|
|
@@ -14,9 +14,11 @@ import common.annotation.CACHEING_CLEAN;
|
|
|
import common.data.*;
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
+import org.apache.cxf.configuration.security.DNConstraintsType;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.webmanage.sale.serviceorder.tools.HttpURLRest;
|
|
|
import restcontroller.webmanage.sale.serviceorder.tools.VerificationManage;
|
|
|
+import restcontroller.webmanage.sale.workorder.workorder;
|
|
|
import restcontroller.webmanage.sale.workorder.workpresetInfo;
|
|
|
import utility.sms.Sms;
|
|
|
|
|
|
@@ -617,9 +619,11 @@ public class serviceorder extends Controller {
|
|
|
}
|
|
|
|
|
|
@API(title = "重新指派工单", apiversion = R.ID2025101710510903.v1.class)
|
|
|
+ @CACHEING_CLEAN(apiversions = {serviceorder.class, workorder.class,restcontroller.sale.serviceorder.serviceorder.class})
|
|
|
public String reAssigningWorkorder() throws YosException {
|
|
|
Long sa_workorderid = content.getLong("sa_workorderid");
|
|
|
JSONArray projectlearders = content.getJSONArray("projectlearders");
|
|
|
+ boolean ismanage = content.getBooleanValue("ismanage");
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
|
Rows rows = dbConnect
|
|
|
.runSqlQuery("select status,billno from sa_workorder where sa_workorderid ='"
|
|
|
@@ -630,6 +634,16 @@ public class serviceorder extends Controller {
|
|
|
.toString();
|
|
|
}
|
|
|
}
|
|
|
+ if(!ismanage){
|
|
|
+ Rows datateamrows =dbConnect.runSqlQuery("select * from sys_datateam where ownertable='sa_workorder' and ownerid="
|
|
|
+ + sa_workorderid + " and siteid='" + siteid + "'");
|
|
|
+ if(datateamrows.isNotEmpty()){
|
|
|
+ return getErrReturnObject().setErrMsg("该任务已由其他同事负责推进").toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ sqlList.add("update sa_workorder set status='待接单' where sa_workorderid ='"
|
|
|
+ + sa_workorderid + "' and siteid='" + siteid + "'");
|
|
|
if (projectlearders != null && !projectlearders.isEmpty()) {
|
|
|
sqlList.add("delete from sys_datateam where ownertable='sa_workorder' and ownerid="
|
|
|
+ sa_workorderid + " and siteid='" + siteid + "'");
|
|
|
@@ -637,6 +651,7 @@ public class serviceorder extends Controller {
|
|
|
sqlList.addAll(DataTeam.createTeamSQL(this, "sa_workorder", sa_workorderid, (int) obj));
|
|
|
}
|
|
|
}
|
|
|
+ dbConnect.runSqlUpdate(sqlList);
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|