Browse Source

模具上模限制报工之后的

qinqi 4 months ago
parent
commit
7e19bab1fe

+ 8 - 2
DK.Client/PCModule/F_PC_0103_1.cs

@@ -985,8 +985,14 @@ namespace Dongke.IBOSS.PRD.Client.PCModule
 					this.txtBarcode.Focus();
 					this.txtBarcode.Focus();
 					this.txtBarcode.SelectAll();
 					this.txtBarcode.SelectAll();
 					return;
 					return;
+				} 
+				if (string.IsNullOrWhiteSpace(item["mouldPlan"].ToString()) || Convert.ToInt32(item["mouldPlan"].ToString()) == 0 )
+				{
+					MessageBox.Show("此模具未报工,不能添加到成型线。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+					this.txtBarcode.Focus();
+					this.txtBarcode.SelectAll();
+					return;
 				}
 				}
-
 				//DataRow r = dtInfo.NewRow();
 				//DataRow r = dtInfo.NewRow();
 				//r["GroutingMouldCode"] = gMouldCode;
 				//r["GroutingMouldCode"] = gMouldCode;
 				//r["MouldSource"] = "1";
 				//r["MouldSource"] = "1";
@@ -1005,7 +1011,7 @@ namespace Dongke.IBOSS.PRD.Client.PCModule
 				//r["NEWFLAG"] = "1";
 				//r["NEWFLAG"] = "1";
 				//dtInfo.Rows.Add(r);
 				//dtInfo.Rows.Add(r);
 
 
-                int outputCount = Convert.ToInt32(item["OutputCount"]);
+				int outputCount = Convert.ToInt32(item["OutputCount"]);
                 if (outputCount == 1)
                 if (outputCount == 1)
                 {
                 {
                     DataRow r = dtInfo.NewRow();
                     DataRow r = dtInfo.NewRow();

+ 1 - 0
DK.Service/PCModuleService/PCModuleLogic.cs

@@ -2785,6 +2785,7 @@ namespace Dongke.IBOSS.PRD.Service.PCModuleService
                     "      ,cu.usercode              CreateUserCode\n" +
                     "      ,cu.usercode              CreateUserCode\n" +
                     "      ,nvl(mo.OutputNo,0) OutputNo\n" +
                     "      ,nvl(mo.OutputNo,0) OutputNo\n" +
                     "      ,nvl(mo.GroutingNum, m.GroutingNum) GroutingNum\n" +
                     "      ,nvl(mo.GroutingNum, m.GroutingNum) GroutingNum\n" +
+                    "      ,m.mould_plan_id mouldPlan" +
                     "  FROM tp_pc_mould m\n" +
                     "  FROM tp_pc_mould m\n" +
                     "  LEFT JOIN tp_mst_datadictionary mtype\n" +
                     "  LEFT JOIN tp_mst_datadictionary mtype\n" +
                     "    ON mtype.dictionaryid = m.mouldtype\n" +
                     "    ON mtype.dictionaryid = m.mouldtype\n" +

+ 8 - 0
WCF.Service/WCF.Services/PDAModuleService.cs

@@ -9499,6 +9499,14 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                                             return actionResult;
                                             return actionResult;
                                         }
                                         }
                                     }
                                     }
+                                    if (string.IsNullOrWhiteSpace(sre.Data.Tables[0].Rows[0]["mouldPlan"].ToString()) || Convert.ToInt32(sre.Data.Tables[0].Rows[0]["mouldPlan"].ToString()) == 0)
+                                    { 
+                                        actionResult.Status = (int)Constant.PDAResult.Fail;
+                                        actionResult.Result = -3;
+                                        actionResult.Message =
+                                            "此模具未报工,不能添加到成型线";
+                                        return actionResult;
+                                    }
                                     actionResult.Status = (int)Constant.PDAResult.Success;
                                     actionResult.Status = (int)Constant.PDAResult.Success;
                                     actionResult.Result = JsonHelper.ToJson(sre.Data.Tables[0]);
                                     actionResult.Result = JsonHelper.ToJson(sre.Data.Tables[0]);
                                 }
                                 }