add: 现场优化
This commit is contained in:
@@ -487,7 +487,7 @@ public class SlitterPdaServiceImpl implements SlitterPdaService {
|
|||||||
plan.setSplit_group(virtualContainer);
|
plan.setSplit_group(virtualContainer);
|
||||||
plan.setDescription("-");
|
plan.setDescription("-");
|
||||||
plan.setWare_house("-");
|
plan.setWare_house("-");
|
||||||
plan.setResource_name(cutDevice.getExt_code());
|
plan.setResource_name(cutDevice.getPoint_code());
|
||||||
plan.setManufacture_sort("1");
|
plan.setManufacture_sort("1");
|
||||||
plan.setMfg_order_name("-");
|
plan.setMfg_order_name("-");
|
||||||
plan.setManufacture_date(DateUtil.format(new Date(), "yyyy-MM-dd"));
|
plan.setManufacture_date(DateUtil.format(new Date(), "yyyy-MM-dd"));
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class NbjPdaServiceImpl implements NbjPdaService {
|
|||||||
.map(item -> {
|
.map(item -> {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("text", item.getPoint_code());
|
jsonObject.put("text", item.getPoint_code());
|
||||||
jsonObject.put("value", item.getExt_code());
|
jsonObject.put("value", item.getPoint_code());
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toCollection(JSONArray::new));
|
.collect(Collectors.toCollection(JSONArray::new));
|
||||||
|
|||||||
@@ -68,7 +68,10 @@ public interface IstIvtHotpointivtService extends IService<StIvtHotpointivt> {
|
|||||||
* @param used 是否使用
|
* @param used 是否使用
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used);
|
List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used, String status);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查找设备号给ACS
|
* 查找设备号给ACS
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.nl.wms.pdm.ivt.hot.service.dao.mapper;
|
package org.nl.wms.pdm.ivt.hot.service.dao.mapper;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
import org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.nl.wms.quartz.dto.HotDeviceAndEreaDto;
|
import org.nl.wms.quartz.dto.HotDeviceAndEreaDto;
|
||||||
@@ -16,7 +15,7 @@ import java.util.List;
|
|||||||
public interface StIvtHotpointivtMapper extends BaseMapper<StIvtHotpointivt> {
|
public interface StIvtHotpointivtMapper extends BaseMapper<StIvtHotpointivt> {
|
||||||
|
|
||||||
|
|
||||||
List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used);
|
List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used, String status);
|
||||||
|
|
||||||
List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea);
|
List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea);
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<select id="getNotTaskHotOven" resultType="org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt">
|
<select id="getNotTaskHotOven" resultType="org.nl.wms.pdm.ivt.hot.service.dao.StIvtHotpointivt">
|
||||||
SELECT ht.*
|
SELECT ht.*
|
||||||
FROM `st_ivt_hotpointivt` ht
|
FROM `st_ivt_hotpointivt` ht
|
||||||
WHERE ht.point_status = '01'
|
WHERE ht.point_status = #{status}
|
||||||
AND ht.plan = #{rollType}
|
AND ht.plan = #{rollType}
|
||||||
AND ht.is_used = #{used}
|
AND ht.is_used = #{used}
|
||||||
AND 0 = (SELECT COUNT(*)
|
AND 0 = (SELECT COUNT(*)
|
||||||
|
|||||||
@@ -129,10 +129,12 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used) {
|
public List<StIvtHotpointivt> getNotTaskHotOven(String rollType, String used,String status) {
|
||||||
return stIvtHotpointivtMapper.getNotTaskHotOven(rollType, used);
|
return stIvtHotpointivtMapper.getNotTaskHotOven(rollType, used,status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea) {
|
public List<HotDeviceAndEreaDto> getHotDeviceInfoForAcs(String productArea) {
|
||||||
return stIvtHotpointivtMapper.getHotDeviceInfoForAcs(productArea);
|
return stIvtHotpointivtMapper.getHotDeviceInfoForAcs(productArea);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class AutoInHotTrussTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
String bakingTemperature = order.getBaking_temperature();
|
String bakingTemperature = order.getBaking_temperature();
|
||||||
// 如果需要烘烤, 先找对应点
|
// 如果需要烘烤, 先找对应点
|
||||||
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(order.getRoll_type(), "1");
|
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(order.getRoll_type(), "1","01");
|
||||||
if (hotList.size() == 0) {
|
if (hotList.size() == 0) {
|
||||||
log.error("找不到温度为:{} 的可用烘箱位置", bakingTemperature);
|
log.error("找不到温度为:{} 的可用烘箱位置", bakingTemperature);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class InHotTrussTask extends AbstractTask {
|
|||||||
requestObj.put("baking_temperature", bakingTemperature);
|
requestObj.put("baking_temperature", bakingTemperature);
|
||||||
requestObj.put("baking_time", order.getBaking_time());
|
requestObj.put("baking_time", order.getBaking_time());
|
||||||
// 如果需要烘烤, 先找对应点
|
// 如果需要烘烤, 先找对应点
|
||||||
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(order.getRoll_type(), "1");
|
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(order.getRoll_type(), "1","01");
|
||||||
if (hotList.size() > 0) {
|
if (hotList.size() > 0) {
|
||||||
List<StIvtHotpointivt> hotListFilter = multiFilter(hotList);
|
List<StIvtHotpointivt> hotListFilter = multiFilter(hotList);
|
||||||
// 查找合适温度的点位
|
// 查找合适温度的点位
|
||||||
@@ -125,9 +125,9 @@ public class InHotTrussTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
// todo: 需要烘烤,且是小卷,但是没有位置,需要将最快结束的烘箱组锁住
|
// todo: 需要烘烤,且是小卷,但是没有位置,需要将最快结束的烘箱组锁住
|
||||||
} else {
|
} else {
|
||||||
// 如果是去烘箱暂存的,找禁用的烘箱
|
// 如果是去烘箱暂存的,找暂存的烘箱
|
||||||
if (GeneralDefinition.YES.equals(isStorage)) {
|
if (GeneralDefinition.YES.equals(isStorage)) {
|
||||||
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(plan, "0");
|
List<StIvtHotpointivt> hotList = hotpointivtService.getNotTaskHotOven(plan, "1","03");
|
||||||
for (StIvtHotpointivt hotPoint : hotList) {
|
for (StIvtHotpointivt hotPoint : hotList) {
|
||||||
String pointCode = hotPoint.getPoint_code();
|
String pointCode = hotPoint.getPoint_code();
|
||||||
String pointTemperature = (String) redisUtils.hget(pointCode, "temperature");
|
String pointTemperature = (String) redisUtils.hget(pointCode, "temperature");
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class OutHotTrussTask extends AbstractTask {
|
|||||||
// 找一个没开启的烘箱???
|
// 找一个没开启的烘箱???
|
||||||
PdmBiRawfoilworkorder order = rawfoilworkorderService.getById(hotPoint.getWorkorder_id());
|
PdmBiRawfoilworkorder order = rawfoilworkorderService.getById(hotPoint.getWorkorder_id());
|
||||||
List<StIvtHotpointivt> notTaskHotOven = hotpointivtService.getNotTaskHotOven(order.getRoll_type(),
|
List<StIvtHotpointivt> notTaskHotOven = hotpointivtService.getNotTaskHotOven(order.getRoll_type(),
|
||||||
"0");
|
"0","01");
|
||||||
// 没有位置,自然需要报错
|
// 没有位置,自然需要报错
|
||||||
if (notTaskHotOven.size() == 0) {
|
if (notTaskHotOven.size() == 0) {
|
||||||
throw new BadRequestException("烘箱烘烤完毕的暂存位不够!");
|
throw new BadRequestException("烘箱烘烤完毕的暂存位不够!");
|
||||||
|
|||||||
@@ -428,6 +428,6 @@ public class TaskUtils {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String createVirtualSubContainer(String format, String pointCode, int count) {
|
public static String createVirtualSubContainer(String format, String pointCode, int count) {
|
||||||
return "S-" + pointCode + "-" + TaskUtils.getDateTime(format) + "-" + count;
|
return TaskUtils.getDateTime(format) + "-" + count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user