|
@@ -789,8 +789,6 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
TFee tFee = JSONArray.parseObject(tfee, TFee.class);
|
|
TFee tFee = JSONArray.parseObject(tfee, TFee.class);
|
|
- // 声明业务编号 list
|
|
|
|
- List<String> fSrcBillnos = new ArrayList<>();
|
|
|
|
String billstatus = "";
|
|
String billstatus = "";
|
|
if (isApprove) {
|
|
if (isApprove) {
|
|
billstatus = "4";
|
|
billstatus = "4";
|
|
@@ -817,13 +815,14 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
// 删除从表
|
|
// 删除从表
|
|
//tFeeDoMapper.deleteByFPid(tFee.getfId());
|
|
//tFeeDoMapper.deleteByFPid(tFee.getfId());
|
|
messageMap.put("tFee", tFee);
|
|
messageMap.put("tFee", tFee);
|
|
- // fSrcBillnos.add(tFee.getfSrcBillno());
|
|
|
|
|
|
+ // 声明业务编号 list
|
|
|
|
+ List<String> fSrcBillnos = new ArrayList<>();
|
|
// 财务从表
|
|
// 财务从表
|
|
if (StringUtils.isNotNull(tfeeDo) && !"[]".equals(tfeeDo)) {
|
|
if (StringUtils.isNotNull(tfeeDo) && !"[]".equals(tfeeDo)) {
|
|
JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
|
|
JSONArray jsonDrArray = JSONArray.parseArray(tfeeDo);
|
|
List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
|
|
List<TFeeDo> tFeeDoList = JSONObject.parseArray(jsonDrArray.toJSONString(), TFeeDo.class);
|
|
for (TFeeDo tFeeDo : tFeeDoList) {
|
|
for (TFeeDo tFeeDo : tFeeDoList) {
|
|
- if (StringUtils.isNull(tFeeDo.getfId())) {
|
|
|
|
|
|
+ if (StringUtils.isNull(tFeeDo.getfId())) { // 走新建
|
|
Map<String, Object> map = this.judgeMoney(tFeeDo.getfSrcid(), tFeeDo.getfAmt(), fBilltype, tFeeDo.getfFeeid());
|
|
Map<String, Object> map = this.judgeMoney(tFeeDo.getfSrcid(), tFeeDo.getfAmt(), fBilltype, tFeeDo.getfFeeid());
|
|
if (!(Boolean) map.get("flag")) {
|
|
if (!(Boolean) map.get("flag")) {
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
@@ -838,11 +837,16 @@ public class TFeeServiceImpl implements ITFeeService {
|
|
fSrcBillnos.add(tFeeDo.getfSrcBillno());
|
|
fSrcBillnos.add(tFeeDo.getfSrcBillno());
|
|
}
|
|
}
|
|
tFeeDoMapper.insertTFeeDo(tFeeDo);
|
|
tFeeDoMapper.insertTFeeDo(tFeeDo);
|
|
- } else {
|
|
|
|
- // 走了修改
|
|
|
|
- tFeeDo.setUpdateBy(loginUser.getUser().getUserName());
|
|
|
|
- tFeeDo.setUpdateTime(new Date());
|
|
|
|
- tFeeDoMapper.updateTFeeDo(tFeeDo);
|
|
|
|
|
|
+ } else { // 走修改
|
|
|
|
+ // 根据传递的 tFeeDo的 id 获取到该条数据,避免直接传递是数据直接覆盖
|
|
|
|
+ TFeeDo tfDo = tFeeDoMapper.selectTFeeDoById(tFeeDo.getfId());
|
|
|
|
+ if (StringUtils.isNotNull(tfDo.getfSrcBillno())){
|
|
|
|
+ // 装载业务编号
|
|
|
|
+ fSrcBillnos.add(tfDo.getfSrcBillno());
|
|
|
|
+ }
|
|
|
|
+ tfDo.setUpdateBy(loginUser.getUser().getUserName());
|
|
|
|
+ tfDo.setUpdateTime(new Date());
|
|
|
|
+ tFeeDoMapper.updateTFeeDo(tfDo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|