| | |
| | | left join TKimp_Ewo E on M.sourceid=E.id |
| | | left join T_Sec_Stck K on E.stck_code=K.code |
| | | where A.style='S' and S.isend='Y' and A.sqty>0 |
| | | ) as AA where 1=1 " + search; |
| | | ) as AA where AA.good_qty>AA.inhouseqty " + search; |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | mes.code = "200"; |
| | | mes.Message = "查询成功!"; |
| | |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | labcode=sub_arra[i]["inbarcode"].ToString(), |
| | | labcode = sub_arra[i]["inbarcode"].ToString(), |
| | | materiel_code = sub_arra[i]["partcode"].ToString(), |
| | | storehouse_code = sub_arra[i]["stockcode"].ToString(), |
| | | qty =decimal.Parse(sub_arra[i]["stinhouseqty"].ToString()), |
| | | qty = decimal.Parse(sub_arra[i]["stinhouseqty"].ToString()), |
| | | lm_user = username, |
| | | lm_date = DateTime.Now.ToString() |
| | | } |
| | |
| | | str = sql, |
| | | parm = new |
| | | { |
| | | docu_typecode="1202", |
| | | hbillno= obj["head"]["hbillno"].ToString(), |
| | | hsoucenillnoid= obj["head"]["sourceVoucherId"].ToString(), |
| | | docu_typecode = "1202", |
| | | hbillno = obj["head"]["hbillno"].ToString(), |
| | | hsoucenillnoid = obj["head"]["sourceVoucherId"].ToString(), |
| | | hsoucenillno = obj["head"]["sourceVoucherCode"].ToString(), |
| | | saleorderid = obj["head"]["saleOrderId"].ToString(), |
| | | saleordercode = obj["head"]["saleOrderCode"].ToString(), |
| | | status = "NEW", |
| | | wkshpcode = obj["head"]["wkshpcode"].ToString(), |
| | | lm_user = username, |
| | | lm_date= DateTime.Now.ToString() |
| | | lm_date = DateTime.Now.ToString() |
| | | } |
| | | }); |
| | | |
| | |
| | | // madedate = obj["head"]["madedate"].ToString(), |
| | | // createdtime = obj["head"]["createdtime"].ToString(), |
| | | // DataSource = obj["head"]["DataSource"].ToString(), |
| | | // idsourcevouchertype= obj["head"]["idsourcevouchertype"].ToString() |
| | | |
| | | // } |
| | | //}); |
| | |
| | | // str = sql, |
| | | // parm = new |
| | | // { |
| | | // code= subsum_arra[j]["code"].ToString(), |
| | | // code = subsum_arra[j]["code"].ToString(), |
| | | // arrivalQuantity = subsum_arra[j]["arrivalQuantity"].ToString(), |
| | | // quantity = subsum_arra[j]["quantity"].ToString(), |
| | | // compositionQuantity = subsum_arra[j]["compositionQuantity"].ToString(), |
| | |
| | | // idbusiTypeByMergedFlow = subsum_arra[j]["idbusiTypeByMergedFlow"].ToString(), |
| | | // idinventory = subsum_arra[j]["idinventory"].ToString(), |
| | | // idbaseunit = subsum_arra[j]["idbaseunit"].ToString(), |
| | | // idunit= subsum_arra[j]["idunit"].ToString(), |
| | | // idunit = subsum_arra[j]["idunit"].ToString(), |
| | | // idwarehouse = subsum_arra[j]["idwarehouse"].ToString(), |
| | | // SourceVoucherIdByMergedFlow = subsum_arra[j]["SourceVoucherIdByMergedFlow"].ToString(), |
| | | // SourceVoucherCodeByMergedFlow = subsum_arra[j]["SourceVoucherCodeByMergedFlow"].ToString(), |
| | |
| | | // DataSource = subsum_arra[j]["DataSource"].ToString() |
| | | // } |
| | | //}); |
| | | //写入ERP现存量查询表 |
| | | //sql = @"" + dt.Rows[2]["cname"].ToString() + ""; |
| | | //list.Add(new |
| | | //{ |
| | | // str = sql, |
| | | // parm = new |
| | | // { |
| | | // idinventory = subsum_arra[j]["idinventory"].ToString(), |
| | | // idwarehouse = subsum_arra[j]["idwarehouse"].ToString(), |
| | | // propertyName = "ProductForReceive", |
| | | // baseQuantity= subsum_arra[j]["quantity"].ToString(), |
| | | // IdMarketingOrgan="1", |
| | | // idbaseunit= subsum_arra[j]["idbaseunit"].ToString(), |
| | | // updated= DateTime.Now.ToString(), |
| | | // isCarriedForwardOut ="0", |
| | | // isCarriedForwardIn = "0" |
| | | // } |
| | | //}); |
| | | |
| | | |
| | | |
| | | //写入MES入库记录子表 |
| | | sql = @"insert into TK_WMS_Inwh_Sub(hbillno,rownumber,materiel_code,storehouse_code,qty) |
| | | values(@hbillno,@rownumber,@materiel_code,@storehouse_code,@qty)"; |