Merge remote-tracking branch 'origin/b_lms' into b_lms

# Conflicts:
#	lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/TwoInBoxTrussTask.java
#	lms/nladmin-system/src/main/java/org/nl/b_lms/storage_manage/ios/service/iostorInv/util/impl/InBoxManageServiceImpl.java
This commit is contained in:
2024-05-11 22:12:54 +08:00
27 changed files with 424 additions and 47 deletions

View File

@@ -63,6 +63,14 @@ public class RawFoilController {
return new ResponseEntity<>(rawFoilService.needEmptyAxisTest(whereJson), HttpStatus.OK);
}
@PostMapping("/createOrder")
@Log("创建工单")
public ResponseEntity<Object> createOrder(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(rawFoilService.createOrder(whereJson), HttpStatus.OK);
}
@PostMapping("/needEmptyVehicle")
@Log("呼叫空轴")

View File

@@ -44,6 +44,15 @@ public interface RawFoilService {
*/
JSONObject needEmptyAxisTest(JSONObject whereJson);
/**
* 创建工单
*
* @param whereJson /
* @return JSONObject
*/
JSONObject createOrder(JSONObject whereJson);
/**
* 呼叫空卷轴
*

View File

@@ -393,6 +393,16 @@ public class BakingServiceImpl implements BakingService {
if (ObjectUtil.isEmpty(point_code2)) {
throw new BadRequestException("没有无货且没有任务的点位类型为出箱的烘箱对接位!");
}
JSONObject jsonRaw = rawTab.query("container_name = '" + jsonHotIvt.getString("container_name") + "' and is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonRaw)) {
throw new BadRequestException("未查询到母卷号:" + jsonHotIvt.getString("container_name") + "对应的生箔工单!");
}
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) {
throw new BadRequestException("物料基础信息中无此物料!");
}
// 3.创建任务
JSONObject param = new JSONObject();
param.put("point_code1", point_code1);
@@ -405,15 +415,6 @@ public class BakingServiceImpl implements BakingService {
//查询该母卷对应最近的一条入烘箱记录
JSONObject last_hot_mst = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst").query("container_name = '" + jsonHotIvt.getString("container_name") + "' AND io_type = '0' order by confirm_time desc").uniqueResult(0);
JSONObject jsonRaw = rawTab.query("container_name = '" + jsonHotIvt.getString("container_name") + "' and is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonRaw)) {
throw new BadRequestException("未查询到母卷号:" + jsonHotIvt.getString("container_name") + "对应的生箔工单!");
}
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) {
throw new BadRequestException("物料基础信息中无此物料!");
}
JSONObject hotParam = new JSONObject();
hotParam.put("container_name", jsonRaw.getString("container_name"));
hotParam.put("workorder_id", jsonRaw.getString("workorder_id"));

View File

@@ -203,13 +203,55 @@ public class RawFoilServiceImpl implements RawFoilService {
return jo;
}
@Override
public JSONObject createOrder(JSONObject whereJson) {
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工单表
WQLObject sbTab = WQLObject.getWQLObject("ST_IVT_SbPointIvt"); // 生箔点位库存表
JSONObject device_jo = sbTab.query("point_code = '" + whereJson.getString("point_code") + "'").uniqueResult(0);
String container_name = whereJson.getString("container_name");
//判断该母卷是否存在工单
JSONObject raw_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '"+container_name+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(raw_jo)){
throw new BadRequestException("当前母卷存在生箔工单,不允许创建!");
}
// 插入生箔工序工单表
JSONObject json = new JSONObject();
json.put("workorder_id", IdUtil.getSnowflake(1, 1).nextId());
json.put("container_name", container_name);
json.put("resource_name", device_jo.getString("ext_code"));
json.put("mfg_order_name", "test");
json.put("product_name", "741011000000361");
json.put("description", "铜箔|双面光|原箔|6微米|1350");
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", device_jo.getString("device_type"));
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 jo = new JSONObject();
jo.put("message", "操作成功!");
return jo;
}
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject needEmptyAxisTest(JSONObject whereJson) {
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工单表
WQLObject sbTab = WQLObject.getWQLObject("ST_IVT_SbPointIvt"); // 生箔点位库存表
JSONObject device_jo = sbTab.query("point_code = '"+whereJson.getString("point_code")+"'").uniqueResult(0);
JSONObject device_jo = sbTab.query("point_code = '" + whereJson.getString("point_code") + "'").uniqueResult(0);
// 插入生箔工序工单表
JSONObject json = new JSONObject();
json.put("workorder_id", IdUtil.getSnowflake(1, 1).nextId());

View File

@@ -118,6 +118,14 @@ public class AcsTaskDto {
*/
private String empty_site;
private String layer;
private String length;
private String width;
private String height;
private String barcode;
}

View File

@@ -39,7 +39,7 @@ public class AcsUtil {
product_area = "LK";
}
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0107")) {
product_area = "LK";
product_area = "BLK";
}
if (StrUtil.isEmpty(product_area)) {
throw new BadRequestException("区域不能为空!下发信息:" + jo.toString());

View File

@@ -16,6 +16,7 @@ public enum URLEnum {
ACS_URL_A3("A3", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A3").getValue()),
ACS_URL_A4("A4", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A4").getValue()),
ACS_URL_LK("LK", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_LK").getValue()),
ACS_URL_BLK("BLK", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_BLK").getValue()),
ACS_URL_B2("B2", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_B2").getValue());
private final String product_area;

View File

@@ -375,6 +375,7 @@ public class CheckOutBillController {
@PostMapping("/testInEmp")
@Log("空载具入库测试")
@SaIgnore
public ResponseEntity<Object> testInEmp(@RequestBody JSONObject whereJson) {
new InVehicleManageServiceImpl().inVehicle(whereJson);
return new ResponseEntity<>(HttpStatus.OK);