| | |
| | | { |
| | | DataSet ds; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_StockCheckItem"+ sWhere, "Gy_StockCheckItem"); |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_StockCheckItem" + sWhere, "Gy_StockCheckItem"); |
| | | if (ds == null && ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErr = "没有返回任何数据!"; |
| | |
| | | return false; |
| | | } |
| | | } |
| | | if (dal.AddNew_Mould(oMain.HInterID,oMain.HMouldID,oMain.HBillType,oMain.HWhID,oMain.HSCWHID,oMain.HStockPlaceID,oMain.HOutStockPlaceID,oMain.HBarCode,oMain.HMaker,oMain.HOWNERID,oMain.HStockOrgID,oMain.HBillNo,oMain.HOtherOrgID)) |
| | | if (dal.AddNew_Mould(oMain.HInterID, oMain.HMouldID, oMain.HBillType, oMain.HWhID, oMain.HSCWHID, oMain.HStockPlaceID, oMain.HOutStockPlaceID, oMain.HBarCode, oMain.HMaker, oMain.HOWNERID, oMain.HStockOrgID, oMain.HBillNo, oMain.HOtherOrgID)) |
| | | { |
| | | //sErrMsg = "保存成功!"; |
| | | return true; |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HEmpID,HGroupID,HDeptID,HPRDORGID" + |
| | | ") " + |
| | | " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120)" + |
| | | " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HEmpID.ToString() + "," + oMain.HGroupID.ToString() + "," + oMain.HDeptID.ToString() + "," + oMain.HPRDORGID.ToString() + |
| | | ") "); |
| | |
| | | { |
| | | string sJson_ZYMESFLAG = ""; //生产汇报单同步MES标记 |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | sJson_ZYMESFLAG = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FHZYMESFLAG"]); |
| | | |
| | |
| | | //"\"FID\":\"" + oMain.HInterID.ToString() + "\"," + |
| | | "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," + |
| | | //\"FDocumentStatus\":\"\", |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FPRDORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPRDORGID"]) + "\"}," + |
| | | //\"FWorkshipIdH\":{\"FNumber\":\"\"}, |
| | | //\"FDescription\":\"\", |
| | |
| | | " \"FBASEFINISHQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBASEFINISHQTY"]) + "," + |
| | | " \"FFINISHQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FFINISHQTY"]) + "," + |
| | | " \"FInStockType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInStockType"]) + "\"," + |
| | | sJson_StockPlace + |
| | | sJson_StockPlace + |
| | | sJson_EntryCustom + |
| | | sJson_SubCustom + |
| | | |
| | |
| | | } |
| | | if (oSystemParameter.omodel.Sc_ICMOReportBill_ERPMode.ToUpper() == "CLOUD") //判断同步模式是金蝶CLOUD |
| | | { |
| | | if (set_SaveICMOProductReportBill_CLD_Layui(oMain, workcode,HSourceID, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | if (set_SaveICMOProductReportBill_CLD_Layui(oMain, workcode, HSourceID, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //"保存成功!"; |
| | | return true; |
| | |
| | | |
| | | //生成生产汇报单 |
| | | [WebMethod] |
| | | public bool set_SaveICMOProductReportBill_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain,string workcode,int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public bool set_SaveICMOProductReportBill_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | //if (sHSourceType == "3710") //源单:生产订单 |
| | | //{ |
| | |
| | | /// <param name="oMain"></param> |
| | | /// <param name="sErrMsg"></param> |
| | | /// <returns></returns> |
| | | public bool SaveICMOProductReportBill_ICMO_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain,string workcode,int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public bool SaveICMOProductReportBill_ICMO_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //建立一个 事务; |
| | | try |
| | | { |
| | | |
| | | |
| | | //判断会计期是否合理 |
| | | string s = ""; |
| | | int sYear = 0; |
| | |
| | | ") "); |
| | | |
| | | //更新生产状态临时表(当日完工数量)HDateFinishQty h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty |
| | | oCn.RunProc("exec h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty '"+ workcode + "','" + HSourceID + "','" + oMain.HMainSourceInterID + "','"+oMain.HMainSourceEntryID + "'"); |
| | | oCn.RunProc("exec h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty '" + workcode + "','" + HSourceID + "','" + oMain.HMainSourceInterID + "','" + oMain.HMainSourceEntryID + "'"); |
| | | //string sql1 = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set |
| | | // HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); |
| | | //oCn.RunProc(sql1); |
| | |
| | | |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOToICMOReport_Add " + oMain.HInterID.ToString()); |
| | | |
| | | |
| | | |
| | | |
| | | if (oSystemParameterMain.Sc_ICMOReportBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | |
| | | bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); |
| | | string msgReport = dbId + ';' + sCLOUDUseName + ';' + sCLOUDPsd + ';' + 2052; |
| | | |
| | | |
| | | |
| | | //LogService.Write($"{Pub_Class.ClsPub.sCLOUDUrl}、{dbId}、{sCLOUDUseName}、{sCLOUDPsd}"); |
| | | |
| | | LogService.Write(sJson); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "生成生产汇报单失败!登录失败!"+ msgReport; |
| | | sErrMsg = "生成生产汇报单失败!登录失败!" + msgReport; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | |
| | | |
| | | //生成生产汇报单 |
| | | [WebMethod] |
| | | public bool set_SaveICMOProductReportBill_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType,string HProcID, ref string sErrMsg) |
| | | public bool set_SaveICMOProductReportBill_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, string HProcID, ref string sErrMsg) |
| | | { |
| | | Log.LogInfo(workcode.ToString()); //记录提交数据 |
| | | //获取系统参数 |
| | |
| | | |
| | | //生成生产汇报单 |
| | | [WebMethod] |
| | | public bool set_SaveICMOProductReportBill_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType,string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public bool set_SaveICMOProductReportBill_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | //if (sHSourceType == "3710") //源单:生产订单 |
| | | //{ |
| | |
| | | /// <param name="oMain"></param> |
| | | /// <param name="sErrMsg"></param> |
| | | /// <returns></returns> |
| | | public bool SaveICMOProductReportBill_ICMO_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType,string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public bool SaveICMOProductReportBill_ICMO_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //建立一个 事务; |
| | | try |
| | |
| | | |
| | | //根据单号、资源ID、订单主ID、订单子ID、制单人过滤产量汇报报检申请提交数据 |
| | | string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set |
| | | HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HProcID='"+ HProcID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); |
| | | HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HProcID='" + HProcID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); |
| | | oCn.RunProc(sql); |
| | | |
| | | //根据生产订单号查询生产订单表,拿到组织、车间 |
| | | DataSet ds0 = oCn.RunProcReturn("select HPRDORGID,HDeptID from Sc_ICMOBillMain with(nolock) where HBillNo='" + workcode + "'", "Sc_ICMOBillMain"); |
| | | //查询产量汇报临时表 |
| | | DataSet ds = oCn.RunProcReturn("select top 1 * from Sc_ICMOBillWorkQtyStatus_Tmp with(nolock) where HICMOReportInterID='" + oMain.HInterID + "' and HICMOReportBillNo='" + oMain.HBillNo + "' and HProcID='" + HProcID + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | |
| | | |
| | | |
| | | if (ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | |
| | | ",HPlanQty,HInStockQty,HSumTimes,HExplanation,HRemark" + |
| | | ",HInnerBillNo,HMaker,HMakeDate,HSupID,HMarker" + |
| | | ") " + |
| | | " values('" + oMain.HYear.ToString() + "','"+ oMain.HPeriod.ToString() + "','3714','3714','"+ oMain.HInterID.ToString() + "'" + |
| | | ", convert(varchar(10),getdate(),120),'"+oMain.HBillNo+"','2','0','0'" + |
| | | ", '"+oMain.HMainSourceInterID+"','','" + oMain.HDeptID.ToString() + "','','"+ ds.Tables[0].Rows[0]["HGroupID"].ToString() +"'" + |
| | | " values('" + oMain.HYear.ToString() + "','" + oMain.HPeriod.ToString() + "','3714','3714','" + oMain.HInterID.ToString() + "'" + |
| | | ", convert(varchar(10),getdate(),120),'" + oMain.HBillNo + "','2','0','0'" + |
| | | ", '" + oMain.HMainSourceInterID + "','','" + oMain.HDeptID.ToString() + "','','" + ds.Tables[0].Rows[0]["HGroupID"].ToString() + "'" + |
| | | ", '','" + ds.Tables[0].Rows[0]["HMaterID"].ToString() + "','','0',''" + |
| | | ", '" + ds.Tables[0].Rows[0]["HPlanQty"].ToString() + "','0','0','同步erp生产汇报单','报工台同步工序汇报单'" + |
| | | ",'','" +oMain.HMaker+ "','" + oMain.HDate + "','0',''" + |
| | | ",'','" + oMain.HMaker + "','" + oMain.HDate + "','0',''" + |
| | | ") "); |
| | | |
| | | |
| | | //更新生产状态临时表(当日完工数量)HDateFinishQty h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty |
| | | //oCn.RunProc("exec h_p_JIT_Sc_ICMOBillStatus_Tmp_QtyYqn '" + workcode + "','" + HSourceID + "','"+HProcID+"','" + oMain.HMainSourceInterID + "','" + oMain.HMainSourceEntryID + "'"); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "生成生产汇报单失败Erro!" + e.Message+e.StackTrace; |
| | | sErrMsg = "生成生产汇报单失败Erro!" + e.Message + e.StackTrace; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | //\"FStockerId\":{\"FNumber\":\"\"}, |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | //\"FStockerId\":{\"FNumber\":\"\"}, |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | |
| | | //辅助属性 |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | |
| | | |
| | | //调入仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcStockLocId"]) == "") |
| | | { |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | "\"FStockerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerId"]) + "\"}," + |
| | | "\"FStockerGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerGroupId"]) + "\"}," + |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | //\"FStockerId\":{\"FNumber\":\"\"}, |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | } |
| | | |
| | | //是否启用保质期控制 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | | sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; |
| | | sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; |
| | |
| | | if (oSystemParameterMain.WMS_CampanyName == "凯贝奈特") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100001\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else if (oSystemParameterMain.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | } |
| | | else |
| | | { |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | //\"FStockerId\":{\"FNumber\":\"\"}, |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | //\"FStockerId\":{\"FNumber\":\"\"}, |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," + |
| | | //\"FStockerId\":{\"FNumber\":\"\"}, |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | //\"FNote\":\"\", |
| | | "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | string sJson_StockStyle = ""; |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_BillTypeID = ""; //单据类型 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oMain.HBillSubType == "" || oMain.HBillSubType == null) |
| | |
| | | else |
| | | { |
| | | sJson_BillTypeID = "\"FBillTypeID\":{ \"FNumber\":\"" + oMain.HBillSubType + "\" },"; |
| | | } |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | if (oSystemParameterMain.WMS_CampanyName == "韩电") //系统参数 客户定制化名称 空白为通用 |
| | |
| | | "\"FOwnerTypeIdHead\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerTypeIdHead"]) + "\"," + |
| | | "\"FSETTLECURRID\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSETTLECURRID"]) + "\" }," + |
| | | "\"FOwnerIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\" }," + |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," + |
| | | sJson_StockStyle + |
| | | sJson_MainCustom + |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerInIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerInIdHead"]) + "\" }," + |
| | | "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\" }," + |
| | | "\"FStockInOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockInOrgId"]) + "\" }," + |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," + |
| | | "\"FVESTONWAY\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVESTONWAY"]) + "\"," + |
| | | //\"FSTOCKERID\":{\"FNumber\":\"\"}, |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | sJson_DestBatchNo = " \"FDESTLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FDESTLOT"]) + "\"}, \"FDESTLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FDESTLOT"]) + "\" , "; |
| | |
| | | |
| | | //辅助属性 |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | |
| | | |
| | | //调出仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcStockLocId"]) == "") |
| | | { |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | { |
| | | string sJson_Custom = ""; |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | if (oSystemParameterMain.WMS_CampanyName == "四维尔")//系统参数 客户定制化名称 空白为通用 |
| | | { |
| | |
| | | "\"FOwnerInIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNERINID"]) + "\" }," + |
| | | "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\" }," + |
| | | "\"FStockInOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockInOrgId"]) + "\" }," + |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | //"\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," + |
| | | "\"FVESTONWAY\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVESTONWAY"]) + "\"," + |
| | | //\"FSTOCKERID\":{\"FNumber\":\"\"}, |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | "\"FOwnerInIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNERINID"]) + "\" }," + |
| | | "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\" }," + |
| | | "\"FStockInOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockInOrgId"]) + "\" }," + |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | //"\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," + |
| | | "\"FVESTONWAY\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVESTONWAY"]) + "\"," + |
| | | //\"FSTOCKERID\":{\"FNumber\":\"\"}, |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1251','1251'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1251','1251'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | { |
| | | string sJson_Custom = ""; |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | if (oSystemParameterMain.WMS_CampanyName == "四维尔")//系统参数 客户定制化名称 空白为通用 |
| | | { |
| | |
| | | "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKINORGID"]) + "\" }," + |
| | | "\"FStockOutOrgID\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKOUTORGID"]) + "\" }," + |
| | | //\"FTransferMode\":\"\", |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FOwnerTypeOutIdHead\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNERTYPEOUTID"]) + "\"," + |
| | | "\"FOwnerOutIDHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNEROUTID"]) + "\" }," + |
| | | //\"FSTOCKERID\":{\"FNumber\":\"\"}, |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | |
| | | } |
| | | |
| | | //是否启用保质期控制 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | | sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; |
| | | sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", |
| | | new object[] { "PRD_PickMtrl", sJson3 }); |
| | | |
| | | HReturn =result3.ToString(); |
| | | HReturn = result3.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1254','1254'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1254','1254'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | | "\"Model\": { \"FBILLNO\":\"" + oMain.HBillNo + "\"," + |
| | | //\"FID\":\"0\", |
| | | "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," + |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\"}," + |
| | | //\"FStockId0\":{\"FNumber\":\"\"}, |
| | | "\"FPrdOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPrdOrgId"]) + "\"}," + |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | //\"FID\":\"0\", |
| | | "\"FBillNo\":\"" + oMain.HBillNo + "\"," + |
| | | "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," + |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FSTOCKORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKORGID"]) + "\"}," + |
| | | "\"FSUBORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUBORGID"]) + "\"}," + |
| | | "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," + |
| | |
| | | sJson_Date + |
| | | "\"FCustId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FCustId"]) + "\"}," + |
| | | "\"FDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptId"]) + "\"}," + |
| | | "\"FPickerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPickerId"]) + "\"}," + |
| | | "\"FPickerId\":{\"FSTAFFNUMBER\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPickerId"]) + "\"}," + |
| | | "\"FStockerId\":{\"FName\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerId"]) + "\"}," + |
| | | //\"FStockerGroupId\":{\"FNumber\":\"\"}, |
| | | "\"FBizType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBizType"]) + "\"," + |
| | |
| | | |
| | | //辅助属性 |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | |
| | | |
| | | //是否启用保质期控制 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; //批号 |
| | | } |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 产品入库单 |
| | |
| | | { |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return false; |
| | |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | oMain.HDate = DateTime.Today; |
| | | } |
| | | |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | |
| | | else |
| | | { |
| | | string sJson_MainCustom = ""; //主表自定义字段 |
| | | string sJson_Date = ""; //单据日期 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数 单据日期是否取界面递入日期 |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\","; |
| | | } |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," + |
| | | "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," + |
| | |
| | | //\"FID\":\"0\", |
| | | "\"FBillTypeID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillTypeID"]) + "\"}," + |
| | | //\"FBillNo\":\"\", |
| | | "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," + |
| | | sJson_Date + |
| | | "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\"}," + |
| | | "\"FStockDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockDeptId"]) + "\"}," + |
| | | "\"FStockerGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerGroupId"]) + "\"}," + |
| | |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //是否启用批次管理 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , " + //批号 |
| | | " \"FReceiveLot\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReceiveLot"]) + "\"}, \"FReceiveLot_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReceiveLot"]) + "\" , "; //收货批号 |
| | |
| | | } |
| | | |
| | | //是否启用保质期控制 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | | sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; |
| | | sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; |
| | |
| | | } |
| | | |
| | | //仓位 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | |
| | | sErrMsg = "生成并审核其他入库单成功!单据号为:" + oMain.HBillNo; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("审核回滚" + sRemark); |
| | |
| | | |
| | | //辅助属性 |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | |
| | | |
| | | //是否启用保质期控制 |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | |
| | | // |
| | | //if (oSystemParameter.omodel.Kf_OtherInBill_ERPMode.ToUpper() == "CLOUD") //判断同步模式是金蝶CLOUD |
| | | //{ |
| | | //上传前必填项判断 |
| | | //if (oMain.HDeptID == 0) |
| | | //{ |
| | | // sErrMsg = "部门没有选择!"; |
| | | // return false; |
| | | //} |
| | | if (set_SaveMouldProdInBill_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //"保存成功!"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //"保存失败!"; |
| | | return false; |
| | | } |
| | | //上传前必填项判断 |
| | | //if (oMain.HDeptID == 0) |
| | | //{ |
| | | // sErrMsg = "部门没有选择!"; |
| | | // return false; |
| | | //} |
| | | if (set_SaveMouldProdInBill_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | { |
| | | //"保存成功!"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //"保存失败!"; |
| | | return false; |
| | | } |
| | | //} |
| | | |
| | | sErrMsg = "保存器具采购入库单失败!" + sErrMsg; |
| | |
| | | //生成出入库单据 |
| | | //插入子表 |
| | | //插入主表 |
| | | oCn.RunProc("EXEC h_p_Kf_MouldProdInBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','"+oMain.HBillType+"'"); |
| | | |
| | | oCn.RunProc("EXEC h_p_Kf_MouldProdInBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'"); |
| | | |
| | | //插入主表 |
| | | oCn.RunProc("Insert Into Sc_MouldStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HDate,HBillNo" + |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return false; |
| | |
| | | if (dal.omodel_View.HSourceInterID != 0 && oSystemParameter.omodel.WMS_CampanyName == "博日科技" |
| | | && HBillType != "1202" && HBillType != "1205") |
| | | { |
| | | if(dal.omodel_View.HinitQty==0) |
| | | if (dal.omodel_View.HinitQty == 0) |
| | | { |
| | | sErrMsg = "已扫描数量等于或大于源单数量,不允许扫码!"; |
| | | return false; |
| | | } |
| | | else if(dal.omodel_View.HQty > dal.omodel_View.HinitQty) |
| | | else if (dal.omodel_View.HQty > dal.omodel_View.HinitQty) |
| | | { |
| | | dal.omodel_View.HQty = dal.omodel_View.HinitQty; |
| | | } |
| | |
| | | //先进先出控制 |
| | | if ((HBillType == "1204" && oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y") //系统参数 生产领料单-先进先出控制 |
| | | || (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y") //系统参数 销售出库单-先进先出控制 |
| | | ) |
| | | ) |
| | | { |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + model.HBatchNo + "','" + model.HBarCode + "'," + model.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) |
| | |
| | | } |
| | | return oBar; |
| | | } |
| | | //其他入库、其他出库 森楷专用 |
| | | else if ((HBillType == "1203" || HBillType == "1206") && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | //其他入库 森楷专用 |
| | | else if (HBillType == "1203" && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | //判断是否启用一键扫码模式,Y为启用,未启用时只扫描物料条码 |
| | | if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N") |
| | |
| | | } |
| | | } |
| | | } |
| | | else if(oSystemParameter.omodel.WMS_CampanyName == "四维尔") |
| | | else if (oSystemParameter.omodel.WMS_CampanyName == "四维尔") |
| | | { |
| | | DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); |
| | | if (dal.GetInfoByBarCode_View(sBarCode2)) |
| | |
| | | //无返回数据则为物料条码 |
| | | if (Dss == null || Dss.Tables[0].Rows.Count == 0) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "博日科技" || oSystemParameter.omodel.WMS_CampanyName == "杭州智见" |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "博日科技" || oSystemParameter.omodel.WMS_CampanyName == "杭州智见" |
| | | || oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔" || oSystemParameter.omodel.WMS_CampanyName == "奥邦" |
| | | || oSystemParameter.omodel.WMS_CampanyName == "卓力") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = e.Message+";"+e.StackTrace; |
| | | sErrMsg = e.Message + ";" + e.StackTrace; |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | |
| | | } |
| | | return oBar; |
| | | } |
| | | //其他入库 森楷专用 |
| | | //其他入库 森楷专用(作废,不调用) |
| | | else if (HBillType == "1203" && oSystemParameter.omodel.WMS_CampanyName == "森楷") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | //根据单个条码获取对应整托条码信息写入条码出入库临时表 |
| | |
| | | if (dal.GetInfoByNumber_View(sBarCode)) |
| | | { |
| | | //根据单个条码获取对应整托条码信息 |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | //DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle_New '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'," + HOWNERID.ToString(), "h_p_WMS_BeforeCheckToBarCode_ScanStyle_New"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "获取整托条码信息发生错误!"; |
| | |
| | | } |
| | | else |
| | | { |
| | | dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]); |
| | | dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]); |
| | |
| | | //将整托条码对应的条码编号拼成一串字符串 |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"])+"'"; |
| | | sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]) + "'"; |
| | | } |
| | | sBarCode_New = sBarCode_New.Remove(0, 1); //去掉字符串第一个字符 |
| | | |
| | |
| | | ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" + |
| | | ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" + |
| | | ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " + |
| | | " select " + model.HInterID.ToString() + ",'" + model.HBillNo + "','" + model.HBillType + "',HMaterID,HAuxPropID," + model.HProcID.ToString() + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " + |
| | | " select " + model.HInterID.ToString() + ",'" + model.HBillNo + "','" + model.HBillType + "'," + model.HMaterID.ToString() + ",HAuxPropID," + model.HProcID.ToString() + |
| | | "," + model.HWhID.ToString() + "," + model.HSCWHID.ToString() + "," + model.HStockPlaceID.ToString() + "," + model.HOutStockPlaceID.ToString() + "," + model.HGroupID.ToString() + ",'" + model.HAddr + "'" + |
| | | "," + model.HQtyMust.ToString() + ",HQty," + model.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" + |
| | | ",'" + model.HMaker + "',getdate()" + |
| | |
| | | ",case when '" + model.HBillType + "'='1203' then HSourceBillNo else '" + model.HSourceBillNo + "' end" + |
| | | "," + model.HRelationInterID.ToString() + "," + model.HRelationEntryID.ToString() + ",'" + model.HRelationBillNo + "'," + Convert.ToString(model.HRedBlueFlag ? 1 : 0) + ",'" + model.HMTONo + "',0" + |
| | | "," + model.HSTOCKORGID.ToString() + "," + model.HOWNERID.ToString() + "," + model.HSTOCKORGID.ToString() + ",'','','" + model.HSubBillType + "'" + |
| | | ",0,0,'" + model.HCusBarCode + "'," + model.HMulSourceBill.ToString() + |
| | | ",0,0,'" + model.HCusBarCode + "'," + model.HMulSourceBill.ToString() + ",HProduceDate,HExpiryDate " + |
| | | //"from Gy_BarCodeBill with(nolock) where charindex(',' + HBarCode + ',',',' + '" + sBarCode_New + "' + ',')>0" |
| | | "from Gy_BarCodeBill with(nolock) where HBarCode in (" + sBarCode_New + ")" |
| | | " from Gy_BarCodeBill with(nolock) where HBarCode in (" + sBarCode_New + ")" |
| | | ); |
| | | return true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "无效条码"; |
| | |
| | | string sFIFOCtl = "N"; //先进先出控制('Y'为控制) |
| | | string sMulSourceCtl = "N"; //是否启用多源单扫码模式('Y'为启用) |
| | | int sWHSPCtl = 0; //界面仓库为空时,值变为1 |
| | | string sBarCode = sHBarCode_Pack.Substring(0, sHBarCode_Pack.Length-2);//截掉条码后两位字符串 |
| | | string sBarCode = sHBarCode_Pack.Substring(0, sHBarCode_Pack.Length - 2);//截掉条码后两位字符串 |
| | | double sRelQty = 0; |
| | | |
| | | //根据单据类型,获取对应单据系统参数值 |
| | |
| | | " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + ",HAuxPropID," + oMain.HProcID.ToString() + |
| | | "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" + |
| | | "," + oMain.HQtyMust.ToString() + ",HQty," + oMain.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" + |
| | | ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() +"," + oMain.HSourceEntryID.ToString() +",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + |
| | | ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + |
| | | "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + |
| | | "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','','" + oMain.HSubBillType + "'" + |
| | | ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + |
| | |
| | | public bool Get_CheckTypeByMouldBarCode(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, bool HRedBlueFlag, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddMouldBarCode_New '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWhID.ToString() + "," + HSCSPID.ToString() +",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddMouldBarCode_New"); |
| | | DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddMouldBarCode_New '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWhID.ToString() + "," + HSCSPID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddMouldBarCode_New"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "将模治具信息写入模治具出入库临时表失败!"; |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | return null; |
| | | } |
| | | //多源单模式 |
| | | if (oSystemParameter.omodel.Kf_MoveStockStepInBill_MulSourceBill.ToUpper() == "Y") |
| | | if (oSystemParameter.omodel.Kf_MoveStockStepInBill_MulSourceBill.ToUpper() == "Y") |
| | | { |
| | | sMulSourceFlag = 1; |
| | | } |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | if(HBillType == "1205" && oSystemParameter.omodel.WMS_CampanyName == "森楷") |
| | | if ((HBillType == "1205" || HBillType == "1206") && oSystemParameter.omodel.WMS_CampanyName == "森楷") |
| | | { |
| | | oBar = get_CheckTypeByBarCode_New(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HCustom1, HScanStyle, ref sErrMsg); |
| | | if (oBar == null) |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | { |
| | | NewBarCode = sBarCode.Split(Convert.ToChar("#")); |
| | | sBarCode = NewBarCode[0]; |
| | | if(HQty==0) |
| | | if (HQty == 0) |
| | | { |
| | | HQty = DBUtility.ClsPub.isDoule(NewBarCode[1]); |
| | | } |
| | |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | if(oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | //分解托盘条码得到明细条码信息写入条码出入库临时表 |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode"); |
| | |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | //杭州斯莫尔,条码不存在,解析条码后执行扫码操作 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | //解析条码 |
| | | if (!GetJXBarCode_SiMoEr(sBarCode, HQty, ref sErrMsg)) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | if (dal.GetInfoByBarCode_View(sBarCode)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | | sErrMsg = "条码已被禁用,不允许扫描!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //分解托盘条码得到明细条码信息写入条码出入库临时表 |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "分解托盘条码发生错误!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); |
| | | dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]); |
| | | dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]); |
| | | dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]); |
| | | dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]); |
| | | dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]); |
| | | dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]); |
| | | dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]); |
| | | |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + dal.omodel_View.HBarCode + sErrMsg; |
| | | return null; |
| | | } |
| | | SourceFlag = true; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | //杭州斯莫尔,条码不存在,解析条码后执行扫码操作 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | //解析条码 |
| | | if (!GetJXBarCode_SiMoEr(sBarCode, HQty, ref sErrMsg)) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | if (dal.GetInfoByBarCode_View(sBarCode)) |
| | | { |
| | | if (dal.omodel_View.HStopflag) |
| | | { |
| | | sErrMsg = "条码已被禁用,不允许扫描!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | //判断条码类型是否为托盘条码,如果是托盘条码则分解并模拟扫码 |
| | | if (dal.omodel_View.HBarCodeType == "托盘条码") |
| | | { |
| | | //分解托盘条码得到明细条码信息写入条码出入库临时表 |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "分解托盘条码发生错误!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); |
| | | dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]); |
| | | dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]); |
| | | dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]); |
| | | dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]); |
| | | dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]); |
| | | dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]); |
| | | dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]); |
| | | |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + dal.omodel_View.HBarCode + sErrMsg; |
| | | return null; |
| | | } |
| | | SourceFlag = true; |
| | | } |
| | | } |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | //条码类型不为托盘条码 |
| | | { |
| | | //将物料条码信息写入条码出入库临时表 |
| | | oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!"; |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | sWhName = DBUtility.ClsPub.isStrNull(DsWMS.Tables[0].Rows[0]["HWhName"]); |
| | | sSPName = DBUtility.ClsPub.isStrNull(DsWMS.Tables[0].Rows[0]["HSPName"]); |
| | | |
| | | if(sWMSQty<=0) |
| | | if (sWMSQty <= 0) |
| | | { |
| | | sErrMsg = "所扫描物料条码:" + omodel_View.HBarCode + " ,在仓库[ " + sWhName + " ]、仓位[ " + sSPName + " ]中,无条码库存!"; |
| | | return null; |
| | |
| | | if (oSystemParameterMain.WMS_ERPStockCtl == "Y" && oSystemParameterMain.WMS_CloudMode == "Y") |
| | | { |
| | | //判断ERP库存 返回ERP库存数量 |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory " + HInterID.ToString() + ",'" + HBillType + "','" + HMaterNumber + "'," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory"); |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory_New " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory_New"); |
| | | if (DsERP == null || DsERP.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "所扫描条码对应物料代码: " + HMaterNumber + " ,无金蝶库存!"; |
| | |
| | | //先进先出控制 |
| | | if (HSourceBillType != "-1" && sFIFOCtl == "Y") |
| | | { |
| | | DataSet dsFIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | //DataSet dsFIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | DataSet dsFIFO = oCn.RunProcReturn("exec h_p_WMS_FIFOCheck " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_FIFOCheck"); |
| | | if (dsFIFO == null || dsFIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "判断先进先出控制发生错误!"; |
| | |
| | | } |
| | | else |
| | | { |
| | | if(DBUtility.ClsPub.isDoule(DsInQty.Tables[0].Rows[0]["HQty"])==0) |
| | | if (DBUtility.ClsPub.isDoule(DsInQty.Tables[0].Rows[0]["HQty"]) == 0) |
| | | { |
| | | sErrMsg = "所扫描物料条码: " + omodel_View.HBarCode + " ,已被其他单据扫描上传,不允许再次扫码!"; |
| | | return null; |
| | |
| | | oMain.HSourceEntryID = DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oMain.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | oMain.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillType"]); |
| | | if (omodel_View.HProduceDate<Convert.ToDateTime("1950-01-01")) |
| | | if (omodel_View.HProduceDate < Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | oMain.HBeginDate = ""; |
| | | } |
| | |
| | | { |
| | | oMain.HBeginDate = omodel_View.HProduceDate.ToShortDateString(); |
| | | } |
| | | if (omodel_View.HExpiryDate<Convert.ToDateTime("1950-01-01")) |
| | | if (omodel_View.HExpiryDate < Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | oMain.HEndDate = ""; |
| | | } |
| | | else |
| | | { |
| | | oMain.HEndDate = omodel_View.HExpiryDate.ToShortDateString(); |
| | | } |
| | | } |
| | | oMain.HSTOCKORGID = HStockOrgID; |
| | | oMain.HOWNERID = HStockOrgID; |
| | | oMain.HCusBarCode = HCustom1; |
| | |
| | | ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + |
| | | "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + |
| | | "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','','" + oMain.HSubBillType + "'" + |
| | | ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + "," + (oMain.HBeginDate == "" ? "NULL": "'"+ oMain.HBeginDate + "'" ) + |
| | | ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + "," + (oMain.HBeginDate == "" ? "NULL" : "'" + oMain.HBeginDate + "'") + |
| | | "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")"); |
| | | |
| | | if (sRemQty <= 0) |
| | |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | if(SourceFlag == false) |
| | | if (SourceFlag == false) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[0]["HRemark"]); |
| | | oCn.RollBack(); |
| | |
| | | { |
| | | omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | omodel_View.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[0]["HSourceBillType"]); |
| | | if(omodel_View.HSourceBillNo!="") |
| | | if (omodel_View.HSourceBillNo != "") |
| | | { |
| | | Int64 HAccessFlag = 1; //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息) |
| | | oBar = get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, omodel_View.HSourceBillNo, omodel_View.HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref sErrMsg); |
| | |
| | | } |
| | | |
| | | //扫描托条码,将托条码信息写入条码出入库临时表 |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + omodel_View.HBarCode + "','" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWHID.ToString() + "," + HSCSPID.ToString() + ",'" + HCusBarCode + "'," + HStockOrgID.ToString() + "," + HStockOutOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + "," + sSourceBillCtl + ",'" + sBatchNoCtl + "','" + sMaterWHSPCtl + "','" + sSourceWHSPCtl + "','" + sMustQtyCtl + "','" + oSystemParameterMain.WMS_WMSStockCtl + "','" + sFIFOCtl + "','" + sMulSourceCtl + "'", "h_p_WMS_AddPackBarCode"); |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + omodel_View.HBarCode + "','" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWHID.ToString() + "," + HSCSPID.ToString() + ",'" + HCusBarCode + "'," + HStockOrgID.ToString() + "," + HStockOutOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + "," + sSourceBillCtl + ",'" + sBatchNoCtl + "','" + sMaterWHSPCtl + "','" + sSourceWHSPCtl + "','" + sMustQtyCtl + "','" + oSystemParameterMain.WMS_WMSStockCtl + "','" + sFIFOCtl + "','" + sMulSourceCtl + "','" + sOneScanCtl + "'", "h_p_WMS_AddPackBarCode_New"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "扫描托条码写入条码出入库临时表发生错误!"; |
| | |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory " + HInterID.ToString() + ",'" + HBillType + "','" + HMaterNumber + "'," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory"); |
| | | if (DsERP == null || DsERP.Tables[0].Rows.Count == 0) |
| | | { |
| | | HRemark = HRemark+ "对应物料代码:" + HMaterNumber + "、批号:" + omodel_View.HBatchNo + " ,无金蝶库存!"; |
| | | HRemark = HRemark + "对应物料代码:" + HMaterNumber + "、批号:" + omodel_View.HBatchNo + " ,无金蝶库存!"; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | if(HRemark!="") |
| | | if (HRemark != "") |
| | | { |
| | | sErrMsg = "所扫描托条码:" + omodel_View.HBarCode + "," + HRemark; |
| | | oCn.RollBack(); |
| | |
| | | } |
| | | } |
| | | |
| | | //唯一条码,是否启用一次扫码控制('Y'为启用) |
| | | if (omodel_View.HBarCodeType == "唯一条码" && sOneScanCtl == "Y") |
| | | { |
| | | //一次扫码控制,同一条码、同一单据类型,在WMS表和TEMP表里,只允许进行一次扫码 |
| | | DataSet dsOneScan = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_OneScan '" + omodel_View.HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWHID.ToString() + "," + HSCSPID.ToString() + ",'" + HMaker + "'", "h_p_WMS_AddPackBarCode_OneScan"); |
| | | if (dsOneScan == null || dsOneScan.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsOneScan.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(dsOneScan.Tables[0].Rows[0]["HRemark"]); |
| | | oCn.RollBack(); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | ////唯一条码,是否启用一次扫码控制('Y'为启用) |
| | | //if (omodel_View.HBarCodeType == "唯一条码" && sOneScanCtl == "Y") |
| | | //{ |
| | | // //一次扫码控制,同一条码、同一单据类型,在WMS表和TEMP表里,只允许进行一次扫码 |
| | | // DataSet dsOneScan = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_OneScan '" + omodel_View.HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWHID.ToString() + "," + HSCSPID.ToString() + ",'" + HMaker + "'", "h_p_WMS_AddPackBarCode_OneScan"); |
| | | // if (dsOneScan == null || dsOneScan.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // } |
| | | // else |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(dsOneScan.Tables[0].Rows[0][0]) == 1) |
| | | // { |
| | | // sErrMsg = DBUtility.ClsPub.isStrNull(dsOneScan.Tables[0].Rows[0]["HRemark"]); |
| | | // oCn.RollBack(); |
| | | // return null; |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | oBar.HBarType = "物料条码"; |
| | | oCn.Commit(); |
| | |
| | | { |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOutOrgID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOutOrgID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | if (oSystemParameterMain.WMS_ERPStockCtl == "Y" && oSystemParameterMain.WMS_CloudMode == "Y" && HBillType != "1251") |
| | | { |
| | | //判断ERP库存 返回ERP库存数量 |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + HMaterNumber + "'," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString() + "," + HStockOutOrgID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory"); |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory_New " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString() + "," + HStockOutOrgID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory_New"); |
| | | if (DsERP == null || DsERP.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "所扫描条码对应物料代码: " + HMaterNumber + " ,无金蝶库存!"; |
| | |
| | | } |
| | | } |
| | | |
| | | string HStockStyle = ""; |
| | | if (HStockOutOrgID != HStockInOrgID) |
| | | { |
| | | HStockStyle = "跨组织调拨"; |
| | | } |
| | | else |
| | | { |
| | | HStockStyle = "组织内调拨"; |
| | | } |
| | | oMain.HInterID = HBillID; |
| | | oMain.HBillNo = HBillNo; |
| | | oMain.HBillType = HBillType; |
| | |
| | | //先进先出控制 |
| | | if (HSourceBillType != "-1" && HBillType != "1251" && sFIFOCtl == "Y") |
| | | { |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + oMain.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | //DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + oMain.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_FIFOCheck " + HBillID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + oMain.HQty.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HOutStockPlaceID.ToString(), "h_p_WMS_FIFOCheck"); |
| | | if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "判断先进先出控制发生错误!"; |
| | |
| | | ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" + |
| | | ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" + |
| | | ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate,HStockStyle) " + |
| | | " Values(" + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + "," + oMain.HUnitID.ToString() + "," + oMain.HAuxPropID.ToString() + "," + oMain.HProcID.ToString() + |
| | | "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" + |
| | | "," + oMain.HQtyMust.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HPieceQty.ToString() + ",'" + oMain.HBatchNo + "','" + oMain.HBarCode + "',''" + |
| | |
| | | "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + |
| | | "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" + |
| | | ",0,0,'" + oMain.HCusBarCode + "',0," + (oMain.HBeginDate == "" ? "NULL" : "'" + oMain.HBeginDate + "'") + |
| | | "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")"); |
| | | "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ",'" + HStockStyle + "')"); |
| | | return true; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //根据单个条码获取对应整托条码信息 |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | //DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle"); |
| | | DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle_New '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'," + HStockOutOrgID.ToString(), "h_p_WMS_BeforeCheckToBarCode_ScanStyle_New"); |
| | | if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "获取整托条码信息发生错误!"; |
| | |
| | | } |
| | | else |
| | | { |
| | | omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]); |
| | | omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]); |
| | |
| | | //将整托条码对应的条码编号拼成一串字符串 |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"])+"'"; |
| | | sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]) + "'"; |
| | | } |
| | | sBarCode_New = sBarCode_New.Remove(0, 1); //去掉字符串第一个字符 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | string HStockStyle = ""; |
| | | if(HStockOutOrgID != HStockInOrgID) |
| | | { |
| | | HStockStyle = "跨组织调拨"; |
| | | } |
| | | else |
| | | { |
| | | HStockStyle = "组织内调拨"; |
| | | } |
| | | oMain.HInterID = HBillID; |
| | | oMain.HBillNo = HBillNo; |
| | | oMain.HBillType = HBillType; |
| | |
| | | ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" + |
| | | ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" + |
| | | ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " + |
| | | " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "',HMaterID,HAuxPropID," + oMain.HProcID.ToString() + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate,HStockStyle) " + |
| | | " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + ",HAuxPropID," + oMain.HProcID.ToString() + |
| | | "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" + |
| | | "," + oMain.HQtyMust.ToString() + ",HQty," + oMain.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" + |
| | | ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + |
| | | "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + |
| | | "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" + |
| | | ",0,0,'" + oMain.HCusBarCode + "',0" + |
| | | ",0,0,'" + oMain.HCusBarCode + "',0,HProduceDate,HExpiryDate,'" + HStockStyle + "'" + |
| | | //"from Gy_BarCodeBill with(nolock) where charindex(',' + HBarCode + ',',',' + '" + sBarCode_New + "' + ',')>0" |
| | | "from Gy_BarCodeBill with(nolock) where HBarCode in (" + sBarCode_New + ")" |
| | | " from Gy_BarCodeBill with(nolock) where HBarCode in (" + sBarCode_New + ")" |
| | | ); |
| | | return true; |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 斯莫尔条码解析 |
| | | |
| | | [WebMethod] |
| | | public bool GetJXBarCode_SiMoEr(string sBarCode, Double HQty, ref string sErrMsg) |
| | | { |
| | | try |
| | | { |
| | | //条码解析 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string[] str = sBarCode.Split('@'); |
| | | |
| | | if (str[0] != "CMR" && str[0] != "SRM" && str[0] != "748") |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码是否正确!"; |
| | | return false; |
| | | } |
| | | |
| | | if (str[0] == "748") { |
| | | string[] str1= sBarCode.Split('@'); |
| | | string sBarCode_1 = "SRM@9010@" + str[0] + "@@" + str[1] + "@" + str[2] + "@" + str[3]; |
| | | str = sBarCode_1.Split('@'); |
| | | } |
| | | |
| | | int HOrgIDs = 0; |
| | | //查询组织 |
| | | DataSet ds = oCn.RunProcReturn("select * from Xt_ORGANIZATIONS with(nolock) where HNumber='" + str[1] + "' ", "Xt_ORGANIZATIONS"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码组织是否正确!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HOrgIDs = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString()); |
| | | } |
| | | |
| | | string HMaterNames = ""; |
| | | string HMaterModels = ""; |
| | | string HMaterIDs = "0"; |
| | | //查询物料 |
| | | ds = oCn.RunProcReturn("select * from Gy_Material with(nolock) where HNumber='" + str[4] + "' and HUSEORGID=" + HOrgIDs, "Gy_Material"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "条码解析失败,请确认条码物料是否正确!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | HMaterIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | HMaterNames = ds.Tables[0].Rows[0]["HName"].ToString(); |
| | | HMaterModels = ds.Tables[0].Rows[0]["HModel"].ToString(); |
| | | } |
| | | string HSupIDs = "0"; |
| | | //查询供应商 |
| | | ds = oCn.RunProcReturn("select * from Gy_Supplier with(nolock) where HNumber='" + str[2] + "' and HUSEORGID=" + HOrgIDs, "Gy_Supplier"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //sErrMsg = "条码解析失败,请确认条码供应商是否正确!"; |
| | | //return false; |
| | | } |
| | | else |
| | | { |
| | | HSupIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | string HSourceBillNos = "0"; |
| | | string HInnerBillNos = ""; |
| | | //查询内部采购订单号 |
| | | ds = oCn.RunProcReturn(@" select * from h_v_IF_POInStockList where 内部采购订单号= '" + str[3] + "' ", "h_v_IF_POInStockList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | HInnerBillNos = str[3]; |
| | | //HInnerBillNos = "9624"; |
| | | //sErrMsg = "条码解析失败,请确认条码内部采购订单号是否正确!"; |
| | | //return false; |
| | | } |
| | | else |
| | | { |
| | | HInnerBillNos = ds.Tables[0].Rows[0]["内部采购订单号"].ToString(); |
| | | HSourceBillNos = ds.Tables[0].Rows[0]["采购订单号"].ToString(); |
| | | } |
| | | |
| | | string HSourceInterIDs = "0"; |
| | | string HSourceEntryIDs = "0"; |
| | | string HUnitIDs = "0"; |
| | | //查询采购订单 |
| | | ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a with(nolock) inner join Cg_POOrderBillSub b with(nolock) on a.HInterID = b.HInterID where HBillNo='" + HSourceBillNos + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //sErrMsg = "条码解析失败,请确认条码采购订单是否正确!"; |
| | | //return false; |
| | | } |
| | | else |
| | | { |
| | | HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); |
| | | } |
| | | |
| | | |
| | | HQty = double.Parse(str[6]); |
| | | |
| | | //日期获取方式 |
| | | string sDate = DateTime.Now.ToString(); |
| | | string HWei = "0"; //尾数 |
| | | string HBarCodeType = "批次条码"; |
| | | Int64 HMaterID = int.Parse(HMaterIDs); |
| | | Int64 HAuxPropID = 0; |
| | | Int64 HUnitID = int.Parse(HUnitIDs); |
| | | double HQty2 = HQty; |
| | | string HBatchNo2 = str[5]; |
| | | Int64 HSupID = int.Parse(HSupIDs); |
| | | Int64 HGroupID = 0; |
| | | int HPrintQty = 0; |
| | | Int64 HSourceInterID = int.Parse(HSourceInterIDs); |
| | | Int64 HSourceEntryID = int.Parse(HSourceEntryIDs); |
| | | string HSourceBillNo = HSourceBillNos; |
| | | string HSourceBillType = "1102"; |
| | | Int64 HBarcodeNo = 0; //托号 |
| | | Int64 HBarcodeQtys = 0; //总托数 |
| | | Int64 HDeptID = 0; |
| | | //Int64 HWhID = 0; |
| | | //Int64 HSPID = 0; |
| | | string HRemark = "条码解析"; |
| | | string HMaterName = HMaterNames; |
| | | string HMaterModel = HMaterModels; |
| | | string HPinfan = ""; |
| | | string HMTONo = ""; |
| | | Int64 HCusID = 0; |
| | | string HCusType = ""; |
| | | DateTime HEndDate = DateTime.Now; |
| | | string HWorkLineName = ""; |
| | | string HSeOrderBillNo = ""; |
| | | string HInnerBillNo = HInnerBillNos; |
| | | bool HGiveAwayFlag = false; |
| | | Int64 HEntryID = 1; |
| | | Int64 HInterIDs = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | int HOrgID = HOrgIDs; |
| | | |
| | | 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" + |
| | | ",HProduceDate,HExpiryDate " + |
| | | ") values (" |
| | | + "'" + sBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'admin',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" |
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + ",0,0,'" + HRemark + "'" |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterIDs.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','','')"); |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = e.Message + ";" + e.StackTrace; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == false) |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";返回物料明细列表时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | |
| | | #region 生产删托单模块 提交 |
| | | |
| | | [WebMethod] |
| | | public bool set_DeletePackUnionBill(Int64 HInterID, string HBillNo, string HBarCode_Pack, string HMaker, string HComputerName, string HIPAddress,string HModCaption, ref string sErrMsg) |
| | | public bool set_DeletePackUnionBill(Int64 HInterID, string HBillNo, string HBarCode_Pack, string HMaker, string HComputerName, string HIPAddress, string HModCaption, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + HComputerName + "','" + HIPAddress + "','" + HModCaption + "'" , "h_p_Sc_PackUnionBill_Delete"); |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + HComputerName + "','" + HIPAddress + "','" + HModCaption + "'", "h_p_Sc_PackUnionBill_Delete"); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | } |
| | | |
| | | //同仓库仓位换托 |
| | | if (sStatus==1) |
| | | if (sStatus == 1) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | //数量 |
| | | //只存在一行数据时,数量=条码可扫数量 |
| | | if (ds1.Tables[0].Rows.Count==1) |
| | | if (ds1.Tables[0].Rows.Count == 1) |
| | | { |
| | | oMain.HQty = sRelQty; |
| | | } |
| | | //存在多行相同物料,条码剩余数量<所选行源单剩余可扫数量 或 所选行源单为最后一条数据时 ,数量=条码剩余数量 |
| | | else if (sRemQty <= 0 || (i == ds1.Tables[0].Rows.Count-1 && sRemQty > 0)) |
| | | else if (sRemQty <= 0 || (i == ds1.Tables[0].Rows.Count - 1 && sRemQty > 0)) |
| | | { |
| | | oMain.HQty = sRemQty + omodel_View.HSourceQty; |
| | | } |
| | |
| | | if (oSystemParameterMain.WMS_CloudMode == "Y") |
| | | { |
| | | //判断ERP库存 返回ERP库存数量 |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + HMaterNumber + "'," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory"); |
| | | DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory_New " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory_New"); |
| | | if (DsERP == null || DsERP.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "所扫描条码对应物料代码: " + HMaterNumber + " ,无金蝶库存!"; |
| | |
| | | return null; |
| | | } |
| | | |
| | | if (sBarCode.Trim()=="") |
| | | if (sBarCode.Trim() == "") |
| | | { |
| | | sErrMsg = "条码不能为空,请扫描条码!"; |
| | | return null; |
| | |
| | | string sBarBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["BarCodeType"]); |
| | | |
| | | //判断条码类型为 基础资料条码 或 源单条码 |
| | | if(sBarBillType == "源单条码") |
| | | if (sBarBillType == "源单条码") |
| | | { |
| | | oBar = get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref sErrMsg); |
| | | if (oBar == null) |
| | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | //获取系统参数 |
| | | string sErrMsg=""; |
| | | string sErrMsg = ""; |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | { |
| | |
| | | |
| | | //器具一键扫码模式,根据条码前缀走 不同方法(仓库、仓位、部门)(源单、物料条码) |
| | | [WebMethod] // sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, SCWhID, HStockInOrgID, HStockOutOrgID |
| | | public Model.ClsKf_ICStockBill_Mould get_CheckTypeByBarCode_Mould(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, string HExpressNumber,Int64 SCWhID, Int64 HStockInOrgID,Int64 HStockOutOrgID, ref string sErrMsg) |
| | | public Model.ClsKf_ICStockBill_Mould get_CheckTypeByBarCode_Mould(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, string HExpressNumber, Int64 SCWhID, Int64 HStockInOrgID, Int64 HStockOutOrgID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_Mould oBar = new Model.ClsKf_ICStockBill_Mould(); |
| | |
| | | if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N") |
| | | { |
| | | //将物料条码信息写入出入库条码临时表 |
| | | if (set_SavePonderationBillMain_Temp_BarCode_Mould(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber,SCWhID, HStockInOrgID, HStockOutOrgID, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) |
| | | if (set_SavePonderationBillMain_Temp_BarCode_Mould(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, SCWhID, HStockInOrgID, HStockOutOrgID, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) |
| | | { |
| | | oBar.HSourceBillType = sHSourceBillType; |
| | | oBar.HSourceBillNo = sHSourceBillNo; |