| | |
| | | for (int i = 0; i < json.Count; i++) |
| | | { |
| | | //写入采购到货单子表 |
| | | sql = @"insert into T_PurchaseArrivalOrder_sub(hbillno,rownumber,hpartcode,hplanqty,hqty,hacceptdate,hischeck,hbatchno) |
| | | values(@hbillno,@hpartcode,@hplanqty,@hqty,@hacceptdate,@hischeck,@hbatchno)"; |
| | | sql = @"insert into T_PurchaseArrivalOrder_sub(hbillno,rownumber,hpartcode,hplanqty,hqty,hacceptdate,hcheckstaus,hbatchno) |
| | | values(@hbillno,@rownumber,@hpartcode,@hplanqty,@hqty,@hacceptdate,@hcheckstaus,@hbatchno)"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | |
| | | hplanqty = decimal.Parse(json[i].hplanqty), |
| | | hqty = decimal.Parse(json[i].hqty), |
| | | hacceptdate = hacceptdate == "" ? null : hacceptdate, |
| | | hischeck = json[i].hischeck, |
| | | hcheckstaus = json[i].hischeck, |
| | | hbatchno = json[i].hbatchno |
| | | } |
| | | }); |
| | |
| | | { |
| | | //写入条码档案表 |
| | | sql = @"insert into T_BarCodeBill(rightcode,hbillno,hbilltype,hbarcode,hbarcodestatus,hbarcodetype,hmaterialcode,hqty,hbatchno,hcustomercode,hdeptcode,hsourcebillno,hsourcebilltype,barcodeposition,lm_user,lm_date) |
| | | values(@rightcode,hbillno,@hbilltype,@hbarcode,@hbarcodestatus,@hbarcodetype,@hmaterialcode,@hqty,@hbatchno,@hcustomercode,@hdeptcode,@hsourcebillno,@hsourcebilltype,@barcodeposition,@lm_user,@lm_date)"; |
| | | values(@rightcode,@hbillno,@hbilltype,@hbarcode,@hbarcodestatus,@hbarcodetype,@hmaterialcode,@hqty,@hbatchno,@hcustomercode,@hdeptcode,@hsourcebillno,@hsourcebilltype,@barcodeposition,@lm_user,@lm_date)"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | |
| | | }); |
| | | } |
| | | //更新采购订单子表:累计到货数量 |
| | | sql = @"update T_PurchaseOrder_sub set countarrivalquantity=countarrivalquantity+@hqty where ordercode=@purordercode and materiel_code=@materiel_code and rownumber=@rownumber"; |
| | | sql = @"update T_PurchaseOrder_sub set countarrivalquantity=countarrivalquantity+@hqty where purchaseorder_code=@purordercode and materiel_code=@materiel_code and rownumber=@rownumber"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |
| | |
| | | }); |
| | | } |
| | | //更新采购订单主表:订单状态 |
| | | sql = @"update T_PurchaseOrder set status=@status where ordercode=@purordercode"; |
| | | sql = @"update T_PurchaseOrder set status=@status where ordercode=@ordercode"; |
| | | list.Add(new |
| | | { |
| | | str = sql, |