Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -313,6 +313,8 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no"))
|
||||
);
|
||||
boxDao.setIs_packing("1");
|
||||
iBstIvtBoxinfoService.save(boxDao);
|
||||
if (boxDao == null) {
|
||||
throw new BadRequestException("木箱不存在!");
|
||||
}
|
||||
|
||||
@@ -101,6 +101,14 @@ public class LashManageServiceImpl implements LashManageService {
|
||||
.query("package_box_sn = '" + boxDao.getBox_no() + "'")
|
||||
.uniqueResult(0);
|
||||
|
||||
//查询木箱对应的托盘绑定关系,并清除
|
||||
WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||
JSONObject ext_jo = veExtTab.query("pcsn = '" + boxDao.getBox_no() + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(ext_jo)) {
|
||||
ext_jo.put("pcsn", "");
|
||||
veExtTab.update(ext_jo);
|
||||
}
|
||||
|
||||
/*
|
||||
* 查看点位是否为空:
|
||||
* 为空记当前载具号,载具数量为1,
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
@@ -39,6 +40,7 @@ import java.util.stream.Collectors;
|
||||
@RequiredArgsConstructor
|
||||
public class SendOutManageServiceImpl implements SendOutManageService {
|
||||
|
||||
private static final Logger log = Logger.getLogger(SendOutManageServiceImpl.class);
|
||||
/**
|
||||
* 点位服务
|
||||
*/
|
||||
|
||||
@@ -962,6 +962,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
|
||||
}
|
||||
plan_jo.put("status", "09");
|
||||
plan_jo.put("end_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
param.put("type", "2"); // 1- 冷却区入烘箱 2- 暂存位入烘箱
|
||||
if (ObjectUtil.isNotEmpty(cool_jo)) {
|
||||
param.put("point_code1", cool_jo.getString("point_code"));
|
||||
}else {
|
||||
} else {
|
||||
param.put("point_code1", point_code1);
|
||||
}
|
||||
param.put("point_code2", jsonHotIvt.getString("point_code"));
|
||||
@@ -368,7 +368,38 @@ public class BakingServiceImpl implements BakingService {
|
||||
param.put("material_code", jsonHotIvt.getString("container_name"));
|
||||
param.put("product_area", jsonHotIvt.getString("product_area"));
|
||||
OutHotTask outHotTask = new OutHotTask();
|
||||
outHotTask.createTask(param);
|
||||
String task_id = outHotTask.createTask(param);
|
||||
|
||||
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 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 hotParam = new JSONObject();
|
||||
hotParam.put("container_name", jsonRaw.getString("container_name"));
|
||||
hotParam.put("workorder_id", jsonRaw.getString("workorder_id"));
|
||||
hotParam.put("material_id", jsonMater.getString("material_id"));
|
||||
hotParam.put("qty", jsonRaw.get("qty"));
|
||||
hotParam.put("io_type", "1");
|
||||
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
|
||||
hotParam.put("task_id", task_id);
|
||||
hotParam.put("start_point_code", point_code1);
|
||||
hotParam.put("end_point_code", cache_jo.getString("point_code"));
|
||||
String point_temperature = (String) redisUtils.hget(point_code1, "temperature");
|
||||
hotParam.put("temperature", point_temperature);
|
||||
if (ObjectUtil.isEmpty(last_hot_mst)) {
|
||||
hotParam.put("oven_time", "480");
|
||||
} else {
|
||||
hotParam.put("oven_time", last_hot_mst.getString("oven_time"));
|
||||
}
|
||||
this.createHotIoMst(hotParam);
|
||||
} else {
|
||||
if (!in_area_id.contains(product_area)) {
|
||||
throw new BadRequestException("当前登录人员暂无【" + product_area + "】操作权限");
|
||||
|
||||
@@ -153,7 +153,7 @@ public class InHotTask extends AbstractAcsTask {
|
||||
JSONObject jsonPoint = coolIvtTab.query("point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
jsonPoint.put("container_name", "");
|
||||
jsonPoint.put("full_point_status", "01");
|
||||
pointTab.update(jsonPoint);
|
||||
coolIvtTab.update(jsonPoint);
|
||||
} else {
|
||||
// 更新暂存区点位状态为空位
|
||||
JSONObject jsonPoint = pointTab.query("point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
|
||||
@@ -68,6 +68,7 @@ public class OutHotTask extends AbstractAcsTask {
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
|
||||
WQLObject hotIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烘箱区库存表
|
||||
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烘箱区出入主表
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||
|
||||
String task_id = taskObj.getString("task_id");
|
||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
@@ -103,9 +104,6 @@ public class OutHotTask extends AbstractAcsTask {
|
||||
if (jsonTask.getString("task_type").equals("010205")) {
|
||||
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("full_point_code = '" + jsonTask.getString("point_code3") + "'").uniqueResult(0);
|
||||
//创建AGV任务
|
||||
if (StrUtil.isNotEmpty(cut_jo.getString("container_name")) || "02".equals(cut_jo.getString("full_point_status"))) {
|
||||
throw new BadRequestException("该分切机对应的上料位存在母卷,不能下发搬运任务!");
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
if (StrUtil.equals("01", cut_jo.getString("empty_point_status"))) {
|
||||
jo.put("point_code1", jsonTask.getString("point_code2"));
|
||||
@@ -114,18 +112,32 @@ public class OutHotTask extends AbstractAcsTask {
|
||||
jo.put("product_area", cut_jo.getString("product_area"));
|
||||
jo.put("task_type", "010302");
|
||||
} else {
|
||||
/*jo.put("point_code1", point_code);
|
||||
jo.put("point_code2", next_point_code);
|
||||
jo.put("point_code1", jsonTask.getString("point_code2"));
|
||||
jo.put("point_code2", cut_jo.getString("full_point_code"));
|
||||
jo.put("point_code3", cut_jo.getString("empty_point_code"));
|
||||
jo.put("point_code4", cool_jo.getString("empty_point_code"));
|
||||
jo.put("vehicle_code", cool_jo.getString("container_name"));
|
||||
jo.put("vehicle_code2", cut_jo.getString("empty_vehicle_code"));
|
||||
// 2.找冷却区空货位
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "2");
|
||||
map.put("product_area", cut_jo.getString("product_area"));
|
||||
map.put("point_location", "0");
|
||||
|
||||
JSONObject jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||
// 如果为空
|
||||
if (ObjectUtil.isEmpty(jsonCooIvt)) {
|
||||
map.put("point_location", "1");
|
||||
jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(jsonCooIvt)) {
|
||||
throw new BadRequestException("冷却区空位不足");
|
||||
}
|
||||
jo.put("point_code4", jsonCooIvt.getString("empty_point_code"));
|
||||
jo.put("vehicle_code", jsonTask.getString("container_name"));
|
||||
jo.put("product_area", cut_jo.getString("product_area"));
|
||||
jo.put("task_type", "010301");*/
|
||||
jo.put("task_type", "010301");
|
||||
}
|
||||
AbstractAcsTask task = new CoolCutTask();
|
||||
task.createTask(jo);
|
||||
}else {
|
||||
} else {
|
||||
JSONObject jsonHotIvt = hotIvtTab.query("point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
|
||||
// 更新主表: 什么时候更新主表
|
||||
@@ -133,9 +145,20 @@ public class OutHotTask extends AbstractAcsTask {
|
||||
|
||||
// 更新暂存区点位状态
|
||||
JSONObject jsonPoint2 = pointTab.query("point_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
||||
jsonPoint2.put("point_status", "2");
|
||||
jsonPoint2.put("material_code", jsonHotIvt.getString("container_name"));
|
||||
pointTab.update(jsonPoint2);
|
||||
if (ObjectUtil.isEmpty(jsonPoint2)) {
|
||||
//查询冷却区点位
|
||||
jsonPoint2 = ivtTab.query("point_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
||||
jsonPoint2.put("full_point_status", "02");
|
||||
jsonPoint2.put("cool_ivt_status", "04");
|
||||
jsonPoint2.put("instorage_time", DateUtil.now());
|
||||
jsonPoint2.put("container_name", jsonHotIvt.getString("container_name"));
|
||||
ivtTab.update(jsonPoint2);
|
||||
} else {
|
||||
jsonPoint2.put("point_status", "2");
|
||||
jsonPoint2.put("material_code", jsonHotIvt.getString("container_name"));
|
||||
pointTab.update(jsonPoint2);
|
||||
}
|
||||
|
||||
|
||||
// 更新烘箱区库存状态
|
||||
jsonHotIvt.put("point_status", "01");
|
||||
@@ -217,7 +240,7 @@ public class OutHotTask extends AbstractAcsTask {
|
||||
String task_type = form.getString("task_type");
|
||||
if (StrUtil.isNotEmpty(task_type)) {
|
||||
json.put("task_type", task_type);
|
||||
}else {
|
||||
} else {
|
||||
json.put("task_type", "010202");
|
||||
}
|
||||
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||
|
||||
Reference in New Issue
Block a user