diff --git a/src/com/api/salary/web/ProcessController.java b/src/com/api/salary/web/ProcessController.java new file mode 100644 index 000000000..60fcf484f --- /dev/null +++ b/src/com/api/salary/web/ProcessController.java @@ -0,0 +1,8 @@ +package com.api.salary.web; + +import javax.ws.rs.Path; + +@Path("/bs/hrmsalary/process") +public class ProcessController extends com.engine.salary.web.ProcessController{ + +} diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 907d03375..2596c9747 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -95,6 +95,10 @@ public class SIAccountBiz extends Service { return MapperProxyFactory.getProxy(SIAccountUtilMapper.class); } + private InsuranceAccountInspectMapper getInsuranceAccountInspectMapper() { + return MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class); + } + public PageInfo listPage(InsuranceAccountBatchParam queryParam) { SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); List list = getInsuranceAccountBatchMapper().list(queryParam); @@ -732,33 +736,14 @@ public class SIAccountBiz extends Service { } public void batchDelInspectDetail(List list) { - MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).batchDelInspectDetails(list); - //上报删除日志 -// list.forEach(item -> { -// LoggerContext insuranceSchemeContext = new LoggerContext<>(); -// insuranceSchemeContext.setTargetId(String.valueOf(item.getId())); -// insuranceSchemeContext.setTargetName(String.valueOf(item.getEmployeeId())); -// insuranceSchemeContext.setOperateType(OperateTypeEnum.DELETE.getValue()); -// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100445, "删除核算异常记录")); -// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100445, "删除核算异常记录")); -// insuranceSchemeContext.setNewValues(item); -// siAccountLoggerTemplate.write(insuranceSchemeContext); -// }); + List> lists = Lists.partition(list, 100); + lists.forEach(getInsuranceAccountInspectMapper()::batchDelInspectDetails); + } public void batchSaveInspectDetail(List list) { - MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).batchSaveInspectDetails(list); - //上报新增日志 -// list.forEach(item -> { -// LoggerContext insuranceSchemeContext = new LoggerContext<>(); -// insuranceSchemeContext.setTargetId(String.valueOf(item.getId())); -// insuranceSchemeContext.setTargetName(String.valueOf(item.getEmployeeId())); -// insuranceSchemeContext.setOperateType(OperateTypeEnum.ADD.getValue()); -// insuranceSchemeContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(100447, "新建核算异常记录")); -// insuranceSchemeContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(100447, "新建核算异常记录")); -// insuranceSchemeContext.setNewValues(item); -// siAccountLoggerTemplate.write(insuranceSchemeContext); -// }); + List> lists = Lists.partition(list, 100); + lists.forEach(getInsuranceAccountInspectMapper()::batchSaveInspectDetails); } diff --git a/src/com/engine/salary/biz/SISchemeBiz.java b/src/com/engine/salary/biz/SISchemeBiz.java index 7c81d4479..b965b7cb9 100644 --- a/src/com/engine/salary/biz/SISchemeBiz.java +++ b/src/com/engine/salary/biz/SISchemeBiz.java @@ -33,7 +33,6 @@ import java.util.stream.Collectors; /** * @Author weaver_cl - * * @Date 2022/3/7 * @Version V1.0 **/ @@ -42,15 +41,17 @@ public class SISchemeBiz { private SIAccountUtilMapper getSIAccountUtilMapper() { return SqlProxyHandle.getProxy(SIAccountUtilMapper.class); } + /** * 获取社保方案 + * * @param id * @param welfareTypeEnum * @return */ - public InsuranceSchemeFormVO getForm(Long id, WelfareTypeEnum welfareTypeEnum) { - InsuranceSchemeDTO insuranceSchemeDTO = getSchemeFormDTO(welfareTypeEnum,id); - List insuranceSchemeDetailDTOList = getSchemeDetailFormDTO(welfareTypeEnum,id); + public InsuranceSchemeFormVO getForm(Long id, WelfareTypeEnum welfareTypeEnum) { + InsuranceSchemeDTO insuranceSchemeDTO = getSchemeFormDTO(welfareTypeEnum, id); + List insuranceSchemeDetailDTOList = getSchemeDetailFormDTO(welfareTypeEnum, id); return InsuranceSchemeFormVO.builder().schemeBatch(insuranceSchemeDTO).schemeDetailList(insuranceSchemeDetailDTOList).build(); } @@ -68,7 +69,7 @@ public class SISchemeBiz { PaymentScopeEnum[] paymentScopeEnums = SalaryEnumUtil.stringToEnums(item.getPaymentScope(), ","); Arrays.stream(paymentScopeEnums).forEach(e -> { InsuranceSchemeDetailDTO insuranceSchemeDetailDTO = InsuranceSchemeDetailDTO.builder().build(); - InsuranceSchemeDetailPO insuranceSchemeDetailPO = getByPPI(id,e.getValue(),item.getId()); + InsuranceSchemeDetailPO insuranceSchemeDetailPO = getByPPI(id, e.getValue(), item.getId()); if (insuranceSchemeDetailPO == null) { insuranceSchemeDetailDTO = InsuranceSchemeDetailDTO.builder() .id((long) (Math.random() * 10000)) @@ -125,6 +126,7 @@ public class SISchemeBiz { /** * 根据福利类型获取 + * * @param welfareType * @return */ @@ -132,7 +134,7 @@ public class SISchemeBiz { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - List insuranceCategoryPOS = iCategoryMapper.listByWelfareType(welfareType,null); + List insuranceCategoryPOS = iCategoryMapper.listByWelfareType(welfareType, null); return insuranceCategoryPOS; } finally { sqlSession.close(); @@ -150,7 +152,7 @@ public class SISchemeBiz { InsuranceSchemeDetailPO insuranceSchemeDetailPO = insuranceSchemeDetailMapper.getByPPI(primaryId, paymentScope, insuranceId); InsuranceSchemeDetailPOEncrypt.decryptItem(insuranceSchemeDetailPO); return insuranceSchemeDetailPO; - }finally { + } finally { sqlSession.close(); } } @@ -167,7 +169,7 @@ public class SISchemeBiz { InsuranceSchemeDTO insuranceSchemeDTO = InsuranceSchemeDTO.builder().paymentType(PaymentTypeEnum.SCHEME_TOWN).welfareType(welfareTypeEnum).build(); if (id != null) { InsuranceSchemePO insuranceSchemePO = getById(id); - SalaryAssert.notNull(insuranceSchemePO,"福利方案不存在"); + SalaryAssert.notNull(insuranceSchemePO, "福利方案不存在"); //BeanUtils.copyProperties(insuranceSchemePO, insuranceSchemeDTO); insuranceSchemeDTO.setId(insuranceSchemePO.getId()); insuranceSchemeDTO.setPaymentArea(insuranceSchemePO.getPaymentArea()); @@ -175,12 +177,15 @@ public class SISchemeBiz { insuranceSchemeDTO.setSchemeName(insuranceSchemePO.getSchemeName()); insuranceSchemeDTO.setPaymentType(SalaryEnumUtil.enumMatchByValue(insuranceSchemePO.getPaymentType(), PaymentTypeEnum.values(), PaymentTypeEnum.class)); insuranceSchemeDTO.setWelfareType(welfareTypeEnum); + insuranceSchemeDTO.setSharedType(StringUtils.isBlank(insuranceSchemePO.getSharedType()) ? "0" : insuranceSchemePO.getSharedType()); + insuranceSchemeDTO.setTaxAgentIds(insuranceSchemePO.getTaxAgentIds()); } return insuranceSchemeDTO; } /** - *社保方案基础信息主表 + * 社保方案基础信息主表 + * * @param id * @return */ @@ -200,6 +205,7 @@ public class SISchemeBiz { /** * 获取所有方案 + * * @return */ public List listAll() { @@ -215,9 +221,9 @@ public class SISchemeBiz { } - /** * 社保方案基础信息明细表 + * * @param primaryId * @return */ @@ -236,25 +242,35 @@ public class SISchemeBiz { /** * 新增 + * * @param saveParam * @param employeeId */ public void save(InsuranceSchemeReqParam saveParam, long employeeId) { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try{ + try { //保存福利项目主表 InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); List listResult = insuranceSchemeMapper.listByName(saveParam.getInsuranceScheme().getSchemeName()); - SalaryAssert.isEmpty(listResult, "该福利名称已经存在"); + SalaryAssert.isEmpty(listResult, "该福利名称已经存在,福利名称系统全局唯一"); InsuranceSchemePO insuranceSchemePO = InsuranceSchemeBO.convert2BatchPO(saveParam.getInsuranceScheme(), employeeId); + if (insuranceSchemePO.getSharedType() == null) { + insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); + } else { + if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { + throw new SalaryRunTimeException("方案可见性为私有时,未设置可见范围"); + } + } + + insuranceSchemeMapper.insert(insuranceSchemePO); - //日志 + //保存福利项目明细表 InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(saveParam.getInsuranceSchemeDetailList(),employeeId,insuranceSchemePO.getId()); + List insuranceSchemeDetailPOS = InsuranceSchemeBO.convertToInsuranceSchemeDetailPoList(saveParam.getInsuranceSchemeDetailList(), employeeId, insuranceSchemePO.getId()); InsuranceSchemeDetailPOEncrypt.encryptList(insuranceSchemeDetailPOS); insuranceSchemeDetailPOS.forEach(insuranceSchemeDetailMapper::insert); @@ -269,6 +285,7 @@ public class SISchemeBiz { /** * 更新 + * * @param updateParam * @param employeeId */ @@ -286,9 +303,17 @@ public class SISchemeBiz { //福利方案名称重复 List insuranceSchemePOList = insuranceSchemeMapper.listByName(updateParam.getInsuranceScheme().getSchemeName()); - if(CollectionUtils.isNotEmpty(insuranceSchemePOList)) { + if (CollectionUtils.isNotEmpty(insuranceSchemePOList)) { boolean repeat = insuranceSchemePOList.stream().anyMatch(item -> !Objects.equals(item.getId(), updateParam.getInsuranceScheme().getId())); - SalaryAssert.isTrue(!repeat,"福利方案名称重复"); + SalaryAssert.isTrue(!repeat, "福利方案名称重复"); + } + + if (insuranceSchemePO.getSharedType() == null) { + insuranceSchemePO.setSharedType(SharedTypeEnum.PUBLIC.getValue()); + } else { + if (insuranceSchemePO.getSharedType().equals(SharedTypeEnum.PRIVATE.getValue()) && StringUtils.isBlank(insuranceSchemePO.getTaxAgentIds())) { + throw new SalaryRunTimeException("方案可见性为私有时,未设置可见范围"); + } } //更新福利方案主表 @@ -305,7 +330,7 @@ public class SISchemeBiz { //记录操作日志 sqlSession.commit(); - }finally { + } finally { sqlSession.close(); } @@ -313,6 +338,7 @@ public class SISchemeBiz { /** * 复制方案 + * * @param id * @param schemeName * @param employeeId @@ -322,14 +348,14 @@ public class SISchemeBiz { try { InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); List listResult = insuranceSchemeMapper.listByName(schemeName); - SalaryAssert.isEmpty(listResult, "方案名称重复"); + SalaryAssert.isEmpty(listResult, "方案名称重复"); InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); if (Objects.isNull(id)) { throw new SalaryRunTimeException("方案id为空"); } - if(Objects.isNull(schemeName)) { + if (Objects.isNull(schemeName)) { throw new SalaryRunTimeException("复制方案名为空"); } @@ -385,13 +411,14 @@ public class SISchemeBiz { } sqlSession.commit(); - }finally { + } finally { sqlSession.close(); } } /** * 根据险种id和是否缴费查询社保方案明细表 + * * @param insuranceId 险种id * @param isPayment 是否缴费 * @return list @@ -400,11 +427,11 @@ public class SISchemeBiz { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOList = insuranceSchemeDetailMapper.queryListByInsuranceIdIsPayment(insuranceId,isPayment); + List insuranceSchemeDetailPOList = insuranceSchemeDetailMapper.queryListByInsuranceIdIsPayment(insuranceId, isPayment); InsuranceSchemeDetailPOEncrypt.decryptList(insuranceSchemeDetailPOList); return insuranceSchemeDetailPOList; - }finally { - sqlSession.close(); + } finally { + sqlSession.close(); } } @@ -441,34 +468,37 @@ public class SISchemeBiz { item.setLowerLimit(AESEncryptUtil.decrypt(item.getLowerLimit())); return item; } - public int checkBeforeDeleteSocialscheme(Map params){ - return getSIAccountUtilMapper().checkBeforeDeleteSocialscheme((Collection)params.get("ids")).get(0).getNum(); - } - public int checkBeforeDeleteAccumulationfund(Map params){ - return getSIAccountUtilMapper().checkBeforeDeleteAccumulationfund((Collection)params.get("ids")).get(0).getNum(); - } - public int checkBeforeDeleteOtherscheme(Map params){ - return getSIAccountUtilMapper().checkBeforeDeleteOtherscheme((Collection)params.get("ids")).get(0).getNum(); - } - public int checkBeforeDeleteBill(Map params,Integer welfareTypeId){ - return getSIAccountUtilMapper().checkBeforeDeleteBill((Collection)params.get("ids"),welfareTypeId).get(0).getNum(); + + public int checkBeforeDeleteSocialscheme(Map params) { + return getSIAccountUtilMapper().checkBeforeDeleteSocialscheme((Collection) params.get("ids")).get(0).getNum(); } - public void deleteSocialscheme(Map params){ + public int checkBeforeDeleteAccumulationfund(Map params) { + return getSIAccountUtilMapper().checkBeforeDeleteAccumulationfund((Collection) params.get("ids")).get(0).getNum(); + } + + public int checkBeforeDeleteOtherscheme(Map params) { + return getSIAccountUtilMapper().checkBeforeDeleteOtherscheme((Collection) params.get("ids")).get(0).getNum(); + } + + public int checkBeforeDeleteBill(Map params, Integer welfareTypeId) { + return getSIAccountUtilMapper().checkBeforeDeleteBill((Collection) params.get("ids"), welfareTypeId).get(0).getNum(); + } + + public void deleteSocialscheme(Map params) { SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); try { InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - insuranceSchemeMapper.deleteByIds((Collection)params.get("ids")); - insuranceSchemeDetailMapper.deleteByIds((Collection)params.get("ids")); + insuranceSchemeMapper.deleteByIds((Collection) params.get("ids")); + insuranceSchemeDetailMapper.deleteByIds((Collection) params.get("ids")); sqlSession.commit(); - }finally { + } finally { sqlSession.close(); } } - } diff --git a/src/com/engine/salary/biz/SalarySobItemBiz.java b/src/com/engine/salary/biz/SalarySobItemBiz.java index f741947a3..bd7cfde0e 100644 --- a/src/com/engine/salary/biz/SalarySobItemBiz.java +++ b/src/com/engine/salary/biz/SalarySobItemBiz.java @@ -1,5 +1,6 @@ package com.engine.salary.biz; +import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; import com.engine.salary.mapper.salarysob.SalarySobItemMapper; import com.google.common.collect.Lists; @@ -32,6 +33,17 @@ public class SalarySobItemBiz { } } + public List listBySalarySobIdWithHideItem(SalarySobItemPO build) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); + return mapper.listBySalarySobIdWithHideItem(build); + } finally { + sqlSession.close(); + } + } + + public void batchInsert(Collection salarySobItemPOS) { if(CollectionUtils.isEmpty(salarySobItemPOS)){ return; @@ -58,4 +70,39 @@ public class SalarySobItemBiz { sqlSession.close(); } } + + public void deleteItemShowBySalarySobId(Collection salarySobIds) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); + mapper.deleteItemShowBySalarySobId(salarySobIds); + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + public void InsertItemShow(SalarySobItemHidePO salarySobItemHidePO) { + if(salarySobItemHidePO == null){ + return; + } + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); + mapper.insertItemShow(salarySobItemHidePO); + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } + + public List listBySalarySobIdAndGroupId(Long salarySobId, Collection salarySobItemGroupIds) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class); + return mapper.listBySalarySobIdAndGroupId(salarySobId,salarySobItemGroupIds); + } finally { + sqlSession.close(); + } + } } diff --git a/src/com/engine/salary/biz/SalarySobItemGroupBiz.java b/src/com/engine/salary/biz/SalarySobItemGroupBiz.java index 67d2939c9..c54097ae2 100644 --- a/src/com/engine/salary/biz/SalarySobItemGroupBiz.java +++ b/src/com/engine/salary/biz/SalarySobItemGroupBiz.java @@ -62,4 +62,14 @@ public class SalarySobItemGroupBiz { sqlSession.close(); } } + + public List listSomeWithItemHide(SalarySobItemGroupPO build) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SalarySobItemGroupMapper mapper = sqlSession.getMapper(SalarySobItemGroupMapper.class); + return mapper.listSomeWithItemHide(build); + } finally { + sqlSession.close(); + } + } } diff --git a/src/com/engine/salary/biz/SalarySobItemHideBiz.java b/src/com/engine/salary/biz/SalarySobItemHideBiz.java new file mode 100644 index 000000000..ceec5ab42 --- /dev/null +++ b/src/com/engine/salary/biz/SalarySobItemHideBiz.java @@ -0,0 +1,22 @@ +package com.engine.salary.biz; + +import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; +import com.engine.salary.mapper.salarysob.SalarySobItemHideMapper; +import org.apache.ibatis.session.SqlSession; +import weaver.conn.mybatis.MyBatisFactory; + +import java.util.List; + +public class SalarySobItemHideBiz { + + public List listSome(SalarySobItemHidePO salarySobPO) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + SalarySobItemHideMapper mapper = sqlSession.getMapper(SalarySobItemHideMapper.class); + return mapper.getById(salarySobPO); + } finally { + sqlSession.close(); + } + } + +} diff --git a/src/com/engine/salary/entity/process/dto/SalaryAdjustmentDTO.java b/src/com/engine/salary/entity/process/dto/SalaryAdjustmentDTO.java new file mode 100644 index 000000000..d1d1d0544 --- /dev/null +++ b/src/com/engine/salary/entity/process/dto/SalaryAdjustmentDTO.java @@ -0,0 +1,18 @@ +package com.engine.salary.entity.process.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SalaryAdjustmentDTO { + + private String isShow; + + private String url; + +} diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java index bd8203929..5dbadc876 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java @@ -85,12 +85,14 @@ public class SalarySobItemAggregateBO { .salarySobId(e.getSalarySobId()) .name(e.getName()) .sortedIndex(e.getSortedIndex()) + .itemHide(e.getItemHide()) .build()) .collect(Collectors.toList()); Map salarySobItemGroupDTOMap = SalaryEntityUtil.convert2Map(salarySobItemGroupDTOS, SalarySobItemGroupDTO::getId); Map salaryItemMap = SalaryEntityUtil.convert2Map(salaryItems, SalaryItemPO::getId); Map> salarySobItemMap = SalaryEntityUtil.group2Map(salarySobItems, SalarySobItemPO::getSalarySobItemGroupId); Map formulaMap = SalaryEntityUtil.convert2Map(expressFormulas, ExpressFormula::getId, ExpressFormula::getFormula); + // 薪资账套的薪资项目副本po转换成dto salarySobItemMap.forEach((k, v) -> { List items = Lists.newArrayList(); @@ -104,6 +106,7 @@ public class SalarySobItemAggregateBO { .salaryItemId(salaryItemPO.getId()) .dateType(salaryItemPO.getDataType()) .name(salaryItemPO.getName()) + .itemHide(salarySobItemPO.getItemHide()) .formulaId(salarySobItemPO.getFormulaId()) .formulaContent(formulaMap.getOrDefault(salarySobItemPO.getFormulaId(), "")) .taxDeclarationColumn(SalaryItemBO.buildTaxDeclarationColumn(salaryItemPO.getCode())) diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java index 16a7033d5..e23dc6f16 100644 --- a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java +++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemDTO.java @@ -41,6 +41,7 @@ public class SalarySobItemDTO { //名称 private String name; + //是否是薪资档案引用 private Integer useInEmployeeSalary; @@ -88,4 +89,8 @@ public class SalarySobItemDTO { //是否可以删除 private boolean canDelete; + + //该分类是否隐藏(0不隐藏,1隐藏) + @JsonSerialize(using = ToStringSerializer.class) + private Long itemHide; } diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemGroupDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemGroupDTO.java index 8c589c282..ee06db0a6 100644 --- a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemGroupDTO.java +++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemGroupDTO.java @@ -38,6 +38,10 @@ public class SalarySobItemGroupDTO { //薪资项目分组排序字段") private Integer sortedIndex; + //该分类是否隐藏(0不隐藏,1隐藏) + @JsonSerialize(using = ToStringSerializer.class) + private Long itemHide; + //薪资项目分组下的薪资项目") private List items; } diff --git a/src/com/engine/salary/entity/salarysob/param/SalarySobItemSaveParam.java b/src/com/engine/salary/entity/salarysob/param/SalarySobItemSaveParam.java index edb9725da..a1ebb158d 100644 --- a/src/com/engine/salary/entity/salarysob/param/SalarySobItemSaveParam.java +++ b/src/com/engine/salary/entity/salarysob/param/SalarySobItemSaveParam.java @@ -73,6 +73,9 @@ public class SalarySobItemSaveParam { //公式") private Long formulaId; + //该分类是否隐藏(0不隐藏,1隐藏) + private Long itemHide; + private Boolean canDelete; } @@ -94,5 +97,8 @@ public class SalarySobItemSaveParam { //分类下的薪资项目 private List items; + + //该分类是否隐藏(0不隐藏,1隐藏) + private Long itemHide; } } diff --git a/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java b/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java index b81df8fa6..4a6b5502a 100644 --- a/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java +++ b/src/com/engine/salary/entity/salarysob/po/SalarySobItemGroupPO.java @@ -73,5 +73,8 @@ public class SalarySobItemGroupPO { */ private Date updateTime; + //该分类是否隐藏(0不隐藏,1隐藏) + private Long itemHide; + Collection ids; } diff --git a/src/com/engine/salary/entity/salarysob/po/SalarySobItemHidePO.java b/src/com/engine/salary/entity/salarysob/po/SalarySobItemHidePO.java new file mode 100644 index 000000000..8ceb1db26 --- /dev/null +++ b/src/com/engine/salary/entity/salarysob/po/SalarySobItemHidePO.java @@ -0,0 +1,71 @@ +package com.engine.salary.entity.salarysob.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Description hrsa_salary_item_hide 薪资项目是否在薪资核算中展示 + * @author Harryxzy + * @date 2022/8/22 18:00 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SalarySobItemHidePO { + + /** + * ID + */ + private Long id; + + /** + * 账套ID + */ + private Long salarySobId; + + /** + * 薪资项目ID + */ + private Long salaryItemId; + + /** + * 类型(是否是项目组 0-不是 1-是) + */ + private Integer isGroup; + + /** + * 是否隐藏(0-不隐藏 1-隐藏) + */ + private Long itemHide; + + /** + * 创建人 + */ + private Long creator; + + /** + * 是否删除 + */ + private Integer deleteType; + + /** + * 租户 + */ + private String tenantKey; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + +} diff --git a/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java b/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java index f9e287df2..0464d63f8 100644 --- a/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java +++ b/src/com/engine/salary/entity/salarysob/po/SalarySobItemPO.java @@ -88,6 +88,9 @@ public class SalarySobItemPO { */ private Date updateTime; + //该分类是否隐藏(0不隐藏,1隐藏) + private Long itemHide; + //in Collection ids; Collection salarySobIds; diff --git a/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java b/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java index fb2e3afba..1a6cdd3d5 100644 --- a/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java +++ b/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java @@ -38,6 +38,8 @@ public class InsuranceSchemeBO { .schemeName(dto.getSchemeName()) .paymentType(dto.getPaymentType().getValue()) .welfareType(dto.getWelfareType().getValue()) + .sharedType(dto.getSharedType()) + .taxAgentIds(dto.getTaxAgentIds()) .isUse(1) .paymentArea(dto.getPaymentArea()) .remarks(dto.getRemarks()) @@ -82,6 +84,8 @@ public class InsuranceSchemeBO { po.setPaymentType(dto.getPaymentType().getValue()); po.setSchemeName(dto.getSchemeName()); po.setRemarks(dto.getRemarks()); + po.setSharedType(dto.getSharedType()); + po.setTaxAgentIds(dto.getTaxAgentIds()); return po; } } diff --git a/src/com/engine/salary/entity/sischeme/dto/InsuranceSchemeDTO.java b/src/com/engine/salary/entity/sischeme/dto/InsuranceSchemeDTO.java index d71d8ba48..f27776bc1 100644 --- a/src/com/engine/salary/entity/sischeme/dto/InsuranceSchemeDTO.java +++ b/src/com/engine/salary/entity/sischeme/dto/InsuranceSchemeDTO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.sischeme.dto; import com.engine.salary.enums.sicategory.PaymentTypeEnum; +import com.engine.salary.enums.sicategory.SharedTypeEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -39,6 +40,17 @@ public class InsuranceSchemeDTO { */ private String schemeName; + /** + * 共享权限 + * @see SharedTypeEnum + */ + private String sharedType; + + /** + * 个税扣缴义务人 + */ + private String taxAgentIds; + /** * 备注 */ diff --git a/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java b/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java index 8a2042a5b..002ecdac8 100644 --- a/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java +++ b/src/com/engine/salary/entity/sischeme/po/InsuranceSchemePO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.sischeme.po; +import com.engine.salary.enums.sicategory.SharedTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -18,6 +19,7 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor +//hrsa_social_security_scheme public class InsuranceSchemePO { /** @@ -45,6 +47,18 @@ public class InsuranceSchemePO { */ private Integer welfareType; + /** + * 共享权限 + * + * @see SharedTypeEnum + */ + private String sharedType; + + /** + * 个税扣缴义务人 + */ + private String taxAgentIds; + /** * 是否启用 0-停用 1-启用 */ diff --git a/src/com/engine/salary/enums/sicategory/SharedTypeEnum.java b/src/com/engine/salary/enums/sicategory/SharedTypeEnum.java new file mode 100644 index 000000000..7ff3d03cd --- /dev/null +++ b/src/com/engine/salary/enums/sicategory/SharedTypeEnum.java @@ -0,0 +1,37 @@ +package com.engine.salary.enums.sicategory; + +import com.engine.salary.enums.BaseEnum; + + +public enum SharedTypeEnum implements BaseEnum { + PUBLIC("0", "公共", 86568), + PRIVATE("1", "私有", 86569); + + private String value; + + private String defaultLabel; + + private Integer labelId; + + SharedTypeEnum(String value, String defaultLabel, Integer labelId) { + this.value = value; + this.defaultLabel = defaultLabel; + this.labelId = labelId; + } + + + @Override + public String getValue() { + return this.value; + } + + @Override + public Integer getLabelId() { + return this.labelId; + } + + @Override + public String getDefaultLabel() { + return this.defaultLabel; + } +} diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataValueMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataValueMapper.xml index 11f373497..e96e8b59c 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataValueMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataValueMapper.xml @@ -324,7 +324,7 @@ select #{item.employeeId,jdbcType=DOUBLE}, #{item.attendQuoteId,jdbcType=DOUBLE}, - #{item.attendQuoteDataId,jdbcType=DOUBLE},s + #{item.attendQuoteDataId,jdbcType=DOUBLE}, #{item.attendQuoteFieldId,jdbcType=DOUBLE}, #{item.dataValue,jdbcType=VARCHAR}, #{item.createTime,jdbcType=DATE}, diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 43bba1ce7..812e005ad 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -163,7 +163,7 @@ c.id as jobtitleId, e.companystartdate as companystartdate, e.mobile as mobile, - e.enddate as dismissdate + e.enddate as dismissdate from hrmresource e left join hrmdepartment d on e.departmentid = d.id left join hrmjobtitles c on e.jobtitle = c.id @@ -242,8 +242,11 @@ e.subcompanyid1 as subcompanyid, e.costcenterid as costcenterId, e.locationid as locationId, - e.jobtitle as jobtitleId + e.jobtitle as jobtitleId, + d.departmentname as departmentName, + d.id as departmentId from hrmresource e + left join hrmdepartment d on e.departmentid = d.id where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.java b/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.java index f5dfcc103..82324c399 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.java +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.java @@ -21,7 +21,8 @@ public interface SalarySobItemGroupMapper { * @return 返回集合,没有返回空List */ List listSome(SalarySobItemGroupPO salarySobItemGroup); - + + List listSomeWithItemHide(SalarySobItemGroupPO build); /** * 根据主键查询 @@ -85,5 +86,6 @@ public interface SalarySobItemGroupMapper { * @param salarySobItemGroups */ void batchInsert(@Param("collection") Collection salarySobItemGroups); - + + } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.xml index d4540fcd8..bd29320f7 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.xml +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemGroupMapper.xml @@ -12,6 +12,7 @@ + @@ -93,6 +94,35 @@ + + + + INSERT INTO hrsa_salary_sob_item_group diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemHideMapper.java b/src/com/engine/salary/mapper/salarysob/SalarySobItemHideMapper.java new file mode 100644 index 000000000..bd2033fa5 --- /dev/null +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemHideMapper.java @@ -0,0 +1,15 @@ +package com.engine.salary.mapper.salarysob; + +import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; + +import java.util.List; + +public interface SalarySobItemHideMapper { + + /** + * 根据账套id获取关闭显示开关的itemID + * @param salarySobPO + * @return + */ + List getById(SalarySobItemHidePO salarySobPO); +} diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemHideMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobItemHideMapper.xml new file mode 100644 index 000000000..db0e0037a --- /dev/null +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemHideMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java index f6d450cd2..9c96ac650 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.java @@ -1,7 +1,7 @@ package com.engine.salary.mapper.salarysob; +import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO; import com.engine.salary.entity.salarysob.po.SalarySobItemPO; -import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.Collection; @@ -23,7 +23,9 @@ public interface SalarySobItemMapper { * @return 返回集合,没有返回空List */ List listSome(SalarySobItemPO salarySobItemPO); - + + List listBySalarySobIdWithHideItem(SalarySobItemPO salarySobItemPO); + /** * 根据主键查询 @@ -86,5 +88,24 @@ public interface SalarySobItemMapper { * @param salarySobItems */ void batchInsert(@Param("collection") Collection salarySobItems); - + + + /** + * 删除工资项目是否显示 + * + * @param salarySobIds + */ + void deleteItemShowBySalarySobId(@Param("salarySobIds")Collection salarySobIds); + + /** + * 插入薪资项目分组是否显示 + * @param salarySobItemHidePO + */ + void insertItemShow(SalarySobItemHidePO salarySobItemHidePO); + + /** + * 根据账套id以及薪资项目分组获取 + * @param + */ + List listBySalarySobIdAndGroupId(@Param("salarySobId") Long salarySobId,@Param("salarySobItemGroupIds") Collection salarySobItemGroupIds); } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml index d57bc554e..624eb4f93 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml +++ b/src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml @@ -121,6 +121,53 @@ ORDER BY id DESC + + + + + @@ -284,6 +331,16 @@ AND delete_type = 0 + + + DELETE FROM hrsa_salary_item_hide + WHERE delete_type = 0 + AND salary_sob_id IN + + #{salarySobId} + + + UPDATE hrsa_salary_sob_item @@ -369,5 +426,13 @@ + + insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide, + creator,tenant_key,create_time,update_time,delete_type) + VALUES (#{id},#{salarySobId},#{salaryItemId}, + #{isGroup},#{itemHide},#{creator}, + #{tenantKey},#{createTime},#{updateTime},0) + + \ No newline at end of file diff --git a/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml b/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml index 8b7fd6df7..d41ca1336 100644 --- a/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml +++ b/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml @@ -79,39 +79,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + INSERT INTO hrsa_insurance_category + + id, + insurance_name, + welfare_type, + is_use, + payment_scope, + data_type, + create_time, + update_time, + creator, + delete_type, + tenant_key, + + + #{id}, + #{insuranceName}, + #{welfareType}, + #{isUse}, + #{paymentScope}, + #{dataType}, + #{createTime}, + #{updateTime}, + #{creator}, + #{deleteType}, + #{tenantKey}, + +