Merge remote-tracking branch 'origin/fix/employeeServiceFormat_0412' into feature/报表
This commit is contained in:
commit
2d8b538897
|
|
@ -17,6 +17,16 @@ import java.util.List;
|
|||
|
||||
public class EmployBiz extends BaseBean {
|
||||
|
||||
public List<DataCollectionEmployee> listAll(){
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.listAll();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员列表
|
||||
*
|
||||
|
|
@ -158,4 +168,15 @@ public class EmployBiz extends BaseBean {
|
|||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
public List<DataCollectionEmployee> listAllForReport() {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.listAllForReport();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
|||
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
|
||||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryFormItemUtil;
|
||||
|
|
@ -110,6 +112,10 @@ public class SIArchivesBiz {
|
|||
return ServiceUtil.getService(TaxAgentWrapper.class, user);
|
||||
}
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param welfareType
|
||||
* @param employeeId
|
||||
|
|
@ -120,8 +126,7 @@ public class SIArchivesBiz {
|
|||
public Map<String, Object> getBaseForm(WelfareTypeEnum welfareType, Long employeeId, Long operateId, User user, Long paymentOrganization) {
|
||||
Map<String, Object> data = new HashMap<>(16);
|
||||
SalaryAssert.notNull(employeeId, "员工id不可为空");
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
List<DataCollectionEmployee> employeeByIds = employBiz.getEmployeeByIdsAll(Collections.singletonList(employeeId));
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(employeeId));
|
||||
SalaryAssert.notEmpty(employeeByIds, "员工信息不存在");
|
||||
DataCollectionEmployee item = employeeByIds.get(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -140,4 +140,18 @@ public class SalarySobItemBiz {
|
|||
}
|
||||
|
||||
|
||||
public void batchInsertItemShow(List<SalarySobItemHidePO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
|
||||
List<List<SalarySobItemHidePO>> partition = Lists.partition( list, 100);
|
||||
partition.forEach(mapper::batchInsertItemShow);
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class SpecialAddDeductionBiz extends BaseBean {
|
|||
try {
|
||||
SpecialAddDeductionMapper mapper = sqlSession.getMapper(SpecialAddDeductionMapper.class);
|
||||
encryptUtil.encryptList(param, SpecialAddDeductionPO.class);
|
||||
List<List<SpecialAddDeductionPO>> partition = Lists.partition(param, 100);
|
||||
List<List<SpecialAddDeductionPO>> partition = Lists.partition(param, 50);
|
||||
partition.forEach(mapper::updateBatchSelective);
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,14 @@ import com.engine.salary.sys.constant.SalarySysConstant;
|
|||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.enums.OpenEnum;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.wbi.util.StringUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.AES;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 此AES加密工具类仅用于关联应用设置中是否开启加密的应用使用
|
||||
* 如另有需要,请重写工具类
|
||||
|
|
@ -77,12 +81,58 @@ public class AESEncryptUtil {
|
|||
*/
|
||||
public static String closeEncryptSetting(String encryptStr) {
|
||||
SalarySysConfPO sysConfPo = salarySysConfService.getOneByCode(SalarySysConstant.OPEN_APPLICATION_ENCRYPT);
|
||||
if (StringUtils.isNotBlank(encryptStr) && encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
|
||||
encryptStr = encryptStr.substring(4, encryptStr.length());
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
} else if (sysConfPo == null && StringUtils.isNotBlank(encryptStr)) {
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
// if (StringUtils.isNotBlank(encryptStr) && encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
|
||||
// encryptStr = encryptStr.substring(4, encryptStr.length());
|
||||
// return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
// } else if (sysConfPo == null && StringUtils.isNotBlank(encryptStr)) {
|
||||
// return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
// }
|
||||
// return encryptStr;
|
||||
if (encryptStr == null) {
|
||||
return null;
|
||||
} else {
|
||||
//AES_前缀的密文
|
||||
if (encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
|
||||
encryptStr = encryptStr.substring(4, encryptStr.length());
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
} else if (isNumeric(encryptStr) || checkHaveChinese(encryptStr) || encryptStr.startsWith("{") || encryptStr.contains("-") || encryptStr.contains(".")) {
|
||||
return encryptStr;
|
||||
} else if ("null".equals(encryptStr) || StringUtils.isBlank(encryptStr)) {
|
||||
return encryptStr;
|
||||
} else if (sysConfPo == null || sysConfPo.getConfValue().equals(OpenEnum.OFF.getValue())) {
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
} else {
|
||||
return encryptStr;
|
||||
}
|
||||
}
|
||||
return encryptStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断字符串是否为整数或者小数或者负数
|
||||
*/
|
||||
public static boolean isNumeric(String str) {
|
||||
|
||||
Pattern pattern = Pattern.compile("^-?\\d+(\\.\\d+)?$");
|
||||
Matcher isNum = pattern.matcher(str);
|
||||
if (!isNum.matches()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断字符串是否包含中文字符
|
||||
*/
|
||||
public static boolean checkHaveChinese(String countname) {
|
||||
|
||||
Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
|
||||
Matcher m = p.matcher(countname);
|
||||
if (m.find()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import lombok.Builder;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -135,4 +136,6 @@ public class SalaryTemplatePO {
|
|||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
private Collection<Long> salarySobIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,9 +348,10 @@ public class SalaryArchiveExcelBO extends Service {
|
|||
* @param excelComments
|
||||
* @param errorCount
|
||||
* @param importHandleParam
|
||||
* @param confValue 人员匹配规则
|
||||
* @return
|
||||
*/
|
||||
public static boolean singleRowCheck(List<String> allTodoSalaryArchives, Map<String, Object> map, List<String> headers, int effectiveTimeIndex, List<Map<String, String>> excelComments, int errorCount, SalaryArchiveImportHandleParam importHandleParam) {
|
||||
public static boolean singleRowCheck(List<String> allTodoSalaryArchives, Map<String, Object> map, List<String> headers, int effectiveTimeIndex, List<Map<String, String>> excelComments, int errorCount, SalaryArchiveImportHandleParam importHandleParam, String confValue) {
|
||||
//是否是流程
|
||||
boolean process = importHandleParam.isProcess();
|
||||
|
||||
|
|
@ -362,18 +363,26 @@ public class SalaryArchiveExcelBO extends Service {
|
|||
String mobileName = Optional.ofNullable(map.get("手机号")).orElse("").toString();
|
||||
String jobNum = Optional.ofNullable(map.get(jobNumI18n)).orElse("").toString();
|
||||
String hrmStatus = Optional.ofNullable(map.get(hrStatusI18n)).orElse("").toString();
|
||||
String workCode = Optional.ofNullable(map.get("工号")).orElse("").toString();
|
||||
// Optional<HrmStatus> optionalStatus = importHandleParam.getHrmStatusList().stream().filter(s -> s.getName().equals(hrmStatus)).findFirst();
|
||||
// String codeId = optionalStatus.map(status -> status.getCodeId() + "").orElse("");
|
||||
|
||||
List<DataCollectionEmployee> emps = importHandleParam.getEmployees().stream().filter(e ->
|
||||
(StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
|
||||
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
|
||||
&& (StringUtils.isBlank(mobileName) || Objects.equals(e.getMobile(), mobileName))
|
||||
List<DataCollectionEmployee> emps = new ArrayList<>();
|
||||
// "0"代表姓名+部门+手机号的匹配原则,“1”代表工号为唯一匹配原则
|
||||
if("0".equals(confValue)){
|
||||
emps = importHandleParam.getEmployees().stream().filter(e ->
|
||||
(StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
|
||||
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
|
||||
&& (StringUtils.isBlank(mobileName) || Objects.equals(e.getMobile(), mobileName))
|
||||
// && (StringUtils.isBlank(jobNum) || Objects.equals(e.getWorkcode(), jobNum))
|
||||
)
|
||||
)
|
||||
// && (StringUtils.isBlank(hrmStatus) || Objects.equals(e.getPersonnelStatus(), codeId))
|
||||
// .map(DataCollectionEmployee::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
.collect(Collectors.toList());
|
||||
}else if("1".equals(confValue)){
|
||||
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(workCode) || Objects.equals(e.getWorkcode(), workCode)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
|
|
@ -394,7 +403,7 @@ public class SalaryArchiveExcelBO extends Service {
|
|||
|
||||
if (employeeId == null) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowindex + "人员存在重复数据,请确定姓名、部门、手机号唯一");
|
||||
errorMessageMap.put("message", rowindex + "人员存在重复数据,请确定姓名、部门、手机号或工号唯一");
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
return isError;
|
||||
|
|
@ -512,7 +521,7 @@ public class SalaryArchiveExcelBO extends Service {
|
|||
|
||||
// 必填判空
|
||||
boolean isEmpty = StringUtils.isEmpty(cellVal) &&
|
||||
((userNameI18n.equals(key.toString()) && !process) || taxAgentI18n.equals(key.toString()) || incomeCategoryI18n.equals(key.toString()) || salarySobI18n.equals(key.toString())
|
||||
((userNameI18n.equals(key.toString()) && !process && "0".equals(confValue)) || taxAgentI18n.equals(key.toString()) || incomeCategoryI18n.equals(key.toString()) || salarySobI18n.equals(key.toString())
|
||||
// 定薪列表初始化导入必填: 起始发薪日期、生效日期
|
||||
|| ((payStartDateI18n.equals(key.toString()) || effectiveTimeI18n.equals(key.toString())) && importHandleParam.isInit())
|
||||
// 定薪列表调薪必填: 调整原因、生效日期
|
||||
|
|
|
|||
|
|
@ -715,6 +715,7 @@ public class TaxDeclarationBO {
|
|||
|
||||
private static String findStringValue(String fieldCode, Map<Long, List<SalaryAcctResultPO>> resultMap, Map<String, Long> salaryItemMap) {
|
||||
return resultMap.getOrDefault(salaryItemMap.getOrDefault(fieldCode, 0L), Collections.emptyList()).stream()
|
||||
.filter(f -> StringUtils.isNotBlank(f.getResultValue()))
|
||||
.map(SalaryAcctResultPO::getResultValue)
|
||||
.findFirst().orElse("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@
|
|||
insert into hrsa_salary_send_range_obj
|
||||
(salary_send_id, salary_send_range_id, range_type, target_type, target_id, creator,
|
||||
create_time, update_time, delete_type, tenant_key)
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<foreach collection="list" item="item" separator="union all">
|
||||
select
|
||||
#{item.salarySendId,jdbcType=BIGINT}, #{item.salarySendRangeId,jdbcType=BIGINT},
|
||||
#{item.rangeType,jdbcType=INTEGER}, #{item.targetType,jdbcType=INTEGER}, #{item.targetId,jdbcType=BIGINT},
|
||||
|
|
|
|||
|
|
@ -307,6 +307,12 @@
|
|||
<if test="deleteType != null and deleteType != ''">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="salarySobIds != null and salarySobIds.size() > 0">
|
||||
AND salary_sob_id IN
|
||||
<foreach collection="salarySobIds" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -112,5 +112,9 @@ public interface SalarySobItemMapper {
|
|||
|
||||
void deleteByGroupIds(@Param("groupIds") List<Long> needDeleteGroupIds);
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入薪资项目分组是否显示
|
||||
* @param list
|
||||
*/
|
||||
void batchInsertItemShow(@Param("collection")List<SalarySobItemHidePO> list);
|
||||
}
|
||||
|
|
@ -434,6 +434,63 @@
|
|||
#{tenantKey},#{createTime},#{updateTime},0)
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsertItemShow">
|
||||
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
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salarySobId},
|
||||
#{item.salaryItemId},
|
||||
#{item.isGroup},
|
||||
#{item.itemHide},
|
||||
#{item.creator},
|
||||
#{item.tenantKey},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
0
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertItemShow" databaseId="oracle">
|
||||
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)
|
||||
<foreach collection="collection" item="item" separator="union all">
|
||||
select
|
||||
#{item.id,jdbcType=DOUBLE},
|
||||
#{item.salarySobId,jdbcType=DOUBLE},
|
||||
#{item.salaryItemId,jdbcType=DOUBLE},
|
||||
#{item.isGroup,jdbcType=INTEGER},
|
||||
#{item.itemHide,jdbcType=INTEGER},
|
||||
#{item.creator,jdbcType=DOUBLE},
|
||||
#{item.tenantKey,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=DATE},
|
||||
#{item.updateTime,jdbcType=DATE},
|
||||
0
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertItemShow" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
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
|
||||
(
|
||||
#{item.id},
|
||||
#{item.salarySobId},
|
||||
#{item.salaryItemId},
|
||||
#{item.isGroup},
|
||||
#{item.itemHide},
|
||||
#{item.creator},
|
||||
#{item.tenantKey},
|
||||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
0
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="deleteByGroupIds">
|
||||
UPDATE hrsa_salary_sob_item
|
||||
|
|
|
|||
|
|
@ -278,11 +278,29 @@ public interface SIAccountService {
|
|||
|
||||
|
||||
/**
|
||||
* 合计行
|
||||
* 正常缴纳合计行
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> listCommonSum(InsuranceAccountDetailParam queryParam);
|
||||
|
||||
/**
|
||||
* 补缴合计行
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> listSupplementarySum(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 退差合计列
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> listRecessionSum(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
|
||||
/**
|
||||
* 补差合计列
|
||||
* @param insuranceAccountDetailParam
|
||||
*/
|
||||
Map<String, Object> listBalanceSum(InsuranceAccountDetailParam insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
import com.engine.salary.entity.hrm.PositionInfo;
|
||||
import com.engine.salary.entity.hrm.SubCompanyInfo;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -40,7 +44,7 @@ public interface SalaryEmployeeService {
|
|||
* @param ids
|
||||
* @return 全量
|
||||
*/
|
||||
List<DataCollectionEmployee> listByIds(List<Long> ids);
|
||||
List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取人员信息
|
||||
|
|
@ -73,4 +77,17 @@ public interface SalaryEmployeeService {
|
|||
* @param uid 人员id
|
||||
*/
|
||||
List<DataCollectionEmployee> matchImportEmployee(List<DataCollectionEmployee> employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid);
|
||||
|
||||
String empValidType();
|
||||
|
||||
List<DeptInfo> getDeptInfoList(List<Long> departmentIds);
|
||||
|
||||
List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds);
|
||||
|
||||
List<PositionInfo> listPositionInfo(List<Long> positionIds);
|
||||
|
||||
List<DataCollectionEmployee> listEmployee();
|
||||
|
||||
List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,4 +95,11 @@ public interface SalaryTemplateService {
|
|||
* @return
|
||||
*/
|
||||
List<SalaryTemplatePO> getDefaultTemplates(List<Long> salarySobIds);
|
||||
|
||||
/**
|
||||
* 根据薪资账套id获取工资单模板
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<SalaryTemplatePO> getBySalarySobIds(Collection<Long> ids);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
|
||||
//检验参数
|
||||
|
|
@ -211,7 +211,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
//个税扣缴义务人
|
||||
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
|
||||
|
|
@ -437,7 +437,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
public void createAddUpDeduction(AddUpDeductionRecordParam addUpDeductionRecordParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
|
||||
//税款所属期
|
||||
|
|
@ -450,7 +449,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
//个税扣缴义务人
|
||||
String taxAgentId = Util.null2String(addUpDeductionRecordParam.getTaxAgentId());
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
|
||||
|
|
@ -729,7 +728,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
.forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List<AddUpDeduction>) l));
|
||||
if (!errorMessages.isEmpty()) {
|
||||
String userNames = getSalaryEmployeeService(user)
|
||||
.listByIds(errorMessages)
|
||||
.getEmployeeByIdsAll(errorMessages)
|
||||
.stream()
|
||||
.map(DataCollectionEmployee::getUsername)
|
||||
.collect(Collectors.joining(","));
|
||||
|
|
@ -885,8 +884,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
@Override
|
||||
public XSSFWorkbook exportDetail(Long beLongEmployeeId, boolean isChief, AddUpDeductionQueryParam queryParam) {
|
||||
queryParam.setEmployeeId(beLongEmployeeId);
|
||||
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpDeductionBiz biz = new AddUpDeductionBiz();
|
||||
|
||||
Long id = queryParam.getAccumulatedSpecialAdditionalDeductionId();
|
||||
|
|
@ -899,7 +896,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在" + "[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,7 +395,6 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
@Override
|
||||
public XSSFWorkbook exportDetail(AddUpSituationQueryParam queryParam) {
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
Long id = queryParam.getAccumulatedSituationId();
|
||||
if (id == null) {
|
||||
|
|
@ -407,7 +406,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
throw new SalaryRunTimeException(String.format("累计情况不存在" + "[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
|
@ -583,7 +582,6 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -603,7 +601,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据(获取税款所属期下一个月的数据)
|
||||
YearMonth nextTaxYearMonth = SalaryDateUtil.String2YearMonth(taxYearMonthStr);
|
||||
|
|
@ -907,7 +905,6 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
@Override
|
||||
public void createAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -919,7 +916,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
private AttendQuoteDataBiz dataBiz = new AttendQuoteDataBiz();
|
||||
private AttendQuoteDataValueBiz dataValueBiz = new AttendQuoteDataValueBiz();
|
||||
private AttendQuoteFieldBiz fieldBiz = new AttendQuoteFieldBiz();
|
||||
private EmployBiz employeeBiz = new EmployBiz();
|
||||
|
||||
private AttendQuoteFieldSettingService getFieldSettingService(User user) {
|
||||
return ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user);
|
||||
|
|
@ -596,7 +595,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employeeBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取已设置的可同步的考勤字段
|
||||
List<AttendQuoteFieldPO> attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.IMPORT);
|
||||
// 生成获取考勤引用
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
|
||||
long currentEmployeeId = user.getUID();
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -206,7 +205,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
//税款所属期
|
||||
|
|
@ -480,7 +479,6 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
public XSSFWorkbook exportDetail(OtherDeductionQueryParam param) {
|
||||
|
||||
OtherDeductionBiz biz = new OtherDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
Long id = param.getOtherTaxExemptDeductionId();
|
||||
if (id == null) {
|
||||
|
|
@ -492,7 +490,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
throw new SalaryRunTimeException(String.format("其他免税扣除不存在" + "[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
|
@ -601,7 +599,6 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
long currentEmployeeId = user.getUID();
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
|
@ -609,7 +606,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
//税款所属期
|
||||
String declareMonthStr = Util.null2String(otherDeductionParam.getDeclareMonth());
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
//税款所属期
|
||||
|
|
|
|||
|
|
@ -171,8 +171,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return MapperProxyFactory.getProxy(FundSchemeMapper.class);
|
||||
}
|
||||
|
||||
private EmployBiz employeeBiz = new EmployBiz();
|
||||
|
||||
private TaxAgentBiz taxAgentBiz = new TaxAgentBiz();
|
||||
|
||||
private ICategoryMapper getICategoryMapper() {
|
||||
|
|
@ -1242,7 +1240,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
|
|
@ -1259,7 +1256,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Map<String, Long> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listEmployee();
|
||||
|
||||
// 失败的数量
|
||||
int failCount = 0;
|
||||
|
|
@ -1535,7 +1532,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
for(InsuranceAccountDetailPO po : supplyDataList) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
employee = employeeBiz.getEmployeeById(po.getEmployeeId());
|
||||
employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId());
|
||||
resultMap.put("username", employee.getUsername());
|
||||
resultMap.put("departmentName", employee.getDepartmentName());
|
||||
resultMap.put("mobile", employee.getMobile());
|
||||
|
|
@ -1575,7 +1572,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
for(InsuranceAccountDetailPO po : normalDataList) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
employee = employeeBiz.getEmployeeById(po.getEmployeeId());
|
||||
employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId());
|
||||
resultMap.put("username", employee.getUsername());
|
||||
resultMap.put("departmentName", employee.getDepartmentName());
|
||||
resultMap.put("mobile", employee.getMobile());
|
||||
|
|
@ -1910,8 +1907,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
public Map<String, Object> importExcelInsuranceDetail(ExcelInsuranceImportParam importParam) {
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
|
@ -1924,7 +1919,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listEmployee();
|
||||
|
||||
// 失败的数量
|
||||
int failCount = 0;
|
||||
|
|
@ -2599,7 +2594,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
|
|
@ -2616,7 +2610,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Map<String, Long> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
|
||||
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> salaryEmployees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listEmployee();
|
||||
|
||||
List<ICategoryPO> insuranceCategoryPOS = getICategoryMapper().listAll();
|
||||
// 失败的数量
|
||||
|
|
@ -2834,6 +2828,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listCommonSum(InsuranceAccountDetailParam queryParam) {
|
||||
|
||||
|
|
@ -2846,13 +2841,128 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
|
||||
// 数据组装
|
||||
List<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
|
||||
Map<String, Object> maxSizeRecord = records.stream().reduce(new HashMap<>(), (a, b) -> a.size() > b.size() ? a : b);
|
||||
// Map<String, Object> maxSizeRecord = records.stream().reduce(new HashMap<>(), (a, b) -> a.size() > b.size() ? a : b);
|
||||
Map<String, Object> sumRow = countSum(records);
|
||||
datas.put("sumRow", sumRow);
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listSupplementarySum(InsuranceAccountDetailParam queryParam) {
|
||||
Long employeeId = (long) user.getUID();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
queryParam.setPageSize(10000000);
|
||||
|
||||
//过滤出福利档案基础信息表中runStatus为正在缴纳和待减员的人员
|
||||
List<InsuranceArchivesBaseInfoPO> baseInfoPOList = getInsuranceBaseInfoMapper().listAll();
|
||||
List<Long> canAccountIds = baseInfoPOList.stream()
|
||||
.filter(f->f.getPaymentOrganization().toString().equals(queryParam.getPaymentOrganization())
|
||||
&& (f.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || f.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())))
|
||||
.map(InsuranceArchivesBaseInfoPO::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
queryParam.setEmployeeIds(canAccountIds);
|
||||
|
||||
//补缴缴纳列表
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue());
|
||||
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
|
||||
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
|
||||
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
|
||||
//数据组装
|
||||
List<Map<String, Object>> records = getService(user).buildCommonRecords(list, employeeId);
|
||||
// Map<String, Object> maxSizeRecord = records.stream().reduce(new HashMap<>(), (a, b) -> a.size() > b.size() ? a : b);
|
||||
Map<String, Object> sumRow = countSum(records);
|
||||
datas.put("sumRow", sumRow);
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listRecessionSum(InsuranceAccountDetailParam queryParam) {
|
||||
Long employeeId = (long) user.getUID();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
queryParam.setPageSize(10000000);
|
||||
// 分权逻辑
|
||||
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
|
||||
if (needAuth) {
|
||||
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgents((long) user.getUID());
|
||||
List<Long> taxAgents = taxAgentPOS.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(taxAgents)) {
|
||||
//防止普通用户查询
|
||||
queryParam.setTaxAgents(Collections.singletonList(-1L));
|
||||
} else {
|
||||
queryParam.setTaxAgents(taxAgents);
|
||||
}
|
||||
}
|
||||
|
||||
//退差列表
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.RECESSION.getValue());
|
||||
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
|
||||
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
|
||||
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
|
||||
//数据组装
|
||||
List<Map<String, Object>> records = getService(user).buildCommonRecords(list, employeeId);
|
||||
Map<String, Object> sumRow = countSum(records);
|
||||
datas.put("sumRow", sumRow);
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listBalanceSum(InsuranceAccountDetailParam queryParam) {
|
||||
Long employeeId = (long) user.getUID();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
queryParam.setPageSize(10000000);
|
||||
// 分权逻辑
|
||||
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
|
||||
if (needAuth) {
|
||||
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgents((long) user.getUID());
|
||||
List<Long> taxAgents = taxAgentPOS.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(taxAgents)) {
|
||||
//防止普通用户查询
|
||||
queryParam.setTaxAgents(Collections.singletonList(-1L));
|
||||
} else {
|
||||
queryParam.setTaxAgents(taxAgents);
|
||||
}
|
||||
}
|
||||
|
||||
//补差列表
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.BALANCE.getValue());
|
||||
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
|
||||
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
|
||||
//数据组装
|
||||
List<Map<String, Object>> records = getService(user).buildCommonRecords(list, employeeId);
|
||||
Map<String, Object> sumRow = countSum(records);
|
||||
datas.put("sumRow", sumRow);
|
||||
return datas;
|
||||
}
|
||||
|
||||
public Map<String, Object> countSum(List<Map<String, Object>> records ){
|
||||
// 获取需要统计的列
|
||||
String[] keys = {"Base", "Com", "Sum", "Per", "total"};
|
||||
List<String> numKeys = new ArrayList<>();
|
||||
for(String key : maxSizeRecord.keySet()){
|
||||
if(StringUtils.containsAny(key,keys)){
|
||||
numKeys.add(key);
|
||||
Set<String> numKeys = new HashSet<>();
|
||||
// for(String key : maxSizeRecord.keySet()){
|
||||
// if(StringUtils.containsAny(key,keys)){
|
||||
// numKeys.add(key);
|
||||
// }
|
||||
// }
|
||||
for(int i =0; i < records.size(); i++){
|
||||
Map<String, Object> record = records.get(i);
|
||||
for(String key : record.keySet()){
|
||||
if(StringUtils.containsAny(key,keys)){
|
||||
numKeys.add(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> sumRow = new HashMap<>();
|
||||
|
|
@ -2869,10 +2979,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
sumRow.put(numKey,value);
|
||||
}
|
||||
datas.put("sumRow", sumRow);
|
||||
return datas;
|
||||
return sumRow;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检查补差数据中的福利缴纳费用相关福利类别,是否在正常缴纳中有设置缴纳
|
||||
* @param po
|
||||
|
|
|
|||
|
|
@ -124,8 +124,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
return ServiceUtil.getService(SIImportServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employeeBiz = new EmployBiz();
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
|
|
@ -635,7 +633,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
|
||||
|
||||
// 获取所有人员信息
|
||||
List<DataCollectionEmployee> employeeByIds = employeeBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).listEmployee();
|
||||
int total = 0;
|
||||
|
||||
int index = 0;
|
||||
|
|
@ -1402,7 +1400,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
List<TaxAgentManageRangeEmployeeDTO> taxAgentManageRangeEmployeeTree = getTaxAgentService().listTaxAgentAndEmployeeTree();
|
||||
|
||||
// 获取所有人员信息
|
||||
List<DataCollectionEmployee> employeeByIds = employeeBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employeeByIds = getSalaryEmployeeService(user).listEmployee();
|
||||
int total = 0;
|
||||
|
||||
int index = 0;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
// 数据库字段加密用
|
||||
// 1、查询人员信息
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
SalarySobCycleDTO salarySobCycleDTO = salaryAcctCalculateBO.getSalarySobCycleDTO();
|
||||
Long taxAgentId = salaryAcctCalculateBO.getSalarySobPO().getTaxAgentId();
|
||||
// 2、查询薪资档案的数据
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.engine.salary.service.impl;
|
|||
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.dev.api.util.Util_DataCache;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.component.WeaTableColumnGroup;
|
||||
|
|
@ -41,7 +40,6 @@ import com.engine.salary.util.SalaryEntityUtil;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.Column;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
|
|
@ -54,11 +52,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFCell;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -247,7 +242,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
for (List<SalaryAcctEmployeePO> tempList : partition) {
|
||||
// 人员
|
||||
List<Long> employeeIds = tempList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 个税扣缴义务人
|
||||
List<Long> taxAgentIds = tempList.stream().map(SalaryAcctEmployeePO::getTaxAgentId).distinct().collect(Collectors.toList());
|
||||
List<TaxAgentPO> taxAgents = getTaxAgentService(user).listByIds(taxAgentIds);
|
||||
|
|
@ -300,8 +295,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
||||
total = true;
|
||||
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
||||
sumRow.put("taxAgentName", "总计");
|
||||
resultMapList.add(sumRow);
|
||||
if(sumRow !=null){
|
||||
sumRow.put("taxAgentName", "总计");
|
||||
resultMapList.add(sumRow);
|
||||
}
|
||||
}
|
||||
|
||||
// excel导出的数据
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
List<SalaryAcctResultPO> salaryAcctResultPOS = listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
|
||||
// 查询人员信息
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 查询个税扣缴义务人
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getTaxAgentId);
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ import com.engine.salary.enums.salaryarchive.SalaryArchiveListTypeEnum;
|
|||
import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
|
|
@ -80,8 +83,11 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
return ServiceUtil.getService(TaxAgentManageRangeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public SalarySysConfService getSalarySysConfService(User user) {
|
||||
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryArchiveBiz salaryArchiveMapper = new SalaryArchiveBiz();
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
|
||||
private SalaryArchiveTaxAgentBiz salaryArchiveTaxAgentMapper = new SalaryArchiveTaxAgentBiz();
|
||||
private SalaryArchiveDimissionBiz salaryArchiveDimissionMapper = new SalaryArchiveDimissionBiz();
|
||||
|
|
@ -343,7 +349,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
// row.add(e.get("hiredate"));
|
||||
row.add(e.get("departmentName"));
|
||||
row.add(e.get("mobile") == null ? "" : e.get("mobile").toString());
|
||||
row.add(Optional.ofNullable(e.get("jobNum")).orElse("").toString());
|
||||
row.add(Optional.ofNullable(e.get("workcode")).orElse("").toString());
|
||||
// if (enableHr) {
|
||||
// row.add(Optional.ofNullable(e.get("idNo")).orElse("").toString());
|
||||
// }
|
||||
|
|
@ -488,6 +494,9 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
}
|
||||
// 错误sheet数据
|
||||
List<Map<String, Object>> errorData = new ArrayList<>();
|
||||
// 获取匹配规则
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfService(user).getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
||||
Map<String, Object> map;
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
|
|
@ -495,7 +504,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
map = data.get(i);
|
||||
map.put("index", i + 2);
|
||||
// 3.校验行内容
|
||||
boolean isError = SalaryArchiveExcelBO.singleRowCheck(allTodoSalaryArchives, map, headers, effectiveTimeIndex, excelComments, errorCount, importHandleParam);
|
||||
boolean isError = SalaryArchiveExcelBO.singleRowCheck(allTodoSalaryArchives, map, headers, effectiveTimeIndex, excelComments, errorCount, importHandleParam, confValue);
|
||||
if (isError) {
|
||||
errorCount += 1;
|
||||
// 添加错误数据
|
||||
|
|
@ -576,6 +585,10 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
|
||||
// 错误sheet数据
|
||||
List<Map<String, Object>> errorData = new ArrayList<>();
|
||||
// 获取匹配规则
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfService(user).getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
||||
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
Map<String, Object> map = data.get(i);
|
||||
|
|
@ -603,7 +616,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
|
|||
map = data.get(i);
|
||||
map.put("index", i + 2);
|
||||
// 3.校验行内容
|
||||
boolean isError = SalaryArchiveExcelBO.singleRowCheck(allTodoSalaryArchives, map, headers, effectiveTimeIndex, excelComments, errorCount, importHandleParam);
|
||||
boolean isError = SalaryArchiveExcelBO.singleRowCheck(allTodoSalaryArchives, map, headers, effectiveTimeIndex, excelComments, errorCount, importHandleParam, confValue);
|
||||
if (isError) {
|
||||
errorCount += 1;
|
||||
// 添加错误数据
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX;
|
|||
public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveService {
|
||||
|
||||
private SalaryArchiveBiz salaryArchiveMapper = new SalaryArchiveBiz();
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
|
||||
private SalaryArchiveTaxAgentBiz salaryArchiveTaxAgentMapper = new SalaryArchiveTaxAgentBiz();
|
||||
private SalaryArchiveDimissionBiz salaryArchiveDimissionMapper = new SalaryArchiveDimissionBiz();
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public class SalaryComparisonResultServiceImpl extends Service implements Salary
|
|||
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
|
||||
// 查询人员信息
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 判断是否存在合并计税
|
||||
Set<Long> salaryAcctEmployeeIds4ConsolidatedTax;
|
||||
if (StringUtils.isEmpty(queryParam.getConsolidatedTaxation())) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
import com.engine.salary.entity.hrm.PositionInfo;
|
||||
import com.engine.salary.entity.hrm.SubCompanyInfo;
|
||||
import com.engine.salary.entity.salarysob.bo.SalarySobRangeBO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
|
||||
|
|
@ -93,7 +96,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listByIds(List<Long> ids) {
|
||||
public List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> ids) {
|
||||
return employBiz.getEmployeeByIdsAll(ids);
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +113,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
List<DataCollectionEmployee> employeeList = new ArrayList<>();
|
||||
List<List<Long>> partition = Lists.partition(simpleEmployeeIds, 1000);
|
||||
for (List<Long> longs : partition) {
|
||||
employeeList.addAll(getEmployMapper().getEmployeeByIds(longs));
|
||||
employeeList.addAll(employBiz.getEmployeeByIds(longs));
|
||||
}
|
||||
return employeeList;
|
||||
|
||||
|
|
@ -156,4 +159,44 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
return employees;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员定位方式
|
||||
* “0”代表姓名+部门+手机号的匹配原则,“1”代表工号为唯一匹配原则
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String empValidType() {
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
return (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeptInfo> getDeptInfoList(List<Long> departmentIds) {
|
||||
return employBiz.getDeptInfoList(departmentIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds) {
|
||||
return employBiz.getSubCompanyInfoList(subDepartmentIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionInfo> listPositionInfo(List<Long> positionIds) {
|
||||
return employBiz.listPositionInfo(positionIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listEmployee() {
|
||||
List<DataCollectionEmployee> result = employBiz.listEmployee();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listByParams(List<SalarySobRangeEmpQueryParam> includeQueryParams) {
|
||||
List<DataCollectionEmployee> result = employBiz.listByParams(includeQueryParams);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
|
|||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
private <R> R applyMapper(Function<SalarySendRangeMapper, R> mapper) {
|
||||
try (SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession()) {
|
||||
|
|
@ -116,17 +115,17 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
|
|||
.orElse(null);
|
||||
break;
|
||||
case DEPT:
|
||||
targetName = employBiz.getDeptInfoList(Collections.singletonList(rangeObj.getTargetId()))
|
||||
targetName = getSalaryEmployeeService().getDeptInfoList(Collections.singletonList(rangeObj.getTargetId()))
|
||||
.stream().findFirst()
|
||||
.map(DeptInfo::getName).orElse(null);
|
||||
break;
|
||||
case SUB_COMPANY:
|
||||
targetName = employBiz.getSubCompanyInfoList(Collections.singletonList(rangeObj.getTargetId()))
|
||||
targetName = getSalaryEmployeeService().getSubCompanyInfoList(Collections.singletonList(rangeObj.getTargetId()))
|
||||
.stream().findFirst()
|
||||
.map(SubCompanyInfo::getName).orElse(null);
|
||||
break;
|
||||
case POSITION:
|
||||
targetName = employBiz.listPositionInfo(Collections.singletonList(rangeObj.getTargetId()))
|
||||
targetName = getSalaryEmployeeService().listPositionInfo(Collections.singletonList(rangeObj.getTargetId()))
|
||||
.stream().findFirst()
|
||||
.map(PositionInfo::getName).orElse(null);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
List<SalarySobItemGroupPO> salarySobItemGroupPOS = getSalarySobItemGroupService(user).listBySalarySobIdWithItemHide(salarySobId);
|
||||
// 查询薪资账套的薪资项目副本
|
||||
List<SalarySobItemPO> salarySobItemPOS = listBySalarySobIdWithHideItem(salarySobId);
|
||||
// 薪资项目副本去重
|
||||
salarySobItemPOS = salarySobItemPOS.stream().filter(SalaryEntityUtil.distinctByKey(PO -> PO.getSalarySobId() + "-" + PO.getSalaryItemId())).collect(Collectors.toList());
|
||||
// 回算薪资项目
|
||||
List<SalarySobBackItemPO> salarySobBackItems = getSalarySobBackItemService(user).listBySalarySobId(salarySobId);
|
||||
// 薪资账套的薪资项目副本所用的公式id
|
||||
|
|
@ -346,6 +348,9 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
List<SalarySobItemSaveParam.SalarySobItemGroupParam> needUpdateGroup = itemGroups.stream().filter(f -> f.getId() != null && oldGroupIds.contains(f.getId())).collect(Collectors.toList());
|
||||
List<Long> needDeleteGroupIds = oldGroupIds.stream().filter(f -> !newGroupIds.contains(f)).collect(Collectors.toList());
|
||||
|
||||
// 需要保存的隐藏项目
|
||||
List<SalarySobItemHidePO> needInsertItemShow = new ArrayList<>();
|
||||
|
||||
//先保存项目分类获,取分类id
|
||||
Collection<SalarySobItemPO> salarySobItems = new ArrayList<>();
|
||||
for (SalarySobItemSaveParam.SalarySobItemGroupParam itemGroupParam : needAddGroup) {
|
||||
|
|
@ -383,7 +388,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
if (itemGroupParam.getItemHide() == null) {
|
||||
salarySobGroupItemHidePO.setItemHide(Long.valueOf(0));
|
||||
}
|
||||
salarySobItemMapper.InsertItemShow(salarySobGroupItemHidePO);
|
||||
needInsertItemShow.add(salarySobGroupItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobGroupItemHidePO);
|
||||
|
||||
|
||||
for (SalarySobItemSaveParam.SalarySobItemParam itemParam : itemGroupParam.getItems()) {
|
||||
|
|
@ -417,7 +423,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
needInsertItemShow.add(salarySobItemHidePO);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -451,7 +458,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
if (itemGroupParam.getItemHide() == null) {
|
||||
salarySobGroupItemHidePO.setItemHide(Long.valueOf(0));
|
||||
}
|
||||
salarySobItemMapper.InsertItemShow(salarySobGroupItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobGroupItemHidePO);
|
||||
needInsertItemShow.add(salarySobGroupItemHidePO);
|
||||
|
||||
|
||||
List<SalarySobItemSaveParam.SalarySobItemParam> items = itemGroupParam.getItems();
|
||||
|
|
@ -494,7 +502,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
needInsertItemShow.add(salarySobItemHidePO);
|
||||
}
|
||||
//更新
|
||||
for (SalarySobItemSaveParam.SalarySobItemParam itemParam : needUpdateItems) {
|
||||
|
|
@ -523,7 +532,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
needInsertItemShow.add(salarySobItemHidePO);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -578,7 +588,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
needInsertItemShow.add(salarySobItemHidePO);
|
||||
}
|
||||
|
||||
for (SalarySobItemSaveParam.SalarySobItemParam itemParam : needUpdateItems) {
|
||||
|
|
@ -606,7 +617,8 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
// salarySobItemMapper.InsertItemShow(salarySobItemHidePO);
|
||||
needInsertItemShow.add(salarySobItemHidePO);
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(needDeleteItemIds)) {
|
||||
|
|
@ -615,8 +627,13 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
|
||||
// 保存薪资账套的薪资项目副本
|
||||
batchSave(salarySobItems);
|
||||
|
||||
// 保存薪资账套的薪资项目隐藏信息
|
||||
batchSaveShow(needInsertItemShow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void handleEmpField(SalarySobItemSaveParam saveParam) {
|
||||
long employeeId = (long) user.getUID();
|
||||
Date now = new Date();
|
||||
|
|
@ -670,6 +687,17 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
salarySobItemMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
private void batchSaveShow(List<SalarySobItemHidePO> needInsertItemShow) {
|
||||
if (CollectionUtils.isEmpty(needInsertItemShow)) {
|
||||
return;
|
||||
}
|
||||
//前端可能传重复数据,去重
|
||||
List<SalarySobItemHidePO> list = new ArrayList<>(needInsertItemShow.stream()
|
||||
.collect(Collectors.toMap(SalarySobItemHidePO::getSalaryItemId, Function.identity(), (oldValue, newValue) -> oldValue))
|
||||
.values());
|
||||
salarySobItemMapper.batchInsertItemShow(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBySalarySobIds(Collection<Long> salarySobIds) {
|
||||
salarySobItemMapper.deleteBySalarySobIds(salarySobIds);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ import java.util.stream.Collectors;
|
|||
public class SalarySobRangeServiceImpl extends Service implements SalarySobRangeService {
|
||||
|
||||
private SalarySobRangeBiz salarySobRangeBiz = new SalarySobRangeBiz();
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
private OrganizationShowSetBiz orgBiz = new OrganizationShowSetBiz();
|
||||
|
||||
|
||||
|
|
@ -116,7 +115,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
|
|||
.filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue()))
|
||||
.map(SalarySobRangePO::getTargetId)
|
||||
.collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> empInfos = employBiz.getEmployeeByIds(employeeIds);
|
||||
List<DataCollectionEmployee> empInfos = getSalaryEmployeeService(user).getEmployeeByIds(employeeIds);
|
||||
|
||||
|
||||
// 查询部门信息
|
||||
|
|
@ -143,7 +142,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
|
|||
.filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue()))
|
||||
.map(SalarySobRangePO::getTargetId)
|
||||
.collect(Collectors.toList());
|
||||
List<PositionInfo> positionInfos = employBiz.listPositionInfo(positionIds);
|
||||
List<PositionInfo> positionInfos = getSalaryEmployeeService(user).listPositionInfo(positionIds);
|
||||
|
||||
// 薪资账套的人员范围po转换成列表dto
|
||||
List<SalarySobRangeListDTO> salarySobRangeListDTOS = SalarySobRangeBO.convert2ListDTO(salarySobRangePOS, empInfos, deptInfos,subCompanyInfos, positionInfos);
|
||||
|
|
@ -294,7 +293,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 错误excel内容
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
|
|
@ -23,7 +24,6 @@ import com.engine.salary.enums.SalarySystemTypeEnum;
|
|||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobDefaultItemMapper;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -113,6 +113,10 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
return ServiceUtil.getService(SalarySobBackItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryTemplateService getSalaryTemplateService(User user) {
|
||||
return ServiceUtil.getService(SalaryTemplateServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -544,6 +548,13 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
if (CollectionUtils.isNotEmpty(salaryAcctRecordPOS)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99713, "账套已用于薪资核算,不能删除"));
|
||||
}
|
||||
|
||||
// 根据薪资账套id查询工资单模板,存在该账套下的工资单模板就不能删除账套了
|
||||
List<SalaryTemplatePO> salaryTemplatePOS = getSalaryTemplateService(user).getBySalarySobIds(ids);
|
||||
if(CollectionUtils.isNotEmpty(salaryTemplatePOS)){
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99713, "账套存在工资单模板,不能删除,请先删除该账套所对应的工资单模板"));
|
||||
}
|
||||
|
||||
//关联其他的删除
|
||||
// 删除薪资账套
|
||||
salarySobMapper.deleteByIds(ids);
|
||||
|
|
@ -603,6 +614,8 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = salarySobEmpFieldService.listSome(SalarySobEmpFieldPO.builder().salarySobId(duplicateParam.getId()).build());
|
||||
// 查询薪资账套的薪资项目副本
|
||||
List<SalarySobItemPO> salarySobItemPOS = salarySobItemService.listBySalarySobIdWithHideItem(SalarySobItemPO.builder().salarySobId(duplicateParam.getId()).build());
|
||||
// 薪资项目副本去重
|
||||
salarySobItemPOS = salarySobItemPOS.stream().filter(SalaryEntityUtil.distinctByKey(PO -> PO.getSalarySobId() + "-" + PO.getSalaryItemId())).collect(Collectors.toList());
|
||||
// 查询薪资账套的薪资项目分类
|
||||
List<SalarySobItemGroupPO> salarySobItemGroupPOS = salarySobItemGroupService.listSomeWithItemHide(SalarySobItemGroupPO.builder().salarySobId(duplicateParam.getId()).build());
|
||||
// 查询薪资账套的调薪计薪规则
|
||||
|
|
|
|||
|
|
@ -274,4 +274,9 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
public List<SalaryTemplatePO> getDefaultTemplates(List<Long> salarySobIds) {
|
||||
return mapper.listDefaultTemplates(salarySobIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryTemplatePO> getBySalarySobIds(Collection<Long> ids) {
|
||||
return mapper.listSome(SalaryTemplatePO.builder().salarySobIds(ids).build());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,7 +175,6 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
|
||||
long currentEmployeeId = user.getUID();
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
|
|
@ -202,7 +201,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 查询已有数据
|
||||
|
|
@ -402,7 +401,6 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
public XSSFWorkbook exportDetail(SpecialAddDeductionQueryParam param) {
|
||||
|
||||
SpecialAddDeductionBiz biz = new SpecialAddDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
Long id = param.getSpecialAddDeductionId();
|
||||
if (id == null) {
|
||||
|
|
@ -414,7 +412,7 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
throw new SalaryRunTimeException(String.format("专项附加扣除不存在" + "[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
|
@ -519,13 +517,12 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
long currentEmployeeId = user.getUID();
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 查询已有数据
|
||||
|
|
|
|||
|
|
@ -98,8 +98,6 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
return ServiceUtil.getService(SIArchivesServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
private List<TaxAgentManageRangePO> listByTaxAgentIds(List<Long> taxAgentIds) {
|
||||
if (CollectionUtils.isEmpty(taxAgentIds)) {
|
||||
return Lists.newArrayList();
|
||||
|
|
@ -233,17 +231,17 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
// 查询人员信息
|
||||
List<Long> employeeIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.EMPLOYEE.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
|
||||
// List<DataCollectionEmployee> employeeComInfos = comInfoCache.getCacheList(HrmEmployeeComInfo.class, employeeIds);
|
||||
List<DataCollectionEmployee> employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
|
||||
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
|
||||
// 查询部门信息
|
||||
List<Long> departmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.DEPT.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
|
||||
List<DeptInfo> departmentComInfos = employBiz.getDeptInfoList(departmentIds);
|
||||
List<DeptInfo> departmentComInfos = getSalaryEmployeeService().getDeptInfoList(departmentIds);
|
||||
// 查询分部信息
|
||||
List<Long> subDepartmentIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.SUBCOMPANY.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
|
||||
|
||||
List<SubCompanyInfo> subDepartmentComInfos = employBiz.getSubCompanyInfoList(subDepartmentIds);
|
||||
List<SubCompanyInfo> subDepartmentComInfos = getSalaryEmployeeService().getSubCompanyInfoList(subDepartmentIds);
|
||||
// 查询岗位信息
|
||||
List<Long> positionIds = taxAgentManageRanges.stream().filter(e -> Objects.equals(e.getTargetType(), TargetTypeEnum.POSITION.getValue())).map(TaxAgentManageRangePO::getTargetId).collect(Collectors.toList());
|
||||
List<PositionInfo> positionComInfos = employBiz.listPositionInfo(positionIds);
|
||||
List<PositionInfo> positionComInfos = getSalaryEmployeeService().listPositionInfo(positionIds);
|
||||
// 分页参数
|
||||
PageInfo<TaxAgentManageRangeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentManageRangeListDTO.class);
|
||||
// 查询人员状态
|
||||
|
|
@ -589,7 +587,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService().listEmployee();
|
||||
|
||||
// 错误excel内容
|
||||
List<Map> errorData = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
|
|||
// 查询个税申报表明细
|
||||
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(queryParam.getTaxDeclarationId(), employeeIdPage);
|
||||
// 查询人员
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIdPage);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIdPage);
|
||||
// List<SimpleEmployee> simpleEmployees = hrmCommonEmployeeService.getEmployeeByIds(employeeIdPage.getRecords(), tenantKey);
|
||||
// 转换成列表dto
|
||||
TaxDeclarationBO.buildDetailListDTO(queryParam.getTaxDeclarationId(), dtoPage, taxDeclarationDetailPOS, simpleEmployees);
|
||||
|
|
@ -181,7 +181,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
|
|||
List<Long> employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
|
||||
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
|
||||
// 查询人员信息
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
|
||||
// 转换成列表dto
|
||||
return TaxDeclarationDetailBO.convert2ListDTO4Labor(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
|
||||
}
|
||||
|
|
@ -199,7 +199,7 @@ public class TaxDeclarationDetailServiceImpl extends Service implements TaxDecla
|
|||
List<Long> employeeIds = taxDeclarationEmployees.stream().map(TaxDeclarationEmployeeDTO::getEmployeeId).collect(Collectors.toList());
|
||||
List<TaxDeclarationDetailPO> taxDeclarationDetailPOS = listByTaxDeclarationIdAndEmployeeIds(taxDeclarationId, employeeIds);
|
||||
// 查询人员信息
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService().getEmployeeByIdsAll(employeeIds);
|
||||
// 转换成列表dto
|
||||
return TaxDeclarationDetailBO.convert2ListDTO4Annual(taxDeclarationDetailPOS, taxDeclarationEmployees, simpleEmployees);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
package com.engine.salary.sys.service.impl;
|
||||
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.weaverboot.frame.ioc.anno.classAnno.WeaSysInitComponent;
|
||||
import com.weaverboot.frame.ioc.anno.methodAnno.WeaSysInit;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@WeaSysInitComponent("initSalary")
|
||||
public class InitServiceImpl {
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
||||
BaseBean baseBean = new BaseBean();
|
||||
|
||||
@WeaSysInit(order = 1, description = "升级薪酬非标版本")
|
||||
public void init() {
|
||||
String version = baseBean.getPropValue("hrmSalary", "version");
|
||||
Date date = new Date();
|
||||
|
||||
//升级版本号
|
||||
//当前版本
|
||||
SalarySysConfPO currentVersion = getSalarySysConfMapper().getOneByCode("currentVersion");
|
||||
//前一个版本
|
||||
int orderWeight = getSalarySysConfMapper().countByCode("previousVersion");
|
||||
if (currentVersion == null) {
|
||||
//初始化版本
|
||||
SalarySysConfPO current = SalarySysConfPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.confKey("currentVersion")
|
||||
.confValue(version)
|
||||
.title("当前版本")
|
||||
.module("basic")
|
||||
.orderWeight(0)
|
||||
.createTime(date)
|
||||
.updateTime(date)
|
||||
.deleteType(0).build();
|
||||
getSalarySysConfMapper().insertIgnoreNull(current);
|
||||
} else {
|
||||
//版本不一样
|
||||
if (!StringUtils.equals(version, currentVersion.getConfValue())) {
|
||||
//生成历史版本记录
|
||||
SalarySysConfPO previous = SalarySysConfPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.confKey("previousVersion")
|
||||
.confValue(currentVersion.getConfValue())
|
||||
.title("上一个版本")
|
||||
.module("basic")
|
||||
.orderWeight(orderWeight)
|
||||
.createTime(date)
|
||||
.updateTime(date)
|
||||
.deleteType(0)
|
||||
.build();
|
||||
getSalarySysConfMapper().insertIgnoreNull(previous);
|
||||
|
||||
//更新当前版本
|
||||
currentVersion.setConfValue(version);
|
||||
currentVersion.setUpdateTime(date);
|
||||
getSalarySysConfMapper().updateIgnoreNull(currentVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@WeaSysInit(order = 2, description = "处理薪资档案历史数据")
|
||||
public void handleSalaryArchiveHistoryData() {
|
||||
// new SalaryArchiveServiceImpl().handleHistory(1L);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -770,7 +770,7 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
po.setTotal(AESEncryptUtil.encrypt(po.getTotal()));
|
||||
}
|
||||
});
|
||||
List<List<InsuranceAccountDetailPO>> partition = Lists.partition(insuranceAccountDetailPos, 50);
|
||||
List<List<InsuranceAccountDetailPO>> partition = Lists.partition(insuranceAccountDetailPos, 20);
|
||||
InsuranceAccountDetailMapper mapper = sqlSession.getMapper(InsuranceAccountDetailMapper.class);
|
||||
partition.forEach(mapper::batchUpdate);
|
||||
sqlSession.commit();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
|||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.wrapper.AddUpDeductionWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
|
|
@ -198,9 +199,11 @@ public class AddUpDeductionController {
|
|||
if (StringUtils.isNotBlank(id)) {
|
||||
param.setId(Long.valueOf(id));
|
||||
}
|
||||
|
||||
String declareMonth = request.getParameter("declareMonth");
|
||||
if (StringUtils.isNotBlank(declareMonth)) {
|
||||
param.setDeclareMonth(Arrays.asList(declareMonth.split(",")));
|
||||
param.setDeclareMonth(Arrays.stream(declareMonth.split(",")).map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
param.setDeclareMonthDate(Arrays.stream(declareMonth.split(",")).map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
String username = request.getParameter("username");
|
||||
|
|
|
|||
|
|
@ -150,6 +150,23 @@ public class SIAccountController {
|
|||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listSupplementaryPage, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取补缴缴纳列表合计行
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/detail/supplementary/list/sum")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listSupplementarySum(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listSupplementarySum, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据姓名获取补缴缴纳列表
|
||||
*
|
||||
|
|
@ -677,6 +694,24 @@ public class SIAccountController {
|
|||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listRecessionPage, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取退差列表合计列
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/detail/recession/list/sum")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listRecessionSum(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listRecessionSum, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取InsuranceAccountDetailPO中的社保、公积金、其他福利个人和公司缴纳数据
|
||||
* @param request
|
||||
|
|
@ -896,6 +931,23 @@ public class SIAccountController {
|
|||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listBalancePage, insuranceAccountDetailParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取补差列表合计列
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param insuranceAccountDetailParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/detail/balance/list/sum")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listBalanceSum(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody InsuranceAccountDetailParam insuranceAccountDetailParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<InsuranceAccountDetailParam, Map<String, Object>>(user).run(getService(user)::listBalanceSum, insuranceAccountDetailParam);
|
||||
}
|
||||
// **********************************补差 end*********************************/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class SalaryAcctEmployeeWrapper extends Service {
|
|||
}
|
||||
// 查询人员信息
|
||||
List<Long> employeeIds = list.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 查询个税扣缴义务人
|
||||
List<Long> taxAgentIds = list.stream().map(SalaryAcctEmployeePO::getTaxAgentId).collect(Collectors.toList());
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
|
||||
|
|
|
|||
|
|
@ -15,14 +15,8 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
|||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.SalaryAcctEmployeeService;
|
||||
import com.engine.salary.service.SalaryAcctRecordService;
|
||||
import com.engine.salary.service.SalarySendService;
|
||||
import com.engine.salary.service.SalarySobService;
|
||||
import com.engine.salary.service.impl.SalaryAcctEmployeeServiceImpl;
|
||||
import com.engine.salary.service.impl.SalaryAcctRecordServiceImpl;
|
||||
import com.engine.salary.service.impl.SalarySendServiceImpl;
|
||||
import com.engine.salary.service.impl.SalarySobServiceImpl;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.impl.*;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
|
@ -62,6 +56,10 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
return ServiceUtil.getService(SalarySendServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
// private ComInfoCache comInfoCache;
|
||||
|
||||
public PageInfo<SalaryAcctRecordListDTO> listPage(SalaryAcctRecordQueryParam queryParam) {
|
||||
|
|
@ -70,7 +68,6 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
SalarySobUtil.handleEmployeeStatusHistory();
|
||||
// 处理工资单发放历史数据
|
||||
getSalarySendService(user).handleHistory();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
// 查询薪资核算记录(分页)
|
||||
PageInfo<SalaryAcctRecordPO> page = getSalaryAcctRecordService(user).listPageByParam(queryParam);
|
||||
PageInfo<SalaryAcctRecordListDTO> dtoPage = new PageInfo<SalaryAcctRecordListDTO>(SalaryAcctRecordListDTO.class);
|
||||
|
|
@ -84,7 +81,7 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByIds(salarySobIds);
|
||||
// 查询薪资核算记录的创建人员的人员信息
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getCreator, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
|
||||
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 查询薪资核算人数的数量
|
||||
Set<Long> salaryAcctRecordIds = SalaryEntityUtil.properties(list, SalaryAcctRecordPO::getId);
|
||||
List<SalaryAcctEmployeeCountDTO> salaryAcctEmployeeCountDTOS = getSalaryAcctEmployeeService(user).countBySalaryAcctRecordId(salaryAcctRecordIds);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
|||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.impl.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -32,8 +31,6 @@ import weaver.hrm.User;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
import static com.engine.salary.sys.constant.SalarySysConstant.OPEN_ACCT_RESULT_SUM;
|
||||
|
||||
/**
|
||||
* 薪资核算结果
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
|
|
@ -125,7 +122,7 @@ public class SalaryAcctResultWrapper extends Service {
|
|||
Map<String, Object> datas = new HashMap<>();
|
||||
|
||||
//合计
|
||||
SalarySysConfPO openSum = getSalarySysConfService(user).getOneByCode(OPEN_ACCT_RESULT_SUM);
|
||||
// SalarySysConfPO openSum = getSalarySysConfService(user).getOneByCode(OPEN_ACCT_RESULT_SUM);
|
||||
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
||||
datas.put("sumRow", sumRow);
|
||||
return datas;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return ServiceUtil.getService(SalaryArchiveItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private EmployBiz employeeService = new EmployBiz();
|
||||
|
||||
|
||||
private TaxAgentService getTaxAgentService(User user) {
|
||||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
|
|
@ -67,6 +67,10 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return ServiceUtil.getService(SalaryArchiveExcelServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 薪资档案列表(分页)
|
||||
|
|
@ -320,7 +324,7 @@ public class SalaryArchiveWrapper extends Service {
|
|||
throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(100463, "薪资档案不存在") + "[id:%s]", salaryArchiveId));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employeeService.getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId()));
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).getEmployeeByIdsAll(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100465, "薪资档案员工信息不存在"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
|
|
@ -9,8 +10,10 @@ import com.engine.salary.entity.taxagent.param.*;
|
|||
import com.engine.salary.entity.taxagent.po.TaxAgentSubAdminPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentManageRangeService;
|
||||
import com.engine.salary.service.TaxAgentSubAdminService;
|
||||
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -34,12 +37,14 @@ import java.util.stream.Collectors;
|
|||
**/
|
||||
public class TaxAgentSubAdminWrapper extends Service {
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService() {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private TaxAgentSubAdminService taxAgentSubAdminService;
|
||||
private TaxAgentManageRangeService taxAgentManageRangeService;
|
||||
// private HrmCommonEmployeeService hrmCommonEmployeeService;
|
||||
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
/**
|
||||
* 获取分管理员列表
|
||||
*
|
||||
|
|
@ -51,7 +56,7 @@ public class TaxAgentSubAdminWrapper extends Service {
|
|||
|
||||
List<TaxAgentSubAdminPO> list = taxAgentSubAdminService.listByTaxAgentIds(Collections.singletonList(queryParam.getTaxAgentId()));
|
||||
String range = SalaryI18nUtil.getI18nLabel(106290, "详情");
|
||||
List<DataCollectionEmployee> subAdminList = employBiz.getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
List<DataCollectionEmployee> subAdminList = getSalaryEmployeeService().getEmployeeByIds(list.stream().map(TaxAgentSubAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
|
||||
List<TaxAgentSubAdminListDTO> records = TaxAgentBO.convertToSubAdminListDTO(list, range, subAdminList);
|
||||
PageInfo<TaxAgentSubAdminListDTO> listPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxAgentSubAdminListDTO.class);
|
||||
|
|
@ -95,7 +100,7 @@ public class TaxAgentSubAdminWrapper extends Service {
|
|||
taxAgentSubAdminBaseFormDTO.setDescription(taxAgentSubAdmin.getRemark());
|
||||
TaxAgentEmployeeOptionDTO taxAgentEmployee = new TaxAgentEmployeeOptionDTO();
|
||||
taxAgentEmployee.setId(taxAgentSubAdmin.getEmployeeId());
|
||||
DataCollectionEmployee employee = employBiz.getEmployeeById(taxAgentEmployee.getId());
|
||||
DataCollectionEmployee employee = getSalaryEmployeeService().getEmployeeById(taxAgentEmployee.getId());
|
||||
taxAgentEmployee.setContent(employee == null ? "" : employee.getUsername());
|
||||
|
||||
taxAgentSubAdminBaseFormDTO.setSubAdminUser(Collections.singletonList(taxAgentEmployee));
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ public class TaxAgentWrapper extends Service {
|
|||
List<TaxAgentPO> list = page.getList();
|
||||
List<Long> taxAgentIds = list.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
List<TaxAgentAdminPO> taxAgentAdmins = getTaxAgentAdminService(user).listByTaxAgentIds(taxAgentIds);
|
||||
List<DataCollectionEmployee> adminList = getSalaryEmployeeService(user).listByIds(taxAgentAdmins.stream().map(TaxAgentAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
List<DataCollectionEmployee> adminList = getSalaryEmployeeService(user).getEmployeeByIdsAll(taxAgentAdmins.stream().map(TaxAgentAdminPO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
listPage.setList(TaxAgentBO.convertToTableListDTO(page.getList(), null, taxAgentAdmins, adminList, setLabel));
|
||||
} else {
|
||||
listPage.setList(TaxAgentBO.convertToTableListDTO(page.getList(), null, setLabel));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.engine.salary.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.component.WeaFormOption;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
|
|
@ -14,8 +13,10 @@ import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryPara
|
|||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.service.TaxDeclarationService;
|
||||
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
|
||||
import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
||||
import com.engine.salary.service.impl.TaxDeclarationServiceImpl;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
|
|
@ -48,6 +49,10 @@ public class TaxDeclarationWrapper extends Service {
|
|||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个税申报表列表
|
||||
*
|
||||
|
|
@ -56,7 +61,6 @@ public class TaxDeclarationWrapper extends Service {
|
|||
* @return
|
||||
*/
|
||||
public PageInfo listPage(TaxDeclarationListQueryParam queryParam) {
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
// 询个税申报表(分页)
|
||||
PageInfo<TaxDeclarationPO> page = getTaxDeclarationService(user).listPageByParam(queryParam);
|
||||
PageInfo<TaxDeclarationListDTO> dtoPage = new PageInfo<TaxDeclarationListDTO>(TaxDeclarationListDTO.class);
|
||||
|
|
@ -67,7 +71,7 @@ public class TaxDeclarationWrapper extends Service {
|
|||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
// 查询人员
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getCreator, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeComInfos = employBiz.getEmployeeByIdsAll(employeeIds);
|
||||
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
// 查询个税扣缴义务人
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(list, TaxDeclarationPO::getTaxAgentId);
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxDeclarationService(user).countByTaxDeclarationId(taxAgentIds);
|
||||
|
|
|
|||
Loading…
Reference in New Issue