福利方案bug修复
This commit is contained in:
parent
c4e63e101b
commit
99c9ad807f
|
|
@ -160,7 +160,7 @@ public class SICategoryBiz {
|
|||
}
|
||||
List<InsuranceSchemeDetailPO> 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)) {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class SICategoryGetFormCmd extends AbstractCommonCommand<Map<String, Obje
|
|||
|
||||
SearchConditionItem radio = conditionFactory.createCondition(ConditionType.RADIO,502327,"radio");
|
||||
List<SearchConditionOption> 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<Map<String, Obje
|
|||
radio.setOptions(radioOptions);
|
||||
radio.setLabel("类型");
|
||||
radio.setRules("required");
|
||||
radio.setValue(Objects.isNull(id) ? "SOCIAL_SECURITY" : form.getWelfareType());
|
||||
items.put("welfareType",radio);
|
||||
|
||||
SearchConditionItem checkbox = conditionFactory.createCondition(ConditionType.CHECKBOX,502327,"check");
|
||||
List<SearchConditionOption> 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<Map<String, Obje
|
|||
checkbox.setOptions(checkOptions);
|
||||
checkbox.setLabel("缴纳对象");
|
||||
checkbox.setRules("required");
|
||||
checkbox.setValue(Objects.isNull(id) ? "SCOPE_PERSON" : form.getPaymentScope());
|
||||
items.put("paymentScope",checkbox);
|
||||
|
||||
apidatas.put("item",items);
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ public class ICategoryBO {
|
|||
.paymentScope(SalaryEnumUtil.enumArrToString(dto.getPaymentScope()))
|
||||
.welfareType(dto.getWelfareType().getValue())
|
||||
.insuranceName(dto.getInsuranceName())
|
||||
.isUse(dto.getIsUse())
|
||||
.isUse(0)
|
||||
.dataType(DataTypeEnum.CUSTOM.getValue())
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.creator(employeeId)
|
||||
.dataType(0)
|
||||
.deleteType(0)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import lombok.NoArgsConstructor;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "ee8c0e7f-4096-4150-9491-823e24d37765",
|
||||
fields = "id, insurance_name, is_use, welfareType, paymentScopt",
|
||||
fields = "id, insurance_name, is_use, welfare_type, payment_scope",
|
||||
fromSql = "FROM hrsa_insurance_category",
|
||||
orderby = "id desc",
|
||||
primarykey = "id",
|
||||
|
|
@ -42,9 +42,8 @@ public class ICategoryListDTO {
|
|||
private String welfareType;
|
||||
|
||||
|
||||
@SalaryTableColumn(column = "payment_scope", width = "30%", text = "缴纳对象")
|
||||
|
||||
private String paymentScopt;
|
||||
@SalaryTableColumn(column = "payment_scope", width = "30%", text = "缴纳对象",transmethod = "com.engine.salary.transmethod.ICategoryTransMethod.getPaymentcopeTypeName")
|
||||
private String paymentScope;
|
||||
|
||||
@SalaryTableColumn(column = "operate", width = "10%", text = "操作")
|
||||
private String operate;
|
||||
|
|
|
|||
|
|
@ -111,11 +111,11 @@
|
|||
</update>
|
||||
|
||||
<!-- 根据险种id和是否缴费查询社保方案明细表 -->
|
||||
<select id="queryListByInsuranceIdIsPayment" resultMap="BaseResultMap" parameterType="Long">
|
||||
<select id="queryListByInsuranceIdIsPayment" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
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
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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<String, Object> listPage(Map<String, Object> params) {
|
||||
return null;
|
||||
return commandExecutor.execute(new SICategoryListCmd(params,user));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<String, Object> 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue