| | |
| | | //委外工序发出反序列化 |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1); |
| | | |
| | | string eventType = list[0].eventType; |
| | | long HInterID = list[0].HInterID;//递入type得到的单据ID |
| | | int HYear = 2021; |
| | | double HPeriod = list[0].HPeriod;//单价 |
| | |
| | | string HInnerBillNo = list[0].HInnerBillNo;//送货单号 |
| | | string HICMOBillNo = list[0].HICMOBillNo;//生产订单号 |
| | | long HICMOInterID = list[0].HICMOInterID;//生产订单号ID |
| | | int HProcExchInterID = 0; |
| | | int HProcExchEntryID = 0; |
| | | long HProcExchInterID = list[0].lngBillKey; |
| | | long HProcExchEntryID = list[0].lngBillSubKey; |
| | | string HProcExchBillNo = list[0].HProcExchBillNo;//流转卡 |
| | | long HProcID = list[0].HProcID;//当前工序 |
| | | long HMaterID = list[0].HMaterID;//产品ID |
| | |
| | | string HBarCode = list[0].HBarCode;//条形码 |
| | | string HAddr = ""; |
| | | string HBarCodeMaker = ""; |
| | | |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchEntryID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号2没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchBillNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HMaterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "产品没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HSupID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "供应商没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前工序没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HQty <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "发出数量不能为0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | //主表 |
| | | oCN.RunProc("Insert Into Sc_StationInBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HInnerBillNo" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPieceQty" + |
| | | ",HProcNo,HOrderProcNO,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID" + |
| | | ") " + |
| | | " values('3792','3792'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillStatus.ToString() + "',getdate(),'" + HMaker + "',getdate()" + |
| | | ",'" + HYear.ToString() + "','" + HPeriod.ToString() + "','" + HRemark + "','" + HInnerBillNo + "'" + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "'" + ",'" + HWWWorkOrderBillNo + "'" + "," + HWWWorkOrderInterID + "" + "," + HWWWorkOrderEntryID + "" + |
| | | ") "); |
| | | if ("Add".Equals(eventType)) |
| | | { |
| | | if (!AllowbillNo(HBillNo)) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据号重复!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //主表 |
| | | oCN.RunProc("Insert Into Sc_StationInBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HInnerBillNo" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPieceQty" + |
| | | ",HProcNo,HOrderProcNO,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID" + |
| | | ") " + |
| | | " values('3792','3792'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillStatus.ToString() + "',getdate(),'" + HMaker + "',getdate()" + |
| | | ",'" + HYear.ToString() + "','" + HPeriod.ToString() + "','" + HRemark + "','" + HInnerBillNo + "'" + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "'" + ",'" + HWWWorkOrderBillNo + "'" + "," + HWWWorkOrderInterID + "" + "," + HWWWorkOrderEntryID + "" + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | | { |
| | | |
| | | //删除关联 |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID + ",-1"); |
| | | oCN.RunProc("exec h_p_WW_EntrustWorkOrderRelationQty_In " + HInterID + ",-1"); |
| | | |
| | | //更新主表 |
| | | oCN.RunProc("UpDate Sc_StationInBillMain set " + |
| | | "HBillNo='" + HBillNo + "'" + |
| | | ",HRemark='" + HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | ",HInnerBillNo='" + HInnerBillNo + "'" + |
| | | ",HSupID=" + HSupID + |
| | | ",HQty=" + HQty + |
| | | ",HPieceQty=" + HPieceQty + |
| | | ",HPrice=" + HPrice + |
| | | ",HMoney=" + HMoney + |
| | | ",HTaxRate=" + HTaxRate + |
| | | ",HMaterID=" + HMaterID + |
| | | ",HProcID=" + HProcID + |
| | | ",HProcNo=" + HProcNo + |
| | | ",HOrderProcNO='" + HOrderProcNO + "'" + |
| | | " where HInterID=" + HInterID); |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "操作类型无效!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); |
| | | if (ds == null) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.Message; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | private bool AllowbillNo(string HBillNo) |
| | | { |
| | | ds = oCN.RunProcReturn("select HBillNo from Sc_StationInBillMain where HBillNo = '" + HBillNo + "'", "Sc_StationInBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 编辑页面根据id获取委外工序接收单信息 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Cj_StationEntrustInBill/GetStationEntrustInBill")] |
| | | [HttpGet] |
| | | public object GetStationEntrustInBill(int HInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_GetStationInBill where HInterID = " + HInterID, "h_v_GetStationOutBill"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "委外工序接收单信息获取失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // |
| | | } |
| | | } |
| | |
| | | //部门基础资料反序列化 |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1); |
| | | |
| | | string eventType = list[0].eventType; |
| | | long HInterID = list[0].HInterID;//递入type得到的单据ID |
| | | int HYear = 2021; |
| | | double HPeriod = list[0].HPeriod;//单价 |
| | |
| | | string HInnerBillNo = list[0].HInnerBillNo;//送货单号 |
| | | string HICMOBillNo = list[0].HICMOBillNo;//生产订单号 |
| | | long HICMOInterID = list[0].HICMOInterID;//生产订单号ID |
| | | int HProcExchInterID = 0; |
| | | int HProcExchEntryID = 0; |
| | | long HProcExchInterID = list[0].lngBillKey; |
| | | long HProcExchEntryID = list[0].lngBillSubKey; |
| | | string HProcExchBillNo = list[0].HProcExchBillNo;//流转卡 |
| | | long HProcID = list[0].HProcID;//当前工序 |
| | | long HMaterID = list[0].HMaterID;//产品ID |
| | |
| | | double HMainSourceInterID = 0; |
| | | string HMainSourceBillNo = ""; |
| | | string HMainSourceBillType = "3792"; |
| | | |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchEntryID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号2没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchBillNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HInnerBillNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "发货号没有输入!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前工序没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HMaterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "产品没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HSupID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "供应商没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HQty <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "接收个数不能小于等于0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HWasterQty < 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "不合格数不能小于0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HTaxRate < 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "税率不能为负!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | //主表 |
| | | oCN.RunProc("Insert Into Sc_StationOutBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HInnerBillNo,HSourceName,HPieceQty,HWasterQty,HPlanPieceQty,HBadPNL" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationOutTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPrice_BHS,HMoney_BHS,HBadCount" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HProcNo,HOrderProcNO,HLastSubProc,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HInnerBillNo + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPrice_BHS + "," + HMoney_BHS + "," + HBadCount + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + HProcNo + ",'" + HOrderProcNO + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + ",'" + HWWWorkOrderBillNo + "'," + HWWWorkOrderInterID + "," + HWWWorkOrderEntryID + |
| | | ") "); |
| | | if ("Add".Equals(eventType)) |
| | | { |
| | | if (!AllowbillNo(HBillNo)) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据号重复!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //主表 |
| | | oCN.RunProc("Insert Into Sc_StationOutBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HInnerBillNo,HSourceName,HPieceQty,HWasterQty,HPlanPieceQty,HBadPNL" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationOutTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPrice_BHS,HMoney_BHS,HBadCount" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HProcNo,HOrderProcNO,HLastSubProc,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HInnerBillNo + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPrice_BHS + "," + HMoney_BHS + "," + HBadCount + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + HProcNo + ",'" + HOrderProcNO + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + ",'" + HWWWorkOrderBillNo + "'," + HWWWorkOrderInterID + "," + HWWWorkOrderEntryID + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | | { |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ",-1"); |
| | | oCN.RunProc("exec h_p_WW_EntrustWorkOrderRelationQty_Out " + HInterID + ",-1"); |
| | | //更新主表 |
| | | oCN.RunProc("UpDate Sc_StationOutBillMain set " + |
| | | " HBillNo='" + HBillNo + "'" + |
| | | ",HRemark='" + HRemark + "'" + |
| | | ",HUpDater='" + HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | ",HInnerBillNo='" + HInnerBillNo + "'" + |
| | | ",HSupID=" + HSupID + |
| | | ",HQty=" + HQty + |
| | | ",HPieceQty=" + HPieceQty + |
| | | ",HPrice=" + HPrice + |
| | | ",HMoney=" + HMoney + |
| | | ",HProcNo=" + HProcNo + |
| | | ",HPrice_BHS=" + HPrice_BHS + |
| | | ",HMoney_BHS=" + HMoney_BHS + |
| | | ",HTaxRate=" + HTaxRate + |
| | | ",HOrderProcNO='" + HOrderProcNO + "'" + |
| | | ",HMaterID=" + HMaterID + |
| | | ",HProcID=" + HProcID + |
| | | ",HBadPNL=" + HBadPNL + |
| | | ",HWasterQty=" + HWasterQty + |
| | | " where HInterID=" + HInterID); |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "操作类型无效!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl"); |
| | | if (ds == null) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | private bool AllowbillNo(string HBillNo) |
| | | { |
| | | ds = oCN.RunProcReturn("select HBillNo from Sc_StationOutBillMain where HBillNo = '" + HBillNo + "'", "Sc_StationOutBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | /// <summary> |
| | | /// 编辑页面根据id获取委外工序接收单信息 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Cj_StationEntrustOutBill/GetStationEntrustOutBill")] |
| | | [HttpGet] |
| | | public object GetStationEntrustOutBill(int HInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_GetStationOutBill where HInterID = " + HInterID, "h_v_GetStationOutBill"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "委外工序接收单信息获取失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | // |
| | | } |
| | |
| | | DataSet ds1; |
| | | |
| | | |
| | | /// <summary> |
| | | /// test |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Cj_StationInBill/AddBill")] |
| | | [HttpPost] |
| | | public object AddBill([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | //委外工序发出反序列化 |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1); |
| | | string BillType = "3790"; |
| | | long HInterID = list[0].HInterID;//递入type得到的单据ID |
| | | string HBillNo = list[0].HBillNo;//递入type得到的单据号 |
| | | int HBillStatus = 0; |
| | | string HMaker = list[0].HMaker;//制单人 |
| | | int HYear = 2021; |
| | | double HPeriod = 1; |
| | | string HRemark = list[0].HRemark;//备注 |
| | | long HICMOInterID = list[0].HICMOInterID;//任务单ID |
| | | string HICMOBillNo = list[0].HICMOBillNo;//任务单 |
| | | int HProcPlanInterID = 0; |
| | | int HProcPlanEntryID = 0; |
| | | string HProcPlanBillNo = ""; |
| | | int HProcExchInterID = 0; |
| | | int HProcExchEntryID = 0; |
| | | string HProcExchBillNo = list[0].HProcExchBillNo;//流转卡 |
| | | long HMaterID = list[0].HMaterID;//产品ID |
| | | long HProcID = list[0].HProcID;//当前工序 |
| | | double HICMOQty = list[0].HICMOQty;//任务单数量 |
| | | double HPlanQty = list[0].HPlanQty;//流转卡数量 |
| | | long HSourceID = list[0].HSourceID;//生产资源ID |
| | | long HGroupID = list[0].HGroupID;//班组ID |
| | | long HDeptID = 0; |
| | | long HEmpID = list[0].HEmpID;//接收人ID |
| | | string HBarCode = list[0].HBarCode;//条形码 |
| | | string HAddr = ""; |
| | | string HBarCodeMaker = ""; |
| | | long HSupID = 0; |
| | | double HQty = list[0].HQty;//接收数量 |
| | | double HPrice = 0; |
| | | double HMoney = 0; |
| | | double HPieceQty = list[0].HPieceQty;//接收件数 |
| | | string HSourceName = list[0].HSourceName;//生产资源名称 |
| | | long HCenterID = list[0].HCenterID;//工作中心ID |
| | | long HProcNo = list[0].HProcNo;//流水号 |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订单跟踪号 |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | |
| | | DAL.ClsSc_StationInBill BillNew = new DAL.ClsSc_StationInBill(); |
| | | |
| | | BillNew.omodel.HInterID = HInterID; |
| | | BillNew.omodel.HYear = 2011; |
| | | BillNew.omodel.HPeriod = 1; |
| | | BillNew.omodel.HBillNo = HBillNo; |
| | | BillNew.omodel.HICMOBillNo = HICMOBillNo; |
| | | BillNew.omodel.HICMOInterID = HICMOInterID; |
| | | BillNew.omodel.HProcExchInterID = HProcExchInterID; |
| | | BillNew.omodel.HProcExchEntryID = HProcExchEntryID; |
| | | BillNew.omodel.HProcExchBillNo = HProcExchBillNo; |
| | | BillNew.omodel.HProcID = HProcID; |
| | | BillNew.omodel.HMaterID = HMaterID; |
| | | BillNew.omodel.HStationInTime = DateTime.Now; |
| | | BillNew.omodel.HEmpID = HEmpID; |
| | | BillNew.omodel.HSourceID = HSourceID; |
| | | BillNew.omodel.HGroupID = HGroupID; |
| | | BillNew.omodel.HICMOQty = HICMOQty; |
| | | BillNew.omodel.HPlanQty = HPlanQty; |
| | | BillNew.omodel.HQty = HQty; |
| | | BillNew.omodel.HPieceQty = HPieceQty; |
| | | BillNew.omodel.HSourceName = HSourceName; |
| | | BillNew.omodel.HCenterID = HCenterID; |
| | | |
| | | BillNew.omodel.HProcNo = HProcNo; |
| | | BillNew.omodel.HOrderProcNO = HOrderProcNO; |
| | | bool bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); |
| | | |
| | | //提示 |
| | | if (bResult == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "单据存盘完毕!单据号:" + HBillNo.Trim() + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!原因:" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 新增单据-保存按钮 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | ///// <summary> |
| | | ///// test |
| | | /////参数:string sql。 |
| | | /////返回值:object。 |
| | | ///// </summary> |
| | | //[Route("Cj_StationInBill/AddBill")] |
| | | //[HttpPost] |
| | | //public object AddBill([FromBody] JObject oMain) |
| | |
| | | // int HBillStatus = 0; |
| | | // string HMaker = list[0].HMaker;//制单人 |
| | | // int HYear = 2021; |
| | | // double HPeriod = 1; |
| | | // long HPeriod = 1; |
| | | // string HRemark = list[0].HRemark;//备注 |
| | | // long HICMOInterID = list[0].HICMOInterID;//任务单ID |
| | | // string HICMOBillNo = list[0].HICMOBillNo;//任务单 |
| | |
| | | // double HPieceQty = list[0].HPieceQty;//接收件数 |
| | | // string HSourceName = list[0].HSourceName;//生产资源名称 |
| | | // long HCenterID = list[0].HCenterID;//工作中心ID |
| | | // string HProcNo = list[0].HProcNo;//流水号 |
| | | // long HProcNo = list[0].HProcNo;//流水号 |
| | | // string HOrderProcNO = list[0].HOrderProcNO;//订单跟踪号 |
| | | // //若MAINDI重复则重新获取 |
| | | // oCN.BeginTran(); |
| | | // //主表 |
| | | // oCN.RunProc("Insert Into Sc_StationInBillMain " + |
| | | // "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | // ",HYear,HPeriod,HRemark" + |
| | | // ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | // ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" + |
| | | // ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | // ",HSupID,HQty,HPrice,HMoney,HPieceQty,HSourceName,HCenterID" + |
| | | // ",HProcNo,HOrderProcNO" + |
| | | // ") " + |
| | | // " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | // "," + HYear + "," + HPeriod + ",'" + HRemark + "'" + |
| | | // "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | // ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | // "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | // "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + ",'" + HSourceName + "'," + HCenterID + |
| | | // ",'" + HProcNo + "','" + HOrderProcNO + "'" + |
| | | // ") "); |
| | | // ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); |
| | | // if (ds == null) |
| | | // { |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "判断数量失败!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // if (ds.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "判断数量失败!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") |
| | | // { |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID + ",1"); |
| | | // //判断是否是 首道工序 |
| | | // ds1 = oCN.RunProcReturn(" select HLastProc,HFstProc from Sc_ProcessExchangeBillMain a " + |
| | | // " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " + |
| | | // " Where a.HInterID=" + HProcExchInterID + " and b.HEntryID=" + HProcExchEntryID + " ", "Sc_ProcessExchangeBillMain"); |
| | | // if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | // { |
| | | |
| | | // } |
| | | // else if (ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFstProc"]) == "是") |
| | | // { |
| | | |
| | | // ListModels oListModels = new ListModels(); |
| | | |
| | | // DAL.ClsSc_StationInBill BillNew = new DAL.ClsSc_StationInBill(); |
| | | |
| | | // BillNew.omodel.HInterID = HInterID; |
| | | // BillNew.omodel.HYear = HYear; |
| | | // BillNew.omodel.HPeriod = HPeriod; |
| | | // BillNew.omodel.HBillNo = HBillNo; |
| | | // BillNew.omodel.HICMOBillNo = HICMOBillNo; |
| | | // BillNew.omodel.HICMOInterID = HICMOInterID; |
| | | // BillNew.omodel.HProcExchInterID = HProcExchInterID; |
| | | // BillNew.omodel.HProcExchEntryID = HProcExchEntryID; |
| | | // BillNew.omodel.HProcExchBillNo = HProcExchBillNo; |
| | | // BillNew.omodel.HProcID = HProcID; |
| | | // BillNew.omodel.HMaterID = HMaterID; |
| | | // BillNew.omodel.HStationInTime = DateTime.Now; |
| | | // BillNew.omodel.HEmpID = HEmpID; |
| | | // BillNew.omodel.HSourceID = HSourceID; |
| | | // BillNew.omodel.HGroupID = HGroupID; |
| | | // BillNew.omodel.HICMOQty = HICMOQty; |
| | | // BillNew.omodel.HPlanQty = HPlanQty; |
| | | // BillNew.omodel.HQty = HQty; |
| | | // BillNew.omodel.HPieceQty = HPieceQty; |
| | | // BillNew.omodel.HSourceName = HSourceName; |
| | | // BillNew.omodel.HCenterID = HCenterID; |
| | | // BillNew.omodel.HBillStatus = HBillStatus; |
| | | // BillNew.omodel.HMaker = HMaker; |
| | | // BillNew.omodel.HRemark = HRemark; |
| | | // BillNew.omodel.HProcPlanInterID = HProcPlanInterID; |
| | | // BillNew.omodel.HProcPlanEntryID = HProcPlanEntryID; |
| | | // BillNew.omodel.HProcPlanBillNo = HProcPlanBillNo; |
| | | // BillNew.omodel.HDeptID = HDeptID; |
| | | // BillNew.omodel.HBarCode = HBarCode; |
| | | // BillNew.omodel.HAddr = HAddr; |
| | | // BillNew.omodel.HBarCodeMaker = HBarCodeMaker; |
| | | // BillNew.omodel.HSupID = HSupID; |
| | | // BillNew.omodel.HPrice = HPrice; |
| | | // BillNew.omodel.HMoney = HMoney; |
| | | |
| | | // BillNew.omodel.HProcNo = HProcNo; |
| | | // BillNew.omodel.HOrderProcNO = HOrderProcNO; |
| | | // bool bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); |
| | | |
| | | // //提示 |
| | | // if (bResult == true) |
| | | // { |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "单据存盘完毕!单据号:" + HBillNo.Trim(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // oCN.Commit(); |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "新增单据成功!"; |
| | | // objJsonResult.data = ds.Tables[0]; |
| | | // return objJsonResult; |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "保存失败!原因:" + ClsPub.sExeReturnInfo; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "Exception!" + e.ToString(); |
| | |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | /// <summary> |
| | | /// 新增单据-保存按钮 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Cj_StationInBill/AddBill")] |
| | | [HttpPost] |
| | | public object AddBill([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | //委外工序发出反序列化 |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1); |
| | | string eventType = list[0].eventType; |
| | | string BillType = "3790"; |
| | | long HInterID = list[0].HInterID;//递入type得到的单据ID |
| | | string HBillNo = list[0].HBillNo;//递入type得到的单据号 |
| | | int HBillStatus = 0; |
| | | string HMaker = list[0].HMaker;//制单人 |
| | | int HYear = 2021; |
| | | double HPeriod = 1; |
| | | string HRemark = list[0].HRemark;//备注 |
| | | long HICMOInterID = list[0].HICMOInterID;//任务单ID |
| | | string HICMOBillNo = list[0].HICMOBillNo;//任务单 |
| | | long HProcPlanInterID = 0; |
| | | long HProcPlanEntryID = 0; |
| | | string HProcPlanBillNo = ""; |
| | | long HProcExchInterID = list[0].lngBillKey;//流转卡主内码 |
| | | long HProcExchEntryID = list[0].lngBillSubKey;//流转卡子内码 |
| | | string HProcExchBillNo = list[0].HProcExchBillNo;//流转卡 |
| | | long HMaterID = list[0].HMaterID;//产品ID |
| | | long HProcID = list[0].HProcID;//当前工序 |
| | | double HICMOQty = list[0].HICMOQty;//任务单数量 |
| | | double HPlanQty = list[0].HPlanQty;//流转卡数量 |
| | | long HSourceID = list[0].HSourceID;//生产资源ID |
| | | long HGroupID = list[0].HGroupID;//班组ID |
| | | long HDeptID = 0; |
| | | long HEmpID = list[0].HEmpID;//接收人ID |
| | | string HBarCode = list[0].HBarCode;//条形码 |
| | | string HAddr = ""; |
| | | string HBarCodeMaker = ""; |
| | | long HSupID = 0; |
| | | double HQty = list[0].HQty;//接收数量 |
| | | double HPrice = 0; |
| | | double HMoney = 0; |
| | | double HPieceQty = list[0].HPieceQty;//接收件数 |
| | | string HSourceName = list[0].HSourceName;//生产资源名称 |
| | | long HCenterID = list[0].HCenterID;//工作中心ID |
| | | long HProcNo = list[0].HProcNo;//流水号 |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订单跟踪号 |
| | | //单据完整性判断 |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "错误的流转卡内码!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchEntryID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "错误的流转卡子内码!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchBillNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HMaterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "产品没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HSourceID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "工作中心没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前工序没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HQty <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "接收个数不能为0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select HInterID from Sc_ProcessExchangeBillSub Where hinterid=" + HProcExchInterID + " and hprocno<" + HProcNo + " order by hprocno", "Sc_ProcessExchangeBillSub"); |
| | | if (ds == null) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "判断首道工序失败,不允许保存!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | |
| | | if ("Add".Equals(eventType)) |
| | | { |
| | | if (!AllowbillNo(HBillNo)) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据号重复!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //插入主表 |
| | | oCN.RunProc("Insert Into Sc_StationInBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HQty,HPrice,HMoney,HPieceQty,HSourceName,HCenterID" + |
| | | ",HProcNo,HOrderProcNO" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "'" + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + ",'" + HSourceName + "'," + HCenterID + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "'" + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | | { |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HProcExchInterID + ",-1"); |
| | | //更新主表 |
| | | oCN.RunProc("UpDate Sc_StationInBillMain set " + |
| | | " HBillNo='" + HBillNo + "'" + |
| | | ",HYear='" + HYear + "'" + |
| | | ",HPeriod='" + HPeriod + "'" + |
| | | ",HBillStatus='" + HBillStatus + "'" + |
| | | ",HRemark='" + HRemark + "'" + |
| | | ",HUpDater='" + HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | ",HSupID=" + HSupID + |
| | | ",HQty=" + HQty + |
| | | ",HPieceQty=" + HPieceQty + |
| | | ",HSourceName='" + HSourceName + "'" + |
| | | ",HICMOInterID=" + HICMOInterID + |
| | | ",HICMOBillNo='" + HICMOBillNo + "'" + |
| | | ",HProcPlanInterID=" + HProcPlanInterID + |
| | | ",HProcPlanEntryID=" + HProcPlanEntryID + |
| | | ",HProcPlanBillNo='" + HProcPlanBillNo + "'" + |
| | | ",HProcExchInterID=" + HProcExchInterID + |
| | | ",HProcExchEntryID=" + HProcExchEntryID + |
| | | ",HProcExchBillNo='" + HProcExchBillNo + "'" + |
| | | ",HMaterID=" + HMaterID + |
| | | ",HProcID=" + HProcID + |
| | | ",HICMOQty=" + HICMOQty + |
| | | ",HPlanQty=" + HPlanQty + |
| | | ",HStationInTime=getdate()" + |
| | | ",HSourceID=" + HSourceID + |
| | | ",HGroupID=" + HGroupID + |
| | | ",HDeptID=" + HDeptID + |
| | | ",HEmpID=" + HEmpID + |
| | | ",HBarCode='" + HBarCode + "'" + |
| | | ",HSaveBillFlag=0 " + |
| | | ",HAddr='" + HAddr + "'" + |
| | | ",HBarCodeMaker='" + HBarCodeMaker + "'" + |
| | | ",HProcNo='" + HProcNo + "'" + |
| | | ",HOrderProcNO='" + HOrderProcNO + "'" + |
| | | " where HInterID=" + HInterID); |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "操作类型无效!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_QtyCtrl " + HInterID + "", "h_p_MES_StationInBill_QtyCtrl"); |
| | | if (ds == null) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "判断数量失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "判断数量失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_In " + HInterID + ",1"); |
| | | //判断是否是 首道工序 |
| | | ds1 = oCN.RunProcReturn(" select HLastProc,HFstProc from Sc_ProcessExchangeBillMain a " + |
| | | " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " + |
| | | " Where a.HInterID=" + HProcExchInterID + " and b.HEntryID=" + HProcExchEntryID + " ", "Sc_ProcessExchangeBillMain"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | } |
| | | else if (ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFstProc"]) == "是") |
| | | { |
| | | |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "新增单据成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | private bool AllowbillNo(string HBillNo) |
| | | { |
| | | ds = oCN.RunProcReturn("select HBillNo from Sc_StationInBillMain where HBillNo = '" + HBillNo + "'", "Sc_StationInBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 工序进站接收单流水号回车获取工序信息 |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 编辑页面根据id获取工序进站接收单信息 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Cj_StationInBill/GetStationInBill")] |
| | | [HttpGet] |
| | | public object GetStationOutBill(int HInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_GetStationInBill where HInterID = " + HInterID, "h_v_GetStationInBill"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "工序进站接收单信息获取失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // |
| | | } |
| | |
| | | DataSet ds1; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 新增单据-保存按钮 |
| | | ///参数:string sql。 |
| | |
| | | //反序列化 |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg1); |
| | | |
| | | string eventType = list[0].eventType; |
| | | string BillType = "3791"; |
| | | string HBillSubType = "3791"; |
| | | long HInterID = list[0].HInterID;//递入type得到的单据ID |
| | |
| | | double HPriceRate = list[0].HPriceRate;//系数 |
| | | double HWorkTimes = list[0].HWorkTimes;//工时 |
| | | long HQCCheckID = list[0].HQCCheckID;//检验员ID |
| | | //单据完整性判断 |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡没有选择!请扫描条形码或输入条形码后回车"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchEntryID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号没有选择!请输入流水号后回车"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流水号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcExchBillNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "流转卡号没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HMaterID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "产品没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HGroupID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "生产班组没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HProcID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前工序没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HEmpID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "操作员没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HQCCheckID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "检验员没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HSourceID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "生产资源没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HCenterID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "工作中心没有选择!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HQty + HWasterQty <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "合格数量加报废数量不能为0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HWorkTimes <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "工时必须大于0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (HEmpID2 == 0 ) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "操作员2没有选择!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //if (HEmpID3 == 0 ) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "操作员3没有选择!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //if (HEmpID4 == 0 ) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "操作员4没有选择!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //if (HEmpID5 == 0 ) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "操作员5没有选择!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | if ("Add".Equals(eventType)) |
| | | { |
| | | if (!AllowbillNo(HBillNo)) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据号重复!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.RunProc("Insert Into Sc_StationOutBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate,HMouldNum" + |
| | | ",HYear,HPeriod,HRemark,HSourceName,HPieceQty,HWasterQty,HPlanPieceQty,HBadPNL" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationOutTime,HSourceID,HPayProcID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HSourceID2,HSourceID3,HSourceID4,HSourceID5" + |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",'" + HStationOutTime + "'," + HSourceID + "," + HPayProcID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + "," + HSourceID2 + "," + HSourceID3 + "," + HSourceID4 + "," + HSourceID5 + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | | { |
| | | oCN.RunProc("UpDate Sc_StationOutBillMain set " + |
| | | "HUpDater='" + HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | ",HSourceName='" + HSourceName + "'" + |
| | | ",HRemark='" + HRemark + "'" + |
| | | ",HQCCheckID=" + HQCCheckID + |
| | | ",HEmpID=" + HEmpID + |
| | | ",HEmpID2=" + HEmpID2 + |
| | | ",HEmpID3=" + HEmpID3 + |
| | | ",HEmpID4=" + HEmpID4 + |
| | | ",HEmpID5=" + HEmpID5 + |
| | | ",HSourceID=" + HSourceID + |
| | | ",HSourceID2=" + HSourceID2 + |
| | | ",HSourceID3=" + HSourceID3 + |
| | | ",HSourceID4=" + HSourceID4 + |
| | | ",HSourceID5=" + HSourceID5 + |
| | | ",HPayProcID=" + HPayProcID + |
| | | ",HWorkTimes=" + HWorkTimes + |
| | | ",HSaveBillFlag=0 " + |
| | | ",HPieceQty=" + HPieceQty + |
| | | ",HQty=" + HQty + |
| | | ",HDSQty=" + HDSQty + |
| | | ",HChongQty=" + HChongQty + |
| | | ",HMouldNum='" + HMouldNum + "'" + |
| | | ",HSourceNameList='" + HSourceNameList + "'" + |
| | | ",HWasterQty=" + HWasterQty + |
| | | ",HLastSubProc=" + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | " where HInterID=" + HInterID); |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "操作类型无效!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //主表 |
| | | oCN.RunProc("Insert Into Sc_StationOutBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate,HMouldNum" + |
| | | ",HYear,HPeriod,HRemark,HSourceName,HPieceQty,HWasterQty,HPlanPieceQty,HBadPNL" + |
| | | ",HICMOInterID,HICMOBillNo,HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationOutTime,HSourceID,HPayProcID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HSourceID2,HSourceID3,HSourceID4,HSourceID5" + |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",'" + HStationOutTime + "'," + HSourceID + "," + HPayProcID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + "," + HSourceID2 + "," + HSourceID3 + "," + HSourceID4 + "," + HSourceID5 + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + |
| | | ") "); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl"); |
| | | if (ds == null) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | |
| | | } |
| | | } |
| | | |
| | | private bool AllowbillNo(string HBillNo) |
| | | { |
| | | ds = oCN.RunProcReturn("select HBillNo from Sc_StationOutBillMain where HBillNo = '" + HBillNo + "'", "Sc_StationOutBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 返回工序出站汇报单列表 |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 编辑页面根据id获取工序出站汇报单信息 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Cj_StationOutBill/GetStationOutBill")] |
| | | [HttpGet] |
| | | public object GetStationOutBill(int HInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_GetStationOutBill where HInterID = " + HInterID, "h_v_GetStationOutBill"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "工序出站汇报单信息获取失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | // |
| | | } |
| | |
| | | public double HPriceRate { get; set; } |
| | | public double HWorkTimes { get; set; } |
| | | public long HQCCheckID { get; set; } |
| | | public long HProcPlanInterID { get; set; } |
| | | public long HProcPlanEntryID { get; set; } |
| | | |
| | | public string eventType { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | <ItemGroup> |
| | | <File Include="apiapp.json"> |
| | | <publishTime>04/12/2021 11:33:15</publishTime> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/Antlr3.Runtime.dll"> |
| | | <publishTime>02/22/2013 08:43:40</publishTime> |
| | |
| | | <publishTime>05/07/2021 20:31:20</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 14:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/Kingdee.BOS.WebApi.Client.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/Kingdee.BOS.WebApi.FormService.dll"> |
| | | <publishTime>09/20/2018 19:23:20</publishTime> |
| | |
| | | <publishTime>07/25/2012 11:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>05/20/2021 17:29:58</publishTime> |
| | | </File> |
| | | <File Include="bin/Newtonsoft.Json.dll"> |
| | | <publishTime>08/03/2014 20:33:56</publishTime> |
| | |
| | | <publishTime>01/04/2011 13:48:18</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>05/21/2020 10:51:50</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/Swashbuckle.Core.dll"> |
| | | <publishTime>02/15/2015 17:57:08</publishTime> |
| | |
| | | <publishTime>11/28/2018 13:01:00</publishTime> |
| | | </File> |
| | | <File Include="bin/System.Web.Http.WebHost.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="bin/System.Web.Mvc.dll"> |
| | | <publishTime>01/28/2015 04:02:18</publishTime> |
| | |
| | | <publishTime>11/24/2014 11:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>05/23/2021 23:05:31</publishTime> |
| | | <publishTime>05/28/2021 17:10:46</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>05/23/2021 23:05:31</publishTime> |
| | | <publishTime>05/28/2021 17:10:46</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.XmlSerializers.dll"> |
| | | <publishTime>02/04/2021 21:35:21</publishTime> |
| | |
| | | <publishTime>03/26/2019 14:23:20</publishTime> |
| | | </File> |
| | | <File Include="Content/bootstrap.css"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Content/bootstrap.min.css"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Content/Site.css"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/BLL.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/DAL.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/DBUtility.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/Kingdee.BOS.WebApi.Client.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/Model.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>05/20/2021 17:29:58</publishTime> |
| | | </File> |
| | | <File Include="DLL/Newtonsoft.Json.Net35.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/Pub_Class.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>05/21/2020 10:51:50</publishTime> |
| | | </File> |
| | | <File Include="DLL/Pub_Control.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="DLL/SQLHelper.dll"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="fonts/glyphicons-halflings-regular.eot"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="fonts/glyphicons-halflings-regular.svg"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="fonts/glyphicons-halflings-regular.ttf"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="fonts/glyphicons-halflings-regular.woff"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Global.asax"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Index.html"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="packages.config"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/21/2021 13:19:40</publishTime> |
| | | </File> |
| | | <File Include="PrecompiledApp.config"> |
| | | <publishTime>05/07/2021 20:31:19</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/bootstrap.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/bootstrap.min.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery-1.10.2.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery-1.10.2.min.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery-1.10.2.min.map"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery.validate.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery.validate.min.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery.validate.unobtrusive.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Scripts/modernizr-2.6.2.js"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Shared/Error.cshtml"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/Shared/_Layout.cshtml"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/web.config"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Views/_ViewStart.cshtml"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>01/13/2021 21:47:30</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsCLD_Department_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:21</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Customer_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Department_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Employee_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:21</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Group_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Source_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:21</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:21</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource"> |
| | | <publishTime>05/21/2021 18:05:12</publishTime> |
| | | <publishTime>02/22/2021 09:25:20</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>05/23/2021 23:05:36</publishTime> |
| | | <publishTime>05/28/2021 17:10:52</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
| | |
| | | <Compile Include="Controllers\SCGL\QC_LastPieceCheckBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\QC_OutCompCheckBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\QC_ProcessCheckBillController.cs" /> |
| | | <Compile Include="Controllers\PZGL\QC_LastPieceCheckBillController.cs" /> |
| | | <Compile Include="Controllers\Sc_ProcessMangementController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Cj_StationEntrustInBillController.cs" /> |
| | | <Compile Include="Controllers\LMESController.cs" /> |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Folder Include="App_Data\" /> |
| | | <Folder Include="Controllers\PZGL\" /> |
| | | <Folder Include="Views\MoveStockBill\" /> |
| | | <Folder Include="Views\QC_Management\" /> |
| | | </ItemGroup> |