Просмотр исходного кода

经销商档案区域字段优化

wu 2 месяцев назад
Родитель
Сommit
b556469fd7

+ 1 - 0
src/custom/restcontroller/webmanage/sale/workorder/SQL/服务工单节点更新.sql

@@ -8,6 +8,7 @@ SET
     confirm_value = $confirm_value$,
     amount=$amount$,
     dooramount=$dooramount$,
+    otheramount=$otheramount$,
     accessoryamount=$accessoryamount$,
     questionoption=$questionoption$,
     questionedit=$questionedit$,

+ 8 - 1
src/custom/restcontroller/webmanage/sale/workorder/workorder.java

@@ -241,15 +241,17 @@ public class workorder extends Controller {
                 rows.get(0).put("cardbegdate", serviceorderitemsrows.get(0).getString("cardbegdate"));
                 rows.get(0).put("cardenddate", serviceorderitemsrows.get(0).getString("cardenddate"));
             }
-            Rows amountrows = dbConnect.runSqlQuery("select sa_workorderid,max(ifnull(accessoryamount,0)) accessoryamount,max(ifnull(dooramount,0)) dooramount,max(ifnull(amount,0)) amount from sa_workorder_node where sa_workorderid=" + sa_workorderid + " group by sa_workorderid");
+            Rows amountrows = dbConnect.runSqlQuery("select sa_workorderid,max(ifnull(accessoryamount,0)) accessoryamount,max(ifnull(dooramount,0)) dooramount,max(ifnull(otheramount,0)) otheramount,max(ifnull(amount,0)) amount from sa_workorder_node where sa_workorderid=" + sa_workorderid + " group by sa_workorderid");
             if (amountrows.isEmpty()) {
                 rows.get(0).put("accessoryamount", 0);
                 rows.get(0).put("dooramount", 0);
                 rows.get(0).put("amount", 0);
+                rows.get(0).put("otheramount", 0);
             } else {
                 rows.get(0).put("accessoryamount", amountrows.get(0).getString("accessoryamount"));
                 rows.get(0).put("dooramount", amountrows.get(0).getString("dooramount"));
                 rows.get(0).put("amount", amountrows.get(0).getString("amount"));
+                rows.get(0).put("otheramount", amountrows.get(0).getString("otheramount"));
             }
 
         }
@@ -761,6 +763,11 @@ public class workorder extends Controller {
             } else {
                 updateNodesqlFactory.addParameter("dooramount", 0);
             }
+            if (content.containsKey("otheramount") && content.getDouble("otheramount") > 0) {
+                updateNodesqlFactory.addParameter("otheramount", content.getBigDecimal("otheramount"));
+            } else {
+                updateNodesqlFactory.addParameter("otheramount", 0);
+            }
             if (content.containsKey("accessoryamount") && content.getDouble("accessoryamount") > 0) {
                 updateNodesqlFactory.addParameter("accessoryamount", content.getBigDecimal("accessoryamount"));
             } else {