Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
b464240ff7
|
|
@ -772,12 +772,17 @@
|
|||
<if test="null != otherPerJson and '' != otherPerJson">other_per_json = #{otherPerJson},</if>
|
||||
<if test="null != otherPerSum and '' != otherPerSum">other_per_sum = #{otherPerSum},</if>
|
||||
<if test="null != perSum and '' != perSum">per_sum = #{perSum},</if>
|
||||
<if test="null != comSum and '' != comSum">com_sum = #{comSum},</if>
|
||||
<if test="null != socialComJson and '' != socialComJson">social_com_json = #{socialComJson},</if>
|
||||
<if test="null != socialComSum and '' != socialComSum">social_com_sum = #{socialComSum},</if>
|
||||
<if test="null != fundComJson and '' != fundComJson">fund_com_json = #{fundComJson},</if>
|
||||
<if test="null != fundComSum and '' != fundComSum">fund_com_sum = #{fundComSum},</if>
|
||||
<if test="null != otherComJson and '' != otherComJson">other_com_json = #{otherComJson},</if>
|
||||
<if test="null != otherComSum and '' != otherComSum">other_com_sum = #{otherComSum},</if>
|
||||
<if test="null != socialSum and '' != socialSum">social_sum = #{socialSum},</if>
|
||||
<if test="null != fundSum and '' != fundSum">fund_sum = #{fundSum},</if>
|
||||
<if test="null != otherSum and '' != otherSum">other_sum = #{otherSum},</if>
|
||||
<if test="null != total and '' != total">total = #{total},</if>
|
||||
<if test="null != updateTime">update_time = #{updateTime},</if>
|
||||
|
||||
</set>
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@
|
|||
(
|
||||
SELECT
|
||||
e.lastname AS userName,
|
||||
e.jobtitle AS jobNum,
|
||||
e.workcode AS jobNum,
|
||||
e.departmentid AS departmentId,
|
||||
d.departmentname AS departmentName,
|
||||
e.STATUS AS userStatus,
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
.collect(Collectors.toList());
|
||||
if (employeeSameIds.size() != 1) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不能为空且不可重复(姓名、部门和手机号同时确认唯一)");
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不存在或者存在多个员工");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
.collect(Collectors.toList());
|
||||
if (employeeSameIds.size() != 1) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不能为空且不可重复(姓名、部门和手机号同时确认唯一)");
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不存在或者存在多个员工");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
errorSum += 1;
|
||||
} else if (CollectionUtils.isEmpty(employeeSameIds) || employeeSameIds.size() > 1) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", SalaryI18nUtil.getI18nLabel(100579, "员工信息不能为空且不可重复(姓名、部门和手机号同时确认唯一)"));
|
||||
errorMessageMap.put("message", SalaryI18nUtil.getI18nLabel(100579, "员工信息不存在或者存在多个员工"));
|
||||
excelComments.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
errorSum += 1;
|
||||
} else if (CollectionUtils.isEmpty(employeeSameIds) || employeeSameIds.size() > 1) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不能为空且不可重复(姓名、部门和手机号同时确认唯一)");
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不存在或者存在多个员工");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1125,7 +1125,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
|
||||
//当人员信息导入筛选的全局配置为"0"时,姓名才是必填项
|
||||
if (StringUtils.isEmpty(dataValue) && "0".equals(salarySysConfPO.getConfValue())) {
|
||||
if (StringUtils.isEmpty(dataValue) && "0".equals(salarySysConfPO.getConfValue())) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"));
|
||||
|
|
@ -1386,6 +1386,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
insuranceAccountDetailPO.setBillMonth(baseMap.get("账单月份").toString());
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("社保合计", "").toString())) {
|
||||
insuranceAccountDetailPO.setSocialSum(baseMap.get("社保合计").toString());
|
||||
}
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("公积金合计", "").toString())) {
|
||||
insuranceAccountDetailPO.setFundSum(baseMap.get("公积金合计").toString());
|
||||
}
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("其他福利合计", "").toString())) {
|
||||
insuranceAccountDetailPO.setOtherSum(baseMap.get("其他福利合计").toString());
|
||||
}
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("合计", "").toString())) {
|
||||
insuranceAccountDetailPO.setTotal(baseMap.get("合计").toString());
|
||||
}
|
||||
|
||||
insuranceAccountDetailPO.setUpdateTime(new Date());
|
||||
|
||||
return insuranceAccountDetailPO;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.service.impl;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
|
|
@ -34,11 +35,13 @@ import com.engine.salary.mapper.siarchives.SocialSchemeMapper;
|
|||
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.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.SIImportService;
|
||||
import com.engine.salary.service.SISchemeService;
|
||||
import com.engine.salary.service.SalaryAcctEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
|
|
@ -122,6 +125,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getForm(Map<String, Object> params) {
|
||||
return commandExecutor.execute(new SISchemeGetFormCmd(params, user));
|
||||
|
|
@ -689,10 +696,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
String userStatus = (String) singleAccount.get(3).get(SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
|
||||
String workcode = (String) singleAccount.get(4).get(SalaryI18nUtil.getI18nLabel(86317, "工号"));
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
|
||||
String rowIndex = "第" + index + "行";
|
||||
if (StringUtils.isBlank(userName) && StringUtils.isBlank(deparmentName) && StringUtils.isBlank(mobile) && StringUtils.isBlank(userStatus)) {
|
||||
//仅在全局人员筛选配置为“0”时,才对用户名、部门名称、手机号有要求
|
||||
if (StringUtils.isBlank(userName) && StringUtils.isBlank(deparmentName) && StringUtils.isBlank(mobile) && "0".equals(salarySysConfPO.getConfValue())) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + " 用户名、部门名称、手机号、用户状态" + SalaryI18nUtil.getI18nLabel(100303, "不能同时为空"));
|
||||
errorMessageMap.put("message", rowIndex + " 用户名、部门名称、手机号" + SalaryI18nUtil.getI18nLabel(100303, "不能同时为空"));
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
|
|
@ -27,7 +28,9 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
|||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
|
|
@ -118,6 +121,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
return ServiceUtil.getService(SalaryAcctReportServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfMapper getSalarySysConfMapper() {
|
||||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
|
|
@ -521,6 +528,9 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
|
||||
// 薪资核算记录的id
|
||||
Long salaryAcctRecordId = param.getSalaryAcctRecordId();
|
||||
// 薪资核算记录
|
||||
|
|
@ -612,25 +622,25 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
continue;
|
||||
}
|
||||
String dataValue = (String) map.getOrDefault(dataKey.toString(), "");
|
||||
|
||||
String deparmentName = (String) map.getOrDefault("部门", "");
|
||||
|
||||
String mobile = (String) map.getOrDefault("手机号", "");
|
||||
String workcode = (String) map.getOrDefault("工号", "");
|
||||
|
||||
if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) {
|
||||
usernameIndex = j;
|
||||
if (StringUtils.isEmpty(dataValue)) {
|
||||
if (StringUtils.isEmpty(dataValue) && "0".equals(salarySysConfPO.getConfValue())) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"));
|
||||
excelComments.add(errorMessageMap);
|
||||
//salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"), i, i, j, j);
|
||||
} else {
|
||||
|
||||
List<DataCollectionEmployee> employeeSameIds = salaryEmployees.stream().filter(e -> (StringUtils.isBlank(dataValue) || Objects.equals(e.getUsername(), dataValue))
|
||||
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
|
||||
&& (StringUtils.isBlank(mobile) || Objects.equals(e.getMobile(), mobile)))
|
||||
.collect(Collectors.toList());
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
List<DataCollectionEmployee> employeeSameIds = getSalaryAcctEmployeeService(user).matchImportEmployee(salaryEmployees, dataValue, deparmentName, mobile, workcode);
|
||||
// List<DataCollectionEmployee> employeeSameIds = salaryEmployees.stream().filter(e -> (StringUtils.isBlank(dataValue) || Objects.equals(e.getUsername(), dataValue))
|
||||
// && (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
|
||||
// && (StringUtils.isBlank(mobile) || Objects.equals(e.getMobile(), mobile)))
|
||||
// .collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSameIds)) {
|
||||
isError = true;
|
||||
|
|
@ -646,7 +656,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
if (employeeSameIds.size() != 1) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + "员工信息不能为空且不可重复(姓名、部门和手机号同时确认唯一)");
|
||||
errorMessageMap.put("message", row + "员工信息不存在或者存在多个员工");
|
||||
excelComments.add(errorMessageMap);
|
||||
} else {
|
||||
employeeId = CollectionUtils.isNotEmpty(employeeSameIds) && employeeSameIds.size() == 1 ? employeeSameIds.get(0).getEmployeeId() : null;
|
||||
|
|
|
|||
|
|
@ -1059,7 +1059,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
if (!isEmpty && userNameI18n.equals(key)) {
|
||||
if (CollectionUtils.isEmpty(employeeSameIds) || employeeSameIds.size() > 1) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowindex + "员工信息不能为空且不可重复(姓名、部门和手机号同时确认唯一)");
|
||||
errorMessageMap.put("message", rowindex + "员工信息不存在或者存在多个员工");
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
} else if (employeeId == null) {
|
||||
|
|
|
|||
|
|
@ -100,6 +100,12 @@ public class SalaryFormulaWrapper extends Service {
|
|||
welfareList.add(insuranceAcctDetailImportFieldDTO);
|
||||
|
||||
}
|
||||
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("社保合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("公积金合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("其他福利合计"));
|
||||
welfareList.add(new InsuranceAcctDetailImportFieldDTO("合计"));
|
||||
|
||||
return welfareList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue