diff --git a/src/com/engine/salary/entity/salaryacct/dto/AbnormalEmployeeListDTO.java b/src/com/engine/salary/entity/salaryacct/dto/AbnormalEmployeeListDTO.java
new file mode 100644
index 000000000..f6292f980
--- /dev/null
+++ b/src/com/engine/salary/entity/salaryacct/dto/AbnormalEmployeeListDTO.java
@@ -0,0 +1,37 @@
+package com.engine.salary.entity.salaryacct.dto;
+
+import com.engine.salary.annotation.TableTitle;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 未报送人员列表
+ *
Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class AbnormalEmployeeListDTO {
+
+ //主键id
+ private Long id;
+
+ //人员id
+ private Long employeeId;
+
+ //姓名
+ @TableTitle(title = "姓名", dataIndex = "employeeName", key = "employeeName")
+ private String employeeName;
+
+ //工号")
+ @TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum")
+ private String jobNum;
+
+}
diff --git a/src/com/engine/salary/entity/salaryacct/param/AbnormalEmployeeListQueryParam.java b/src/com/engine/salary/entity/salaryacct/param/AbnormalEmployeeListQueryParam.java
new file mode 100644
index 000000000..0e129b8c9
--- /dev/null
+++ b/src/com/engine/salary/entity/salaryacct/param/AbnormalEmployeeListQueryParam.java
@@ -0,0 +1,39 @@
+package com.engine.salary.entity.salaryacct.param;
+
+import com.engine.salary.common.BaseQueryParam;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+/**
+ * 未报送人员列表
+ * Copyright: Copyright (c) 2023
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class AbnormalEmployeeListQueryParam extends BaseQueryParam {
+
+ //工号、姓名、身份证号码")
+ private String keyword;
+
+ //个税申报记录id")
+ private Long recordId;
+
+ @JsonIgnore
+ //个税扣缴义务人id")
+ private Long taxAgentId;
+
+ @JsonIgnore
+ //税款所属期")
+ private Date taxCycle;
+}
diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobCycleDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobCycleDTO.java
index 70a688b10..5a1f4ed2b 100644
--- a/src/com/engine/salary/entity/salarysob/dto/SalarySobCycleDTO.java
+++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobCycleDTO.java
@@ -65,4 +65,8 @@ public class SalarySobCycleDTO {
private Date attendCycleFromDate;
@SalaryFormulaVar(defaultLabel = "考勤周期结束日期", labelId = 86321, dataType = "string")
private Date attendCycleEndDate;
+
+
+ //存在异常人员数量
+ private Integer abnormalEmployeeNum;
}
diff --git a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java
index fcdacf5cd..2ce01f8c3 100644
--- a/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java
+++ b/src/com/engine/salary/enums/salarysob/IncomeCategoryEnum.java
@@ -8,12 +8,14 @@ import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedback
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.excel.ExcelUtil;
import com.google.common.collect.Lists;
+import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import weaver.general.Util;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.Type;
import java.util.*;
/**
@@ -38,6 +40,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getZcgzxj().getSscglb();
@@ -45,6 +48,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -55,7 +61,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -70,6 +76,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getLwbclb().getSscglb();
@@ -77,6 +84,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -87,7 +97,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -103,6 +113,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQnycxjjsslb().getSscglb();
@@ -110,6 +121,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -120,7 +134,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -136,6 +150,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getNtycxbcjlb().getSscglb();
@@ -143,6 +158,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -153,7 +171,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -169,6 +187,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getJcldhtycxbcjlb().getSscglb();
@@ -176,6 +195,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -186,7 +208,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -202,6 +224,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getGrgqjl().getSscglb();
@@ -209,6 +232,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -219,7 +245,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -235,6 +261,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQynj().getSscglb();
@@ -242,6 +269,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -252,7 +282,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -268,6 +298,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getBxyxy().getSscglb();
@@ -275,6 +306,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -285,7 +319,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -301,6 +335,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getZqjjr().getSscglb();
@@ -308,6 +343,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -318,7 +356,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -334,6 +372,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQtlxlwbc().getSscglb();
@@ -341,6 +380,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -351,7 +393,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -367,6 +409,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQtflxlwbc().getSscglb();
@@ -374,6 +417,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -384,7 +430,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -400,6 +446,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getGcsdlb().getSscglb();
@@ -407,6 +454,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -417,7 +467,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -433,6 +483,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getTxq().getSscglb();
@@ -440,6 +491,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -450,7 +504,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -466,6 +520,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getWjgzxjlb().getSscglb();
@@ -473,6 +528,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.fjmsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -483,7 +541,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -499,6 +557,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getWjrysyjjlb().getSscglb();
@@ -506,6 +565,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.fjmsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -516,7 +578,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -532,6 +594,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getLwbclb().getSscglb();
@@ -539,6 +602,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.fjmsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -549,7 +615,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
@@ -564,6 +630,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
@Override
public Map parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List employeeDeclares, SalarySobTaxRuleDTO taxRuleDTO) {
+ Gson gs = new Gson();
List taxRules = taxRuleDTO.getTaxRules();
List sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getJcldhtycxbcjlb().getSscglb();
@@ -571,6 +638,9 @@ public enum IncomeCategoryEnum implements BaseEnum {
Map resultMap = new HashMap<>();
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
GetASynIndividualIncomeTaxFeedbackResponse.Body.fjmsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
+ if (result == null) {
+ continue;
+ }
taxRules.forEach(rule -> {
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
try {
@@ -581,7 +651,7 @@ public enum IncomeCategoryEnum implements BaseEnum {
log.error("getTaxErr no such method {}", getter, ex);
}
});
- resultMap.put(employeeDeclare.getEmployeeId(), taxRuleDTO);
+ resultMap.put(employeeDeclare.getEmployeeId(), gs.fromJson(gs.toJson(taxRuleDTO), (Type) SalarySobTaxRuleDTO.class));
}
return resultMap;
}
diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java
index 3b97e3084..b8244909f 100644
--- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java
+++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.java
@@ -1,6 +1,8 @@
package com.engine.salary.mapper.salaryacct;
+import com.engine.salary.entity.salaryacct.dto.AbnormalEmployeeListDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
+import com.engine.salary.entity.salaryacct.param.AbnormalEmployeeListQueryParam;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeQueryParam;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
import org.apache.ibatis.annotations.Param;
@@ -122,4 +124,8 @@ public interface SalaryAcctEmployeeMapper {
void lockByAcctEmpIds(@Param("lockStatus") Integer lockStatus, @Param("acctEmpIds") Set acctEmpIds);
void lockByRecordId(@Param("lockStatus") Integer lockStatus, @Param("recordId") Long recordId);
+
+ List listPage4NotDeclareByParam(@Param("param") AbnormalEmployeeListQueryParam queryParam);
+
+ int countNotDeclareByParam(@Param("param") AbnormalEmployeeListQueryParam queryParam);
}
diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml
index f39b5bc53..8ea42d36e 100644
--- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml
+++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml
@@ -1281,7 +1281,47 @@
UPDATE hrsa_salary_acct_emp
SET lock_status = #{lockStatus}
WHERE delete_type = 0
- AND salary_acct_record_id =#{recordId}
+ AND salary_acct_record_id = #{recordId}
+
+
+
+
+
diff --git a/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java b/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java
index d4d1c0b53..0657a790f 100644
--- a/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java
+++ b/src/com/engine/salary/remote/tax/response/calculate/GetASynIndividualIncomeTaxFeedbackResponse.java
@@ -494,7 +494,7 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse {
/**
* 速算扣除数 必填:否
*/
- @TaxField(name = "速算扣除数", taxIndex = "sskcs ")
+ @TaxField(name = "速算扣除数", taxIndex = "sskcs")
private BigDecimal sskcs;
/**
diff --git a/src/com/engine/salary/service/SalaryAcctEmployeeService.java b/src/com/engine/salary/service/SalaryAcctEmployeeService.java
index 10bdf5bd5..505befd94 100644
--- a/src/com/engine/salary/service/SalaryAcctEmployeeService.java
+++ b/src/com/engine/salary/service/SalaryAcctEmployeeService.java
@@ -1,5 +1,6 @@
package com.engine.salary.service;
+import com.engine.salary.entity.salaryacct.dto.AbnormalEmployeeListDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
@@ -264,4 +265,14 @@ public interface SalaryAcctEmployeeService {
*/
void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam);
+ /**
+ * 未报送人员
+ * @param queryParam
+ * @return
+ */
+ PageInfo listPage4NotDeclareByParam(AbnormalEmployeeListQueryParam queryParam);
+
+
+ int countNotDeclareByParam(AbnormalEmployeeListQueryParam queryParam);
+
}
diff --git a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java
index 412858d08..3144966ab 100644
--- a/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryAcctEmployeeServiceImpl.java
@@ -5,11 +5,12 @@ import cn.hutool.core.date.DateUtil;
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.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
+import com.engine.salary.entity.salaryacct.dto.AbnormalEmployeeListDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
@@ -788,4 +789,30 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
}
}
+
+ @Override
+ public PageInfo listPage4NotDeclareByParam(AbnormalEmployeeListQueryParam queryParam) {
+
+ Long recordId = queryParam.getRecordId();
+ SalaryAcctRecordPO recordPO = getSalaryAcctRecordService(user).getById(recordId);
+ SalarySobPO sobPO = getSalarySobService(user).getById(recordPO.getSalarySobId());
+ queryParam.setTaxCycle(recordPO.getTaxCycle());
+ queryParam.setTaxAgentId(sobPO.getTaxAgentId());
+
+ List list = getSalaryAcctEmployeeMapper().listPage4NotDeclareByParam(queryParam);
+ return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AbnormalEmployeeListDTO.class);
+ }
+
+ @Override
+ public int countNotDeclareByParam(AbnormalEmployeeListQueryParam queryParam) {
+
+ Long recordId = queryParam.getRecordId();
+ SalaryAcctRecordPO recordPO = getSalaryAcctRecordService(user).getById(recordId);
+ SalarySobPO sobPO = getSalarySobService(user).getById(recordPO.getSalarySobId());
+ queryParam.setTaxCycle(recordPO.getTaxCycle());
+ queryParam.setTaxAgentId(sobPO.getTaxAgentId());
+
+ return getSalaryAcctEmployeeMapper().countNotDeclareByParam(queryParam);
+ }
+
}
diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
index 546cbf3c9..deb771892 100644
--- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
@@ -3,15 +3,13 @@ package com.engine.salary.service.impl;
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.common.LocalDateRange;
import com.engine.salary.common.YearMonthRange;
-import com.engine.salary.constant.SalaryDefaultTenantConstant;
-import com.engine.salary.entity.datacollection.DataCollectionEmployee;
-import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
import com.engine.salary.config.SalaryElogConfig;
-import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
+import com.engine.salary.entity.salaryacct.param.AbnormalEmployeeListQueryParam;
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
@@ -20,9 +18,9 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctTaxAgentPO;
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.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
+import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
import com.engine.salary.exception.SalaryRunTimeException;
@@ -41,7 +39,6 @@ import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.engine.salary.util.valid.ValidUtil;
-import com.engine.salary.util.db.IdGenerator;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.collections4.CollectionUtils;
@@ -286,8 +283,11 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98747, "薪资核算记录不存在或已被删除"));
}
// 查询薪资核算所用薪资账套的薪资周期、考勤周期……
- return getSalarySobService(user).getSalarySobCycle(salaryAcctRecordPO.getSalarySobId(), SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()));
+ SalarySobCycleDTO salarySobCycle = getSalarySobService(user).getSalarySobCycle(salaryAcctRecordPO.getSalarySobId(), SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()));
+ int i = getSalaryAcctEmployeeService(user).countNotDeclareByParam(AbnormalEmployeeListQueryParam.builder().recordId(id).build());
+ salarySobCycle.setAbnormalEmployeeNum(i);
+ return salarySobCycle;
}
@Override
diff --git a/src/com/engine/salary/service/impl/SalaryCalcTaxServiceImpl.java b/src/com/engine/salary/service/impl/SalaryCalcTaxServiceImpl.java
index ef221cba5..1eedb6ae5 100644
--- a/src/com/engine/salary/service/impl/SalaryCalcTaxServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryCalcTaxServiceImpl.java
@@ -7,6 +7,7 @@ import com.engine.salary.constant.SzyhApiConstant;
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
import com.engine.salary.entity.salaryacct.bo.SalaryCalcTax;
import com.engine.salary.entity.salaryacct.dto.SalaryCalcTaxInfoDTO;
+import com.engine.salary.entity.salaryacct.param.AbnormalEmployeeListQueryParam;
import com.engine.salary.entity.salaryacct.param.SalaryCalcTaxParam;
import com.engine.salary.entity.salaryacct.po.*;
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
@@ -110,6 +111,11 @@ public class SalaryCalcTaxServiceImpl extends Service implements SalaryCalcTaxSe
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(160525, "接口流量不足,暂无法使用该功能,请先购买智能算薪接口流量"));
}
+ int i = getSalaryAcctEmployeeService(user).countNotDeclareByParam(AbnormalEmployeeListQueryParam.builder().recordId(salaryCalcTaxParam.getSalaryAcctRecordId()).build());
+ if (i > 0) {
+ throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(11111, "存在未报送的人员,请先进行人员报送"));
+ }
+
// 查询薪资核算记录
SalaryAcctRecordPO salaryAcctRecord = getSalaryAcctRecordService(user).getById(salaryCalcTaxParam.getSalaryAcctRecordId());
// 查询薪资核算记录关联的个税扣缴义务人
@@ -231,7 +237,7 @@ public class SalaryCalcTaxServiceImpl extends Service implements SalaryCalcTaxSe
continue;
}
SalarySobTaxRuleDTO taxRuleDTO = salarySobTaxRuleMap.get(incomeCategoryEnum.getValue().toString());
- Map empIdResult = incomeCategoryEnum.parseGetASynIndividualIncomeTaxFeedbackResponse(feedbackResponse, subEmployeeDeclares,taxRuleDTO);
+ Map empIdResult = incomeCategoryEnum.parseGetASynIndividualIncomeTaxFeedbackResponse(feedbackResponse, subEmployeeDeclares, taxRuleDTO);
List subSalaryAcctEmployees = salaryAcctEmployeeMap.get(salaryAcctTaxAgent.getTaxAgentId() + "-" + salaryAcctTaxAgent.getIncomeCategory());
if (CollectionUtils.isEmpty(subSalaryAcctEmployees)) {
continue;
@@ -243,10 +249,12 @@ public class SalaryCalcTaxServiceImpl extends Service implements SalaryCalcTaxSe
}
SalarySobTaxRuleDTO salarySobTaxRuleDTO = empIdResult.get(salaryAcctEmployee.getEmployeeId());
List taxRules = salarySobTaxRuleDTO.getTaxRules();
- taxRules.forEach(rule->{
+ taxRules.forEach(rule -> {
SalaryAcctResultPO salaryAcctResultPO = salaryAcctResultValue.get(rule.getSalaryItemId());
- salaryAcctResultPO.setResultValue(rule.getValue());
- resultPOS.add(salaryAcctResultPO);
+ if (salaryAcctResultPO != null) {
+ salaryAcctResultPO.setResultValue(rule.getValue());
+ resultPOS.add(salaryAcctResultPO);
+ }
});
}
}
diff --git a/src/com/engine/salary/web/SalaryAcctController.java b/src/com/engine/salary/web/SalaryAcctController.java
index 5897976db..39a9a2245 100644
--- a/src/com/engine/salary/web/SalaryAcctController.java
+++ b/src/com/engine/salary/web/SalaryAcctController.java
@@ -400,6 +400,17 @@ public class SalaryAcctController {
}
}
+ /**
+ * 未报送人员列表
+ */
+ @POST
+ @Path("/acctemployee/listPage4NotDeclare")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String listPage4NotDeclare(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AbnormalEmployeeListQueryParam param) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult>(user).run(getSalaryAcctEmployeeWrapper(user)::listPage4NotDeclareByParam, param);
+ }
+
// **********************************薪资核算人员相关 end*********************************/
diff --git a/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java
index 095935fd5..b010175a9 100644
--- a/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java
+++ b/src/com/engine/salary/wrapper/SalaryAcctEmployeeWrapper.java
@@ -4,6 +4,7 @@ import com.engine.common.util.ServiceUtil;
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.AbnormalEmployeeListDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAccEmployeeListDTO;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
@@ -195,4 +196,14 @@ public class SalaryAcctEmployeeWrapper extends Service {
public void lockEmp(SalaryAcctResultUpdateLockStatusParam salaryAcctResultUpdateLockStatusParam) {
getSalaryAcctEmployeeService(user).lockEmp(salaryAcctResultUpdateLockStatusParam);
}
+
+
+ /**
+ * 未报送人员列表
+ * @param param
+ * @return
+ */
+ public PageInfo listPage4NotDeclareByParam(AbnormalEmployeeListQueryParam param) {
+ return getSalaryAcctEmployeeService(user).listPage4NotDeclareByParam(param);
+ }
}