diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index 0638a4f0d..c62ade2bb 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=2.14.2.2405.02 +version=2.14.3.2406.01 openFormulaForcedEditing=false \ No newline at end of file diff --git a/resource/sqlupgrade/DM/sql202405280703.sql b/resource/sqlupgrade/DM/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/DM/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/sqlupgrade/GS/sql202405280703.sql b/resource/sqlupgrade/GS/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/GS/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/sqlupgrade/JC/sql202405280703.sql b/resource/sqlupgrade/JC/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/JC/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/sqlupgrade/Mysql/sql202405280703.sql b/resource/sqlupgrade/Mysql/sql202405280703.sql new file mode 100644 index 000000000..329bd939c --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202405280703.sql @@ -0,0 +1 @@ +ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int(0) NULL ; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202405280703.sql b/resource/sqlupgrade/Oracle/sql202405280703.sql new file mode 100644 index 000000000..24fc81139 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202405280703.sql @@ -0,0 +1,2 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202405280703.sql b/resource/sqlupgrade/PG/sql202405280703.sql new file mode 100644 index 000000000..902cfab0d --- /dev/null +++ b/resource/sqlupgrade/PG/sql202405280703.sql @@ -0,0 +1 @@ +ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int NULL ; \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202405280703.sql b/resource/sqlupgrade/SQLServer/sql202405280703.sql new file mode 100644 index 000000000..086ab3bf5 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202405280703.sql @@ -0,0 +1,2 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status int NULL +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202405280703.sql b/resource/sqlupgrade/ST/sql202405280703.sql new file mode 100644 index 000000000..905ff7b4f --- /dev/null +++ b/resource/sqlupgrade/ST/sql202405280703.sql @@ -0,0 +1,3 @@ +ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0); +/ + diff --git a/resource/wiki/人员生成不了档案.sql b/resource/wiki/人员生成不了档案.sql index d66d7df39..75b03ff39 100644 --- a/resource/wiki/人员生成不了档案.sql +++ b/resource/wiki/人员生成不了档案.sql @@ -1,7 +1,6 @@ +select id from hrsa_tax_agent_emp +where tax_agent_id =扣缴义务人id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =扣缴义务人id and delete_type = 0) + + update hrsa_tax_agent_emp set delete_type = 3 -where id in( - - select id from hrsa_tax_agent_emp - where tax_agent_id =27 and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =27 and delete_type = 0) - -) \ No newline at end of file +where tax_agent_id=扣缴义务人id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =扣缴义务人id and delete_type = 0) \ No newline at end of file diff --git a/resource/wiki/常用查询.md b/resource/wiki/常用查询.md index 51576d16d..594b14bf8 100644 --- a/resource/wiki/常用查询.md +++ b/resource/wiki/常用查询.md @@ -17,5 +17,5 @@ left join hrmresource e on e.id= result.employee_id left join hrsa_salary_item c on c.id=i.salary_item_id left join hrsa_tax_agent t on a.tax_agent_id=t.id where a.delete_type=0 and i.delete_type=0 and t.delete_type=0 and c.delete_type=0 - and a.employee_id=$main.ygid$ and t.name='$main.dzqgskjywr$' + and a.employee_id=人员id and t.name=扣缴义务人名称 and effective_time <= now() and c.name='基本工资' order by effective_time desc \ No newline at end of file diff --git a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java index a3b7ea962..839c3f779 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteDataBaseDTO.java @@ -53,4 +53,9 @@ public class AttendQuoteDataBaseDTO { * 工号 */ private String jobNum; + + /** + * 证件号码 + */ + private String idNo; } diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index 2dc46b6c0..2e8f30ea4 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -172,7 +172,7 @@ public class SalaryBillBO { try { Method method = salaryFormulaEmployeeDTO.getClass().getMethod(getter); Object invoke = method.invoke(salaryFormulaEmployeeDTO); - e.setSalaryItemValue((String) invoke); + e.setSalaryItemValue(Util.null2String(invoke)); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { log.error("no such method", e); } @@ -386,7 +386,6 @@ public class SalaryBillBO { } try { - log.info("发送短信内容, {}", content); if (e.get("mobile") != null) { MessageUtil.sendSMS(e.get("mobile").toString(), content); } else { diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 64f6bcfe5..121092602 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -181,9 +181,9 @@ public class SalaryAcctResultBO { List childrenColumns = Lists.newArrayList(); for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName(), 0), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns); @@ -192,18 +192,18 @@ public class SalaryAcctResultBO { // 没有分类的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } // 回算的薪资项目 for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) { if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } else { - columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); + columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType())); } } @@ -288,6 +288,8 @@ public class SalaryAcctResultBO { } // 主键id map.put("id", e.getId()); + //锁定状态 + map.put("lockStatus", LockStatusEnum.getByValue(e.getLockStatus()).getDefaultLabel()); //人员id map.put("employeeId", e.getEmployeeId()); // 个税扣缴义务人 @@ -552,7 +554,7 @@ public class SalaryAcctResultBO { // .canEdit(Objects.equals(Optional.ofNullable(salaryItemPO).map(SalaryItemPO::getUseInEmployeeSalary).orElse(0), 0)) .canEdit(true) .pattern(salarySobItemPO.getPattern()) - .lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getValue() : LockStatusEnum.UNLOCK.getValue()) + .lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getDefaultLabel() : LockStatusEnum.UNLOCK.getDefaultLabel()) .build(); } diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java index 1e6042977..c4ed999fd 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultUpdateLockStatusParam.java @@ -21,19 +21,19 @@ import java.util.Set; @AllArgsConstructor @NoArgsConstructor public class SalaryAcctResultUpdateLockStatusParam { - //锁定状态 private LockStatusEnum lockStatus; - //薪资项目的Id") - private Long salaryItemId; - //薪资核算人员的id") -// private Set idStrSet; + //薪资核算记录的id + private Long salaryAcctRecordId; + + //薪资项目的Id + private Long salaryItemId; //薪资项目的IdList private Set salaryItemIds; - //薪资核算记录的id") - private Long salaryAcctRecordId; + //薪资核算人员的id + private Set acctEmpIds; } diff --git a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java index f46c43f34..26b0c3e59 100644 --- a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java +++ b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java @@ -1,7 +1,7 @@ package com.engine.salary.entity.salaryacct.po; -import com.engine.salary.annotation.SalaryFormulaVar; import com.engine.hrmelog.annotation.ElogTransform; +import com.engine.salary.annotation.SalaryFormulaVar; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import lombok.AllArgsConstructor; import lombok.Builder; @@ -119,6 +119,11 @@ public class SalaryAcctEmployeePO { @ElogTransform(name = "更新时间") private Date updateTime; + + @ElogTransform(name = "锁定状态") + private Integer lockStatus; + + //--------条件---------- //主键id集合 private Collection ids; diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java index 62d9196a6..fabbfd1b0 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java @@ -78,6 +78,7 @@ public class SalaryArchiveBO { columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "部门"), "departmentName")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86185, "工号"), "workcode")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile")); + columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86186, "证件号码"), "idNo")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "起始发薪日期"), "payStartDate")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "最后发薪日期"), "payEndDate")); diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java index cfe3d8d43..3332fff79 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java @@ -349,6 +349,7 @@ public class SalaryArchiveExcelBO extends Service { String deparmentName = Optional.ofNullable(map.get(departmentI18n)).orElse("").toString(); String mobileName = Optional.ofNullable(map.get("手机号")).orElse("").toString(); String workcode = Optional.ofNullable(map.get("工号")).orElse("").toString(); + String idNo = Optional.ofNullable(map.get("证件号码")).orElse("").toString(); String validType = importHandleParam.getEmpValidType(); List emps = new ArrayList<>(); @@ -369,6 +370,10 @@ public class SalaryArchiveExcelBO extends Service { emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode))) .collect(Collectors.toList()); } + else if ("2".equals(validType)) { + emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(idNo) || Objects.equals(e.getIdNo(), idNo))) + .collect(Collectors.toList()); + } } List employeeSameIds = new ArrayList<>(); diff --git a/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java b/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java index 82b97bf05..1083ca4dd 100644 --- a/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java +++ b/src/com/engine/salary/entity/salaryarchive/dto/SalaryArchiveListDTO.java @@ -89,6 +89,12 @@ public class SalaryArchiveListDTO { @TableTitle(title = "工号", dataIndex = "workcode", key = "workcode") private String workcode; + /** + * 证件号码 + */ + @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") + private String idNo; + /** * 员工状态 */ diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java index f1a29db50..86973e4a4 100644 --- a/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java +++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobRangeImportListDTO.java @@ -54,10 +54,16 @@ public class SalarySobRangeImportListDTO { @ExcelProperty(index = 3) private String jobNum; + //证件号码 + @SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo") + @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") + @ExcelProperty(index = 4) + private String idNo; + //人员状态 @SalaryTableColumn(text = "员工状态", width = "10%", column = "employeeStatus") @TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus") - @ExcelProperty(index = 4) + @ExcelProperty(index = 5) private String employeeStatus; } diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java index 2aa206984..2fb5297ce 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesEmployeePO.java @@ -36,6 +36,8 @@ public class InsuranceArchivesEmployeePO { private String telephone; + private String idNo; + @I18n private String departmentName; diff --git a/src/com/engine/salary/entity/siexport/po/AccountExportPO.java b/src/com/engine/salary/entity/siexport/po/AccountExportPO.java index 574c08b5c..73c82c82e 100644 --- a/src/com/engine/salary/entity/siexport/po/AccountExportPO.java +++ b/src/com/engine/salary/entity/siexport/po/AccountExportPO.java @@ -2,6 +2,7 @@ package com.engine.salary.entity.siexport.po; import com.engine.salary.annotation.I18n; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; +import lombok.Data; /** * @Author weaver_cl @@ -9,6 +10,7 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; * @Date 2022/3/7 * @Version V1.0 **/ +@Data public class AccountExportPO extends InsuranceAccountDetailPO { @I18n @@ -16,58 +18,12 @@ public class AccountExportPO extends InsuranceAccountDetailPO { private String telephone; + private String idNo; + @I18n private String departmentName; private Integer userStatus; private String workcode; - - public void setWorkcode(String workcode) { - this.workcode = workcode; - } - - public String getWorkcode() { - return workcode; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getTelephone() { - return telephone; - } - - public void setTelephone(String telephone) { - this.telephone = telephone; - } - - public String getDepartmentName() { - return departmentName; - } - - public void setDepartmentName(String departmentName) { - this.departmentName = departmentName; - } - - public Integer getUserStatus() { - return userStatus; - } - - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - // public UserStatusEnum getUserStatus() { -// return userStatus; -// } -// -// public void setUserStatus(UserStatusEnum userStatus) { -// this.userStatus = userStatus; -// } } diff --git a/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java b/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java index 8865e6742..efb2bd799 100644 --- a/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java +++ b/src/com/engine/salary/entity/taxagent/dto/TaxAgentManageRangeEmployeeListDTO.java @@ -62,10 +62,16 @@ public class TaxAgentManageRangeEmployeeListDTO { @ExcelProperty(index = 3) private String jobNum; + // + @SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo") + @TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo") + @ExcelProperty(index = 4) + private String idNo; + //人员状态 @SalaryTableColumn(text = "员工状态", width = "10%", column = "employeeStatus") @TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus") - @ExcelProperty(index = 4) + @ExcelProperty(index = 5) private String employeeStatus; diff --git a/src/com/engine/salary/enums/common/FilterEnum.java b/src/com/engine/salary/enums/common/FilterEnum.java index c3d1ea2a5..ae7de1221 100644 --- a/src/com/engine/salary/enums/common/FilterEnum.java +++ b/src/com/engine/salary/enums/common/FilterEnum.java @@ -90,7 +90,7 @@ public enum FilterEnum implements BaseEnum { return StringUtils::isEmpty; } }, - ISNOTEMPTY("ISNOTEMPTY", "包含", 1) { + ISNOTEMPTY("ISNOTEMPTY", "不为空", 1) { @Override public Predicate filter(List params) { return StringUtils::isNotEmpty; diff --git a/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java b/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java index 316f9aa91..e7fa758c2 100644 --- a/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java +++ b/src/com/engine/salary/enums/salaryaccounting/LockStatusEnum.java @@ -3,25 +3,25 @@ package com.engine.salary.enums.salaryaccounting; import com.engine.salary.enums.BaseEnum; -public enum LockStatusEnum implements BaseEnum { - DEFAULT("DEFAULT", "默认", 0), - LOCK("LOCK", "锁定", 0), - UNLOCK("UNLOCK", "未锁定", 0); +public enum LockStatusEnum implements BaseEnum { + LOCK(1, "LOCK", 0), + UNLOCK(0, "UNLOCK", 0); - private String value; + private Integer value; private String defaultLabel; private int labelId; - LockStatusEnum(String value, String defaultLabel, int labelId) { + + LockStatusEnum(Integer value, String defaultLabel, int labelId) { this.value = value; this.defaultLabel = defaultLabel; this.labelId = labelId; } @Override - public String getValue() { + public Integer getValue() { return value; } @@ -34,4 +34,13 @@ public enum LockStatusEnum implements BaseEnum { public String getDefaultLabel() { return defaultLabel; } + + public static LockStatusEnum getByValue(Integer value) { + for (LockStatusEnum lockStatusEnum : LockStatusEnum.values()) { + if (lockStatusEnum.getValue().equals(value)) { + return lockStatusEnum; + } + } + return UNLOCK; + } } diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml index 481c44a30..dbe86d9f6 100644 --- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml +++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml @@ -7,6 +7,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -32,6 +33,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -57,6 +59,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -121,6 +124,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -147,6 +151,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * @@ -173,6 +178,7 @@ e.MOBILE AS telephone, d.departmentname AS departmentName, e.STATUS AS userStatus, + e.certificatenum as idNo, e.workcode AS workcode FROM ( SELECT * diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml index 0ad41c310..a1fa6af6b 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml @@ -94,11 +94,13 @@ , t.employee_type , e.mobile , e.workcode + , e.certificatenum as idNo , e.lastname as username , e.status AS employeeStatus , e.companystartdate as companystartdate , e.enddate as dismissdate , e.status AS employeeStatus + ,e.certificatenum as idNo , d.departmentname AS departmentName , c.subcompanyname AS subcompanyName diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml index b02390a48..234d990b3 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml @@ -163,7 +163,8 @@ e.lastname as username, d.departmentname AS departmentName, e.mobile, - e.workcode as job_num + e.workcode as job_num, + e.certificatenum as idNo diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 97ff1970a..a85801244 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -9,6 +9,7 @@ e.status, e.mobile, e.workcode, + e.certificatenum as idNo, 'false' as extEmp from hrmresource e left join hrmdepartment d on e.departmentid = d.id diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java index c27b10ac8..3b97e3084 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java @@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 薪资核算人员 @@ -16,7 +17,7 @@ import java.util.List; * @author qiantao * @version 1.0 **/ -public interface SalaryAcctEmployeeMapper { +public interface SalaryAcctEmployeeMapper { /** * 批量插入 @@ -117,4 +118,8 @@ public interface SalaryAcctEmployeeMapper { * @return 返回记录,没有返回null */ SalaryAcctEmployeePO getById(Long id); + + void lockByAcctEmpIds(@Param("lockStatus") Integer lockStatus, @Param("acctEmpIds") Set acctEmpIds); + + void lockByRecordId(@Param("lockStatus") Integer lockStatus, @Param("recordId") Long recordId); } diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml index a5a87e205..f39b5bc53 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml @@ -15,6 +15,7 @@ + @@ -52,7 +54,7 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) VALUES ( @@ -66,14 +68,15 @@ #{emp.updateTime}, #{emp.deleteType}, #{emp.tenantKey}, - #{emp.employeeType} + #{emp.employeeType}, + #{emp.lockStatus} ) INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) select @@ -87,7 +90,8 @@ #{emp.updateTime,jdbcType=DATE}, #{emp.deleteType,jdbcType=INTEGER}, #{emp.tenantKey,jdbcType=VARCHAR}, - #{emp.employeeType,jdbcType=INTEGER} + #{emp.employeeType,jdbcType=INTEGER}, + #{emp.lockStatus,jdbcType=INTEGER} from dual @@ -95,7 +99,7 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) VALUES ( #{emp.salaryAcctRecordId}, @@ -108,7 +112,8 @@ #{emp.updateTime}, #{emp.deleteType}, #{emp.tenantKey}, - #{emp.employeeType} + #{emp.employeeType}, + #{emp.lockStatus} ) @@ -1145,6 +1150,7 @@ + @@ -1163,6 +1169,7 @@ , t.delete_type , t.tenant_key , t.employee_type + , t.lock_status @@ -1259,4 +1266,22 @@ FROM hrsa_salary_acct_emp t WHERE id = #{id} AND delete_type = 0 + + + UPDATE hrsa_salary_acct_emp + SET lock_status = #{lockStatus} + WHERE delete_type = 0 + AND id IN + + #{acctEmpId} + + + + + UPDATE hrsa_salary_acct_emp + SET lock_status = #{lockStatus} + WHERE delete_type = 0 + AND salary_acct_record_id =#{recordId} + + diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java index 2dec937ca..2a05a0c72 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java @@ -116,6 +116,14 @@ public interface InsuranceAccountDetailMapper { */ List querySupplementListByBillMonth(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization); + /** + * 查询补差数据 + * @param billMonth 账单月份 + * @param paymentOrganization 个税扣缴义务人 + * @return + */ + List queryBalanceListByBillMonth(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization); + /** * 查询正常缴纳数据 * @param billMonth 账单月份 diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml index 55b55947e..977fb9edd 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml @@ -497,6 +497,7 @@ + + SELECT base.id AS baseInfoId, e.ID AS employeeId, e.lastname AS userName, e.departmentid AS departmentId, e.workcode AS jobNum, e.MOBILE AS telephone, - d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate, + d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,e.certificatenum as idNo, e.enddate as dimissionDate, social.siSchemeId, base.payment_organization AS paymentOrganization, diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java index 2397700e4..421f0a18e 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java @@ -746,7 +746,7 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt // 报表分享时间校验 String formatLocalDateTime = SalaryDateUtil.getFormatLocalDate(LocalDateTime.now()); List result = pushList.stream().filter(pushPO -> { - if (pushPO.getStartTime().compareTo(formatLocalDateTime) > 0 || (StringUtils.isNotEmpty(pushPO.getEndTime()) && pushPO.getEndTime().compareTo(formatLocalDateTime) < 0)) { + if ((StringUtils.isNotBlank(pushPO.getStartTime()) && pushPO.getStartTime().compareTo(formatLocalDateTime) > 0) || (StringUtils.isNotEmpty(pushPO.getEndTime()) && pushPO.getEndTime().compareTo(formatLocalDateTime) < 0)) { return false; } return true; diff --git a/src/com/engine/salary/service/SalaryAcctEmployeeService.java b/src/com/engine/salary/service/SalaryAcctEmployeeService.java index b3882c68c..10bdf5bd5 100644 --- a/src/com/engine/salary/service/SalaryAcctEmployeeService.java +++ b/src/com/engine/salary/service/SalaryAcctEmployeeService.java @@ -258,4 +258,10 @@ public interface SalaryAcctEmployeeService { */ List listByTaxAgentAndSalaryMonth(List taxAgentIds, Set salaryMonths); + /** + * 锁定人员 + * @param updateParam + */ + void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam); + } diff --git a/src/com/engine/salary/service/SalaryAcctResultService.java b/src/com/engine/salary/service/SalaryAcctResultService.java index 0090f8330..7c8e8a00f 100644 --- a/src/com/engine/salary/service/SalaryAcctResultService.java +++ b/src/com/engine/salary/service/SalaryAcctResultService.java @@ -158,7 +158,7 @@ public interface SalaryAcctResultService { List listBySalaryAcctRecordIdsAndTaxAgentIds(Collection salaryAcctRecordIds, Collection taxAgentIds); /** - * 更新锁定状态 + * 锁定项目 * * @param updateParam */ diff --git a/src/com/engine/salary/service/SalaryEmployeeService.java b/src/com/engine/salary/service/SalaryEmployeeService.java index 5c84a0efb..a320545cb 100644 --- a/src/com/engine/salary/service/SalaryEmployeeService.java +++ b/src/com/engine/salary/service/SalaryEmployeeService.java @@ -86,9 +86,10 @@ public interface SalaryEmployeeService { * @param deparmentName 部门 * @param mobile 手机号 * @param workcode 工号 + * @param idNo 身份证号 * @param uid 人员id */ - List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid); + List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, String idNo, Long uid); String empValidType(); diff --git a/src/com/engine/salary/service/impl/AbstractTaxAgentTaxReturnCheckService.java b/src/com/engine/salary/service/impl/AbstractTaxAgentTaxReturnCheckService.java index e4a5fba05..301782ed1 100644 --- a/src/com/engine/salary/service/impl/AbstractTaxAgentTaxReturnCheckService.java +++ b/src/com/engine/salary/service/impl/AbstractTaxAgentTaxReturnCheckService.java @@ -124,6 +124,7 @@ public abstract class AbstractTaxAgentTaxReturnCheckService extends Service impl String reqJson = JsonUtil.toJsonString(requestParam); Map params = new HashMap<>(1); Map header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret()); + log.info("getCompanyRegisterInfo params = {}", reqJson); String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE); log.info("getCompanyRegisterInfo === res : {}", res); return JsonUtil.parseBean(res, CompanyRegisterInfoResponse.class); @@ -190,6 +191,7 @@ public abstract class AbstractTaxAgentTaxReturnCheckService extends Service impl String reqJson = JsonUtil.toJsonString(requestParam); Map params = new HashMap<>(1); Map header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret()); + log.info("checkPassword === res : {}", reqJson); String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE); log.info("checkPassword === res : {}", res); return JsonUtil.parseObject(res, CheckPasswordResponse.class); diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 8a3fcd474..0a3db3b50 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -296,9 +296,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction String deparmentName = dto.getDepartmentName(); String mobile = dto.getMobile(); String workcode = dto.getJobNum(); + String idNo = dto.getIdNo(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null); if (StringUtils.isBlank(userName) && "0".equals(confValue)) { //姓名 不能为空 @@ -1750,6 +1751,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction Map params = new HashMap<>(1); params.put("requestId", requestPO.getOuterRequestId()); Map header = SingnatureData.initHeader(Collections.emptyMap(), apiConfig.getAppKey(), apiConfig.getAppSecret()); + log.info("GET_QUERY_SPECIAL_AMOUNT_FEEDBACK params = {}", params); String res = HttpUtil.getRequest(url, header, params); log.info("GET_QUERY_SPECIAL_AMOUNT_FEEDBACK res = {}", res); return JsonUtil.parseObject(res, QuerySpecialAmountFeedbackResponse.class); diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index 1943b49ee..19cc49ed6 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -618,9 +618,10 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation String deparmentName = dto.getDepartmentName(); String mobile = dto.getMobile(); String workcode = dto.getJobNum(); + String idNo = dto.getIdNo(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null); //当人员信息导入筛选的全局配置为"0"时,姓名才是必填项 if (StringUtils.isBlank(userName) && "0".equals(confValue)) { diff --git a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java index 9216e7841..a9cb7876e 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteDataServiceImpl.java @@ -32,6 +32,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobRangePO; import com.engine.salary.enums.OperateTypeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.datacollection.AttendQuoteSourceTypeEnum; +import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.AttendQuoteDataMapper; import com.engine.salary.mapper.salarysob.SalarySobMapper; @@ -177,6 +178,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa map.put("departmentName", m.getDepartmentName()); map.put("mobile", m.getMobile()); map.put("jobNum", m.getJobNum()); + map.put("idNo", m.getIdNo()); // 考勤数据 attendQuoteDataValues.stream().filter(a -> a.getAttendQuoteDataId().equals(m.getId())).collect(Collectors.toList()).forEach(e -> { map.put(e.getAttendQuoteFieldId() + "_attendQuoteData", e.getDataValue()); @@ -551,6 +553,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa header.add(SalaryI18nUtil.getI18nLabel(86185, "部门")); header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号")); header.add(SalaryI18nUtil.getI18nLabel(86317, "工号")); + header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码")); // 动态列 for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) { header.add(attendQuoteField.getFieldName()); @@ -630,7 +633,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0"; // 获取租户下所有的人员 - List employees = getSalaryEmployeeService(user).listEmployee(); + List employees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL); // 获取已设置的可同步的考勤字段 List attendQuoteFields = getAttendQuoteSetFields(AttendQuoteSourceTypeEnum.IMPORT); // 生成获取考勤引用 @@ -702,10 +705,11 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa String deparmentName = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86185, "部门"))).orElse("").toString(); String mobile = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"))).orElse("").toString(); String workcode = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "工号"))).orElse("").toString(); + String idNo = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"))).orElse("").toString(); List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo, null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java index a03f1e529..d9edd129e 100644 --- a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java @@ -64,6 +64,7 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 1933, "工号"), "workcode")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus")); + list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "证件号码"), "idNo")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom")); if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth")); diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 6ac7b89cf..d5877254e 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -251,10 +251,11 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction String deparmentName = dto.getDepartmentName(); String mobile = dto.getMobile(); String workcode = dto.getJobNum(); + String idNo = dto.getIdNo(); List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + List emps = getSalaryEmployeeService(user).matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java index 2976579d4..4151c33d9 100644 --- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java @@ -30,6 +30,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import weaver.general.Util; import weaver.hrm.User; import java.text.ParseException; @@ -104,6 +105,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())) : ""); ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class); record.put("workcode", StringUtils.isBlank(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode()); + record.put("idNo", Util.null2String(simpleEmployee.getIdNo())); record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel())); record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName()); record.put("socialAccount", item.getSocialAccount()); diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 2b54dc5dc..66273cc37 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -1592,10 +1592,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { "部门", SalaryI18nUtil.getI18nLabel(86186, "手机号"), SalaryI18nUtil.getI18nLabel(86317, "工号"), + SalaryI18nUtil.getI18nLabel(86317, "证件号码"), SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "账单月份"); // List dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth"); - List dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode", "socialPayOrg", "billMonth"); + List dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode","idNo", "socialPayOrg", "billMonth"); // 查询福利核算项目 List welfareNames = (List) param.getWelfareNames(); headerList.addAll(welfareNames); @@ -1758,6 +1759,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { String deparmentName = (String) map.getOrDefault("部门", ""); String mobile = (String) map.getOrDefault("手机号", ""); String workcode = (String) map.getOrDefault("工号", ""); + String idNo = (String) map.getOrDefault("证件号码", ""); if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) { @@ -1770,7 +1772,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; @@ -1985,10 +1987,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { "部门", SalaryI18nUtil.getI18nLabel(86186, "手机号"), SalaryI18nUtil.getI18nLabel(86317, "工号"), + SalaryI18nUtil.getI18nLabel(86317, "证件号码"), SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "账单月份", "补缴月份"); - List dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth", "supplementaryMonth"); + List dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName", "billMonth", "supplementaryMonth"); // 查询福利核算项目 List welfareNames = (List) param.getWelfareNames(); headerList.addAll(welfareNames); @@ -2043,6 +2046,41 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { resultMap.put("departmentName", employee.getDepartmentName()); resultMap.put("mobile", employee.getMobile()); resultMap.put("workcode", employee.getWorkcode()); + resultMap.put("idNo", employee.getIdNo()); + resultMap.put("taxAgentName", taxAgentPO.getName()); + resultMap.put("billMonth", billMonth); + resultMap.put("supplementaryMonth", po.getSupplementaryMonth()); + + resultList.add(resultMap); + } + return resultList; + } + + /** + * 获取福利台账中的补差数据 + * @param billMonth 账单月份 + * @param paymentOrganization 个税扣缴义务人id + * @return + */ + private List> getBalanceDataByBillMonth(String billMonth, Long paymentOrganization) { + + List> resultList = new ArrayList<>(); + + DataCollectionEmployee employee = new DataCollectionEmployee(); + + TaxAgentPO taxAgentPO = taxAgentBiz.getById(paymentOrganization); + + List balanceDataList = getInsuranceAccountDetailMapper().queryBalanceListByBillMonth(billMonth, paymentOrganization); + + + for(InsuranceAccountDetailPO po : balanceDataList) { + Map resultMap = new HashMap<>(); + employee = getSalaryEmployeeService(user).getEmployeeById(po.getEmployeeId()); + resultMap.put("username", employee.getUsername()); + resultMap.put("departmentName", employee.getDepartmentName()); + resultMap.put("mobile", employee.getMobile()); + resultMap.put("workcode", employee.getWorkcode()); + resultMap.put("idNo", employee.getIdNo()); resultMap.put("taxAgentName", taxAgentPO.getName()); resultMap.put("billMonth", billMonth); resultMap.put("supplementaryMonth", po.getSupplementaryMonth()); @@ -3036,6 +3074,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { String deparmentName = (String) map.getOrDefault("部门", ""); String mobile = (String) map.getOrDefault("手机号", ""); String workcode = (String) map.getOrDefault("工号", ""); + String idNo = (String) map.getOrDefault("证件号码", ""); if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) { @@ -3048,7 +3087,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, dataValue, deparmentName, mobile, workcode, idNo,null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; @@ -3463,6 +3502,16 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Map resultMap = new HashMap<>(); // resultMap.put("data", dataMap); // resultMap.put("items", addGroups); + List insuranceSchemeDetailPOS = new ArrayList<>(); + List schemeIdList = new ArrayList<>(); + schemeIdList.add(insuranceAccountDetailPO.getSocialSchemeId()); + schemeIdList.add(insuranceAccountDetailPO.getFundSchemeId()); + schemeIdList.add(insuranceAccountDetailPO.getOtherSchemeId()); + schemeIdList = schemeIdList.stream().filter(schemeId -> schemeId != null).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(schemeIdList)) { + insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(schemeIdList); + } + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); List> perList = new ArrayList<>(); List> comList = new ArrayList<>(); @@ -3482,6 +3531,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { map.put("insuranceName", item.getLabel()); map.put("insuranceId", insuranceId); map.put("insuranceValue", dataMap.get(domkey[0])); + map.put("validNum", schemeValidNumMap.getOrDefault(insuranceId + "-2", 2).toString()); if (map.get("insuranceValue") != null && !"".equals(map.get("insuranceValue"))) { perList.add(map); @@ -3495,6 +3545,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { map.put("insuranceName", item.getLabel()); map.put("insuranceId", insuranceId); map.put("insuranceValue", dataMap.get(domkey[0])); + map.put("validNum", schemeValidNumMap.getOrDefault(insuranceId + "-1", 2).toString()); if (map.get("insuranceValue") != null && !"".equals(map.get("insuranceValue"))) { comList.add(map); @@ -3523,10 +3574,15 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } //对比可进行缴纳福利项与上面的已有福利项生成map for (Map balancePayItem : balancePaymentGroup) { + Map target = (Map)targetMap.get(balancePayItem.get("insuranceId") + "-" + balancePayItem.get("paymentScope")); if (targetMap.get(balancePayItem.get("insuranceId") + "-" + balancePayItem.get("paymentScope")) == null) { balancePayItem.put("insuranceValue", ""); + balancePayItem.put("validNum", balancePayItem.get("validNum")); resultList.add(balancePayItem); + } else { + target.put("validNum", balancePayItem.get("validNum")); } + } } } @@ -3759,28 +3815,26 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { "部门", SalaryI18nUtil.getI18nLabel(86186, "手机号"), SalaryI18nUtil.getI18nLabel(86317, "工号"), + SalaryI18nUtil.getI18nLabel(86317, "证件号码"), SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人") ); - List dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName"); + List dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName"); // 查询福利核算项目 List welfareNames = (List) param.getWelfareNames(); headerList.addAll(welfareNames); -// //查询当前已有的补缴数据 -// List> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization()); -// // excel导出的数据 -// List> rows = Lists.newArrayListWithExpectedSize(resultMapList.size()); -// rows.add(headerList); -// for (Map map : resultMapList) { -// List row = Lists.newArrayListWithExpectedSize(headerList.size()); -// for (String dataIndex : dataIndexList) { -// row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY)); -// } -// rows.add(row); -// } - List> rows = new ArrayList<>(); + //查询当前已有的补差数据 + List> resultMapList = getBalanceDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization()); + // excel导出的数据 rows.add(headerList); + for (Map map : resultMapList) { + List row = Lists.newArrayListWithExpectedSize(headerList.size()); + for (String dataIndex : dataIndexList) { + row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY)); + } + rows.add(row); + } String sheetName = "福利核算-补差导入模板"; return ExcelUtil.genWorkbookV2(rows, sheetName); @@ -3898,6 +3952,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { String departmentName = (String) map.getOrDefault("部门", ""); String mobile = (String) map.getOrDefault("手机号", ""); String workcode = (String) map.getOrDefault("工号", ""); + String idNo = (String) map.getOrDefault("证件号码", ""); if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) { @@ -3910,7 +3965,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue,salaryEmployees, name, departmentName, mobile, workcode,idNo, null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 3ba2bac03..4734c8443 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -770,9 +770,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (insuranceArchivesEmployeePOS == null) { insuranceArchivesEmployeePOS = new ArrayList<>(); } -// List> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS); List> records = buildTableData(insuranceArchivesEmployeePOS); -// List columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID()); List columns = buildWeaTableColumns(insuranceArchivesEmployeePOS); //工作簿list @@ -1699,6 +1697,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService map.put("subcompanyName", item.getSubcompanyName()); map.put("departmentId", item.getDepartmentId()); map.put("jobNum", item.getJobNum()); + map.put("idNo", item.getIdNo()); map.put("companystartdate", item.getCompanystartdate()); map.put("dismissdate", item.getDimissionDate()); map.put("mobile", item.getTelephone()); @@ -1926,10 +1925,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "手机号"), "mobile")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "工号"), "jobNum")); - + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "证件号码"), "idNo")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate")); -// list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "合同到期日期"), "dismissdate")); - list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialName")); titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k))); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保账号"), "socialAccount")); diff --git a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java index 6714938a3..29464725d 100644 --- a/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIBalanceServiceImpl.java @@ -4,12 +4,11 @@ import com.alibaba.fastjson.JSON; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.hrmelog.entity.dto.LoggerContext; import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; -import com.engine.hrmelog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.siaccount.param.BalanceAccountBaseParam; -import com.engine.salary.entity.siaccount.param.EditAccountDetailParam; import com.engine.salary.entity.siaccount.param.InspectAccountParam; import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; @@ -24,7 +23,6 @@ import com.engine.salary.enums.siaccount.ResourceFromEnum; import com.engine.salary.enums.sicategory.DeleteTypeEnum; import com.engine.salary.enums.sicategory.IsPaymentEnum; import com.engine.salary.enums.sicategory.PaymentScopeEnum; -import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; @@ -39,17 +37,15 @@ import com.engine.salary.service.SIAccountService; import com.engine.salary.service.SIBalanceService; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; +import com.engine.salary.util.db.IdGenerator; import com.engine.salary.util.db.MapperProxyFactory; import com.google.common.collect.Lists; -import com.engine.salary.util.db.IdGenerator; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import weaver.hrm.User; import java.math.BigDecimal; import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -175,6 +171,8 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); socialMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -187,6 +185,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -198,6 +197,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -207,6 +207,8 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { Map fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); fundMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -219,6 +221,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -230,6 +233,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -239,6 +243,9 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { Map otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); + otherMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -251,6 +258,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -262,6 +270,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index b8fe30f57..5b744a686 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -289,6 +289,7 @@ public class SIExportServiceImpl extends Service implements SIExportService { record.put("supplementaryMonth", item.getSupplementaryMonth()); record.put("mobile", item.getTelephone()); record.put("workcode", item.getWorkcode()); + record.put("idNo", item.getIdNo()); record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus())); ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class); record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel())); @@ -671,6 +672,7 @@ public class SIExportServiceImpl extends Service implements SIExportService { list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86317, "工号"), "workcode")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "证件号码"), "idNo")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100377, "数据来源"), "sourceFrom")); if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) { list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100379, "补缴月份"), "supplementaryMonth")); diff --git a/src/com/engine/salary/service/impl/SIImportServiceImpl.java b/src/com/engine/salary/service/impl/SIImportServiceImpl.java index 64623943d..03a4b00ea 100644 --- a/src/com/engine/salary/service/impl/SIImportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIImportServiceImpl.java @@ -178,8 +178,7 @@ public class SIImportServiceImpl extends Service implements SIImportService { // 4.注释 List excelComments = Lists.newArrayList(); excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); - excelComments.add(new ExcelComment(6, 0, 7, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); - excelComments.add(new ExcelComment(7, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空"))); + excelComments.add(new ExcelComment(8, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空"))); //工作簿数据 @@ -203,6 +202,7 @@ public class SIImportServiceImpl extends Service implements SIImportService { result.add(SalaryI18nUtil.getI18nLabel( 86186, "手机号")); result.add(SalaryI18nUtil.getI18nLabel( 86187, "员工状态")); result.add(SalaryI18nUtil.getI18nLabel(86317, "工号")); + result.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码")); result.add(SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称")); // result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织")); //社保福利基数 diff --git a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java index a37f5298f..270fbb143 100644 --- a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java @@ -28,10 +28,7 @@ import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import org.apache.commons.lang3.StringUtils; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -230,6 +227,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); socialMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -241,6 +240,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -251,6 +251,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -260,6 +261,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(fundSchemePO.getFundSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); fundMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -271,6 +274,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -281,6 +285,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -290,6 +295,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(otherSchemePO.getOtherSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); otherMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -301,6 +308,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -311,6 +319,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -322,6 +331,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); socialMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -333,6 +344,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -343,6 +355,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -358,6 +371,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); socialMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -369,6 +384,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -379,6 +395,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -394,6 +411,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); socialMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -405,6 +424,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -415,6 +435,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -430,6 +451,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); socialMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -441,6 +464,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -451,6 +475,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -462,6 +487,9 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(fundSchemePO.getFundSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); + fundMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -473,6 +501,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -483,6 +512,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); @@ -494,6 +524,9 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap().getClass()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId()); + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(otherSchemePO.getOtherSchemeId())); + Map schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum); + otherMap.forEach((k, v) -> { String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" ); String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" ); @@ -505,6 +538,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); comMap.put("paymentScope", "公司"); comMap.put("paymentScopeSign", "com"); + comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString()); resultList.add(comMap); } if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) { @@ -515,6 +549,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k))); perMap.put("paymentScope", "个人"); perMap.put("paymentScopeSign", "per"); + perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString()); resultList.add(perMap); } }); diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index d96af1c37..a66119416 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -420,6 +420,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { map.put("departmentName", item.getDepartmentName()); map.put("departmentId", item.getDepartmentId()); map.put("jobNum", item.getJobNum()); + map.put("idNo", item.getIdNo()); map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); map.put("mobile", item.getTelephone()); map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus())); @@ -700,6 +701,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "status")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "工号"), "jobNum")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "证件号码"), "idNo")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialName")); titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k))); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount")); @@ -1093,6 +1095,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { Map mobileMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86186, "手机号")); Map userStatusMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工状态")); Map workcodeMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "工号")); + Map idNoMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "证件号码")); Map employeeIdMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工id")); @@ -1101,6 +1104,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { String mobile = (String) mobileMap.get(SalaryI18nUtil.getI18nLabel(86186, "手机号")); String userStatus = (String) userStatusMap.get(SalaryI18nUtil.getI18nLabel(86187, "员工状态")); String workcode = (String) workcodeMap.get(SalaryI18nUtil.getI18nLabel(86317, "工号")); + String idNo = (String) idNoMap.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码")); String toAddEmployeeId; if (employeeIdMap.isEmpty()) { toAddEmployeeId = null; @@ -1126,7 +1130,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { isError = true; } //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode, null); + employees = getSalaryEmployeeService(user).matchImportEmployee(confValue,employeeByIds, userName, deparmentName, mobile, workcode,idNo, null); } else { employees = employeeByIds.stream().filter(f -> f.getEmployeeId().equals(addEmployeeId)).collect(Collectors.toList()); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java index 7ac1a5b30..76e852686 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java @@ -30,7 +30,6 @@ import com.engine.salary.util.SalaryEntityUtil; import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.ListUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -167,7 +166,6 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc } //核算锁定的值 Map salaryAcctLockResultPOS = MapUtils.emptyIfNull(salaryAcctCalculateBO.getSalaryAcctLockResultPOS()); - List lockSalaryItemIds = ListUtils.emptyIfNull(salaryAcctCalculateBO.getLockSalaryItemIds()); sw.stop(); // 9、查询相同税款所属期内涉及合并计税的其他薪资核算结果 sw.start("查询相同税款所属期内涉及合并计税的其他薪资核算结果"); @@ -257,7 +255,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc // 处理小数点 resultValue = SalaryAcctFormulaBO.roundResultValue(resultValue, salaryItemPO, salarySobBackItems, salarySobBackItemMap, salaryItemIdKeySalarySobItemPOMap); //是否锁定 - if (lockSalaryItemIds.contains(salaryItemId) && salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId) != null) { + if (salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId) != null) { resultValue = salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId).getResultValue(); } // 将已经计算过的薪资项目的值转换成公式变量的值添加到集合中 diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java index 6e6f2e20c..412858d08 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java @@ -18,6 +18,7 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO; import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO; import com.engine.salary.entity.salarysob.po.SalarySobPO; import com.engine.salary.enums.OperateTypeEnum; +import com.engine.salary.enums.salaryaccounting.LockStatusEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper; @@ -228,7 +229,7 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct BeanUtils.copyProperties(queryParam, salaryAcctEmployeeQueryParam); // 查询薪资核算人员(分页) // 如果需要筛选是否合并计税 - if (StringUtils.isNotEmpty(queryParam.getConsolidatedTaxation())) { + if (StringUtils.isNotEmpty(queryParam.getConsolidatedTaxation()) && queryParam.getConsolidatedTaxation().equals("1")) { return listPageByParam4ConsolidatedTax(salaryAcctEmployeeQueryParam); } else { return listPageByParam(salaryAcctEmployeeQueryParam); @@ -702,19 +703,19 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct // } // list = list.stream().filter(po -> employeeIdsByPostionFilter.contains(po.getEmployeeId())).collect(Collectors.toList()); // } - // 人事状态过滤 - if (CollectionUtils.isNotEmpty(param.getStatus())) { - Set employeeIdsByStatus = new HashSet<>(); - employeeList.forEach(simpleEmployee -> { - if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) { - employeeIdsByStatus.add(simpleEmployee.getEmployeeId()); - } - }); - if (CollectionUtils.isEmpty(employeeIdsByStatus)) { - return Lists.newArrayList(); - } - list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList()); - } + // 人事状态过滤 + if (CollectionUtils.isNotEmpty(param.getStatus())) { + Set employeeIdsByStatus = new HashSet<>(); + employeeList.forEach(simpleEmployee -> { + if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) { + employeeIdsByStatus.add(simpleEmployee.getEmployeeId()); + } + }); + if (CollectionUtils.isEmpty(employeeIdsByStatus)) { + return Lists.newArrayList(); + } + list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList()); + } // 入职日期 if (CollectionUtils.isNotEmpty(param.getHiredate())) { Set employeeIdsByHiredate = new HashSet<>(); @@ -759,4 +760,32 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct return getSalaryAcctEmployeeMapper().listSome(SalaryAcctEmployeePO.builder().taxAgentIds(taxAgentIds).salaryMonths(salaryMonths).build()); } + + @Override + public void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam) { + // 查询薪资核算记录 + SalaryAcctRecordPO salaryAcctRecord = getSalaryAcctRecordService(user).getById(updateParam.getSalaryAcctRecordId()); + if (CollectionUtils.isEmpty(salaryAcctRecord.getLockSalaryItemIds())) { + salaryAcctRecord.setLockSalaryItemIds(new ArrayList<>()); + } + List salaryAcctEmployees = listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId()); + if (CollectionUtils.isEmpty(salaryAcctEmployees)) { + return; + } + + LockStatusEnum lockStatus = updateParam.getLockStatus(); + if (lockStatus == null) { + throw new SalaryRunTimeException("锁定状态异常!"); + } + + Set acctEmpIds = updateParam.getAcctEmpIds(); + if (CollUtil.isNotEmpty(acctEmpIds)) { + //锁定指定人员 + getSalaryAcctEmployeeMapper().lockByAcctEmpIds(lockStatus.getValue(), acctEmpIds); + } else { + //锁定全部 + getSalaryAcctEmployeeMapper().lockByRecordId(lockStatus.getValue(), updateParam.getSalaryAcctRecordId()); + } + } + } diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 2cbb928b9..d21fe8d56 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -727,6 +727,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc headerRangeList.add("username"); headerRangeList.add("mobile"); headerRangeList.add("workcode"); + headerRangeList.add("idNo"); headerRangeList.add("taxAgentName"); headerRangeList.add("departmentName"); // 查询列表的表头 @@ -1125,6 +1126,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc String deparmentName = (String) map.getOrDefault("部门", ""); String mobile = (String) map.getOrDefault("手机号", ""); String workcode = (String) map.getOrDefault("工号", ""); + String idNo = (String) map.getOrDefault("证件号码", ""); if (StringUtils.equals(SalaryI18nUtil.getI18nLabel(85429, "姓名"), dataKey.toString())) { usernameIndex = j; @@ -1136,7 +1138,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc //salaryBatchService.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(102838, "姓名不能为空"), i, i, j, j); } else { //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, dataValue, deparmentName, mobile, workcode,idNo, null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; @@ -1380,12 +1382,6 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc loggerContext.setOldValueList(list4log); SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext); - // 存储薪资核算结果数据来源日志 - new Thread() { - public void run() { - handleSalaryAcctResultLog(salaryAcctResults); - } - }.start(); //报表 getSalaryAcctReportService(user).batchSave(salaryAcctReports); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 32a23ed79..de0842e3f 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.collection.CollUtil; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.hrmelog.entity.dto.LoggerContext; @@ -561,7 +562,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe } Map resultMap = Maps.newHashMap(); // 查询薪资核算使用的薪资账套下的薪资项目 - SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateByRecordId(salaryAcctRecordId,true); + SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateByRecordId(salaryAcctRecordId, true); for (SalarySobItemIncomeCategoryDTO incomeCategoryDTO : salarySobItemAggregateDTO.getIncomeCategories()) { for (SalarySobItemGroupDTO salarySobItemGroupDTO : incomeCategoryDTO.getItemGroups()) { for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) { @@ -647,7 +648,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe // 存储薪资核算结果数据来源日志 salaryAcctResultPOS = getSalaryAcctRecordService(user).listBySalaryAcctEmpId(saveParam.getSalaryAcctEmpId()); - saveSalaryAcctResultLog(salaryAcctResultPOSOld, salaryAcctResultPOS); // 查询操作日志的targetName String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(salaryAcctEmployeePO.getSalaryAcctRecordId()); @@ -724,7 +724,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe @Override public void calculate(SalaryAcctCalculateParam calculateParam, DataCollectionEmployee simpleEmployee) { - StopWatch stopWatch = new StopWatch("总核算耗时,id:"+calculateParam.getSalaryAcctRecordId()); + StopWatch stopWatch = new StopWatch("总核算耗时,id:" + calculateParam.getSalaryAcctRecordId()); try { stopWatch.start("数据准备"); // 1、查询薪资核算记录 @@ -766,15 +766,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe // 7、查询考勤引用的所有字段 List attendQuoteFieldListDTOS = getAttendQuoteFieldService(user).listAll(); - //核算锁定值 - List lockSalaryItemIds = salaryAcctRecordPO.getLockSalaryItemIds(); - Map acctResults = new HashMap<>(); - if (CollectionUtils.isNotEmpty(lockSalaryItemIds)) { - List acctResultPOS = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singleton(calculateParam.getSalaryAcctRecordId()), lockSalaryItemIds); -// List acctResultPOS = listBySalaryAcctRecordIds(Collections.singleton(calculateParam.getSalaryAcctRecordId())); - acctResults = Optional.ofNullable(acctResultPOS).orElse(new ArrayList<>()).stream().filter(po -> lockSalaryItemIds.contains(po.getSalaryItemId())).collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a)); - } - // 8、查询公式详情 Set formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId); formulaIds.addAll(SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId)); @@ -799,6 +790,20 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(103378, "薪资核算人员不能为空")); } + //核算锁定值 + List lockSalaryItemIds = salaryAcctRecordPO.getLockSalaryItemIds(); + Map acctResults = new HashMap<>(); + if (CollUtil.isNotEmpty(lockSalaryItemIds)) { + List acctResultPOS = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singleton(calculateParam.getSalaryAcctRecordId()), lockSalaryItemIds); + acctResults = Optional.ofNullable(acctResultPOS).orElse(new ArrayList<>()).stream().filter(po -> lockSalaryItemIds.contains(po.getSalaryItemId())).collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a)); + } + List lockEmpIds = salaryAcctEmployeePOS.stream().filter(po -> LockStatusEnum.LOCK.getValue().equals(po.getLockStatus())).map(SalaryAcctEmployeePO::getId).collect(Collectors.toList()); + if(CollUtil.isNotEmpty(lockEmpIds)){ + List acctResultPOS = listBySalaryAcctEmployeeIds(lockEmpIds); + Map acctResultMaps = Optional.ofNullable(acctResultPOS).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a)); + acctResults.putAll(acctResultMaps); + } + stopWatch.stop(); stopWatch.start("核算耗时"); @@ -874,16 +879,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe stopWatch.stop(); log.info(stopWatch.prettyPrint()); - // 存储薪资核算数据来源日志 - new Thread() { - public void run() { - List exceptItemIds = new ArrayList<>(); - List salaryAcctEmployeeIds = salaryAcctEmployeePOS.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList()); - exceptItemIds.addAll(lockSalaryItemIds); - exceptItemIds.addAll(salaryItemPOS.stream().filter(PO -> Objects.equals(PO.getValueType(), NumberUtils.INTEGER_ONE) && Objects.equals(PO.getUseInEmployeeSalary(), 0)).map(SalaryItemPO::getId).collect(Collectors.toList())); - getSalaryAcctResultLogService(user).deleteBySalaryAcctEmpIdExceptItemIds(salaryAcctEmployeeIds, exceptItemIds); - } - }.start(); + // 记录日志 // 查询操作日志的targetName String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(calculateParam.getSalaryAcctRecordId()); diff --git a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java index c34c1fcc3..7f3428faf 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java @@ -277,6 +277,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch header.add(SalaryI18nUtil.getI18nLabel(86185, "部门")); header.add(SalaryI18nUtil.getI18nLabel(1933, "工号")); header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号")); + header.add(SalaryI18nUtil.getI18nLabel(86186, "证件号码")); header.add(SalaryI18nUtil.getI18nLabel(15890, "员工状态")); // if (enableHr) { // header.add(SalaryI18nUtil.getI18nLabel(106277, "身份证号码")); @@ -335,6 +336,7 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch row.add(Optional.ofNullable(e.get("departmentName")).orElse("").toString()); row.add(Optional.ofNullable(e.get("workcode")).orElse("").toString()); row.add(e.get("mobile") == null ? "" : e.get("mobile").toString()); + row.add(Util.null2String(e.get("idNo"))); row.add(Util.null2String(e.get("employeeStatus"))); // if (enableHr) { // row.add(Optional.ofNullable(e.get("idNo")).orElse("").toString()); @@ -380,16 +382,16 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch // SalaryArchiveExcelBO.createExcelComment(excelComments, requireI18n + ',' + SalaryI18nUtil.getI18nLabel(127641, "多个账套之间用,分隔"), 0, 0, 3, 3); // int i = enableHr ? 10 : 9; if (isPendingList) { - excelComments.add(new ExcelComment(6, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100458, "格式样例为'2022-01-01'、'2022/1/1'"))); + excelComments.add(new ExcelComment(7, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100458, "格式样例为'2022-01-01'、'2022/1/1'"))); // excelComments.add(new ExcelComment(5, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100458, "格式样例为'2022-01-01'、'2022/1/1'"))); } else if (isFixedList) { if (isInit) { - excelComments.add(new ExcelComment(6, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); - excelComments.add(new ExcelComment(7, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100458, "格式样例为'2022-01-01'、'2022/1/1'"))); - excelComments.add(new ExcelComment(8, 0, 10, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); - } else if (isSalaryItemAdjust) { - excelComments.add(new ExcelComment(6, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,可填写如:入职,转正,调薪,晋升,降职,调岗,调岗调薪,离职,其他,初始化"))); excelComments.add(new ExcelComment(7, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); + excelComments.add(new ExcelComment(8, 0, 10, 2, SalaryI18nUtil.getI18nLabel(100458, "格式样例为'2022-01-01'、'2022/1/1'"))); + excelComments.add(new ExcelComment(9, 0, 11, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); + } else if (isSalaryItemAdjust) { + excelComments.add(new ExcelComment(7, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,可填写如:入职,转正,调薪,晋升,降职,调岗,调岗调薪,离职,其他,初始化"))); + excelComments.add(new ExcelComment(8, 0, 10, 2, SalaryI18nUtil.getI18nLabel(100458, "必填,格式样例为'2022-01-01'、'2022/1/1'"))); } } else if (isSuspendList) { // SalaryArchiveExcelBO.createExcelComment(excelComments, SalaryI18nUtil.getI18nLabel(109736, "格式样例为'2022-01-01'、'2022/1/1'"), 0, 0, i + 1, i + 1); diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 22b6eb738..2bfd9f8c3 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -496,6 +496,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe map.put("departmentName", e.getDepartmentName()); map.put("mobile", e.getMobile()); map.put("workcode", e.getWorkcode()); + map.put("idNo", e.getIdNo()); map.put("employeeStatus", e.getEmployeeStatus()); map.put("payStartDate", SalaryDateUtil.getFormatLocalDate(e.getPayStartDate())); map.put("payEndDate", SalaryDateUtil.getFormatLocalDate(e.getPayEndDate())); @@ -524,6 +525,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe SalaryI18nUtil.getI18nLabel(86185, "部门"), SalaryI18nUtil.getI18nLabel(86176, "工号"), SalaryI18nUtil.getI18nLabel(86186, "手机号"), + SalaryI18nUtil.getI18nLabel(86186, "证件号码"), SalaryI18nUtil.getI18nLabel(15890, "员工状态"), SalaryI18nUtil.getI18nLabel(91075, "起始发薪日期"), SalaryI18nUtil.getI18nLabel(91075, "最后发薪日期")}; @@ -579,6 +581,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe row.add(Util.null2String(e.get("departmentName"))); row.add(Util.null2String(e.get("workcode"))); row.add(Util.null2String(e.get("mobile"))); + row.add(Util.null2String(e.get("idNo"))); row.add(Util.null2String(e.get("employeeStatus"))); row.add(Util.null2String(e.get("payStartDate"))); row.add(Util.null2String(e.get("payEndDate"))); diff --git a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java index 41f0f9875..8f5a6707b 100644 --- a/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryEmployeeServiceImpl.java @@ -227,7 +227,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee } @Override - public List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, Long uid) { + public List matchImportEmployee(String confValue, List employeeList, String userName, String deparmentName, String mobile, String workcode, String idNo, Long uid) { if (uid != null) { return employeeList.stream() .filter(e -> Objects.equals(e.getEmployeeId(), uid)) @@ -244,6 +244,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee } else if ("1".equals(confValue)) { employees = employeeList.stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode))) .collect(Collectors.toList()); + } else if ("2".equals(confValue)) { + employees = employeeList.stream().filter(e -> (StringUtils.isBlank(idNo) || Objects.equals(e.getIdNo(), idNo))) + .collect(Collectors.toList()); } return SalaryI18nUtil.i18nList(employees); @@ -272,7 +275,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee if (CollectionUtils.isEmpty(virtualDepartmentIds)) { return Collections.emptyList(); } - return SalaryI18nUtil.i18nList(getEmployMapper().getVirtualDeptInfoList(virtualDepartmentIds)); + return SalaryI18nUtil.i18nList(getEmployMapper().getVirtualDeptInfoList(virtualDepartmentIds)); } diff --git a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java index 4959613fd..cb1fa61e0 100644 --- a/src/com/engine/salary/service/impl/SalarySendServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySendServiceImpl.java @@ -945,6 +945,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService .telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone()) .username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername()) .workcode(StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode()) + .idNo(Util.null2String(simpleEmployee.getIdNo())) .taxAgentName(taxAgentName) .build(); List items = employeeInformation.getItems(); diff --git a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java index cebcefa63..0432abfee 100644 --- a/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java @@ -249,13 +249,14 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0"; // 注释 List excelComments = Lists.newArrayList(); - if (confValue.equals("1")) { - // 人员校验规则为工号 - excelComments.add(new ExcelComment(3, 0, 4, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); - } else { + if (confValue.equals("0")) { excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); + } else if(confValue.equals("1")){ + excelComments.add(new ExcelComment(3, 0, 4, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); + } else if(confValue.equals("2")){ + excelComments.add(new ExcelComment(4, 0, 5, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); } - excelComments.add(new ExcelComment(4, 0, 6, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期"))); + excelComments.add(new ExcelComment(5, 0, 7, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期"))); //获取excel @@ -325,12 +326,13 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange String deparmentName = dto.getDepartmentName(); String mobile = dto.getMobile(); String workcode = dto.getJobNum(); + String idNo = dto.getIdNo(); String employeeStatusStr = dto.getEmployeeStatus(); List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List emps = getSalaryEmployeeService(user) - .matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + .matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, idNo,null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() @@ -477,7 +479,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List salarySobRangeImportList = ExcelParseHelper.parse2Map(fileInputStream, SalarySobRangeImportListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx"); + List salarySobRangeImportList = ExcelParseHelper.parse2Map(fileInputStream, SalarySobRangeImportListDTO.class, 0, 1, 6, "TaxAgentEmployee.xlsx"); apidatas.put("preview", salarySobRangeImportList); } finally { IOUtils.closeQuietly(fileInputStream); @@ -499,6 +501,7 @@ public class SalarySobRangeServiceImpl extends Service implements SalarySobRange headers.add(SalaryI18nUtil.getI18nLabel(86185, "部门")); headers.add(SalaryI18nUtil.getI18nLabel(86186, "手机号")); headers.add(SalaryI18nUtil.getI18nLabel(86317, "工号")); + headers.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码")); headers.add(SalaryI18nUtil.getI18nLabel(86318, "员工状态")); List> rowList = new ArrayList<>(); rowList.add(headers); diff --git a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java index efe53fae3..80fee7f92 100644 --- a/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java @@ -242,11 +242,12 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd String deparmentName = dto.getDepartmentName(); String mobile = dto.getMobile(); String workcode = dto.getJobNum(); + String idNo = dto.getIdNo(); List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List emps = getSalaryEmployeeService(user) - .matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, null); + .matchImportEmployee(confValue, employees, userName, deparmentName, mobile, workcode, idNo,null); //含在职和离职,选在职数据 if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) { employeeSameIds = emps.stream() diff --git a/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java index 932f8a2ee..636c65c4c 100644 --- a/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentExcelServiceImpl.java @@ -46,7 +46,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe // 注释 List excelComments = Lists.newArrayList(); excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填"))); - excelComments.add(new ExcelComment(4, 0, 6, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期"))); + excelComments.add(new ExcelComment(5, 0, 7, 3, SalaryI18nUtil.getI18nLabel(100344, "若不填,默认全部员工状态。指定员工状态格式:试用、正式、临时、试用延期"))); //获取excel return ExcelUtil.genWorkbookV2(rowList, "个税扣缴义务人人员范围", excelComments); } @@ -62,7 +62,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List taxAgentManageRangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx"); + List taxAgentManageRangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 6, "TaxAgentEmployee.xlsx"); apidatas.put("preview", taxAgentManageRangeEmployees); } finally { IOUtils.closeQuietly(fileInputStream); @@ -86,6 +86,7 @@ public class TaxAgentExcelServiceImpl extends Service implements TaxAgentExcelSe headers.add(SalaryI18nUtil.getI18nLabel( 86185, "部门")); headers.add(SalaryI18nUtil.getI18nLabel(86186, "手机号")); headers.add(SalaryI18nUtil.getI18nLabel(86317, "工号")); + headers.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码")); headers.add(SalaryI18nUtil.getI18nLabel(86318, "员工状态")); List> rowList = new ArrayList<>(); rowList.add(headers); diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index e789ea5c2..5d17168b5 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -826,7 +826,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM InputStream fileInputStream = null; try { fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId)); - List rangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 5, "TaxAgentEmployee.xlsx"); + List rangeEmployees = ExcelParseHelper.parse2Map(fileInputStream, TaxAgentManageRangeEmployeeListDTO.class, 0, 1, 6, "TaxAgentEmployee.xlsx"); int total = rangeEmployees.size(); int index = 0; @@ -867,12 +867,14 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM String deparmentName = dto.getDepartmentName(); String mobile = dto.getMobile(); String workcode = dto.getJobNum(); + String idNo = dto.getIdNo(); + String employeeStatusStr = dto.getEmployeeStatus(); List employeeSameIds = new ArrayList<>(); //筛选导入人员信息可以在人力资源池中匹配到的人员信息 List emps = getSalaryEmployeeService() - .matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode, null); + .matchImportEmployee(confValue,employees, userName, deparmentName, mobile, workcode,idNo, null); if (CollectionUtils.isNotEmpty(emps)) { employeeSameIds = emps.stream() .map(DataCollectionEmployee::getEmployeeId) diff --git a/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java index 9be20c0ad..63581da27 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationExcelServiceImpl.java @@ -7,7 +7,6 @@ import com.engine.core.impl.Service; import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.entity.datacollection.DataCollectionEmployee; -import com.engine.hrmelog.entity.dto.LoggerContext; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.entity.taxdeclaration.dto.AbnormalEmployeeListDTO; import com.engine.salary.entity.taxdeclaration.dto.FailEmployeeListDTO; @@ -221,6 +220,7 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar heads.add(SalaryI18nUtil.getI18nLabel(86185, "部门")); heads.add(SalaryI18nUtil.getI18nLabel(86186, "手机号")); heads.add(SalaryI18nUtil.getI18nLabel(86317, "工号")); + heads.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码")); heads.addAll(SalaryEntityUtil.properties(taxReportColumnPOS, TaxReportColumnPO::getReportColumnName, Collectors.toList())); List> rowList = new ArrayList<>(); @@ -336,6 +336,7 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar String deparmentName = (String) map.getOrDefault("部门", ""); String mobile = (String) map.getOrDefault("手机号", ""); String workcode = (String) map.getOrDefault("工号", ""); + String idNo = (String) map.getOrDefault("证件号码", ""); if (StringUtils.isEmpty(username) && "0".equals(confValue)) { isError = true; @@ -344,7 +345,7 @@ public class TaxDeclarationExcelServiceImpl extends Service implements TaxDeclar excelComments.add(errorMessageMap); } else { //筛选导入人员信息可以在人力资源池中匹配到的人员信息 - List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, username, deparmentName, mobile, workcode, null); + List employeeSameIds = getSalaryEmployeeService(user).matchImportEmployee(confValue, salaryEmployees, username, deparmentName, mobile, workcode, idNo,null); if (CollectionUtils.isEmpty(employeeSameIds)) { isError = true; diff --git a/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java b/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java index 0fcfc35c6..1536718cb 100644 --- a/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java +++ b/src/com/engine/salary/sys/enums/MatchEmployeeModeEnum.java @@ -11,7 +11,8 @@ public enum MatchEmployeeModeEnum implements BaseEnum { //"0"代表按照姓名+部门+手机号为条件的人员匹配方式,"1"代表按照工号为条件的人员匹配方式 NAMEDEPMOBILEMATCH("0", "姓名-部门-手机号", 1), - WORKCODEMATCH("1", "工号", 1); + WORKCODEMATCH("1", "工号", 1), + IDNO("2", "证件号码", 1); private String value; diff --git a/src/com/engine/salary/web/SalaryAcctController.java b/src/com/engine/salary/web/SalaryAcctController.java index 52d95a469..c40a92294 100644 --- a/src/com/engine/salary/web/SalaryAcctController.java +++ b/src/com/engine/salary/web/SalaryAcctController.java @@ -467,7 +467,7 @@ public class SalaryAcctController { } - //更新薪资核算结果的锁定状态 + //更新薪资项目锁定状态 @POST @Path("/acctresult/updateLockStatus") @Produces(MediaType.APPLICATION_JSON) @@ -476,6 +476,14 @@ public class SalaryAcctController { return new ResponseResult(user).run(getSalaryAcctResultWrapper(user)::updateLockStatusByParam, param); } + @POST + @Path("/acctresult/lockEmp") + @Produces(MediaType.APPLICATION_JSON) + public String lock(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultUpdateLockStatusParam param) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getSalaryAcctEmployeeWrapper(user)::lockEmp, param); + } + //批量更新 @POST @Path("/acctresult/batchUpdate") diff --git a/src/com/engine/salary/web/SalarySobController.java b/src/com/engine/salary/web/SalarySobController.java index 3782721f4..6f214c507 100644 --- a/src/com/engine/salary/web/SalarySobController.java +++ b/src/com/engine/salary/web/SalarySobController.java @@ -16,6 +16,7 @@ import com.engine.salary.util.page.PageInfo; import com.engine.salary.wrapper.*; import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.parameters.RequestBody; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -45,6 +46,7 @@ import java.util.Objects; * @author qiantao * @version 1.0 **/ +@Slf4j public class SalarySobController { @@ -283,6 +285,7 @@ public class SalarySobController { response.setContentType("application/octet-stream"); return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build(); } catch (Exception e) { + log.error("人员范围导入失败",e); throw e; } } diff --git a/src/com/engine/salary/wrapper/AttendQuoteDataWrapper.java b/src/com/engine/salary/wrapper/AttendQuoteDataWrapper.java index d1c5f54e3..2e5d4e579 100644 --- a/src/com/engine/salary/wrapper/AttendQuoteDataWrapper.java +++ b/src/com/engine/salary/wrapper/AttendQuoteDataWrapper.java @@ -87,6 +87,7 @@ public class AttendQuoteDataWrapper extends Service { columns.add(Column.builder().title("部门").dataIndex("departmentName").key("departmentName").display(Boolean.TRUE).build()); columns.add(Column.builder().title("手机号").dataIndex("mobile").key("mobile").display(Boolean.TRUE).build()); columns.add(Column.builder().title("工号").dataIndex("jobNum").key("jobNum").display(Boolean.TRUE).build()); + columns.add(Column.builder().title("证件号码").dataIndex("idNo").key("idNo").display(Boolean.TRUE).build()); if (CollectionUtils.isNotEmpty(listMaps)) { attendQuoteFields.stream() .filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId()))) diff --git a/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java index 526fbfcb5..095935fd5 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java @@ -5,10 +5,7 @@ import com.engine.core.impl.Service; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO; import com.engine.salary.entity.salaryacct.dto.SalaryAccEmployeeListDTO; -import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeAddParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeDeleteParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeQueryParam; -import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeSaveParam; +import com.engine.salary.entity.salaryacct.param.*; import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.exception.SalaryRunTimeException; @@ -195,4 +192,7 @@ public class SalaryAcctEmployeeWrapper extends Service { getSalaryAcctEmployeeService(user).refresh(salaryAcctRecordId); } + public void lockEmp(SalaryAcctResultUpdateLockStatusParam salaryAcctResultUpdateLockStatusParam) { + getSalaryAcctEmployeeService(user).lockEmp(salaryAcctResultUpdateLockStatusParam); + } }