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

服务人员行程查询新增字段

hu 4 лет назад
Родитель
Сommit
2bc1ff364f

+ 11 - 6
src/apps/workorder/workorder.java

@@ -534,12 +534,12 @@ public class workorder extends PaoCust {
 		if (!getString("fstatus").equals("进行中") && !getString("fstatus").equals("质保卡审批"))
 			throw new P2AppException("", "该工单不在进行中状态");
 		PaoSetRemote ordernodeset = getPaoSet("ordernode");
-		ordernodeset.setWhere("ischilden=0");
-		ordernodeset.reset();
-		int allcount = ordernodeset.count();
-		ordernodeset.setWhere("ischilden=0 and isconfirm=1");
-		ordernodeset.reset();
-		int count = ordernodeset.count();
+//		ordernodeset.setWhere("ischilden=0");
+//		ordernodeset.reset();
+//		int allcount = ordernodeset.count();
+//		ordernodeset.setWhere("ischilden=0 and isconfirm=1");
+//		ordernodeset.reset();
+//		int count = ordernodeset.count();
 //		if (allcount != count && !getString("ftype").equals("维修")) {
 //			throw new P2AppException("", "还有工序没有确认");
 //		}
@@ -549,6 +549,11 @@ public class workorder extends PaoCust {
 //        if(!workorder_errormsg.isEmpty()){
 //            throw new P2AppException("","有异常信息未处理");
 //        }
+		ordernodeset.setWhere("fisrequirednode =1 and isconfirm=0");
+		ordernodeset.reset();
+		if(ordernodeset.count()>0) {
+			throw new P2AppException("", "还有必填的服务工序没有确认");
+		}
 		DBConnect dbConnect = new DBConnect();
 		PaoSetRemote workordertemplate = getPaoSet("WORKORDERTEMPLATE");
 		/** 判断预约单是否可以完成 **/

+ 3 - 1
src/rest/openapi/restcontroller/hyworkorder/web/workorder/SQL/服务人员行程列表查询.sql

@@ -1,7 +1,9 @@
-select t.fstatus,t.fworknum,t.fprovince+t.fcity+t.fcounty+t.faddress faddress,convert(varchar,t.ACCEPTANCEDATE,120)createdate,t.progress,
+select t1.fname,t2.servicebegindate,t2.serviceenddate,t.fstatus,t.fworknum,t.fprovince+t.fcity+t.fcounty+t.faddress faddress,t.progress,
 (
   select top 1 isnull(t1.oneprocessname,'')+isnull(t1.twoprocessname,'')  from hyordernode t1 where t1.fparentid=t.hyWorkorderid and t1.isconfirm=0 and t1.ischilden=0 order by t1.FROWNUM
 )curcontent
 from hyWorkorder t
+left join  hyworker t1 on t1.hyworkernum=t.PROJECTLEADER and t1.siteid=t.siteid
+left join  AFTERSERVICEORDER t2 on t2.Servicenum=t.servernum and t2.siteid=t.siteid
 where EXISTS(select 1 from hyworkorder_team t1 where t1.fparentid=t.hyWorkorderid) and t.siteid=$siteid$ and t.fstatus<>'×÷·Ï' and  $where$