|
|
@@ -63,10 +63,13 @@ public class ordernode extends PaoCust {
|
|
|
}
|
|
|
/**该节点是否可以确认**/
|
|
|
public String fiscomplate() throws P2Exception {
|
|
|
+ String str=(isNull("oneprocessname")?"":getString("oneprocessname"))+(isNull("twoprocessname")?"":getString("twoprocessname"));
|
|
|
+ PaoSetRemote flowworkset = getPaoSet("$FLOWWORK", "FLOWWORK", "workname='" + str + "'");
|
|
|
+
|
|
|
if(!getBoolean("fiscomplete")){
|
|
|
return "true";
|
|
|
}
|
|
|
- if(getBoolean("fisqualified")&&!getBoolean("qualified")){
|
|
|
+ if(getBoolean("fisqualified")&&!getBoolean("qualified") &&!flowworkset.isEmpty() &&flowworkset.getPao(0).getBoolean("ffisqualified")){
|
|
|
/**如果为不合格需要判断有无上传附件和填写备注(说明)**/
|
|
|
PaoSetRemote doclinks =null;
|
|
|
if(WebClientRest.FISUPLOADFOROBS){
|
|
|
@@ -90,7 +93,7 @@ public class ordernode extends PaoCust {
|
|
|
return "存在"+s+"工序没有确认";
|
|
|
}
|
|
|
//是否上传附件
|
|
|
- if(getBoolean("fisupload")){
|
|
|
+ if(getBoolean("fisupload")&&!flowworkset.isEmpty()&&flowworkset.getPao(0).getBoolean("ffisupload")){
|
|
|
PaoSetRemote doclinks =null;
|
|
|
if(WebClientRest.FISUPLOADFOROBS){
|
|
|
doclinks = P2Server.getP2Server().getPaoSet("tattachment", P2Server.getP2Server().getSystemUserInfo());
|
|
|
@@ -103,7 +106,7 @@ public class ordernode extends PaoCust {
|
|
|
}
|
|
|
|
|
|
//是否上传签名
|
|
|
- if(getBoolean("fissignature")){
|
|
|
+ if(getBoolean("fissignature") && !flowworkset.isEmpty() && flowworkset.getPao(0).getBoolean("ffissignature")){
|
|
|
PaoSetRemote tattachmentset =P2Server.getP2Server().getPaoSet("tattachment", P2Server.getP2Server().getSystemUserInfo());
|
|
|
tattachmentset.setWhere("ownertable='ORDERNODE' and ownerid="+getInt("ORDERNODEid")+" and type='客户签名'");
|
|
|
tattachmentset.reset();
|
|
|
@@ -115,7 +118,7 @@ public class ordernode extends PaoCust {
|
|
|
// if(StringUtils.isBlank(getString("fnotes")))return "请填写完整工序内容:没有填写备注";
|
|
|
// }
|
|
|
//是否添加物料
|
|
|
- if(getBoolean("fisaddtitem")){
|
|
|
+ if(getBoolean("fisaddtitem")&&!flowworkset.isEmpty()&&flowworkset.getPao(0).getBoolean("ffisaddtitem")){
|
|
|
PaoSetRemote workorder_titem = P2Server.getP2Server().getPaoSet("workorder_titem", P2Server.getP2Server().getSystemUserInfo());
|
|
|
workorder_titem.setInsertSite(getSite());
|
|
|
workorder_titem.setWhere("fparentid="+getInt("fparentid")+" and sourcenode='"+String.valueOf(getInt("FROWNUM"))+"'");
|