|
|
@@ -127,13 +127,13 @@ public class serviceorder extends Controller {
|
|
|
"SELECT status,sys_enterpriseid,sa_orderid from sa_serviceorder WHERE sa_serviceorderid = "
|
|
|
+ sa_serviceorderid);
|
|
|
if (rows.isNotEmpty()) {
|
|
|
- if (rows.get(0).getString("status").equals("新建")) {
|
|
|
+ if (rows.get(0).getString("status").equals("新建") || rows.get(0).getString("status").equals("待分配")) {
|
|
|
sqlFactory = new SQLFactory(this, "服务申请单更新");
|
|
|
sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
|
|
|
sqlList.add(DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "更新", "服务申请单更新成功")
|
|
|
.getSQL());
|
|
|
} else {
|
|
|
- return getErrReturnObject().setErrMsg("非新建状态下无法编辑").toString();
|
|
|
+ return getErrReturnObject().setErrMsg("该状态下无法编辑").toString();
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
@@ -890,6 +890,31 @@ public class serviceorder extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "撤回分配服务申请单", apiversion = R.ID2025121818251203.v1.class)
|
|
|
+ @CACHEING_CLEAN(apiClass = {workorder.class, serviceorder.class, warrantycard.class})
|
|
|
+ public String chehuiServiceOrder() throws YosException {
|
|
|
+ long sa_serviceorderid = content.getLong("sa_serviceorderid");
|
|
|
+ ArrayList<String> sqllist = new ArrayList<>();
|
|
|
+
|
|
|
+ Rows serviceorderRows = dbConnect.runSqlQuery("select status,billno from sa_serviceorder where sa_serviceorderid ='"
|
|
|
+ + sa_serviceorderid + "' and siteid='" + siteid + "'");
|
|
|
+ if(serviceorderRows.isNotEmpty()){
|
|
|
+ if(!serviceorderRows.get(0).getString("status").equals("待受理")){
|
|
|
+ return getErrReturnObject().setErrMsg("非待受理状态的服务申请单无法撤回分配").toString();
|
|
|
+ }
|
|
|
+ sqllist.add("update sa_serviceorder set sys_enterpriseid_service=0,status='待分配',allocationdate=null,allocationby='' where sa_serviceorderid="+sa_serviceorderid);
|
|
|
+ sqllist.add(DataContrlLog.createLog(this, "sa_serviceorder", sa_serviceorderid, "撤回分配", "服务申请单撤回分配成功")
|
|
|
+ .getSQL());
|
|
|
+ }else{
|
|
|
+ return getErrReturnObject().setErrMsg("服务申请单不存在").toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ dbConnect.runSqlUpdate(sqllist);
|
|
|
+
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
@API(title = "发送手机验证码", apiversion = R.ID20230215173103.v1.class, accesstoken = false)
|
|
|
public String sendMessage() throws YosException {
|