add: 插入生箔工单

This commit is contained in:
2024-04-17 15:24:40 +08:00
parent 85ad76ab6a
commit 7f86fb0aaf

View File

@@ -2,6 +2,7 @@ package org.nl.wms.pda.mps.service.impl;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@@ -144,7 +145,29 @@ public class RawFoilServiceImpl implements RawFoilService {
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工单表
WQLObject sbTab = WQLObject.getWQLObject("ST_IVT_SbPointIvt"); // 生箔点位库存表
// 插入生箔工序工单表
JSONObject json = new JSONObject();
json.put("workorder_id", IdUtil.getSnowflake(1, 1).nextId());
json.put("container_name", whereJson.getString("container_name"));
json.put("resource_name", whereJson.getString("device_code"));
json.put("mfg_order_name", "test");
json.put("product_name", "test");
json.put("description", "test");
json.put("theory_height", 2000.00);
json.put("eqp_velocity", 20.00);
json.put("up_coiler_date", DateUtil.now());
json.put("is_reload_send", 0);
json.put("order_type", 1); // ?
json.put("product_area", "B2");
json.put("realstart_time", DateUtil.now());
json.put("status", "01");
json.put("is_delete", "0");
json.put("agvno", "0");
json.put("productin_qty", 0);
json.put("create_id", "1");
json.put("create_name", "管理员");
json.put("create_time", DateUtil.now());
rawTab.insert(json);
JSONObject raw_jo = whereJson.getJSONObject("raw_jo");
JSONObject jsonRaw = rawTab.query("workorder_id = '" + raw_jo.getString("workorder_id") + "'").uniqueResult(0);