This commit is contained in:
2022-10-27 09:50:32 +08:00
parent 4630e6138b
commit dfb47e1166

View File

@@ -28,43 +28,6 @@ public class InbillServiceImpl {
private final StorPublicService storPublicService;
//插入分配表
public void insertDis(JSONObject jo) {
WQLObject dis = WQLObject.getWQLObject("ST_IVT_IOStorInvDis");
JSONObject dis_jo = new JSONObject();
dis_jo.put("iostorinvdisdtl_id", IdUtil.getSnowflake(1, 1).nextId());
dis_jo.put("iostorinvdis_id", jo.getString("iostorinvdis_id"));
dis_jo.put("iostorinv_id", jo.getString("iostorinv_id"));
dis_jo.put("iostorinvdtl_id", jo.getString("iostorinvdtl_id"));
JSONArray dis_rows = dis.query("iostorinvdtl_id = '" + jo.getString("iostorinvdtl_id") + "'").getResultJSONArray(0);
dis_jo.put("seq_no", (dis_rows.size() + 1) + "");
dis_jo.put("sect_id", jo.getString("sect_id"));
dis_jo.put("sect_code", jo.getString("sect_code"));
dis_jo.put("sect_name", jo.getString("sect_name"));
dis_jo.put("struct_id", jo.getString("struct_id"));
dis_jo.put("struct_code", jo.getString("struct_code"));
dis_jo.put("struct_name", jo.getString("struct_name"));
dis_jo.put("material_id", jo.getString("material_id"));
dis_jo.put("pcsn", jo.getString("pcsn"));
dis_jo.put("quality_scode", jo.getString("quality_scode"));
dis_jo.put("ivt_level", jo.getString("ivt_level"));
dis_jo.put("is_active", jo.getString("is_active"));
dis_jo.put("is_active", jo.getString("is_active"));
dis_jo.put("work_status", "00");
dis_jo.put("storagevehicle_id", jo.getString("storagevehicle_id"));
dis_jo.put("storagevehicle_type", jo.getString("storagevehicle_type"));
dis_jo.put("storagevehicle_code", jo.getString("storagevehicle_code"));
dis_jo.put("is_issued", "0");
dis_jo.put("qty_unit_id", jo.getString("qty_unit_id"));
dis_jo.put("qty_unit_name", jo.getString("qty_unit_name"));
dis_jo.put("plan_qty", "0");
dis_jo.put("point_id", jo.getString("point_id"));
dis_jo.put("point_code", jo.getString("point_code"));
dis_jo.put("point_name", jo.getString("point_name"));
dis.insert(dis_jo);
}
public void operatePoint(String operate, JSONObject form) {
WQLObject point_table = WQLObject.getWQLObject("SCH_BASE_Point");
WQLObject struct_table = WQLObject.getWQLObject("ST_IVT_StructAttr");
@@ -86,7 +49,7 @@ public class InbillServiceImpl {
break;
case "2":
//解锁终点,绑定载具
String vehicle_code = form.getString("vehicle_code");
String vehicle_code = form.getString("box_no");
map.put("lock_type", "00");
map.put("point_status", "02");
map.put("vehicle_code", vehicle_code);
@@ -176,9 +139,7 @@ public class InbillServiceImpl {
JSONObject dis_row = dis_rows.getJSONObject(i);
JSONObject point_form = new JSONObject();
point_form.put("end_point", dis_row.getString("struct_code"));
point_form.put("vehicle_code", dis_row.getString("storagevehicle_code"));
point_form.put("storagevehicle_id", dis_row.getString("storagevehicle_id"));
point_form.put("storagevehicle_type", dis_row.getString("storagevehicle_type"));
point_form.put("vehicle_code", dis_row.getString("box_no"));
//更新目的点位
this.operatePoint("2", point_form);
@@ -199,8 +160,10 @@ public class InbillServiceImpl {
i_form.put("qty_unit_name", dis_row.getString("qty_unit_name"));
storPublicService.IOStor(i_form, "33");
//如果单据为原辅料入库,且为寄样合格,回写到货通知单
//更新该子卷对应的包装关系为入库
HashMap<String,String> map = new HashMap<>();
map.put("status","2");
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(map,"package_box_SN = '"+dis_row.getString("box_no")+"' AND container_name = '"+dis_row.getString("pcsn")+"' AND status = '1'");
}
mst_jo.put("bill_status", "99");