diff --git a/src/com/engine/salary/biz/SICategoryBiz.java b/src/com/engine/salary/biz/SICategoryBiz.java index c88b067f4..32a89eaed 100644 --- a/src/com/engine/salary/biz/SICategoryBiz.java +++ b/src/com/engine/salary/biz/SICategoryBiz.java @@ -160,7 +160,7 @@ public class SICategoryBiz { } List insuranceSchemeDetailPOS = new SISchemeBiz().queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue()); if(CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) { - throw new SalaryRunTimeException("该福利开启缴费,不可删除(或停用"); + throw new SalaryRunTimeException("该福利开启缴费,不可删除(或停用)"); } ICategoryPO iCategoryPO = getByID(id); if (Objects.isNull(iCategoryPO)) { diff --git a/src/com/engine/salary/cmd/sicategory/SICategoryGetFormCmd.java b/src/com/engine/salary/cmd/sicategory/SICategoryGetFormCmd.java index 19509d28b..67b1b0ccf 100644 --- a/src/com/engine/salary/cmd/sicategory/SICategoryGetFormCmd.java +++ b/src/com/engine/salary/cmd/sicategory/SICategoryGetFormCmd.java @@ -53,7 +53,7 @@ public class SICategoryGetFormCmd extends AbstractCommonCommand radioOptions = new ArrayList <>(); - radioOptions.add(new SearchConditionOption("SOCIAL_SECURITY","社保")); + radioOptions.add(new SearchConditionOption("SOCIAL_SECURITY","社保",true)); radioOptions.add(new SearchConditionOption("ACCUMULATION_FUND","公积金")); radioOptions.add(new SearchConditionOption("OTHER","企业年金及其他福利")); radio.setColSpan(2); @@ -64,13 +64,12 @@ public class SICategoryGetFormCmd extends AbstractCommonCommand checkOptions = new ArrayList <>(); checkOptions.add(new SearchConditionOption("SCOPE_COMPANY","公司")); - checkOptions.add(new SearchConditionOption("SCOPE_PERSON","个人")); + checkOptions.add(new SearchConditionOption("SCOPE_PERSON","个人",true)); checkbox.setColSpan(2); checkbox.setFieldcol(12); checkbox.setLabelcol(6); @@ -79,7 +78,6 @@ public class SICategoryGetFormCmd extends AbstractCommonCommand - SELECT FROM hrsa_scheme_detail t - WHERE t.insuranceId = #{insuranceId} AND t.is_payment = #{isPayment} AND delete_type = 0 + WHERE t.insurance_id = #{insuranceId} AND t.is_payment = #{isPayment} AND delete_type = 0 diff --git a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java index 4bee3f99e..456f5df98 100644 --- a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java @@ -1,10 +1,7 @@ package com.engine.salary.service.impl; import com.engine.core.impl.Service; -import com.engine.salary.cmd.sicategory.SICategoryGetFormCmd; -import com.engine.salary.cmd.sicategory.SICategoryInsertCmd; -import com.engine.salary.cmd.sicategory.SICategoryUpdateCmd; -import com.engine.salary.cmd.sicategory.SICategoryUpdateStatusByIdCmd; +import com.engine.salary.cmd.sicategory.*; import com.engine.salary.service.SICategoryService; import java.util.Map; @@ -39,6 +36,6 @@ public class SICategoryServiceImpl extends Service implements SICategoryService @Override public Map listPage(Map params) { - return null; + return commandExecutor.execute(new SICategoryListCmd(params,user)); } } diff --git a/src/com/engine/salary/transmethod/ICategoryTransMethod.java b/src/com/engine/salary/transmethod/ICategoryTransMethod.java index c58d69523..08ce18f75 100644 --- a/src/com/engine/salary/transmethod/ICategoryTransMethod.java +++ b/src/com/engine/salary/transmethod/ICategoryTransMethod.java @@ -12,10 +12,26 @@ public class ICategoryTransMethod { switch (type) { case "1": return "社保"; - case "0": + case "2": return "公积金"; - default: + case "3": return "企业年金及其它福利"; + default: + return ""; + } + } + + + public static String getPaymentcopeTypeName(String type) { + switch (type) { + case "1": + return "公司"; + case "2": + return "个人"; + case "1,2": + return "公司,个人"; + default: + return ""; } } } diff --git a/src/com/engine/salary/web/SICategoryController.java b/src/com/engine/salary/web/SICategoryController.java index 7f4455611..631eb1283 100644 --- a/src/com/engine/salary/web/SICategoryController.java +++ b/src/com/engine/salary/web/SICategoryController.java @@ -10,6 +10,7 @@ import com.engine.salary.service.SICategoryService; import com.engine.salary.service.impl.SICategoryServiceImpl; import com.engine.salary.util.ResponseResult; import io.swagger.v3.oas.annotations.parameters.RequestBody; +import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.RequestParam; import weaver.hrm.HrmUserVarify; import weaver.hrm.User; @@ -19,8 +20,8 @@ import javax.servlet.http.HttpServletResponse; import javax.ws.rs.*; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; -import java.util.Collection; import java.util.Map; +import java.util.Objects; /** * @Author weaver_cl @@ -59,12 +60,14 @@ public class SICategoryController { @Path("/customCategoryList") @Produces(MediaType.APPLICATION_JSON) public String listPage(@Context HttpServletRequest request, @Context HttpServletResponse response, - @RequestParam(value = "welfareTypeEnum") WelfareTypeEnum welfareTypeEnum) { + @DefaultValue("") @QueryParam(value = "welfareTypeEnum") WelfareTypeEnum welfareTypeEnum) { User user = HrmUserVarify.getUser(request, response); - InsuranceSchemeDTO insuranceSchemeDTO = InsuranceSchemeDTO.builder().welfareType(welfareTypeEnum).build(); - Integer welfareType = insuranceSchemeDTO.getWelfareType().getValue(); Map map = ParamUtil.request2Map(request); - map.put("welfareType",welfareType); + if (Objects.nonNull(welfareTypeEnum)){ + InsuranceSchemeDTO insuranceSchemeDTO = InsuranceSchemeDTO.builder().welfareType(welfareTypeEnum).build(); + Integer welfareType = insuranceSchemeDTO.getWelfareType().getValue(); + map.put("welfareType",welfareType); + } return ResponseResult.run(getService(user)::listPage, map); }