Commit 6ad2fff0 authored by hongguangwu's avatar hongguangwu

MVP1.5.1-收入证明等

parent ce9d3064
...@@ -189,12 +189,12 @@ public class SalaryProveController { ...@@ -189,12 +189,12 @@ public class SalaryProveController {
, "/tsalaryaccount/inner/findAverageSalaryForProve", pd, WageProofDto.class, SecurityConstants.FROM_IN); , "/tsalaryaccount/inner/findAverageSalaryForProve", pd, WageProofDto.class, SecurityConstants.FROM_IN);
if (null != wpR) { if (null != wpR) {
WageProofDto wp = wpR.getData(); WageProofDto wp = wpR.getData();
if (CommonConstants.SUCCESS.equals(wpR.getCode()) && null != wp) { if (Common.isEmpty(wp.getErrorInfo())) {
record.setProveSalary(wp.getSalary()); record.setProveSalary(wp.getSalary());
record.setSalary(wp.getSalary()); record.setSalary(wp.getSalary());
record.setCapital(NumberToCN.number2CNMontrayUnit(wp.getSalary())); record.setCapital(NumberToCN.number2CNMontrayUnit(wp.getSalary()));
} else { } else {
return R.failed(Common.isNotNull(wpR.getMsg()) ? wpR.getMsg() : "调取工资服务返回数据出错!"); return R.failed(wp.getErrorInfo());
} }
} else { } else {
return R.failed("调取工资服务返回数据出错!"); return R.failed("调取工资服务返回数据出错!");
...@@ -207,8 +207,7 @@ public class SalaryProveController { ...@@ -207,8 +207,7 @@ public class SalaryProveController {
} else { } else {
return R.failed("参数出错!"); return R.failed("参数出错!");
} }
return R.ok(record);
return new R(record);
} }
/** /**
......
...@@ -75,10 +75,6 @@ public class TSalaryAccountExportVo { ...@@ -75,10 +75,6 @@ public class TSalaryAccountExportVo {
private BigDecimal salaryTax; private BigDecimal salaryTax;
@ExcelProperty(value = "年终奖扣税") @ExcelProperty(value = "年终奖扣税")
private BigDecimal annualBonusTax; private BigDecimal annualBonusTax;
@ExcelProperty(value = "代扣个人社保")
private BigDecimal withholidingPersonSocial;
@ExcelProperty(value = "代扣个人公积金")
private BigDecimal withholidingPersonFund;
@ExcelProperty("个人社保") @ExcelProperty("个人社保")
private BigDecimal personSocial; private BigDecimal personSocial;
@ExcelProperty("个人公积金") @ExcelProperty("个人公积金")
...@@ -91,10 +87,6 @@ public class TSalaryAccountExportVo { ...@@ -91,10 +87,6 @@ public class TSalaryAccountExportVo {
private BigDecimal unitSocial; private BigDecimal unitSocial;
@ExcelProperty("单位公积金") @ExcelProperty("单位公积金")
private BigDecimal unitFund; private BigDecimal unitFund;
@ExcelProperty("代扣单位社保")
private BigDecimal withholidingUnitSocial;
@ExcelProperty("代扣单位公积金")
private BigDecimal withholidingUnitFund;
// 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金 // 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金
@ExcelProperty(value = "子女教育专项扣除") @ExcelProperty(value = "子女教育专项扣除")
private BigDecimal sumChildEduMoney; private BigDecimal sumChildEduMoney;
......
...@@ -21,4 +21,5 @@ public class WageProofDto implements Serializable { ...@@ -21,4 +21,5 @@ public class WageProofDto implements Serializable {
private String endMouth; private String endMouth;
private String emIdCard; private String emIdCard;
private String sumType; private String sumType;
private String errorInfo;
} }
...@@ -329,7 +329,7 @@ public class TSalaryAccountController { ...@@ -329,7 +329,7 @@ public class TSalaryAccountController {
**/ **/
@Inner @Inner
@PostMapping("/inner/findAverageSalaryForProve") @PostMapping("/inner/findAverageSalaryForProve")
public R<WageProofDto> findAverageSalaryForProve(WageProofDto pd) { public WageProofDto findAverageSalaryForProve(WageProofDto pd) {
return getWageProofDtoR(pd.getStartMouth(), pd.getEndMouth(), pd.getEmIdCard(), pd.getSumType(), null); return getWageProofDtoR(pd.getStartMouth(), pd.getEndMouth(), pd.getEmIdCard(), pd.getSumType(), null);
} }
...@@ -350,10 +350,15 @@ public class TSalaryAccountController { ...@@ -350,10 +350,15 @@ public class TSalaryAccountController {
if( Common.isEmpty(startMouth) || Common.isEmpty(endMouth) || Common.isEmpty(emIdCard) || Common.isEmpty(sumType) ){ if( Common.isEmpty(startMouth) || Common.isEmpty(endMouth) || Common.isEmpty(emIdCard) || Common.isEmpty(sumType) ){
return R.failed("参数不完整"); return R.failed("参数不完整");
} }
return getWageProofDtoR(startMouth, endMouth, emIdCard, sumType, settleDepartId); WageProofDto wp = getWageProofDtoR(startMouth, endMouth, emIdCard, sumType, settleDepartId);
if (Common.isEmpty(wp.getErrorInfo())) {
return R.failed(wp.getErrorInfo());
} else {
return R.ok(wp);
}
} }
private R<WageProofDto> getWageProofDtoR(String startMouth, String endMouth, String emIdCard, String sumType, String settleDepartId) { private WageProofDto getWageProofDtoR(String startMouth, String endMouth, String emIdCard, String sumType, String settleDepartId) {
WageProofDto wp = new WageProofDto(); WageProofDto wp = new WageProofDto();
List<String> accountIdForProve = tSalaryAccountService.getAccountIdForProve(startMouth, endMouth, emIdCard, settleDepartId); List<String> accountIdForProve = tSalaryAccountService.getAccountIdForProve(startMouth, endMouth, emIdCard, settleDepartId);
String accIdStr; String accIdStr;
...@@ -367,10 +372,12 @@ public class TSalaryAccountController { ...@@ -367,10 +372,12 @@ public class TSalaryAccountController {
realMonthCount = accountMonthForProve.size(); realMonthCount = accountMonthForProve.size();
int count = LocalDateTimeUtils.getBeginOfMonth(endMouth.concat("01"), startMouth.concat("01"), "yyyyMMdd") + 1; int count = LocalDateTimeUtils.getBeginOfMonth(endMouth.concat("01"), startMouth.concat("01"), "yyyyMMdd") + 1;
if (count != realMonthCount) { if (count != realMonthCount) {
return R.failed("信息不一致,实际发工资月份为:" + SalaryCommonUtil.listToStrEasy(accountMonthForProve)); wp.setErrorInfo("信息不一致,实际发工资月份为:" + SalaryCommonUtil.listToStrEasy(accountMonthForProve));
return wp;
} }
} else { } else {
return R.failed("实发工资月份有误!"); wp.setErrorInfo("实发工资月份有误!");
return wp;
} }
//普通工资信息 //普通工资信息
accIdStr = SalaryCommonUtil.listForSqlIn(accountIdForProve); accIdStr = SalaryCommonUtil.listForSqlIn(accountIdForProve);
...@@ -382,11 +389,12 @@ public class TSalaryAccountController { ...@@ -382,11 +389,12 @@ public class TSalaryAccountController {
} }
} }
if (null == salary) { if (null == salary) {
return R.failed("无工资信息!"); wp.setErrorInfo("无工资信息!");
return wp;
} }
wp.setRealMonthCount(realMonthCount); wp.setRealMonthCount(realMonthCount);
wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP)); wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
return new R(wp); return wp;
} }
} }
...@@ -788,16 +788,12 @@ ...@@ -788,16 +788,12 @@
annualBonus.SALARY_MONEY as annualBonus, annualBonus.SALARY_MONEY as annualBonus,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) as salaryTax, ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) as salaryTax,
a.ANNUAL_BONUS_TAX as annualBonusTax, a.ANNUAL_BONUS_TAX as annualBonusTax,
withholidingPersonSocial.SALARY_MONEY as withholidingPersonSocial,
withholidingPersonFund.SALARY_MONEY as withholidingPersonFund,
a.PERSON_SOCIAL as personSocial, a.PERSON_SOCIAL as personSocial,
a.PERSON_FUND as personFund, a.PERSON_FUND as personFund,
exemptionPersionTax.SALARY_MONEY as exemptionPersionTax, exemptionPersionTax.SALARY_MONEY as exemptionPersionTax,
enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity, enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity,
a.UNIT_SOCIAL as unitSocial, a.UNIT_SOCIAL as unitSocial,
a.UNIT_FUND as unitFund, a.UNIT_FUND as unitFund,
withholidingUnitSocial.SALARY_MONEY as withholidingUnitSocial,
withholidingUnitFund.SALARY_MONEY as withholidingUnitFund,
a.SUM_BABY_MONEY as sumBabyMoney, a.SUM_BABY_MONEY as sumBabyMoney,
a.SUM_CHILD_EDU_MONEY as sumChildEduMoney, a.SUM_CHILD_EDU_MONEY as sumChildEduMoney,
a.SUM_CONTINUING_EDUCATION_MONEY as sumContinuingEducationMoney, a.SUM_CONTINUING_EDUCATION_MONEY as sumContinuingEducationMoney,
...@@ -810,10 +806,6 @@ ...@@ -810,10 +806,6 @@
from from
t_salary_account a t_salary_account a
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus' left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item withholidingPersonSocial on withholidingPersonSocial.SALARY_ACCOUNT_ID = a.id and withholidingPersonSocial.JAVA_FIED_NAME='withholidingPersonSocial'
left join t_salary_account_item withholidingPersonFund on withholidingPersonFund.SALARY_ACCOUNT_ID = a.id and withholidingPersonFund.JAVA_FIED_NAME='withholidingPersonFund'
left join t_salary_account_item withholidingUnitSocial on withholidingUnitSocial.SALARY_ACCOUNT_ID = a.id and withholidingUnitSocial.JAVA_FIED_NAME='withholidingUnitSocial'
left join t_salary_account_item withholidingUnitFund on withholidingUnitFund.SALARY_ACCOUNT_ID = a.id and withholidingUnitFund.JAVA_FIED_NAME='withholidingUnitFund'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax' left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity' left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
<where> <where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment