|
|
@@ -17,6 +17,7 @@ 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 java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
@@ -25,6 +26,7 @@ import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
|
* 服务工单管理
|
|
|
@@ -321,11 +323,11 @@ public class workorder extends Controller {
|
|
|
public String queryworkorderList() throws YosException {
|
|
|
|
|
|
StringBuffer where = new StringBuffer(" 1=1 ");
|
|
|
-// if (!content.getBooleanValue("isadmin")) {
|
|
|
-// where.append(
|
|
|
-// " and exists(select 1 from sys_datateam where ownerid=t1.sa_workorderid and ownertable='sa_workorder' and userid='")
|
|
|
-// .append(userid).append("')");
|
|
|
-// }
|
|
|
+ if (!content.getBooleanValue("isadmin")) {
|
|
|
+ where.append(
|
|
|
+ " and exists(select 1 from sys_datateam where ownerid=t1.sa_workorderid and ownertable='sa_workorder' and userid='")
|
|
|
+ .append(userid).append("')");
|
|
|
+ }
|
|
|
if(sys_enterpriseid!=0){
|
|
|
where.append(" and t2.sys_enterpriseid_service ='").append(sys_enterpriseid).append("'");
|
|
|
}
|
|
|
@@ -892,6 +894,21 @@ public class workorder extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "验证手机", apiversion = R.ID2025072809441203.v1.class, accesstoken = false)
|
|
|
+ @CACHEING
|
|
|
+ public String sendMessage() throws YosException {
|
|
|
+ String customerphone = content.getStringValue("customerphone");
|
|
|
+ if (!Pattern.matches("^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$", customerphone)) {
|
|
|
+ return getErrReturnObject().setErrMsg("手机格式有误").toString();
|
|
|
+ }
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select t1.*,t2.accountno,t3.isservice from sys_enterprise_hr t1 inner join sys_users t2 on t2.userid = t1.userid inner join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid where t1.siteid='" + siteid + "' and t3.isservice=1 and t1.phonenumber=" + customerphone);
|
|
|
+ if (rows.isEmpty()) {
|
|
|
+ return getErrReturnObject().setErrMsg("您的手机号暂无使用权限!").toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+ }
|
|
|
+
|
|
|
private ArrayList<String> getAddWorkorderNodeSql(long sa_workorder_templateid, long sa_workorderid)
|
|
|
throws YosException {
|
|
|
ArrayList sqList = new ArrayList<String>();
|