|
@@ -320,12 +320,32 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
|
320
|
320
|
|
321
|
321
|
//没有符合的就新增,有的话就修改
|
322
|
322
|
if (null == list || list.size() == 0) {
|
|
323
|
+ businessContractReceive.setYjssl(new BigDecimal(0));
|
323
|
324
|
businessContractReceiveMapper.insert(businessContractReceive);
|
324
|
325
|
} else {
|
325
|
326
|
businessContractReceive.setId(list.get(0).getId());
|
326
|
327
|
businessContractReceive.setUpdateTime(new Date());
|
327
|
|
- businessContractReceive.setYjssl(new BigDecimal(0));
|
328
|
328
|
businessContractReceiveMapper.updateByExample(businessContractReceive, example);
|
329
|
329
|
}
|
330
|
330
|
}
|
|
331
|
+
|
|
332
|
+ @Override
|
|
333
|
+ public Map<String, String> updateYjssl(Integer htid, String bcjssl) throws Exception {
|
|
334
|
+ Map<String, String> map = new HashMap<String, String>();
|
|
335
|
+ BusinessContractReceive businessContractReceive = businessContractReceiveMapper.selectByPrimaryKey(htid);
|
|
336
|
+ if (null == businessContractReceive) {
|
|
337
|
+ map.put("status", "500");
|
|
338
|
+ map.put("msg", "未检测到原合同信息,请联系管理员");
|
|
339
|
+ return map;
|
|
340
|
+ } else {
|
|
341
|
+ BigDecimal new_bcjssl = new BigDecimal(bcjssl);//本次结算数量
|
|
342
|
+ BigDecimal yjssl = businessContractReceive.getYjssl();
|
|
343
|
+ yjssl = yjssl.add(new_bcjssl);
|
|
344
|
+ businessContractReceive.setYjssl(yjssl);
|
|
345
|
+ businessContractReceiveMapper.updateByPrimaryKey(businessContractReceive);
|
|
346
|
+ map.put("status", "200");
|
|
347
|
+ map.put("msg", "操作成功");
|
|
348
|
+ }
|
|
349
|
+ return map;
|
|
350
|
+ }
|
331
|
351
|
}
|