|
|
@@ -14,17 +14,15 @@ import common.data.*;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.webmanage.executorService.Executor;
|
|
|
-import restcontroller.webmanage.sale.order.Order;
|
|
|
-import restcontroller.webmanage.sale.order.OrderItems;
|
|
|
+
|
|
|
import restcontroller.webmanage.sale.serviceorder.serviceorder;
|
|
|
-import restcontroller.webmanage.sale.serviceorder.tools.VerificationManage;
|
|
|
+import restcontroller.webmanage.sale.serviceorder.serviceorderItems;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
@@ -40,8 +38,7 @@ public class workorder extends Controller {
|
|
|
}
|
|
|
|
|
|
@API(title = "服务工单更新", apiversion = R.ID20230208140003.v1.class)
|
|
|
- @CACHEING_CLEAN(apiversions = {R.ID20230208140103.v1.class, R.ID20230208140203.v1.class,
|
|
|
- R.ID20230209091103.v1.class})
|
|
|
+ @CACHEING_CLEAN(apiversions = {workorder.class, serviceorder.class,restcontroller.sale.serviceorder.serviceorder.class, serviceorderItems.class})
|
|
|
public String modify_workorder() throws YosException {
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
|
// 表名
|
|
|
@@ -61,6 +58,16 @@ public class workorder extends Controller {
|
|
|
String scenecontactphonenumber = content.getStringValue("scenecontactphonenumber");
|
|
|
JSONArray projectlearders = content.getJSONArray("projectlearders");
|
|
|
|
|
|
+ String class1 = content.getStringValue("class1");
|
|
|
+ String province = content.getStringValue("province");
|
|
|
+ String city= content.getStringValue("city");
|
|
|
+ String county = content.getStringValue("county");
|
|
|
+ String servicetype = content.getStringValue("servicetype");
|
|
|
+ String cardno = content.getStringValue("cardno");
|
|
|
+ String sku = content.getStringValue("sku");
|
|
|
+ long itemid = content.getLongValue("itemid");
|
|
|
+
|
|
|
+
|
|
|
Rows rows = dbConnect.runSqlQuery(
|
|
|
"select * from sa_workorder where sa_workorderid=" + sa_workorderid + " and siteid='" + siteid + "'");
|
|
|
if (rows.isEmpty()) {
|
|
|
@@ -98,11 +105,30 @@ public class workorder extends Controller {
|
|
|
sqlFactory.addParameter("remarks", remarks);
|
|
|
|
|
|
sqlList.add(sqlFactory.getSQL());
|
|
|
- sqlList.add("update sa_serviceorder set scenecontact='" + scenecontact + "',scenecontactrole='"
|
|
|
- + scenecontactrole + "',scenecontactphonenumber='" + scenecontactphonenumber + "',address='" + address
|
|
|
- + "',reason='" + reason + "' where sa_serviceorderid=" + sa_serviceorderid + " and siteid='" + siteid
|
|
|
- + "'");
|
|
|
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_serviceorder");
|
|
|
+ updateSQL.setUniqueid(sa_serviceorderid);
|
|
|
+ updateSQL.setSiteid(siteid);
|
|
|
+ updateSQL.setValue("scenecontact", scenecontact);
|
|
|
+ updateSQL.setValue("scenecontactrole", scenecontactrole);
|
|
|
+ updateSQL.setValue("scenecontactphonenumber", scenecontactphonenumber);
|
|
|
+ updateSQL.setValue("reason", reason);
|
|
|
+ updateSQL.setValue("class1", class1);
|
|
|
+ updateSQL.setValue("province", province);
|
|
|
+ updateSQL.setValue("city", city);
|
|
|
+ updateSQL.setValue("county", county);
|
|
|
+ updateSQL.setValue("servicetype", servicetype);
|
|
|
+
|
|
|
+ sqlList.add(updateSQL.getSQL());
|
|
|
+
|
|
|
+ UpdateSQL updateSQLdetail = SQLFactory.createUpdateSQL(this, "sa_serviceorder");
|
|
|
+ updateSQLdetail.setUniqueid(sa_serviceorderid);
|
|
|
+ updateSQLdetail.setSiteid(siteid);
|
|
|
+ updateSQLdetail.setValue("itemid", itemid);
|
|
|
+ updateSQLdetail.setValue("sku", sku);
|
|
|
+ updateSQLdetail.setValue("cardno", cardno);
|
|
|
+
|
|
|
+ sqlList.add(updateSQLdetail.getSQL());
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
content.put("sa_workorderid", sa_workorderid);
|
|
|
|