parent
f74f70250d
commit
259c40758f
|
|
@ -1,2 +1 @@
|
|||
update hrsa_formula set formula = 'if({薪资项目.当前累计应纳税所得额}<=36000){{薪资项目.当前累计应纳税所得额}<=36000){0;}else if({薪资项目.当前累计应纳税所得额}<=144000){2520;}else if({薪资项目.当前累计应纳税所得额}<=300000){16920;}else if({薪资项目.当前累计应纳税所得额}<=420000){31920;}else if({薪资项目.当前累计应纳税所得额}<=660000){52920;}else if({薪资项目.当前累计应纳税所得额}<=960000){85920;}else{181920;}', formulaRunScript = 'if(salaryItem_addUpTaxableIncome<=36000){0;}else if(salaryItem_addUpTaxableIncome<=144000){2520;}else if(salaryItem_addUpTaxableIncome<=300000){16920;}else if(salaryItem_addUpTaxableIncome<=420000){31920;}else if(salaryItem_addUpTaxableIncome<=660000){52920;}else if(salaryItem_addUpTaxableIncome<=960000){85920;}else{181920;}' where id = 1651742702735
|
||||
GO
|
||||
update hrsa_formula set formula = 'if({薪资项目.当前累计应纳税所得额}<=36000){0;}else if({薪资项目.当前累计应纳税所得额}<=144000){2520;}else if({薪资项目.当前累计应纳税所得额}<=300000){16920;}else if({薪资项目.当前累计应纳税所得额}<=420000){31920;}else if({薪资项目.当前累计应纳税所得额}<=660000){52920;}else if({薪资项目.当前累计应纳税所得额}<=960000){85920;}else{181920;}' where id = 1651742702735
|
||||
|
|
@ -537,7 +537,6 @@ public class SIAccountBiz extends Service {
|
|||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
;
|
||||
fundPerJsonMap.put(String.valueOf(e), result.toPlainString());
|
||||
fundPer.add(result);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -927,7 +927,7 @@ public class SIArchivesBiz {
|
|||
map.put("siSchemeId", item.getSiSchemeId());
|
||||
map.put("fundSchemeId", item.getFundSchemeId());
|
||||
map.put("otherSchemeId", item.getOtherSchemeId());
|
||||
map.put("status", item.getUserStatus() != null ? UserStatusEnum.values()[item.getUserStatus()].getDescription() : "");
|
||||
map.put("status", item.getUserStatus() != null ? UserStatusEnum.values()[item.getUserStatus()].getDefaultLabel() : "");
|
||||
if (socialItem != null) {
|
||||
map.put("socialName", insuranceSchemeMapper.querySchemeName(socialItem.getSocialSchemeId()));
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -993,7 +993,7 @@ public class SIArchivesBiz {
|
|||
*/
|
||||
public Map<String, Object> getSearchCondition(User user) {
|
||||
|
||||
List<SearchConditionOption> userStatusOptions = Arrays.stream(UserStatusEnum.values()).map(e -> new SearchConditionOption(String.valueOf(e.getValue()), e.getDescription())).collect(Collectors.toList());
|
||||
List<SearchConditionOption> userStatusOptions = Arrays.stream(UserStatusEnum.values()).map(e -> new SearchConditionOption(String.valueOf(e.getValue()), e.getDefaultLabel())).collect(Collectors.toList());
|
||||
List<InsuranceSchemePO> list = new SISchemeBiz().listAll();
|
||||
|
||||
List<SearchConditionOption> schemeOption = list.stream().filter(item -> Objects.equals(item.getWelfareType(), WelfareTypeEnum.SOCIAL_SECURITY.getValue()))
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
package com.engine.salary.entity.salaryitem.bo;
|
||||
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.salaryformula.ExpressFormula;
|
||||
import com.engine.salary.entity.salaryitem.dto.SalaryItemFormDTO;
|
||||
import com.engine.salary.entity.salaryitem.dto.SalaryItemListDTO;
|
||||
import com.engine.salary.entity.salaryitem.param.SalaryItemSaveParam;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationWageListDTO;
|
||||
import com.engine.salary.enums.SalaryRoundingModeEnum;
|
||||
import com.engine.salary.enums.SalarySystemTypeEnum;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
|
|
@ -18,6 +22,7 @@ import org.apache.commons.lang3.math.NumberUtils;
|
|||
import weaver.conn.util.IdGenerator;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -75,11 +80,12 @@ public class SalaryItemBO {
|
|||
* @param expressFormulas 公式详情
|
||||
* @return
|
||||
*/
|
||||
public static List<SalaryItemListDTO> convert2ListDTO(Collection<SalaryItemPO> salaryItems, List<ExpressFormula> expressFormulas) {
|
||||
public static List<SalaryItemListDTO> convert2ListDTO(Collection<SalaryItemPO> salaryItems, List<ExpressFormula> expressFormulas,List<SysSalaryItemPO> sysSalaryItemPOS) {
|
||||
if (CollectionUtils.isEmpty(salaryItems)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Map<Long, String> formulaMap = SalaryEntityUtil.convert2Map(expressFormulas, ExpressFormula::getId, ExpressFormula::getFormula);
|
||||
Map<Long, String> sysSalaryItemNameMap = SalaryEntityUtil.convert2Map(sysSalaryItemPOS, SysSalaryItemPO::getId, SysSalaryItemPO::getName);
|
||||
return salaryItems.stream().map(salaryItemPO -> {
|
||||
SalaryRoundingModeEnum salaryRoundingModeEnum = SalaryRoundingModeEnum.parseByValue(salaryItemPO.getRoundingMode());
|
||||
SalaryValueTypeEnum salaryValueTypeEnum = SalaryValueTypeEnum.parseByValue(salaryItemPO.getValueType());
|
||||
|
|
@ -87,6 +93,7 @@ public class SalaryItemBO {
|
|||
return SalaryItemListDTO.builder()
|
||||
.id(salaryItemPO.getId())
|
||||
.name(salaryItemPO.getName())
|
||||
.systemName(sysSalaryItemNameMap.getOrDefault(salaryItemPO.getSysSalaryItemId(), StringUtils.EMPTY))
|
||||
.useInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary())
|
||||
.useDefault(salaryItemPO.getUseDefault())
|
||||
.roundingMode(Optional.ofNullable(salaryRoundingModeEnum)
|
||||
|
|
@ -140,26 +147,27 @@ public class SalaryItemBO {
|
|||
* @return
|
||||
*/
|
||||
public static String buildTaxDeclarationColumn(String code) {
|
||||
// // 是否是个税申报表(正常工资薪金所得)中的字段
|
||||
// for (Field declaredField : TaxDeclarationWageListDTO.class.getDeclaredFields()) {
|
||||
// if (!declaredField.isAnnotationPresent(SalaryTableColumn.class)) {
|
||||
// continue;
|
||||
// }
|
||||
// if (Objects.equals(code, declaredField.getName())) {
|
||||
// SalaryTableColumn annotation = declaredField.getAnnotation(SalaryTableColumn.class);
|
||||
// return SalaryI18nUtil.getI18nLabel((int) annotation.labelId(), annotation.label());
|
||||
// }
|
||||
// }
|
||||
// // 是否是个税申报表(劳务报酬所得)中的字段
|
||||
// for (Field declaredField : TaxDeclarationLaborListDTO.class.getDeclaredFields()) {
|
||||
// if (!declaredField.isAnnotationPresent(SalaryTableColumn.class)) {
|
||||
// continue;
|
||||
// }
|
||||
// if (Objects.equals(code, declaredField.getName())) {
|
||||
// SalaryTableColumn annotation = declaredField.getAnnotation(SalaryTableColumn.class);
|
||||
// return SalaryI18nUtil.getI18nLabel((int) annotation.labelId(), annotation.label());
|
||||
// }
|
||||
// }
|
||||
// 是否是个税申报表(正常工资薪金所得)中的字段
|
||||
for (Field declaredField : TaxDeclarationWageListDTO.class.getDeclaredFields()) {
|
||||
if (!declaredField.isAnnotationPresent(SalaryTableColumn.class)) {
|
||||
continue;
|
||||
}
|
||||
if (Objects.equals(code, declaredField.getName())) {
|
||||
SalaryTableColumn annotation = declaredField.getAnnotation(SalaryTableColumn.class);
|
||||
return SalaryI18nUtil.getI18nLabel((int) annotation.labelId(), annotation.text());
|
||||
}
|
||||
}
|
||||
// 是否是个税申报表(劳务报酬所得)中的字段
|
||||
for (Field declaredField : TaxDeclarationLaborListDTO.class.getDeclaredFields()) {
|
||||
if (!declaredField.isAnnotationPresent(SalaryTableColumn.class)) {
|
||||
continue;
|
||||
}
|
||||
// 时间紧迫,临时处理
|
||||
if (Objects.equals(code, declaredField.getName()) || Objects.equals(code, declaredField.getName() + "4")) {
|
||||
SalaryTableColumn annotation = declaredField.getAnnotation(SalaryTableColumn.class);
|
||||
return SalaryI18nUtil.getI18nLabel((int) annotation.labelId(), annotation.text());
|
||||
}
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ public class SalaryItemListDTO {
|
|||
@TableTitle(title = "名称",dataIndex = "name",key = "name")
|
||||
private String name;
|
||||
|
||||
@SalaryTableColumn(text = "系统名", width = "10%", column = "systemName")
|
||||
@TableTitle(title = "系统名",dataIndex = "systemName",key = "systemName")
|
||||
private String systemName;
|
||||
|
||||
//薪资档案引用
|
||||
@SalaryTableColumn(text = "薪资档案引用", width = "10%", column = "useInEmployeeSalary")
|
||||
@TableTitle(title = "薪资档案引用",dataIndex = "useInEmployeeSalary",key = "useInEmployeeSalary")
|
||||
|
|
@ -74,8 +78,8 @@ public class SalaryItemListDTO {
|
|||
//公式内容
|
||||
private String formulaContent;
|
||||
|
||||
// @SalaryTableColumn(text = "个税申报表对应字段", width = "10%", column = "taxDeclarationColumn")
|
||||
// @TableTitle(title = "个税申报表对应字段",dataIndex = "taxDeclarationColumn",key = "taxDeclarationColumn")
|
||||
@SalaryTableColumn(text = "个税申报表对应字段", width = "10%", column = "taxDeclarationColumn")
|
||||
@TableTitle(title = "个税申报表对应字段",dataIndex = "taxDeclarationColumn",key = "taxDeclarationColumn")
|
||||
private String taxDeclarationColumn;
|
||||
|
||||
//备注
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
package com.engine.salary.enums;
|
||||
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @Description: 薪资-员工状态
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021/11/1 16:06
|
||||
*/
|
||||
public enum SalaryUserStatusEnum {
|
||||
|
||||
normal("normal", "在职", 100120),
|
||||
unavailable("unavailable", "离职", 85902),
|
||||
locked("locked", "锁定", 102825),
|
||||
unactive("unactive", "未激活", 102826),
|
||||
detached("detached", "无公司", 102827),
|
||||
temp("temp", "临时账号", 102828),
|
||||
invited("invited", "已邀请", 102829);
|
||||
|
||||
private String value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
private int labelId;
|
||||
|
||||
SalaryUserStatusEnum(String value, String defaultLabel, int labelId) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
|
||||
public int getLabelId() {
|
||||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(String value) {
|
||||
Optional<SalaryUserStatusEnum> optional = Arrays.stream(SalaryUserStatusEnum.values()).filter(r -> r.getValue().equals(value)).findFirst();
|
||||
return optional.isPresent() ? SalaryI18nUtil.getI18nLabel(optional.get().getLabelId(), optional.get().getDefaultLabel()) : "";
|
||||
}
|
||||
}
|
||||
|
|
@ -6,50 +6,53 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
*
|
||||
* @Date 2022/3/17
|
||||
* @Version V1.0
|
||||
* The trial
|
||||
* A formal
|
||||
* temporary
|
||||
* Try to postpone the
|
||||
* fire
|
||||
* departure
|
||||
* retired
|
||||
* invalid
|
||||
* 人员状态
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public enum UserStatusEnum {
|
||||
public enum UserStatusEnum implements BaseEnum {
|
||||
|
||||
TRIAL(0, "试用"),
|
||||
FORMAL(1, "正式"),
|
||||
TEMPORARY(2, "临时"),
|
||||
DELAY(3, "试用延期"),
|
||||
FIRE(4, "解雇"),
|
||||
DEPARTURE(5, "离职"),
|
||||
RETIRED(6, "退休"),
|
||||
INVALID(7, "无效");
|
||||
TRIAL(0, "试用", 1),
|
||||
FORMAL(1, "正式", 1),
|
||||
TEMPORARY(2, "临时", 1),
|
||||
DELAY(3, "试用延期", 1),
|
||||
FIRE(4, "解雇", 1),
|
||||
DEPARTURE(5, "离职", 1),
|
||||
RETIRED(6, "退休", 1),
|
||||
INVALID(7, "无效", 1);
|
||||
|
||||
private Integer value;
|
||||
private String description;
|
||||
private String defaultLabel;
|
||||
private int labelId;
|
||||
|
||||
|
||||
UserStatusEnum(Integer value, String description) {
|
||||
UserStatusEnum(Integer value, String defaultLabel, int labelId) {
|
||||
this.value = value;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
this.defaultLabel = defaultLabel;
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getLabelId() {
|
||||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
Optional<UserStatusEnum> optional = Arrays.stream(UserStatusEnum.values()).filter(r -> r.getValue().equals(value)).findFirst();
|
||||
return optional.isPresent() ? optional.get().description : "";
|
||||
return optional.isPresent() ? optional.get().defaultLabel : "";
|
||||
}
|
||||
|
||||
public static List<Map<String, String>> getList() {
|
||||
|
|
@ -58,7 +61,7 @@ public enum UserStatusEnum {
|
|||
.map(v -> {
|
||||
Map<String, String> m = new HashMap();
|
||||
m.put("id", v.value.toString());
|
||||
m.put("content", v.description);
|
||||
m.put("content", v.defaultLabel);
|
||||
return m;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
|
@ -88,7 +91,7 @@ public enum UserStatusEnum {
|
|||
public static List<HrmStatus> getHrmStatusList() {
|
||||
return Arrays.stream(UserStatusEnum.values())
|
||||
.filter(v -> v != INVALID)
|
||||
.map(v -> HrmStatus.builder().id(v.value.toString()).name(v.description).build()).collect(Collectors.toList());
|
||||
.map(v -> HrmStatus.builder().id(v.value.toString()).name(v.defaultLabel).build()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("department", simpleEmployee.getDepartmentName());
|
||||
record.put("supplementaryMonth", item.getSupplementaryMonth());
|
||||
record.put("mobile", simpleEmployee.getMobile());
|
||||
record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.values()[Integer.parseInt(simpleEmployee.getStatus())].getDescription() : "");
|
||||
record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.values()[Integer.parseInt(simpleEmployee.getStatus())].getDefaultLabel() : "");
|
||||
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
|
||||
record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
|
||||
|
|
|
|||
|
|
@ -463,12 +463,12 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
List<List<Permission>> permissions = new ArrayList<>();
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
List<Permission> permission = new ArrayList<>();
|
||||
if (UserStatusEnum.DEPARTURE.getDescription().equals(records.get(i).get("status"))) {
|
||||
if (UserStatusEnum.DEPARTURE.getDefaultLabel().equals(records.get(i).get("status"))) {
|
||||
permission.add(new Permission(true, false));
|
||||
permission.add(new Permission(false, false));
|
||||
permissions.add(permission);
|
||||
}
|
||||
if (UserStatusEnum.DEPARTURE.getDescription().equals(records.get(i).get("status"))) {
|
||||
if (UserStatusEnum.DEPARTURE.getDefaultLabel().equals(records.get(i).get("status"))) {
|
||||
permission.add(new Permission(false, false));
|
||||
permission.add(new Permission(true, false));
|
||||
permissions.add(permission);
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
map.put(SalaryI18nUtil.getI18nLabel( 85429, "姓名"), item.getUserName());
|
||||
map.put(SalaryI18nUtil.getI18nLabel( 86185, "部门"), item.getDepartmentName());
|
||||
map.put(SalaryI18nUtil.getI18nLabel( 86186, "手机号"), item.getTelephone());
|
||||
map.put(SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), item.getUserStatusEnum() == null ? "" : item.getUserStatusEnum().getDescription());
|
||||
map.put(SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), item.getUserStatusEnum() == null ? "" : item.getUserStatusEnum().getDefaultLabel());
|
||||
if (socialItem != null) {
|
||||
map.put(SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"), schemeMap.get(socialItem.getSocialSchemeId()));
|
||||
map.put(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"), paymentMap.get(socialItem.getPaymentOrganization()));
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
UserStatusEnum[] values = UserStatusEnum.values();
|
||||
for (UserStatusEnum value : values) {
|
||||
if (value.getValue().equals(Integer.valueOf(userState))) {
|
||||
return value.getDescription() + "";
|
||||
return value.getDefaultLabel() + "";
|
||||
}
|
||||
}
|
||||
return userState;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,14 @@ import java.util.function.Consumer;
|
|||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 请求执行器
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Slf4j
|
||||
public class ResponseResult<T, R> {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 枚举国家局
|
||||
* 枚举工具类
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class SalaryItemController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listSalaryItem(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryItemSearchParam searchParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryItemSearchParam, PageInfo<SalaryItemListDTO>>(user).run(getSalaryItemWrapper(user)::listPageV2, searchParam);
|
||||
return new ResponseResult<SalaryItemSearchParam, PageInfo<SalaryItemListDTO>>(user).run(getSalaryItemWrapper(user)::listPage, searchParam);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class SalaryItemWrapper extends Service {
|
|||
* @param searchParam 查询参数
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<SalaryItemListDTO> listPageV2(SalaryItemSearchParam searchParam) {
|
||||
public PageInfo<SalaryItemListDTO> listPage(SalaryItemSearchParam searchParam) {
|
||||
|
||||
// 1、查询薪资项目
|
||||
PageInfo<SalaryItemPO> page = getSalaryItemService(user).listPageByParam(searchParam);
|
||||
|
|
@ -89,8 +89,11 @@ public class SalaryItemWrapper extends Service {
|
|||
//2、填充公式内容
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getFormulaId);
|
||||
List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
// 查询系统薪资项目
|
||||
Set<Long> sysSalaryItemIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getSysSalaryItemId);
|
||||
List<SysSalaryItemPO> sysSalaryItemPOS = getSysSalaryItemService(user).listByIds(sysSalaryItemIds);
|
||||
// 转换成薪资项目列表dto
|
||||
List<SalaryItemListDTO> salaryItemListDTOS = SalaryItemBO.convert2ListDTO(salaryItemList, expressFormulas);
|
||||
List<SalaryItemListDTO> salaryItemListDTOS = SalaryItemBO.convert2ListDTO(salaryItemList, expressFormulas, sysSalaryItemPOS);
|
||||
//3、被引用的薪资项目不能删除
|
||||
Set<Long> salaryItemIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getId);
|
||||
salarySobItems = getSalarySobItemService(user).listBySalaryItemIds(salaryItemIds);
|
||||
|
|
@ -124,7 +127,7 @@ public class SalaryItemWrapper extends Service {
|
|||
// 排除被引用的薪资项目(被引用的薪资项目不可以删除)
|
||||
searchParam.setExcludeIds(salaryItemIds);
|
||||
// 转换成前端所需的数据格式
|
||||
return listPageV2(searchParam);
|
||||
return listPage(searchParam);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -142,8 +145,11 @@ public class SalaryItemWrapper extends Service {
|
|||
// 查询公式详情
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId);
|
||||
List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
// 查询系统薪资项目
|
||||
Set<Long> sysSalaryItemIds = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getSysSalaryItemId);
|
||||
List<SysSalaryItemPO> sysSalaryItemPOS = getSysSalaryItemService(user).listByIds(sysSalaryItemIds);
|
||||
// 转换成薪资项目列表dto
|
||||
return SalaryItemBO.convert2ListDTO(salaryItemPOS, expressFormulas);
|
||||
return SalaryItemBO.convert2ListDTO(salaryItemPOS, expressFormulas, sysSalaryItemPOS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,17 +9,12 @@ import com.engine.salary.entity.salaryitem.bo.SalaryItemBO;
|
|||
import com.engine.salary.entity.salaryitem.dto.SalaryItemListDTO;
|
||||
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobItemAggregateDTO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobItemSaveParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO;
|
||||
import com.engine.salary.service.SalaryFormulaService;
|
||||
import com.engine.salary.service.SalaryItemService;
|
||||
import com.engine.salary.service.SalarySobItemGroupService;
|
||||
import com.engine.salary.service.SalarySobItemService;
|
||||
import com.engine.salary.service.impl.SalaryFormulaServiceImpl;
|
||||
import com.engine.salary.service.impl.SalaryItemServiceImpl;
|
||||
import com.engine.salary.service.impl.SalarySobItemGroupServiceImpl;
|
||||
import com.engine.salary.service.impl.SalarySobItemServiceImpl;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.impl.*;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -41,20 +36,24 @@ import java.util.*;
|
|||
public class SalarySobItemWrapper extends Service {
|
||||
|
||||
private SalarySobItemService getSalarySobItemService(User user) {
|
||||
return (SalarySobItemService) ServiceUtil.getService(SalarySobItemServiceImpl.class, user);
|
||||
return ServiceUtil.getService(SalarySobItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySobItemGroupService getSalarySobItemGroupService(User user) {
|
||||
return (SalarySobItemGroupService) ServiceUtil.getService(SalarySobItemGroupServiceImpl.class, user);
|
||||
return ServiceUtil.getService(SalarySobItemGroupServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryItemService getSalaryItemService(User user) {
|
||||
return (SalaryItemService) ServiceUtil.getService(SalaryItemServiceImpl.class, user);
|
||||
return ServiceUtil.getService(SalaryItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalaryFormulaService getSalaryFormulaService(User user) {
|
||||
return (SalaryFormulaService) ServiceUtil.getService(SalaryFormulaServiceImpl.class, user);
|
||||
return ServiceUtil.getService(SalaryFormulaServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SysSalaryItemService getSysSalaryItemService(User user) {
|
||||
return ServiceUtil.getService(SysSalaryItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -78,8 +77,11 @@ public class SalarySobItemWrapper extends Service {
|
|||
// 查询公式
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getFormulaId);
|
||||
List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
// 查询系统薪资项目
|
||||
Set<Long> sysSalaryItemIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getSysSalaryItemId);
|
||||
List<SysSalaryItemPO> sysSalaryItemPOS = getSysSalaryItemService(user).listByIds(sysSalaryItemIds);
|
||||
// 转换成薪资项目列表dto
|
||||
dtoPage.setList(SalaryItemBO.convert2ListDTO(salaryItemList, expressFormulas));
|
||||
dtoPage.setList(SalaryItemBO.convert2ListDTO(salaryItemList, expressFormulas, sysSalaryItemPOS));
|
||||
}
|
||||
return dtoPage;
|
||||
|
||||
|
|
@ -117,6 +119,7 @@ public class SalarySobItemWrapper extends Service {
|
|||
|
||||
/**
|
||||
* 基础信息浏览按钮(下拉框)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Collection<Map<String, String>> empFieldList() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue