1
wangyi
4 天以前 8cdf2c4d1edba2cfa7d63c7b071f170354bdf691
WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -302,9 +302,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 = null;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -337,6 +354,7 @@
            if (OperationType == 1)//新增
            {
                //保存后控制
                objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 1);
                if (objJsonResult.count == 0)
@@ -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.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2215,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 = null;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2442,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 = ds.Tables[0];
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
@@ -2579,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 = null;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2697,7 +2774,7 @@
            oCN.Commit();
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = "新增单据成功!";
            objJsonResult.Message = objJsonResult.Message;
            objJsonResult.data = ds.Tables[0];
            return objJsonResult;
        }
@@ -2791,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 = null;
                            objJsonResult.Message = "新增并审核单据成功!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }