| | |
| | | string OrganizationNUM = oCN.RunProcReturn("select HNumber from Xt_ORGANIZATIONS where HItemID=" + OrganizationID, "Xt_ORGANIZATIONS").Tables[0].Rows[0]["HNumber"].ToString(); |
| | | //根据工序汇报单主ID获取工序汇报入库单的数据 |
| | | DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc"); |
| | | if(ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "生成生产汇报单过程中没有查询到出站单"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | |
| | | //保存 |
| | |
| | | //DataRow dr = ds.Tables[0].Rows[0]; |
| | | |
| | | //判断本次报废总数量是否为0 |
| | | var DTable = oCN.RunProcReturn("select sum(HWasterQty) HWasterQty from Sc_StationOutBillMain where HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0]; |
| | | var DTable = oCN.RunProcReturn("select isnull(sum(HWasterQty),0) HWasterQty from Sc_StationOutBillMain where HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0]; |
| | | |
| | | if (double.Parse(DTable.Rows[0]["HWasterQty"].ToString()) == 0) |
| | | { |