Pārlūkot izejas kodu

班管家 2021-12-7 16:12

sjw 4 gadi atpakaļ
vecāks
revīzija
b342fc6652

+ 11 - 4
src/apps/hyordernode/hyordernode.java

@@ -53,6 +53,13 @@ public class hyordernode extends PaoCust {
     }
     }
     /**该节点是否可以确认**/
     /**该节点是否可以确认**/
     public String fiscomplate() throws P2Exception {
     public String fiscomplate() throws P2Exception {
+//        System.out.println("fiscomplate");
+        String str=(isNull("oneprocessname")?"":getString("oneprocessname"))+(isNull("twoprocessname")?"":getString("twoprocessname"));
+        PaoSetRemote hyflowworkset = getPaoSet("$HYFLOWWORK", "HYFLOWWORK", "workname='" + str + "'");
+//        if(!hyflowworkset.isEmpty()){
+//            System.out.println(hyflowworkset.getPao(0).getString("workname"));
+//        }
+
         if(!getBoolean("fiscomplete")){
         if(!getBoolean("fiscomplete")){
             return "true";
             return "true";
         }
         }
@@ -60,7 +67,7 @@ public class hyordernode extends PaoCust {
         String s = fisPreComplate();
         String s = fisPreComplate();
         if(!s.equals("true"))return "存在"+s+"工序没有确认";
         if(!s.equals("true"))return "存在"+s+"工序没有确认";
         //是否上传附件
         //是否上传附件
-        if(getBoolean("fisupload")){
+        if(getBoolean("fisupload")&&!hyflowworkset.isEmpty()&&hyflowworkset.getPao(0).getBoolean("ffisupload")){
             PaoSetRemote doclinks =null;
             PaoSetRemote doclinks =null;
 
 
             doclinks = P2Server.getP2Server().getPaoSet("tattachment", P2Server.getP2Server().getSystemUserInfo());
             doclinks = P2Server.getP2Server().getPaoSet("tattachment", P2Server.getP2Server().getSystemUserInfo());
@@ -70,7 +77,7 @@ public class hyordernode extends PaoCust {
             if(doclinks.isEmpty())return "请填写完整工序内容:附件没有上传";
             if(doclinks.isEmpty())return "请填写完整工序内容:附件没有上传";
         }
         }
         //是否添加物料
         //是否添加物料
-        if(getBoolean("fisaddtitem")){
+        if(getBoolean("fisaddtitem")&&!hyflowworkset.isEmpty()&&hyflowworkset.getPao(0).getBoolean("ffisaddtitem")){
             PaoSetRemote workorder_titem = P2Server.getP2Server().getPaoSet("hyworkorder_titem", P2Server.getP2Server().getSystemUserInfo());
             PaoSetRemote workorder_titem = P2Server.getP2Server().getPaoSet("hyworkorder_titem", P2Server.getP2Server().getSystemUserInfo());
             workorder_titem.setInsertSite(getSite());
             workorder_titem.setInsertSite(getSite());
             workorder_titem.setWhere("fparentid="+getInt("fparentid")+" and sourcenode='"+String.valueOf(getInt("FROWNUM"))+"'");
             workorder_titem.setWhere("fparentid="+getInt("fparentid")+" and sourcenode='"+String.valueOf(getInt("FROWNUM"))+"'");
@@ -78,11 +85,11 @@ public class hyordernode extends PaoCust {
             if(workorder_titem.isEmpty())return "请填写完整工序内容:没有添加物料";
             if(workorder_titem.isEmpty())return "请填写完整工序内容:没有添加物料";
         }
         }
         //是否上传文本
         //是否上传文本
-        if(getBoolean("fistext")){
+        if(getBoolean("fistext")&&!hyflowworkset.isEmpty()&&hyflowworkset.getPao(0).getBoolean("ffistext")){
             if(isNull("ftext"))return "请填写完整工序内容:没有添加文本";
             if(isNull("ftext"))return "请填写完整工序内容:没有添加文本";
         }
         }
         //是否上传合同
         //是否上传合同
-        if(getBoolean("fiscontract")){
+        if(getBoolean("fiscontract")&&!hyflowworkset.isEmpty()&&hyflowworkset.getPao(0).getBoolean("ffiscontract")){
             PaoSetRemote doclinks =null;
             PaoSetRemote doclinks =null;
 
 
             doclinks = P2Server.getP2Server().getPaoSet("tattachment", P2Server.getP2Server().getSystemUserInfo());
             doclinks = P2Server.getP2Server().getPaoSet("tattachment", P2Server.getP2Server().getSystemUserInfo());

+ 7 - 1
src/rest/openapi/restcontroller/hyworkorder/webapp/workorder/SQL/工单节点详情查询.sql

@@ -15,8 +15,14 @@ select t.frownum,(isnull(t.oneprocessname,'')+isnull(t.twoprocessname,'')) conte
        t.fiscontract,
        t.fiscontract,
        t.ftext,
        t.ftext,
        t.confirmation,
        t.confirmation,
-       t.serverprice
+       t.serverprice,
+       t4.ffisupload,
+       t4.ffisaddtitem,
+       t4.ffistext,
+       t4.ffiscontract,
+       t4.ffisconfirmation
 from hyordernode t
 from hyordernode t
          join hyWorkorder t3 on t3.hyWorkorderid=t.fparentid
          join hyWorkorder t3 on t3.hyWorkorderid=t.fparentid
          left join hyworker t1 on t1.hyworkernum=t.Operator
          left join hyworker t1 on t1.hyworkernum=t.Operator
+         left join hyFlowwork t4 on t4.workname=isnull(t.oneprocessname,'')+isnull(twoprocessname,'') and t4.siteid=t.siteid
 where EXISTS(select 1 from hyWorkorder t2 where t2.fworknum=$fworknum$ and t2.hyWorkorderid=t.fparentid) and t.FROWNUM=$frownum$
 where EXISTS(select 1 from hyWorkorder t2 where t2.fworknum=$fworknum$ and t2.hyWorkorderid=t.fparentid) and t.FROWNUM=$frownum$