|
@@ -188,8 +188,12 @@ public class SubmitAsynTaxCalRequestService implements IHRMsfService {
|
|
|
String creator = paramDataMap.get("creator");//创建人id
|
|
|
String initIds = paramDataMap.get("initIds");//初算数据id
|
|
|
StringBuilder sql = new StringBuilder();
|
|
|
- sql.append("SELECT ").append("\n")
|
|
|
- .append("item.fnumber AS itemNumber,").append("\n")
|
|
|
+ sql.append("SELECT ").append("\n");
|
|
|
+ for (String number : taxItemInitMap.keySet()) {
|
|
|
+ String tableField = taxItemInitMap.get(number);
|
|
|
+ sql.append("scid.").append(tableField).append(" ").append(number).append(",\n");
|
|
|
+ }
|
|
|
+ sql.append("item.fnumber AS itemNumber,").append("\n")
|
|
|
.append("personRe.FCARDNUMBER,").append("\n")
|
|
|
.append("personRe.FCARDTYPE,").append("\n")
|
|
|
.append("(CASE WHEN personRe.FREPORTNAME IS NOT NULL THEN personRe.FREPORTNAME ELSE person.fname_l2 END) AS personName,").append("\n")
|
|
@@ -239,12 +243,8 @@ public class SubmitAsynTaxCalRequestService implements IHRMsfService {
|
|
|
.append("personReEntry.FDEPARTUREDATE,").append("\n") // 离职日期
|
|
|
.append("personReEntry.FEMPLOYEDTYPE,").append("\n") // 任职受雇从业类型
|
|
|
.append("personReEntry.FSITUATION,").append("\n") // 就业情况
|
|
|
- .append("personReEntry.FDEDUCTFEES,").append("\n"); // 是否扣除减除费用
|
|
|
- for (String number : taxItemInitMap.keySet()) {
|
|
|
- String tableField = taxItemInitMap.get(number);
|
|
|
- sql.append("scid.").append(tableField).append(" ").append(number).append(",\n");
|
|
|
- }
|
|
|
- sql.append("FROM T_HR_STaxCalInitDetail scid ").append("\n")
|
|
|
+ .append("personReEntry.FDEDUCTFEES").append("\n") // 是否扣除减除费用
|
|
|
+ .append("FROM T_HR_STaxCalInitDetail scid ").append("\n")
|
|
|
.append("LEFT JOIN T_HR_STaxIncomeItem item ON item.fid = scid.FINCOMEITEMID ").append("\n")
|
|
|
.append("LEFT JOIN T_HR_STaxPersonRecordentry personReEntry ON personReEntry.fPersonId = scid.fPersonId AND scid.fTaxUnitId = personReEntry.fTaxUnitId ").append("\n")
|
|
|
.append("LEFT JOIN T_HR_STaxPersonRecord personRe ON personReEntry.FBILLID = personRe.fid ").append("\n")
|