Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-API
| | |
| | | lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | string sSourceBillType = lsmain[0].HBillType; |
| | | if (webserver.set_SaveOtherOutBill_New(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | |
| | | WebAPI.WebS.ClsKf_OtherOutBillMain websLsmain = new WebS.ClsKf_OtherOutBillMain(); |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; |
| | | |
| | | WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain(); |
| | | if (webserver.set_SaveOtherOutBill_New(websLsmain, sSourceBillType, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | |
| | | //生成其他出库单 |
| | | public bool set_SaveOtherOutBill_New(Model.ClsKf_OtherOutBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | public bool set_SaveOtherOutBill_New(WebAPI.WebS.ClsKf_OtherOutBillMain oMain, string sHSourceType, WebS.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | WebS.WebService1 oWebs = new WebS.WebService1();//set_SaveOtherInBill_CLD_New |
| | | if (oWebs.set_SaveOtherOutBill_CLD_New(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | return false; |
| | | } |
| | | // |
| | | if (oSystemParameter.omodel.Kf_OtherOutBill_ERPMode.ToUpper() == "WISE") //判断同步模式是金蝶WISE |
| | | { |
| | | if (SaveOtherOutBill_K3(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg)) |
| | | { |
| | | //"保存成功!"; |
| | | sErrMsg = "保存成功!" + oMain.HBillNo; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | //"保存失败!"; |
| | | sErrMsg = sErrMsg; |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ", 单据ID:" + oMain.HInterID + ";" + sErrMsg; |
| | | return false; |
| | | } |
| | | } |
| | | if (oSystemParameter.omodel.Kf_OtherOutBill_ERPMode.ToUpper() == "CLOUD") //判断同步模式是金蝶CLOUD |
| | | { |
| | | //上传前必填项判断 |
| | | //if (oMain.HDeptID == 0) |
| | | //{ |
| | | // sErrMsg = "部门没有选择!"; |
| | | // return false; |
| | | //} |
| | | ////同步生成CLOUD单据 |
| | | //if (set_SaveOtherOutBill_CLD(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) |
| | | //{ |
| | | // //"保存成功!"; |
| | | // return true; |
| | | //} |
| | | //else |
| | | //{ |
| | | //"保存失败!"; |
| | | return false; |
| | | //} |
| | | } |
| | | |
| | | sErrMsg = "保存其他出库单失败!" + sErrMsg; |
| | | return false; |
| | | } |
| | | |
| | | |