|
|
@ -153,6 +153,10 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A |
|
|
|
String material_code = MapUtil.getStr(whereJson, "material_code"); |
|
|
|
String material_name = MapUtil.getStr(whereJson, "material_name"); |
|
|
|
String material_spec = MapUtil.getStr(whereJson, "material_spec"); |
|
|
|
String outer_diameter = MapUtil.getStr(whereJson, "outer_diameter"); |
|
|
|
String wall_thickness = MapUtil.getStr(whereJson, "wall_thickness"); |
|
|
|
String length = MapUtil.getStr(whereJson, "length"); |
|
|
|
|
|
|
|
String qty = MapUtil.getStr(whereJson, "qty"); |
|
|
|
|
|
|
|
if(StrUtil.isEmpty(material_code)){ |
|
|
@ -167,12 +171,21 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A |
|
|
|
orderDto.setMaterial_code(material_code); |
|
|
|
orderDto.setMaterial_name(material_name); |
|
|
|
orderDto.setMaterial_spec(material_spec); |
|
|
|
orderDto.setLength(length); |
|
|
|
orderDto.setOuter_diameter(outer_diameter); |
|
|
|
orderDto.setWall_thickness(wall_thickness); |
|
|
|
orderDto.setOrder_id(order_id); |
|
|
|
orderDto.setOrder_code(order_code); |
|
|
|
orderDto.setQty(qty); |
|
|
|
orderDto.setOrder_status("0"); |
|
|
|
orderDto.setOrder_status("00"); |
|
|
|
orderDto.setIs_deleted("0"); |
|
|
|
orderDto.setCreate_by(currentUsername); |
|
|
|
orderDto.setIs_coating("1"); |
|
|
|
orderDto.setIs_labeling("1"); |
|
|
|
orderDto.setIs_lettering("1"); |
|
|
|
orderDto.setIs_risking("1"); |
|
|
|
orderDto.setIs_strapping("1"); |
|
|
|
orderDto.setIs_unbundling("1"); |
|
|
|
|
|
|
|
for(int i=0; i<tableData.size(); i++){ |
|
|
|
JSONObject jsonObject = tableData.getJSONObject(i); |
|
|
@ -184,24 +197,33 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A |
|
|
|
String customer_code = detaildto.getCust_code(); |
|
|
|
//客户名称
|
|
|
|
String customer_name = detaildto.getCust_name(); |
|
|
|
//包装数量
|
|
|
|
String detail_qty = detaildto.getDetail_qty(); |
|
|
|
//明细号客户数量
|
|
|
|
String detail_qty = detaildto.getOrder_detail_qty(); |
|
|
|
//刻字信息
|
|
|
|
String lettering_message = detaildto.getLettering_message(); |
|
|
|
//捆扎每包数量
|
|
|
|
String strap_number = detaildto.getStrap_number(); |
|
|
|
|
|
|
|
//尾料数量
|
|
|
|
String strap_tailint_number = String.valueOf(Integer.parseInt(detail_qty)%Integer.parseInt(strap_number)); |
|
|
|
detaildto.setOrder_id(order_id); |
|
|
|
detaildto.setOrder_code(order_code); |
|
|
|
detaildto.setOrder_detail_status("00"); |
|
|
|
detaildto.setIs_deleted("0"); |
|
|
|
detaildto.setOrderDetail_id(IdUtil.simpleUUID()); |
|
|
|
detaildto.setOrderDetail_code(order_detral_code); |
|
|
|
detaildto.setOrderDetail_code(String.valueOf(i)); |
|
|
|
detaildto.setCust_id(customer_id); |
|
|
|
detaildto.setCust_code(customer_code); |
|
|
|
detaildto.setCust_name(customer_name); |
|
|
|
detaildto.setDetail_qty(detail_qty); |
|
|
|
detaildto.setMaterial_code(material_code); |
|
|
|
detaildto.setMaterial_id(material_id); |
|
|
|
detaildto.setMaterial_name(material_name); |
|
|
|
detaildto.setLength(length); |
|
|
|
detaildto.setWall_thickness(wall_thickness); |
|
|
|
detaildto.setOuter_diameter(outer_diameter); |
|
|
|
detaildto.setOrderDetail_code(detail_qty); |
|
|
|
detaildto.setLabeling_message(lettering_message); |
|
|
|
detaildto.setStrap_number(strap_number); |
|
|
|
detaildto.setStrap_tailint_number(strap_tailint_number); |
|
|
|
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorderdetail"); |
|
|
|
JSONObject json = (JSONObject) JSONObject.toJSON(detaildto); |
|
|
|
wo.insert(json); |
|
|
|