Commit a487c444 authored by huyuchen's avatar huyuchen

明细接口改造

parent 5f4cc0b3
...@@ -299,17 +299,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -299,17 +299,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
TIncome income = new TIncome(); TIncome income = new TIncome();
income.setEmpIdcard(tIncomeDetail.getEmpIdcard()); income.setEmpIdcard(tIncomeDetail.getEmpIdcard());
income.setDeptId(tIncomeDetail.getDeptId()); income.setDeptId(tIncomeDetail.getDeptId());
List<TIncome> incomeList = baseMapper.getTIncomeList(income);
TIncomeDetail detail = new TIncomeDetail();
detail.setEmpIdcard(tIncomeDetail.getEmpIdcard());
detail.setDeptId(tIncomeDetail.getDeptId());
List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail);
tIncomeDetail.setCreateTime(new Date());
tIncomeDetail.setDataCreateMonth(DateUtil.addMonth(0));
tIncomeDetailService.save(tIncomeDetail);
synchronized (this) { synchronized (this) {
List<TIncome> incomeList = baseMapper.getTIncomeList(income);
TIncomeDetail detail = new TIncomeDetail();
detail.setEmpIdcard(tIncomeDetail.getEmpIdcard());
detail.setDeptId(tIncomeDetail.getDeptId());
List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail);
tIncomeDetail.setCreateTime(new Date());
tIncomeDetail.setDataCreateMonth(DateUtil.addMonth(0));
tIncomeDetailService.save(tIncomeDetail);
// 不存在,直接新增 // 不存在,直接新增
if (incomeList == null || incomeList.isEmpty()) { if (incomeList == null || incomeList.isEmpty()) {
return this.savePaymentIncome(tIncomeDetail, paymentId); return this.savePaymentIncome(tIncomeDetail, paymentId);
......
...@@ -276,23 +276,25 @@ public class DoJointSocialTask { ...@@ -276,23 +276,25 @@ public class DoJointSocialTask {
* @return: java.lang.String * @return: java.lang.String
**/ **/
private String getSendBack(TIncome income) { private String getSendBack(TIncome income) {
String sendBack = "";
if (CommonConstants.ONE_STRING.equals(income.getFeeType())) { if (CommonConstants.ONE_STRING.equals(income.getFeeType())) {
EkpIncomeParamManage sendParam = new EkpIncomeParamManage(); EkpIncomeParamManage sendParam = new EkpIncomeParamManage();
this.copyToEkpManage(income, sendParam); this.copyToEkpManage(income, sendParam);
R<String> info = ekpDaprUtil.pushManagerInfoToEkp(sendParam); R<String> info = ekpDaprUtil.pushManagerInfoToEkp(sendParam);
if (!Common.isEmpty(info) && Common.isNotNull(info.getData())) { if (!Common.isEmpty(info) && Common.isNotNull(info.getData())) {
sendBack = info.getData(); return info.getData();
} else {
return "管理费推送失败";
} }
} else if(CommonConstants.TWO_STRING.equals(income.getFeeType())) { } else {
EkpIncomeParamRisk sendParam = new EkpIncomeParamRisk(); EkpIncomeParamRisk sendParam = new EkpIncomeParamRisk();
this.copyToEkpRisk(income, sendParam); this.copyToEkpRisk(income, sendParam);
R<String> info = ekpDaprUtil.pushRiskInfoToEkp(sendParam); R<String> info = ekpDaprUtil.pushRiskInfoToEkp(sendParam);
if (!Common.isEmpty(info) && Common.isNotNull(info.getData())) { if (!Common.isEmpty(info) && Common.isNotNull(info.getData())) {
sendBack = info.getData(); return info.getData();
} else {
return "风险金推送失败";
} }
} }
return sendBack;
} }
/** /**
......
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