蔡德晨 5 年之前
父节点
当前提交
f22bf2db29

+ 4 - 35
src/main/java/com/jeeplus/modules/sg/overheadline/mapper/xml/OverheadLineMapper.xml

@@ -81,6 +81,7 @@
 		 a.id as wbsId,
          a.project_id as projectId,
          a.describe,
+         a.level as hierarchy,
          a.short_id as wbsCode,
          a.subject_allocate as subjectAllocate,
          a.mount_matter as mountMatter,
@@ -242,42 +243,10 @@
 
 
     <update id="updateList" parameterType="java.util.List">
-		<foreach collection="list" item="item" index="index" separator=",">
+		<foreach collection="list" item="item" index="index" separator=";">
           update sg_fee_detail_jkxl set
-             <if test="item.rgFtFee != null and item.rgFtFee != ''">
-				 rg_fee_ft = #{item.rgFtFee},
-			 </if>
-		     <if test="item.cbrFtFee != null and item.cbrFtFee != ''">
-				 cbr_fee_ft = #{item.cbrFtFee},
-		     </if>
-		     <if test="item.fbrFtFee != null and item.fbrFtFee != ''">
-				 fbr_fee_ft =  #{item.fbrFtFee},
-		     </if>
-		      <if test="item.jxFtFee != null and item.jxFtFee != ''">
-				  jx_fee_ft =  #{item.jxFtFee},
-			  </if>
-		      <if test="item.measuresFee1 != null and item.measuresFee1 != ''">
-				  measures_fee1 = #{item.measuresFee1},
-		     </if>
-		      <if test="item.measuresFee2 != null and item.measuresFee2 != ''">
-				  measures_fee2 = #{item.measuresFee2},
-		     </if>
-		     <if test="item.measuresFee3 != null and item.measuresFee3 != ''">
-			       measures_fee3 = #{item.measuresFee3},
-		     </if>
-		     <if test="item.otherCost != null and item.otherCost != ''">
-				 other_cost = #{item.otherCost},
-		     </if>
-		     <if test="item.fees != null and item.fees != ''">
-				 fees = #{item.fees},
-		     </if>
-		     <if test="item.tex != null and item.tex != ''">
-				 tex = #{item.tex},
-		    </if>
-		    <if test="item.totalFee != null and item.totalFee != ''">
-				total_fee = #{item.totalFee},
-		    </if>
-		    id = #{item.id}
+			     rg_fee_ft = #{item.rgFtFee},
+				 total_fee = #{item.totalFee}
           <where>
               id = #{item.id} and wbs_code = #{item.wbsCode}
           </where>

+ 8 - 4
src/main/java/com/jeeplus/modules/sg/overheadline/service/OverheadLineService.java

@@ -742,7 +742,7 @@ public List<JkxlDetailFee> findList(String id,String type){
                 }
             }
 
-        } else {
+        } else if(jzgc !=0.00 && azgc != 0.00) {
             ImportExcel jzqd = new ImportExcel(file, 1, BashInfo.SHEET_JZFBFXJJ,true);  //建筑分部分项工程量清单计价表
             ImportExcel azqd = new ImportExcel(file, 1, BashInfo.SHEET_AZFBFXJJ,true);  //安装分部分项工程量清单计价表
             ImportExcel jzhz = new ImportExcel(file, 1, BashInfo.SHEET_JZHZB,true);   //电缆线路建筑工程费用汇总表
@@ -894,6 +894,8 @@ public List<JkxlDetailFee> findList(String id,String type){
                     }
                 }
             }
+        }else {
+            throw new RuntimeException(BashInfo.NUMBERERROR);
         }
         double tz = 0.00; //总合计金额
         double texTotal = 0.00; //税合计金额
@@ -968,7 +970,7 @@ public List<JkxlDetailFee> findList(String id,String type){
             jkxlDetailFee1.setMeasuresFee1(jkxlDetailFee1.getMeasuresFee1()+csft);
             jkxlDetailFee1.setFees(jkxlDetailFee1.getFees()+gfft);
             jkxlDetailFee1.setTex(jkxlDetailFee1.getTex()+sgft);
-            jkxlDetailFee1.setTotalFee(jkxlDetailFee1.getTotalFee()+csft+gfft);
+            jkxlDetailFee1.setTotalFee(jkxlDetailFee1.getTotalFee()+csft+gfft+sgft);
         }
         //分摊税
         double texh = textotal+btex;//总税额
@@ -1227,7 +1229,7 @@ public List<JkxlDetailFee> findList(String id,String type){
                 list.add(jkxlDetailFee);
             }
 
-        } else {
+        } else if(jzgc !=0.00 && azgc != 0.00){
             ImportExcel jzqd = new ImportExcel(file, 1, BashInfo.SHEET_JZFBFXJJ,true);  //建筑分部分项工程量清单计价表
             ImportExcel azqd = new ImportExcel(file, 1, BashInfo.SHEET_AZFBFXJJ,true);  //安装分部分项工程量清单计价表
             ImportExcel jzhz = new ImportExcel(file, 1, SubstationInfo.SHEET_JZHZB,true);   //电缆线路建筑工程费用汇总表
@@ -1354,6 +1356,8 @@ public List<JkxlDetailFee> findList(String id,String type){
                 jkxlDetailFee.setId(id);
                 list.add(jkxlDetailFee);
             }
+        } else {
+            throw new RuntimeException(BashInfo.NUMBERERROR);
         }
         double tz = 0.00; //总合计金额
         double texTotal = 0.00; //税合计金额
@@ -1427,7 +1431,7 @@ public List<JkxlDetailFee> findList(String id,String type){
             jkxlDetailFee1.setMeasuresFee1(jkxlDetailFee1.getMeasuresFee1()+csft);
             jkxlDetailFee1.setFees(jkxlDetailFee1.getFees()+gfft);
             jkxlDetailFee1.setTex(jkxlDetailFee1.getTex()+sgft);
-            jkxlDetailFee1.setTotalFee(jkxlDetailFee1.getTotalFee()+csft+gfft);
+            jkxlDetailFee1.setTotalFee(jkxlDetailFee1.getTotalFee()+csft+gfft+sgft);
         }
         //分摊税
         double texh = textotal+btex;//总税额

+ 1 - 0
src/main/java/com/jeeplus/modules/sg/overheadline/util/BashInfo.java

@@ -155,6 +155,7 @@ public class BashInfo {
     public static final String JS_GCJS="工程结算价";
 
     public static final String INVALIDFORMAT = "文件格式错误";
+    public static final String NUMBERERROR = "结算书数据异常";
 
 
 

+ 48 - 77
src/main/java/com/jeeplus/modules/sg/overheadline/web/OverheadLineController.java

@@ -131,9 +131,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getZjgcFee();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -142,16 +139,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //人工费
         if(code.equals(BashInfo.TZ_RGF)){
@@ -173,9 +170,6 @@ public class OverheadLineController extends BaseController {
             }
           }
             for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-              JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-              jkxlDetailFee.setId(id);
-              jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
               double rgFee = jkxlDetailFee1.getOriginalRgCost();
               double totalFee = jkxlDetailFee1.getTotalFee();
               if(total==0.00){
@@ -184,16 +178,16 @@ public class OverheadLineController extends BaseController {
                 rate = rgFee/total;
               }
               double ftFee = rate*fee;
-              jkxlDetailFee.setRgFtFee(ftFee);
+              jkxlDetailFee1.setRgFtFee(ftFee);
               if(state.equals("1")){
                 double zFee = totalFee+ftFee;
-                jkxlDetailFee.setTotalFee(zFee);
+                jkxlDetailFee1.setTotalFee(zFee);
               }else {
                 double zFee = totalFee-ftFee;
-                jkxlDetailFee.setTotalFee(zFee);
+                jkxlDetailFee1.setTotalFee(zFee);
               }
-              overheadLineService.updataDate(jkxlDetailFee);
             }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //承包人采购
         if(code.equals(BashInfo.TZ_CBRCG)){
@@ -215,9 +209,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getOriginalCbrCost();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -226,16 +217,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //发包人采购
         if(code.equals(BashInfo.TZ_FBRCG)){
@@ -257,9 +248,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getOriginalFbrCost();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -268,16 +256,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //机械费
         if(code.equals(BashInfo.TZ_JX)){
@@ -299,9 +287,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getOriginalJxCost();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -310,16 +295,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //措施费一(1)
         if(code.equals(BashInfo.TZ_CSF1)){
@@ -341,9 +326,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getMeasuresFee1();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -352,16 +334,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //措施费一(2)
         if(code.equals(BashInfo.TZ_CSF2)){
@@ -383,9 +365,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getMeasuresFee2();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -394,16 +373,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //措施费二
         if(code.equals(BashInfo.TZ_CSF3)){
@@ -425,9 +404,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getMeasuresFee3();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -436,16 +412,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //其他费
         if(code.equals(BashInfo.TZ_QTF)){
@@ -467,9 +443,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getOtherCost();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -478,16 +451,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //规费
         if(code.equals(BashInfo.TZ_GF)){
@@ -509,9 +482,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getFees();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -520,16 +490,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //税费
         if(code.equals(BashInfo.TZ_SF)){
@@ -551,9 +521,6 @@ public class OverheadLineController extends BaseController {
             }
           }
           for(JkxlDetailFee jkxlDetailFee1 : jkxlDetailFees){
-            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
-            jkxlDetailFee.setId(id);
-            jkxlDetailFee.setWbsCode(jkxlDetailFee1.getWbsCode());
             double rgFee = jkxlDetailFee1.getTex();
             double totalFee = jkxlDetailFee1.getTotalFee();
             if(total==0.00){
@@ -562,16 +529,16 @@ public class OverheadLineController extends BaseController {
               rate = rgFee/total;
             }
             double ftFee = rate*fee;
-            jkxlDetailFee.setRgFtFee(ftFee);
+            jkxlDetailFee1.setRgFtFee(ftFee);
             if(state.equals("1")){
               double zFee = totalFee+ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }else {
               double zFee = totalFee-ftFee;
-              jkxlDetailFee.setTotalFee(zFee);
+              jkxlDetailFee1.setTotalFee(zFee);
             }
-            overheadLineService.updataDate(jkxlDetailFee);
           }
+          overheadLineService.updateList(jkxlDetailFees);
         }
         //更新未识别费用表
         JkxlAdjustFee jkxlAdjustFee = new JkxlAdjustFee();
@@ -580,6 +547,7 @@ public class OverheadLineController extends BaseController {
         feeAdjustService.updateFee(jkxlAdjustFee);
       } catch (Exception e){
         addMessage(redirectAttributes, "调整失败");
+        return "redirect:/a/jkxl/list?id="+id+"&type="+itemType;
       }
     addMessage(redirectAttributes, "调整成功");
     return "redirect:/a/jkxl/list?id="+id+"&type="+itemType;
@@ -747,6 +715,9 @@ public class OverheadLineController extends BaseController {
       String file = wbsItem.getItemName();
       String fileName = file+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
       List<JkxlDetailFee> list = overheadLineService.findList(id,type);
+      for (int i=0;i<list.size();i++){
+        list.get(i).setIndex(i+1);
+      }
       //导出
       new ExportExcel(null, JkxlDetailFee.class).setDataList(list).write(response, fileName).dispose();
       return null;

+ 2 - 0
src/main/java/com/jeeplus/modules/sg/project/mapper/ItemMapper.java

@@ -18,6 +18,8 @@ public interface ItemMapper extends BaseMapper<WbsItem> {
     //根据名称获取项目
     List<WbsItem> findItemByName(@Param("itemName")String itemName,@Param("projectId") String projectId);
 
+    void updateList(@Param("list") List<WbsItem> list);
+
     //删除项目
     Integer updateItem(WbsItem wbsItem);
 

+ 10 - 0
src/main/java/com/jeeplus/modules/sg/project/mapper/xml/ItemMapper.xml

@@ -73,6 +73,16 @@
 		</choose>
 	</select>
 
+
+	<update id="updateList" parameterType="java.util.List">
+		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
+		   update sg_wbs_item set
+		   unit = #{item.unit}
+		   <where>
+			   id = #{item.id}
+		   </where>
+		</foreach>
+	</update>
 	
 	<insert id="insert">
 		INSERT INTO sg_wbs_item(

+ 5 - 0
src/main/java/com/jeeplus/modules/sg/project/service/ItemService.java

@@ -33,6 +33,11 @@ public class ItemService extends CrudService<ItemMapper, WbsItem> {
     }
 
     @Transactional(readOnly = false)
+    public void update(List<WbsItem> wbsItems){
+        itemMapper.updateList(wbsItems);
+    }
+
+    @Transactional(readOnly = false)
     public void save(WbsItem wbsItem) {
         String projectId = wbsItem.getProjectId();
         WbsProject wbsProject = projectService.get(projectId);

+ 6 - 0
src/main/java/com/jeeplus/modules/sg/project/service/ProjectService.java

@@ -129,6 +129,12 @@ public class ProjectService extends CrudService<ProjectMapper, WbsProject> {
     }
 
     @Transactional(readOnly = false)
+    public void update(WbsProject wbsProject,List<WbsItem> wbsItems){
+        save(wbsProject);
+        itemService.update(wbsItems);
+    }
+
+    @Transactional(readOnly = false)
     public void updateNum(int number,String id){
         projectMapper.updateNum(number,id);
     }

+ 26 - 0
src/main/java/com/jeeplus/modules/sg/project/web/ProjectController.java

@@ -90,6 +90,32 @@ public class ProjectController extends BaseController {
         return j;
     }
 
+    @ResponseBody
+    @RequestMapping("/update")
+    public Map update(WbsProject wbsProject,String ids,String units){
+        Map map = new HashMap();
+        WbsItem wbsItem = null;
+        List<WbsItem> list = new ArrayList<>();
+        try {
+            String[] id = ids.split(",");
+            String[] unit = units.split(",");
+            for (int i = 0; i < id.length; i++) {
+                wbsItem = new WbsItem();
+                wbsItem.setId(id[i]);
+                wbsItem.setUnit(unit[i]);
+                list.add(wbsItem);
+            }
+            projectService.update(wbsProject, list);
+        }catch (Exception e){
+            map.put("code",0);
+            map.put("msg","修改失败");
+            return map;
+        }
+        map.put("code",1);
+        map.put("msg","成功");
+        return map;
+    }
+
     /**
      *数据导入
      */

+ 3 - 0
src/main/java/com/jeeplus/modules/sg/substation/service/SubstationService.java

@@ -850,6 +850,9 @@ public class SubstationService {
             jkxlAdjustFee.setFee(gxFee);
             feeAdjustService.save(jkxlAdjustFee);
         }
+        if(jzgc ==0.00 && azgc == 0.00){
+            throw new RuntimeException(BashInfo.NUMBERERROR);
+        }
 
     }