Merge branch 'feature/240201_社保福利台账导入字段缓存' into release/2.11.1.2402.01
# Conflicts: # src/com/engine/salary/service/impl/SIAccountServiceImpl.java
This commit is contained in:
commit
20d7266db9
|
|
@ -20,6 +20,16 @@ public class SalaryItemConstant {
|
|||
*/
|
||||
public static final String RESULT_IMPORT_FIELD_SIGN="_salaryAcctResultImportFieldSign";
|
||||
|
||||
/**
|
||||
* 社保福利台账导入缓存表头字段key(正常缴纳、补缴)
|
||||
*/
|
||||
public static final String SI_ACCOUNT_IMPORT_FIELD_SIGN="_SIAccountImportFieldSign";
|
||||
|
||||
/**
|
||||
* 社保福利台账导入缓存表头字段key(补差)
|
||||
*/
|
||||
public static final String SI_ACCOUNT_BALANCE_IMPORT_FIELD_SIGN="_SIAccountBalanceImportFieldSign";
|
||||
|
||||
/**
|
||||
* 薪资核算导出缓存表头字段key
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,4 +20,8 @@ public class InsuranceAcctDetailImportFieldDTO {
|
|||
|
||||
//薪资项目名称
|
||||
private String salaryItemName;
|
||||
|
||||
//是否勾选
|
||||
private Boolean checked;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,5 +316,9 @@ public interface SIAccountService {
|
|||
boolean checkBalancePayInsurance(InsuranceAccountDetailPO po);
|
||||
|
||||
List<InsuranceAccountViewListDTO> buildRecords(List<InsuranceAccountDetailPO> list, Map<Long, TaxAgentPO> paymentMap);
|
||||
|
||||
void cacheWelfareField(List<String> welfareNames);
|
||||
|
||||
void cacheBalanceWelfareField(List<String> welfareNames);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.api.browser.bean.SearchConditionGroup;
|
|||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.dev.api.util.Util_DataCache;
|
||||
import com.cloudstore.eccom.pc.table.*;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -16,6 +17,7 @@ import com.engine.salary.component.SalaryWeaTable;
|
|||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.elog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.progress.ProgressDTO;
|
||||
|
|
@ -6288,6 +6290,18 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return viewDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cacheWelfareField(List<String> welfareNames) {
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.SI_ACCOUNT_IMPORT_FIELD_SIGN;
|
||||
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cacheBalanceWelfareField(List<String> welfareNames) {
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.SI_ACCOUNT_BALANCE_IMPORT_FIELD_SIGN;
|
||||
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
||||
}
|
||||
|
||||
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
||||
int otherNum = 0;
|
||||
BigDecimal otherPaySum = new BigDecimal("0");
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import java.util.*;
|
|||
* @date 2023/08/14 9:30
|
||||
* @description 自动同步离职人员社保福利档案内容
|
||||
*/
|
||||
public class AutoSyncResignationEmpArchiveJob extends BaseCronJob {
|
||||
public class AutoSyncResignationEmpArchiveJob extends BaseCronJob {
|
||||
|
||||
private SalaryArchiveService getSalaryArchiveService(User user) {
|
||||
return ServiceUtil.getService(SalaryArchiveServiceImpl.class,user);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.engine.salary.entity.siaccount.dto.InsuranceCompensationDTO;
|
|||
import com.engine.salary.entity.siaccount.param.*;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.service.SIAccountService;
|
||||
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -25,7 +26,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
import com.engine.salary.service.SIAccountService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
|
@ -34,7 +34,6 @@ import javax.ws.rs.core.Context;
|
|||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -444,6 +443,36 @@ public class SIAccountController {
|
|||
return new ResponseResult<String,List<InsuranceAcctDetailImportFieldDTO>>(user).run(getSalaryFormulaWrapper(user)::welfareList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 社保福利(核算)项列表缓存(正常缴纳、补缴)
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/cacheWelfareList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String cacheWelfareList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAcctDetailImportTemplateParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<List<String>, Void>(user).run(getService(user)::cacheWelfareField, param.getWelfareNames());
|
||||
}
|
||||
|
||||
/**
|
||||
* 社保福利(核算)项列表缓存(正常缴纳、补缴)
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/cacheBalanceWelfareList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String cacheBalanceWelfareList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAcctDetailImportTemplateParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<List<String>, Void>(user).run(getService(user)::cacheBalanceWelfareField, param.getWelfareNames());
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 导出“福利核算导入”模板
|
||||
// */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.cloudstore.dev.api.util.Util_DataCache;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SalaryItemBiz;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.entity.salaryformula.ExpressFormula;
|
||||
import com.engine.salary.entity.salaryformula.bo.SalaryFormulaBO;
|
||||
import com.engine.salary.entity.salaryformula.dto.ExpressFormulaDTO;
|
||||
|
|
@ -22,6 +24,7 @@ import com.engine.salary.service.SalaryFormulaService;
|
|||
import com.engine.salary.service.impl.FormulaRunServiceImpl;
|
||||
import com.engine.salary.service.impl.RemoteExcelServiceImpl;
|
||||
import com.engine.salary.service.impl.SalaryFormulaServiceImpl;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -121,11 +124,20 @@ public class SalaryFormulaWrapper extends Service {
|
|||
|
||||
}
|
||||
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("socialSum","社保合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("fundSum","公积金合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("otherSum","其他福利合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("total","合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("socialSum","社保合计", false));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("fundSum","公积金合计",false));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("otherSum","其他福利合计", false));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("total","合计", false));
|
||||
|
||||
// 缓存勾选
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.SI_ACCOUNT_IMPORT_FIELD_SIGN;
|
||||
String cacheValue = (String) Util_DataCache.getObjVal(cacheKey);
|
||||
List<String> checkFields = JsonUtil.parseList(cacheValue, String.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, String.class);
|
||||
welfareList.stream().forEach(field -> {
|
||||
if (checkFields.contains(field.getFieldId())) {
|
||||
field.setChecked(true);
|
||||
}
|
||||
});
|
||||
return welfareList;
|
||||
}
|
||||
|
||||
|
|
@ -144,6 +156,16 @@ public class SalaryFormulaWrapper extends Service {
|
|||
|
||||
}
|
||||
|
||||
// 缓存勾选
|
||||
String cacheKey = user.getUID() + SalaryItemConstant.SI_ACCOUNT_BALANCE_IMPORT_FIELD_SIGN;
|
||||
String cacheValue = (String) Util_DataCache.getObjVal(cacheKey);
|
||||
List<String> checkFields = JsonUtil.parseList(cacheValue, String.class) == null ? new ArrayList<>() : JsonUtil.parseList(cacheValue, String.class);
|
||||
welfareList.stream().forEach(field -> {
|
||||
if (checkFields.contains(field.getFieldId())) {
|
||||
field.setChecked(true);
|
||||
}
|
||||
});
|
||||
|
||||
return welfareList;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue