固化室入库规则优化&下发任务type取指令状态
This commit is contained in:
@@ -82,14 +82,11 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
|
||||
int startAddress = deviceService.queryAddressBydeviceCode(inst.getStart_point_code());
|
||||
int nextAddress = 520;
|
||||
if(!inst.getInstruction_type().equals("3")){
|
||||
deviceService.queryAddressBydeviceCode(inst.getNext_point_code());
|
||||
}
|
||||
int nextAddress=deviceService.queryAddressBydeviceCode(inst.getNext_point_code());
|
||||
byte ikeyhigh = (byte) IntToHexHigh(Integer.parseInt(instcode));
|
||||
byte ikeylow = (byte) IntToHexLow(Integer.parseInt(instcode));
|
||||
byte typehigh = (byte) IntToHexHigh(1);
|
||||
byte typelow = (byte) IntToHexLow(1);
|
||||
byte typehigh = (byte) IntToHexHigh(Integer.parseInt(inst.getInstruction_type()));
|
||||
byte typelow = (byte) IntToHexLow(Integer.parseInt(inst.getInstruction_type()));
|
||||
byte qhdhigh = (byte) IntToHexHigh(startAddress);
|
||||
byte qhdlow = (byte) IntToHexLow(startAddress);
|
||||
byte fhdhigh = (byte) IntToHexHigh(nextAddress);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
LEFT JOIN md_base_material m ON v.material_id = m.material_id
|
||||
WHERE
|
||||
p.region_code = 'ZC'
|
||||
ORDER BY p.row_num,p.col_num
|
||||
</select>
|
||||
|
||||
<select id="detail" resultType="org.nl.wms.board.service.dao.dto.Detail">
|
||||
|
||||
@@ -206,9 +206,14 @@ public class TBXMLTask extends AbstractTask {
|
||||
}
|
||||
// 2 没有对应的固化室、没有同工艺号的固化室、没有计划方案对应的固化室,就找新的固化室
|
||||
if (points.size() == 0) {
|
||||
points = tbxMapper.getEmptyPoint(nextRegionStr, vehicle_type);
|
||||
points = tbxMapper.getEmptyPoint(nextRegionStr, vehicle_type, workorder.getMaterial_id());
|
||||
}
|
||||
return points.size() > 0 ? points.get(0) : null;
|
||||
SchBasePoint schBasePoint =points.size() > 0 ? points.get(0) : null;
|
||||
if (schBasePoint != null) {
|
||||
schBasePoint.setCan_material_type(workorder.getMaterial_id());
|
||||
pointService.updateById(schBasePoint);
|
||||
}
|
||||
return schBasePoint;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -483,6 +488,9 @@ public class TBXMLTask extends AbstractTask {
|
||||
PointUtils.setUpdateByAcs(point);
|
||||
point.setIng_task_code(task.getTask_code());
|
||||
pointService.updateById(point);
|
||||
//等待点清空物料
|
||||
ghsInPoint.setCan_material_type("");
|
||||
pointService.updateById(ghsInPoint);
|
||||
// 任务修改点位
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface TBXMapper {
|
||||
* @param vehicleType 载具类型
|
||||
* @return 点位数据
|
||||
*/
|
||||
List<SchBasePoint> getEmptyPoint(List<String> nextRegionStr, String vehicleType);
|
||||
List<SchBasePoint> getEmptyPoint(List<String> nextRegionStr, String vehicleType, String materialId);
|
||||
|
||||
/**
|
||||
* 获取方案内的点位
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
AND (p3.ing_task_code = '' OR p3.ing_task_code IS NULL)
|
||||
WHERE p.point_type = '1'
|
||||
AND p.point_status = '3'
|
||||
AND (p3.can_material_type is null or p3.can_material_type ='' or p3.can_material_type = #{materialId})
|
||||
AND 0 = (
|
||||
SELECT
|
||||
COUNT(*)
|
||||
|
||||
Reference in New Issue
Block a user