物料添加单个流转卡数量,批量生成流转卡优化,到货确认模块添加添康科技客户
6个文件已修改
64 ■■■■ 已修改文件
DAL/车间管理/ClsSc_ProcessExchangeBill.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcessExchangeBillSub_BatchSplit.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/POStockInBillController.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsGy_Material_Ctl.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsGy_Material_Model.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBill.cs
@@ -342,7 +342,11 @@
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                if (omodel.HInterID == 0 || omodel.HInterID.ToString() == null || omodel.HInterID.ToString() == "undefined")
                {
                    omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                //若MAINDI重复则重新获取
                //保存前控制=========================================
@@ -496,12 +500,34 @@
                {
                    if (oSystemParameter.omodel.Sc_ProcessExchangeBill_AutoBarCode == "Y") //系统参数  å·¥åºæµè½¬å¡ä¿å­˜æ—¶è‡ªåŠ¨åŒæ­¥æ¡ç ä¿¡æ¯è‡³æ¡ç æ¡£æ¡ˆ
                    {
                        oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                        Int64 HBarCodeInterID =  DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo);
                        if (oSystemParameter.omodel.WMS_CampanyName == "添康科技")
                        {
                            oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                            ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                            ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty" +
                            ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark" +
                            ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate" +
                            ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag" +
                            ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID,HGiveAwayFlag" +
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" +
                            ") values ("
                            + "'" + omodel.HBillNo + "','唯一条码'," + omodel.HMaterID.ToString() + "," + omodel.HUnitID.ToString() + "," + omodel.HQty.ToString()
                            + ",'" + omodel.HBatchNo + "'," + omodel.HSupID.ToString() + ",0,'" + omodel.HMaker + "',getdate(),0," + omodel.HQty.ToString()
                            + ", " + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "','3710',''"
                            + ",1,1,0,0,0,'工序流转卡保存自动同步'"
                            + ",0,'',getdate(),'',getdate()"
                            + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",''," + HBarCodeInterID + ",1,0"
                            + ",'','','',0,'','')");
                        }
                        else
                        {
                            oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                            ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                            ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty" +
                            ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark" +
                            ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate" +
                            ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID,HGiveAwayFlag" +
                            ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" +
                            ") values ("
                            + "'" + omodel.HBillNo + "','唯一条码'," + omodel.HMaterID.ToString() + "," + omodel.HUnitID.ToString() + "," + omodel.HQty.ToString()
@@ -509,8 +535,9 @@
                            + ", " + omodel.HInterID.ToString() + ",1,'" + omodel.HBillNo + "','3772',''"
                            + ",1,1,0,0,0,'工序流转卡保存自动同步'"
                            + ",0,'',getdate(),'',getdate()"
                            + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",'',0,0"
                            + ", " + omodel.HPRDORGID + "," + omodel.HPRDORGID + ",''," + HBarCodeInterID + ",1,0"
                            + ",'','','',0,'','')");
                        }
                    }
                }
                else
Model/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBillSub_BatchSplit.cs
@@ -16,6 +16,9 @@
        public double HProQty;//流转卡数量
        public Int64 HRoutingInterID;//工艺路线内码
        public DateTime HDate;//流转卡日期
        public Int64 HInterID;//流转卡内码
        public string HBillNo;//流转卡号
        public string HBatchNo;//批次
    }
}
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -1065,7 +1065,7 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"exec h_p_Sc_GetProcessExchangeBillSubTech ");
                ds = oCN.RunProcReturn(sql +  HInterID, "h_p_Sc_GetProcessExchangeBillSubTech");
                ds = oCN.RunProcReturn(sql + " '" +  HInterID + "'", "h_p_Sc_GetProcessExchangeBillSubTech");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -2083,18 +2083,24 @@
                DateTime dt = DateTime.Now;
                string sql = "";
                Int64 HInterID = 0;
                string HBillNo = "";
                Int64 HICMOInterID = 0;
                Int64 HICMOEntryID = 0;
                string HICMOBillNo = "";
                double HQty = 0;
                double HProQty = 0;
                foreach (Model.ClsSc_ProcessExchangeBillSub_BatchSplit oItemSub in ls)
                {
                    HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    //HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    HInterID = oItemSub.HInterID;
                    HBillNo = oItemSub.HBillNo;
                    HICMOInterID = oItemSub.HICMOInterID;
                    HICMOEntryID = oItemSub.HICMOEntryID;
                    HICMOBillNo = oItemSub.HICMOBillNo;
                    HQty = oItemSub.HQty;
                    HProQty = oItemSub.HProQty;
                    sql = "select * from h_v_Sc_ProcessExchangeBill_BatchSplit where hmainid = " + oItemSub.HICMOInterID + " and hentryid = " 
                         + oItemSub.HICMOEntryID;
@@ -2102,6 +2108,7 @@
                    //主表赋值
                    if (ds.Tables[0].Rows.Count > 0 && ds != null)
                    {
                        oBill.omodel.HInterID = HInterID;
                        oBill.omodel.HBillNo = HBillNo;
                        oBill.omodel.HBillSubType = "3772";
                        oBill.omodel.HMainSourceBillSubType = "3710";
@@ -2112,7 +2119,7 @@
                        oBill.omodel.HYear = DBUtility.ClsPub.isLong(oItemSub.HDate.Year);
                        oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(oItemSub.HDate.Month);
                        oBill.omodel.HRemark = "";
                        oBill.omodel.HBatchNo = "";
                        oBill.omodel.HBatchNo = oItemSub.HBatchNo;
                        oBill.omodel.HMainMaterID = 0;
                        oBill.omodel.HKeyMaterID = 0;
                        oBill.omodel.HNo = 0;
@@ -2205,7 +2212,7 @@
                        oBill.omodel.HRemark_New = "";
                        oBill.omodel.HWeight_New = 0;
                        oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString();
                        oBill.omodel.HMouldNum = "0";
                        oBill.omodel.HMouldNum = "0";
                    }   
                    //子表赋值
                    for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
@@ -2239,7 +2246,7 @@
                        oItemSubs.HWorkerID = 0;
                        oItemSubs.HWorkerNumber = "";
                        oItemSubs.HSourceID = 0;
                        oItemSubs.HQty = HQty;
                        oItemSubs.HQty = HProQty;
                        oItemSubs.HTimeUnit = "";
                        oItemSubs.HPlanWorkTimes = 0;
                        oItemSubs.HPlanBeginDate = Convert.ToDateTime(dt.ToShortDateString().ToString());
WebAPI/Controllers/POStockInBillController.cs
@@ -5335,9 +5335,11 @@
                string sql = string.Empty;
                if (FCusName.Contains("安瑞"))
                    sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID =(select distinct HSourceInterID from Cg_POInStockBillSub where HInterID ={HInterID}) and HBarCode = '{HBarcode}' and HBarCodeType ='箱号内条码'";
                else if(FCusName.Contains("添康科技"))
                    sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID,HMaterID,HBatchNo,HProduceDate,HExpiryDate from  Gy_BarCodeBill where HSourceInterID = {HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='箱号内条码'";
                else
                    sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}";
                DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList");
                DataSet ds = oCn.RunProcReturn(sql, "Gy_BarCodeBill");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
WebAPI/DLL/ClsGy_Material_Ctl.cs
@@ -29,6 +29,7 @@
                    ",HSTDLABORPREPARETIME,HSTDMACHINEPREPARETIME,HWidth,HWeight,HColorRemark,HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol" +
                    ",HMaterRuleType,HColorNo,HPieceMaxQty,HCommonUseFlag,HAvgStockPrice,HFootPrice,HTaxCost,HNoTaxCost,HOnceRightRate" +
                    ",HHeight_M,HInches_M,HAl1Long_M,HDensity_M,HTela_M,HUnderTela_M,HSizing_M,HQtyDec,HPriceDec,HMoneyDec,HTaxRate,HProfitRate" +
                    ",HLotcardQty" +
                    ") " +
                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
                    ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'" +
@@ -51,6 +52,7 @@
                       "," + oModel.HMoneyDec +
                       "," + oModel.HTaxRate +
                       "," + oModel.HProfitRate +
                       "," + oModel.HLotcardQty +
                       ")", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -219,6 +221,7 @@
                    ",HMoneyDec=" + oModel.HMoneyDec.ToString() +
                    ",HTaxRate=" + oModel.HTaxRate.ToString() +
                    ",HProfitRate=" + oModel.HProfitRate.ToString() +
                    ",HLotcardQty=" + oModel.HLotcardQty.ToString() +
                    " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
WebAPI/Models/ClsGy_Material_Model.cs
@@ -105,5 +105,7 @@
        public double HProfitRate; // é»˜è®¤åˆ©æ¶¦çŽ‡ï¼ˆé»˜è®¤0)
        public int HProjectBillMainID; //项目号
        public double HLotcardQty; //单个流转卡数量
    }
}