1
wangyi
3 天以前 8cdf2c4d1edba2cfa7d63c7b071f170354bdf691
WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -141,7 +141,7 @@
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.code = "1";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
@@ -171,7 +171,7 @@
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.code = "1";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
@@ -301,10 +301,27 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (OperationType == 1)
                {
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.Sc_MouldUpperBill_AutoCheck.ToUpper() == "Y")
                        {
                            oCN.RunProc("Update Sc_MouldUpperBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID);
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -337,6 +354,7 @@
            if (OperationType == 1)//新增
            {
                //保存后控制
                objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 1);
                if (objJsonResult.count == 0)
@@ -1131,7 +1149,7 @@
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.code = "1";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(BeforeSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
@@ -1161,7 +1179,7 @@
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.code = "1";
                objJsonResult.count = 1;  //成功!
                objJsonResult.Message = DBUtility.ClsPub.isStrNull(AfterSave.Tables[0].Rows[0]["HRemark"]);
                objJsonResult.data = null;
@@ -1291,10 +1309,26 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (OperationType == 1)
                {
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.Sc_MouldLowerBill_AutoCheck.ToUpper() == "Y")
                        {
                            oCN.RunProc("Update Sc_MouldLowerBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID);
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2013,11 +2047,16 @@
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "当前模具未做上模单,查询失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                    ds = oCN.RunProcReturn("select * from  h_v_Gy_MouldFile_Query where 1=1" + sWhere, "h_v_Gy_MouldFile_Query");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "当前模具未做上模单,查询失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = "1";
@@ -2210,9 +2249,26 @@
                    return objJsonResult;
                }
                if (OperationType == 1)
                {
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.Sc_MouldUpperBill_AutoCheck.ToUpper() == "Y")
                        {
                            oCN.RunProc("Update Sc_MouldUpperBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID);
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2437,14 +2493,22 @@
                                Service.GeTuiService.PubishSingle(HInterID0);
                            }
                        }
                    }
                }
                        if (oSystemParameter.omodel.Sc_MouldLowerBill_AutoCheck.ToUpper() == "Y")
                        {
                            oCN.RunProc("Update Sc_MouldLowerBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID);
                // 返回成功结果(注意原逻辑中使用了 ds.Tables[0])
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "新增单据成功!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
@@ -2574,9 +2638,27 @@
                    return objJsonResult;
                }
                if (OperationType == 1)
                {
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.Sc_MouldLowerBill_AutoCheck.ToUpper() == "Y")
                        {
                            oCN.RunProc("Update Sc_MouldLowerBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID);
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2692,7 +2774,7 @@
            oCN.Commit();
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = "新增单据成功!";
            objJsonResult.Message = objJsonResult.Message;
            objJsonResult.data = ds.Tables[0];
            return objJsonResult;
        }
@@ -2786,9 +2868,26 @@
                    return objJsonResult;
                }
                if (OperationType == 1)
                {
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.Sc_MouldUpperBill_AutoCheck.ToUpper() == "Y")
                        {
                            oCN.RunProc("Update Sc_MouldUpperBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID);
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }