YL
2021-08-31 718ec9a3caa04bd2f1585e6f48e843e610efd1cf
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
5个文件已修改
210 ■■■■■ 已修改文件
PlanM/数据导入/Gy_DataIn_RoutingBill.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PlanM/数据导入/Gy_DataIn_RoutingBill.designer.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PlanM/数据导入/Gy_DataIn_RoutingBill.resx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs 129 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
PlanM/Êý¾Ýµ¼Èë/Gy_DataIn_RoutingBill.cs
@@ -232,11 +232,6 @@
                }
                for (int i = 0; i <= grdMain.Rows.Count - 1; i++)
                {
                    BillNew.omodel.HPicNumVer = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HPicNumVerCol].Value);
                    BillNew.omodel.HPicNumAssemble = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HPicNumAssembleCol].Value);
                    BillNew.omodel.HMaterTexture = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterTextureCol].Value);
                    BillNew.omodel.HProductNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProductNumCol].Value);
                    BillNew.omodel.HVerNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HVerNumCol].Value);
                    string sHNumber = "";
                    if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterNumberCol].Value) != "")
                    {
@@ -261,7 +256,11 @@
                                    BillNew.omodel.HUnitID = oMaterHlp.omodel.HUnitID;
                                    BillNew.omodel.HUnitNumber = oMaterHlp.omodel.HUnitNumber;
                                }
                                BillNew.omodel.HPicNumVer = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HPicNumVerCol].Value);
                                BillNew.omodel.HPicNumAssemble = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HPicNumAssembleCol].Value);
                                BillNew.omodel.HMaterTexture = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMaterTextureCol].Value);
                                BillNew.omodel.HProductNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProductNumCol].Value);
                                BillNew.omodel.HVerNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HVerNumCol].Value);
                            }
                            else
                            {
PlanM/Êý¾Ýµ¼Èë/Gy_DataIn_RoutingBill.designer.cs
@@ -41,7 +41,8 @@
            // 
            // pPic
            // 
            this.pPic.Size = new System.Drawing.Size(1158, 45);
            this.pPic.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
            this.pPic.Size = new System.Drawing.Size(1544, 56);
            // 
            // panel1
            // 
@@ -52,7 +53,8 @@
            this.panel1.Controls.Add(this.label2);
            this.panel1.Controls.Add(this.cmbHYear);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Size = new System.Drawing.Size(1158, 42);
            this.panel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
            this.panel1.Size = new System.Drawing.Size(1544, 52);
            this.panel1.Controls.SetChildIndex(this.cmdHPath, 0);
            this.panel1.Controls.SetChildIndex(this.label4, 0);
            this.panel1.Controls.SetChildIndex(this.txtHPath, 0);
@@ -66,28 +68,33 @@
            // 
            // lblCaption
            // 
            this.lblCaption.Size = new System.Drawing.Size(129, 19);
            this.lblCaption.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
            this.lblCaption.Size = new System.Drawing.Size(160, 24);
            this.lblCaption.Text = "数据导入模块";
            // 
            // cmdHPath
            // 
            this.cmdHPath.Location = new System.Drawing.Point(782, 7);
            this.cmdHPath.Location = new System.Drawing.Point(1043, 9);
            this.cmdHPath.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
            // 
            // txtHPath
            // 
            this.txtHPath.Location = new System.Drawing.Point(461, 3);
            this.txtHPath.Size = new System.Drawing.Size(315, 32);
            this.txtHPath.Location = new System.Drawing.Point(615, 4);
            this.txtHPath.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
            this.txtHPath.Size = new System.Drawing.Size(419, 39);
            // 
            // label4
            // 
            this.label4.Location = new System.Drawing.Point(390, 12);
            this.label4.Location = new System.Drawing.Point(520, 15);
            this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(26, 9);
            this.label1.Location = new System.Drawing.Point(35, 11);
            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(53, 12);
            this.label1.Size = new System.Drawing.Size(67, 15);
            this.label1.TabIndex = 104;
            this.label1.Text = "会计年:";
            // 
@@ -95,9 +102,10 @@
            // 
            this.cmbHYear.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbHYear.FormattingEnabled = true;
            this.cmbHYear.Location = new System.Drawing.Point(84, 8);
            this.cmbHYear.Location = new System.Drawing.Point(112, 10);
            this.cmbHYear.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.cmbHYear.Name = "cmbHYear";
            this.cmbHYear.Size = new System.Drawing.Size(94, 20);
            this.cmbHYear.Size = new System.Drawing.Size(124, 23);
            this.cmbHYear.TabIndex = 105;
            // 
            // cmbHPeriod
@@ -117,17 +125,19 @@
            "10",
            "11",
            "12"});
            this.cmbHPeriod.Location = new System.Drawing.Point(269, 10);
            this.cmbHPeriod.Location = new System.Drawing.Point(359, 12);
            this.cmbHPeriod.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.cmbHPeriod.Name = "cmbHPeriod";
            this.cmbHPeriod.Size = new System.Drawing.Size(85, 20);
            this.cmbHPeriod.Size = new System.Drawing.Size(112, 23);
            this.cmbHPeriod.TabIndex = 107;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(198, 10);
            this.label2.Location = new System.Drawing.Point(264, 12);
            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(65, 12);
            this.label2.Size = new System.Drawing.Size(82, 15);
            this.label2.TabIndex = 106;
            this.label2.Text = "会计期间:";
            // 
@@ -136,34 +146,38 @@
            this.checkadd.AutoSize = true;
            this.checkadd.Checked = true;
            this.checkadd.CheckState = System.Windows.Forms.CheckState.Checked;
            this.checkadd.Location = new System.Drawing.Point(1085, 10);
            this.checkadd.Location = new System.Drawing.Point(1447, 12);
            this.checkadd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.checkadd.Name = "checkadd";
            this.checkadd.Size = new System.Drawing.Size(48, 16);
            this.checkadd.Size = new System.Drawing.Size(56, 19);
            this.checkadd.TabIndex = 108;
            this.checkadd.Text = "追加";
            this.checkadd.UseVisualStyleBackColor = true;
            // 
            // txtHSheetName
            // 
            this.txtHSheetName.Location = new System.Drawing.Point(949, 9);
            this.txtHSheetName.Location = new System.Drawing.Point(1265, 11);
            this.txtHSheetName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txtHSheetName.Name = "txtHSheetName";
            this.txtHSheetName.Size = new System.Drawing.Size(100, 21);
            this.txtHSheetName.Size = new System.Drawing.Size(132, 25);
            this.txtHSheetName.TabIndex = 109;
            this.txtHSheetName.Text = "Sheet1";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(902, 10);
            this.label3.Location = new System.Drawing.Point(1203, 12);
            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(41, 12);
            this.label3.Size = new System.Drawing.Size(52, 15);
            this.label3.TabIndex = 110;
            this.label3.Text = "工作簿";
            // 
            // Gy_DataIn_RoutingBill
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.ClientSize = new System.Drawing.Size(1158, 631);
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
            this.ClientSize = new System.Drawing.Size(1544, 789);
            this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
            this.Name = "Gy_DataIn_RoutingBill";
            this.Text = "数据导入模块";
            this.pPic.ResumeLayout(false);
PlanM/Êý¾Ýµ¼Èë/Gy_DataIn_RoutingBill.resx
@@ -112,12 +112,12 @@
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>95, 17</value>
  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
</root>
WebAPI/Controllers/Éú²ú¹ÜÀí/ÖÊÁ¿»ã±¨µ¥/Sc_QualityReportBillController.cs
@@ -133,7 +133,6 @@
            string msg = sArray[0].ToString();
            string OperationType = sArray[1].ToString().Trim();
            bool bResult = false;
            bool bResult2 = false;
            try
            {
                msg = "[" + msg.ToString() + "]";
@@ -156,8 +155,6 @@
                {
                    //是否保存
                    bResult = AddBillTmpSQL(mainList, ref ClsPub.sExeReturnInfo);
                    //是否审核
                    bResult2 = set_CheckBill(mainList[0].HInterID, ref ClsPub.sExeReturnInfo);
                }
                else if (OperationType.Equals("3"))
                {
@@ -171,23 +168,11 @@
                //是否保存
                if (bResult == true)
                {
                    //是否审核
                    if (bResult2 == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "单据存盘完毕!单据号:" + mainList[0].HBillNo.Trim();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据存盘完毕!自动审核失败,原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "扫码保存成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
@@ -216,6 +201,7 @@
                //固定赋值=================================
                BillNew.HInterID = mainList[0].HInterID;//递入type得到的单据ID
                BillNew.HBillNo = mainList[0].HBillNo;
                BillNew.HBillType = mainList[0].HBillType;
                BillNew.HDate = mainList[0].HDate;
                BillNew.HICMOBillNo = mainList[0].HICMOBillNo;
                BillNew.HICMOInterID = mainList[0].HICMOInterID;
@@ -231,28 +217,26 @@
                BillNew.HBarCode = mainList[0].HBarCode;
                BillNew.HMaker = mainList[0].HMaker;
                BillNew.HMakeDate = mainList[0].HMakeDate;
                BillNew.HReportType = mainList[0].HReportType;
                BillNew.HSourceBillNo = mainList[0].HICMOBillNo;
                BillNew.HSourceInterID = mainList[0].HICMOInterID;
                BillNew.HSourceBillType = mainList[0].HSourceBillType;
                oCN.BeginTran();
                //主表
                //临时表
                oCN.RunProc("Insert Into Sc_ICMOBillQualityStatus_Tmp " +
                    " (HInterID,HBillNo,HDate,HICMOBillNo,HICMOInterID" +
                    ",HProcExchBillNo,HProcExchInterID,HProcExchEntryID,HProcID,HMaterID" +
                    ",HSourceID,HGroupID,HCheckManID,HBadReasonID,HBarCode" +
                    ",HMaker,HMakeDate" +
                    ",HMaker,HMakeDate,HBillType,HReportType,HSourceBillNo" +
                    ",HSourceInterID,HSourceBillType" +
                ") " +
                " values(" + BillNew.HInterID + ",'" + BillNew.HBillNo + "','" + BillNew.HDate + "','" + BillNew.HICMOBillNo + "'," + BillNew.HICMOInterID + 
                ",'" + BillNew.HProcExchBillNo + "'," + BillNew.HProcExchInterID + "," + BillNew.HProcExchEntryID + "," + BillNew.HProcID + "," + BillNew.HMaterID +
                "," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
                ",'" + BillNew.HMaker + "','" + BillNew.HMakeDate + "'" +
                ",'" + BillNew.HMaker + "','" + BillNew.HMakeDate + "','" + BillNew.HBillType + "','" + +BillNew.HReportType + "','" +BillNew.HSourceBillNo + "'" +
                "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'" +
                ") ");
                //判断是否允许保存
                ds = oCN.RunProcReturn("exec h_p_JIT_ICMOBillQualityStatus_SaveCtrl", "h_p_JIT_ICMOBillQualityStatus_SaveCtrl");
                if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
                {
                    sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    oCN.RollBack();
                    return false;
                }
                sReturn = "新增单据成功!";
                sReturn = "扫码成功!";
                oCN.Commit();
                return true;
            }
@@ -418,5 +402,86 @@
            }
        }
        #endregion
        #region åˆ é™¤æ‰«æè®°å½•行
        [Route("Sc_QualityReportBill/del_BarCodeDetail")]
        [HttpGet]
        public object del_BarCodeDetail(long HItemID)
        {
            try
            {
                oCN.RunProc("delete from Sc_ICMOBillQualityStatus_Tmp where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æäº¤ä¿å­˜ï¼Œå­˜ä¸»å­è¡¨åŠæ˜Žç»†è¡¨
        [Route("Sc_QualityReportBill/set_SaveBill")]
        [HttpGet]
        public object set_SaveBill(long HInterID)
        {
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                bool bResult2 = false;
                oCN.BeginTran();
                oCN.RunProc("exec h_p_save_Sc_QualityReportBill " + HInterID);
                //判断是否允许保存
                ds = oCN.RunProcReturn("exec h_p_JIT_ICMOBillQualityStatus_SaveCtrl", "h_p_JIT_ICMOBillQualityStatus_SaveCtrl");
                if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
                {
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //是否审核
                bResult2 = set_CheckBill(HInterID, ref ClsPub.sExeReturnInfo);
                //是否审核
                if (bResult2 == true)
                {
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "单据保存成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据存盘完毕!自动审核失败,原因:" + ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/WebAPI.csproj.user
@@ -7,7 +7,7 @@
    <WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
    <WebStackScaffolding_LayoutPageFile />
    <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
    <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\Git仓库\MESWMS\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>false</UseIISExpress>
    <Use64BitIISExpress />