ly 1 жил өмнө
parent
commit
9b8ac2eb9c

+ 5 - 1
src/main/java/cn/ezhizao/project/business/reconciliation/priceList/controller/BizEntrustPriceController.java

@@ -115,6 +115,9 @@ public class BizEntrustPriceController extends BaseController {
     @Log(title = "价目表系统", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody BizEntrustPrice bizEntrustPrice) throws NoSuchFieldException, IllegalAccessException {
+        if(bizEntrustPrice.getIsZero()==1){
+            bizEntrustPrice.setAnnualIncome(" ");
+        }
         //判读是否存在该价目
         List<BizEntrustPrice> list = bizEntrustPriceService.getList(bizEntrustPrice);
         //如果存在多条数据
@@ -124,7 +127,8 @@ public class BizEntrustPriceController extends BaseController {
             //如果存在一条数据且id一致
             if (list.get(0).getId().equals(bizEntrustPrice.getId())) {
                 if (bizEntrustPrice.getIsZero() == 1) {
-                    bizEntrustPrice.setAnnualIncome(null);
+                    bizEntrustPrice.setAnnualIncome(" ");
+
                 }
                 return toAjax(bizEntrustPriceService.updateById(bizEntrustPrice));
             } else {