| | |
| | | } |
| | | } |
| | | } |
| | | if (ds.Tables[1].Rows.Count > 0) |
| | | { |
| | | //根据当天开工并且完工对应的产量数据 生成产量汇报单 |
| | | DataTable dt = ds.Tables[1]; |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | nos = dt.Rows[i]["设备编码"].ToString(); |
| | | string HICMInterID = dt.Rows[i]["HInterID"].ToString(); |
| | | string HBegDate = DateTime.Parse(dt.Rows[i]["开始日期"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); |
| | | string HEndDate = DateTime.Parse(dt.Rows[i]["结束日期"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); |
| | | jsonEquipment = await FindProdByNosAndTime(Url, token, nos, HBegDate, HEndDate); |
| | | if (decimal.Parse(jsonEquipment.data[0].prod) > 0) |
| | | { |
| | | //生成产量汇报单 |
| | | oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "'"); |
| | | CustomWriteLog("生成产量汇报单2:'exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "''", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | } |
| | | } |
| | | //if (ds.Tables[1].Rows.Count > 0) |
| | | //{ |
| | | // //根据当天开工并且完工对应的产量数据 生成产量汇报单 |
| | | // DataTable dt = ds.Tables[1]; |
| | | // for (int i = 0; i < dt.Rows.Count; i++) |
| | | // { |
| | | // nos = dt.Rows[i]["设备编码"].ToString(); |
| | | // string HICMInterID = dt.Rows[i]["HInterID"].ToString(); |
| | | // string HBegDate = DateTime.Parse(dt.Rows[i]["开始日期"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); |
| | | // string HEndDate = DateTime.Parse(dt.Rows[i]["结束日期"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); |
| | | // jsonEquipment = await FindProdByNosAndTime(Url, token, nos, HBegDate, HEndDate); |
| | | // if (decimal.Parse(jsonEquipment.data[0].prod) > 0) |
| | | // { |
| | | // //生成产量汇报单 |
| | | // oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "'"); |
| | | // CustomWriteLog("生成产量汇报单2:'exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "''", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | // } |
| | | // } |
| | | //} |
| | | } |
| | | |
| | | } |