add: 添加取消任务功能
This commit is contained in:
@@ -443,7 +443,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
if (CollectionUtils.isEmpty(list)) {
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.getOne(new QueryWrapper<MdBaseVehicle>().eq("vehicle_code", vehicle_code));
|
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.getOne(new QueryWrapper<MdBaseVehicle>().eq("vehicle_code", vehicle_code));
|
||||||
AbstractTask connectorTask = taskFactory.getTask("FTGTask");
|
AbstractTask connectorTask = taskFactory.getTask("FTGTask");
|
||||||
// 准备参数:设备编码
|
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("device_code", schBaseTask.getPoint_code1());
|
param.put("device_code", schBaseTask.getPoint_code1());
|
||||||
param.put("config_code", "FTGTask");
|
param.put("config_code", "FTGTask");
|
||||||
@@ -458,7 +457,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
json.put("status", status);
|
json.put("status", status);
|
||||||
json.put("device_code", schBaseTask.getPoint_code1());
|
json.put("device_code", schBaseTask.getPoint_code1());
|
||||||
json.put("task_code", schBaseTask.getTask_code());
|
json.put("task_code", schBaseTask.getTask_code());
|
||||||
AcsResponse acsResponse = connectorService.feedAgvTaskStatus(json);
|
//AcsResponse acsResponse = connectorService.feedAgvTaskStatus(json);
|
||||||
}
|
}
|
||||||
if ("2".equals(is_connector)) {
|
if ("2".equals(is_connector)) {
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@@ -627,5 +626,4 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,9 +93,10 @@ public class FabServiceImpl {
|
|||||||
pcOperationCMTask.apply(param);
|
pcOperationCMTask.apply(param);
|
||||||
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.eq(SchBasePoint::getPoint_code, callMaterVo.getDevice_code())
|
.eq(SchBasePoint::getPoint_code, callMaterVo.getDevice_code())
|
||||||
.eq(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
|
||||||
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
|
||||||
.set(SchBasePoint::getIs_lock, true));
|
.set(SchBasePoint::getIs_lock, true));
|
||||||
|
iSchBaseVehiclematerialgroupService.update(Wrappers.lambdaUpdate(SchBaseVehiclematerialgroup.class)
|
||||||
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, callMaterVo.getVehicle_code())
|
||||||
|
.set(SchBaseVehiclematerialgroup::getIs_delete, true));
|
||||||
break;
|
break;
|
||||||
case "cnt":
|
case "cnt":
|
||||||
Assert.noNullElements(new Object[]{form.getString("device_code"), form.getString("vehicle_type")}, "参数不能为空!");
|
Assert.noNullElements(new Object[]{form.getString("device_code"), form.getString("vehicle_type")}, "参数不能为空!");
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import nl.basjes.shaded.org.springframework.util.Assert;
|
import nl.basjes.shaded.org.springframework.util.Assert;
|
||||||
import org.nl.common.enums.GoodsEnum;
|
import org.nl.common.enums.GoodsEnum;
|
||||||
|
import org.nl.common.enums.VehicleEnum;
|
||||||
import org.nl.common.enums.VehicleTypeEnum;
|
import org.nl.common.enums.VehicleTypeEnum;
|
||||||
import org.nl.common.enums.region.RegionEnum;
|
import org.nl.common.enums.region.RegionEnum;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
@@ -106,10 +107,11 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
* @param param
|
* @param param
|
||||||
*/
|
*/
|
||||||
private void applyDeliveryRacks(String vehicle, String device_code, JSONObject param) {
|
private void applyDeliveryRacks(String vehicle, String device_code, JSONObject param) {
|
||||||
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle);
|
|
||||||
if (ObjectUtil.isEmpty(mdBaseVehicle)) throw new BadRequestException("载具不存在!");
|
|
||||||
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
||||||
|
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle);
|
||||||
|
if (ObjectUtil.isEmpty(mdBaseVehicle))
|
||||||
|
throw new BadRequestException("载具不存在或载具号与点位不匹配!");
|
||||||
AbstractTask connectorTask = taskFactory.getTask("RACKTask");
|
AbstractTask connectorTask = taskFactory.getTask("RACKTask");
|
||||||
// 准备参数:设备编码
|
// 准备参数:设备编码
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
@@ -120,6 +122,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
jo.put("vehicle_type", mdBaseVehicle.getVehicle_type());
|
jo.put("vehicle_type", mdBaseVehicle.getVehicle_type());
|
||||||
jo.put("ext_data", param);
|
jo.put("ext_data", param);
|
||||||
connectorTask.apply(jo);
|
connectorTask.apply(jo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -284,6 +287,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
*/
|
*/
|
||||||
private void connectorBlanking(JSONObject param, String region_code, String device_code, String vehicle_code, AbstractTask connectorTask) {
|
private void connectorBlanking(JSONObject param, String region_code, String device_code, String vehicle_code, AbstractTask connectorTask) {
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
param.put("region_code", region_code);
|
||||||
jo.put("device_code", device_code);
|
jo.put("device_code", device_code);
|
||||||
jo.put("config_code", "ProcessingSMTTask");
|
jo.put("config_code", "ProcessingSMTTask");
|
||||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||||
@@ -309,6 +313,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
* @param connectorTask
|
* @param connectorTask
|
||||||
*/
|
*/
|
||||||
private void goShelves(SchBasePoint schBasePoint, JSONObject param, String region_code, String device_code, String vehicle_code, AbstractTask connectorTask) {
|
private void goShelves(SchBasePoint schBasePoint, JSONObject param, String region_code, String device_code, String vehicle_code, AbstractTask connectorTask) {
|
||||||
|
//TODO:是否需要加上是否有无货校验
|
||||||
Assert.noNullElements(param.getJSONArray("material"), "参数不能为空!");
|
Assert.noNullElements(param.getJSONArray("material"), "参数不能为空!");
|
||||||
JSONArray materials = param.getJSONArray("material");
|
JSONArray materials = param.getJSONArray("material");
|
||||||
if (materials.size() < 1) {
|
if (materials.size() < 1) {
|
||||||
@@ -362,9 +367,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
jo.put("ext_data", param);
|
jo.put("ext_data", param);
|
||||||
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.eq(SchBasePoint::getPoint_code, device_code)
|
.eq(SchBasePoint::getPoint_code, device_code)
|
||||||
.set(SchBasePoint::getIs_lock, true)
|
.set(SchBasePoint::getIs_lock, true));
|
||||||
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
|
||||||
.set(SchBasePoint::getVehicle_code, null));
|
|
||||||
connectorTask.apply(jo);
|
connectorTask.apply(jo);
|
||||||
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
||||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code));
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code));
|
||||||
@@ -408,6 +411,9 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
if (materials.size() < 1) {
|
if (materials.size() < 1) {
|
||||||
throw new BadRequestException("物料下料数量不能为空!");
|
throw new BadRequestException("物料下料数量不能为空!");
|
||||||
}
|
}
|
||||||
|
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle_code);
|
||||||
|
if(mdBaseVehicle.getVehicle_type().equals(VehicleTypeEnum.TRAY.getVehicleCode())) throw new BadRequestException("钢托盘不能存放加工区!");
|
||||||
|
param.put("region_code", region_code);
|
||||||
jo.put("device_code", device_code);
|
jo.put("device_code", device_code);
|
||||||
jo.put("config_code", "ProcessingSMTTask");
|
jo.put("config_code", "ProcessingSMTTask");
|
||||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||||
@@ -506,8 +512,7 @@ public class HandheldServiceImpl implements HandheldService {
|
|||||||
connectorTask.apply(jo);
|
connectorTask.apply(jo);
|
||||||
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.eq(SchBasePoint::getPoint_code, device_code)
|
.eq(SchBasePoint::getPoint_code, device_code)
|
||||||
.set(SchBasePoint::getIs_lock, true)
|
.set(SchBasePoint::getIs_lock, true));
|
||||||
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -201,7 +201,6 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
|
|||||||
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.eq(SchBasePoint::getPoint_code, entity.get("point_code2"))
|
.eq(SchBasePoint::getPoint_code, entity.get("point_code2"))
|
||||||
.eq(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
.eq(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
|
||||||
.set(SchBasePoint::getIs_lock, true));
|
.set(SchBasePoint::getIs_lock, true));
|
||||||
vehiclematerialgroupMapper.delete(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
vehiclematerialgroupMapper.delete(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
||||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, entity.get("vehicle_code")));
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, entity.get("vehicle_code")));
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
is_lock = FALSE
|
is_lock = FALSE
|
||||||
AND sch_base_point.vehicle_code IS NOT NULL
|
AND sch_base_point.vehicle_code IS NOT NULL
|
||||||
and sch_base_point.point_status = '2'
|
and sch_base_point.point_status = '2'
|
||||||
|
and sch_base_vehiclematerialgroup.is_delete = false
|
||||||
<if test="vehicle_type != null and vehicle_type != ''">
|
<if test="vehicle_type != null and vehicle_type != ''">
|
||||||
and sch_base_point.can_vehicle_type = #{vehicle_type}
|
and sch_base_point.can_vehicle_type = #{vehicle_type}
|
||||||
</if>
|
</if>
|
||||||
@@ -59,8 +60,9 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectPointByRegion" resultType="com.alibaba.fastjson.JSONObject"
|
<select id="selectPointByRegion" resultType="com.alibaba.fastjson.JSONObject"
|
||||||
parameterType="java.lang.String">
|
parameterType="java.lang.String">
|
||||||
select point_code, point_name,point_status
|
select point_code, point_name, point_status
|
||||||
from sch_base_point
|
from sch_base_point
|
||||||
where region_code = #{regionCode} and point_type is null
|
where region_code = #{regionCode}
|
||||||
|
and point_type is null
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -265,9 +265,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
||||||
SchBasePoint schBasePoint = schBasePoints.get(0);
|
SchBasePoint schBasePoint = schBasePoints.get(0);
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code())
|
pointMapper.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, true));
|
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0);
|
SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0);
|
||||||
@@ -284,9 +283,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq())));
|
schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq())));
|
||||||
SchBasePoint schBasePoint = schBasePoints1.get(0);
|
SchBasePoint schBasePoint = schBasePoints1.get(0);
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code())
|
pointMapper.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, true));
|
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -396,8 +394,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
.eq(SchBasePoint::getIs_lock, false)
|
.eq(SchBasePoint::getIs_lock, false)
|
||||||
.eq(SchBasePoint::getIs_used, true)
|
.eq(SchBasePoint::getIs_used, true)
|
||||||
.eq(SchBasePoint::getPoint_status, pointStatus)
|
.eq(SchBasePoint::getPoint_status, pointStatus)
|
||||||
.eq(!vehicle_type.equals("G01"),SchBasePoint::getPoint_type, "1")
|
.eq(!vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "1")
|
||||||
.eq(vehicle_type.equals("G01"),SchBasePoint::getPoint_type, "0")
|
.eq(vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "0")
|
||||||
.eq(StrUtil.isNotBlank(vehicle_type), SchBasePoint::getCan_vehicle_type, vehicle_type)
|
.eq(StrUtil.isNotBlank(vehicle_type), SchBasePoint::getCan_vehicle_type, vehicle_type)
|
||||||
.isNull(seq == 2, SchBasePoint::getVehicles)
|
.isNull(seq == 2, SchBasePoint::getVehicles)
|
||||||
.isNull(seq == 1, SchBasePoint::getVehicle_code)
|
.isNull(seq == 1, SchBasePoint::getVehicle_code)
|
||||||
@@ -417,7 +415,11 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type)
|
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type)
|
||||||
.isNotNull(SchBasePoint::getVehicle_code));
|
.isNotNull(SchBasePoint::getVehicle_code));
|
||||||
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
||||||
return schBasePoints.get(0);
|
SchBasePoint schBasePoint = schBasePoints.get(0);
|
||||||
|
schBasePoint.setIs_lock(true);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
|
updateById(schBasePoint);
|
||||||
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
|
schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
|
||||||
.eq(SchBasePoint::getIs_lock, false)
|
.eq(SchBasePoint::getIs_lock, false)
|
||||||
@@ -462,6 +464,9 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("该货位不存在!");
|
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("该货位不存在!");
|
||||||
schBasePoint1.setVehicle_code(s);
|
schBasePoint1.setVehicle_code(s);
|
||||||
|
schBasePoint1.setIs_lock(true);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
|
updateById(schBasePoint1);
|
||||||
return schBasePoint1;
|
return schBasePoint1;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -526,7 +531,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
if (jsonObject.get("point_status").equals(GoodsEnum.EMPTY_PALLETS.getValue()) || jsonObject.get("point_status").equals(GoodsEnum.IN_STOCK.getValue())) {
|
if (jsonObject.get("point_status").equals(GoodsEnum.EMPTY_PALLETS.getValue()) || jsonObject.get("point_status").equals(GoodsEnum.IN_STOCK.getValue())) {
|
||||||
jsonObject.put("point_status", "1");
|
jsonObject.put("point_status", "1");
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
jsonObject.put("point_status", "0");
|
jsonObject.put("point_status", "0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -550,9 +555,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
||||||
SchBasePoint schBasePoint = schBasePoints.get(0);
|
SchBasePoint schBasePoint = schBasePoints.get(0);
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code())
|
updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, true));
|
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -612,9 +616,9 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SchBasePoint schBasePoint = schBasePoints.get(0);
|
SchBasePoint schBasePoint = schBasePoints.get(0);
|
||||||
this.update(new UpdateWrapper<SchBasePoint>()
|
schBasePoint.setIs_lock(true);
|
||||||
.set("is_lock", true)
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
.eq("point_code", schBasePoint.getPoint_code()));
|
pointMapper.updateById(schBasePoint);
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,9 +68,7 @@ public class CNTTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = null;
|
SchBasePoint schBasePoint = null;
|
||||||
if (TaskType.CARRY_TASK.getValue().equals(task.getTask_type())) {
|
if (TaskType.CARRY_TASK.getValue().equals(task.getTask_type())) {
|
||||||
schBasePoint = schBasePointService.selectByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_code(), "1");
|
schBasePoint = schBasePointService.selectByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_code(), "1");
|
||||||
}/* else if (TaskType.REASSIGN_TASK.getValue().equals(task.getTask_type())) {
|
}
|
||||||
schBasePoint = schBasePointService.selectByReassign(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_code());
|
|
||||||
}*/
|
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
@@ -89,11 +87,6 @@ public class CNTTask extends AbstractTask {
|
|||||||
task.setAcs_trace_id("4");
|
task.setAcs_trace_id("4");
|
||||||
}
|
}
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +116,18 @@ public class CNTTask extends AbstractTask {
|
|||||||
public void cancel(String task_code) {
|
public void cancel(String task_code) {
|
||||||
//TODO:取消任务的时候将int_task_code的清除
|
//TODO:取消任务的时候将int_task_code的清除
|
||||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||||
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
|
schBasePoint.setIs_lock(false);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
|
schBasePointService.updateById(schBasePoint);
|
||||||
|
}
|
||||||
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
|
schBasePoint1.setIs_lock(false);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
|
schBasePointService.updateById(schBasePoint1);
|
||||||
|
}
|
||||||
if (ObjectUtil.isEmpty(taskObj)) {
|
if (ObjectUtil.isEmpty(taskObj)) {
|
||||||
throw new BadRequestException("该任务不存在");
|
throw new BadRequestException("该任务不存在");
|
||||||
}
|
}
|
||||||
@@ -140,16 +145,18 @@ public class CNTTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePoint.setIs_lock(false);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String endPoint = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(endPoint);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
schBasePoint2.setIs_lock(false);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
schBasePoint2.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
schBasePoint2.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint2);
|
||||||
|
schBasePointService.updateById(schBasePoint2);
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -160,22 +167,6 @@ public class CNTTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
|
||||||
String startPoint = taskObj.getPoint_code1();
|
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
|
||||||
// 起点清空
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class FTGTask extends AbstractTask {
|
|||||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
// 查找空载具点位
|
// 查找空载具点位
|
||||||
SchBasePoint schBasePoint = schBasePointService.selectEmpVehicleByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(),task.getVehicle_type());
|
SchBasePoint schBasePoint = schBasePointService.selectEmpVehicleByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_type());
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
@@ -78,13 +78,9 @@ public class FTGTask extends AbstractTask {
|
|||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
schBasePoint.setIs_lock(true);
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.OUT_OF_STOCK.getValue());
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Integer getNumericSuffix(String filename) {
|
private static Integer getNumericSuffix(String filename) {
|
||||||
// 提取数字后缀
|
// 提取数字后缀
|
||||||
String suffix = filename.replaceAll(".*?(\\d+)$", "$1");
|
String suffix = filename.replaceAll(".*?(\\d+)$", "$1");
|
||||||
@@ -126,17 +122,18 @@ public class FTGTask extends AbstractTask {
|
|||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
String startPoint = taskObj.getPoint_code1();
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code, null));
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String endPoint = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(endPoint);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
.eq(SchBasePoint::getPoint_code, endPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -148,20 +145,19 @@ public class FTGTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
String startPoint = taskObj.getPoint_code1();
|
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
|
||||||
// 起点清空
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePoint.setIs_lock(false);
|
||||||
pointService.updateById(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint1.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
}
|
}
|
||||||
|
// 获取参数
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
|
|||||||
@@ -80,13 +80,6 @@ public class AtTask extends AbstractTask {
|
|||||||
.set("task_status", TaskStatus.CREATED.getCode())
|
.set("task_status", TaskStatus.CREATED.getCode())
|
||||||
.set("point_code2", schBasePoint.getPoint_code())
|
.set("point_code2", schBasePoint.getPoint_code())
|
||||||
.eq("task_id", task.getTask_id()));
|
.eq("task_id", task.getTask_id()));
|
||||||
|
|
||||||
//更新点位信息
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setIs_lock(true);
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.EMPTY_PALLETS.getValue());
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,18 +119,20 @@ public class AtTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
.set(SchBasePoint::getVehicle_code, null));
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code()));
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue()));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -149,18 +144,17 @@ public class AtTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
|
||||||
// 起点清空
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePoint.setIs_lock(false);
|
||||||
pointService.updateById(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint1.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -89,9 +89,6 @@ public class BlankingTask extends AbstractTask {
|
|||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
|
|
||||||
schBasePoint.setVehicle_code(task.getVehicle_code());
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint);
|
pointService.updateById(schBasePoint);
|
||||||
@@ -135,14 +132,20 @@ public class BlankingTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -155,20 +158,17 @@ public class BlankingTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
schBasePointService.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -80,10 +80,6 @@ public class CallEmptyTask extends AbstractTask {
|
|||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
|
|
||||||
schBasePoint.setVehicle_code(task.getVehicle_code());
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.EMPTY_PALLETS.getValue());
|
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint);
|
pointService.updateById(schBasePoint);
|
||||||
@@ -127,14 +123,20 @@ public class CallEmptyTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -147,20 +149,17 @@ public class CallEmptyTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
schBasePointService.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -142,6 +142,22 @@ public class EmptyCageTask extends AbstractTask {
|
|||||||
public void cancel(String task_code) {
|
public void cancel(String task_code) {
|
||||||
//TODO:取消任务的时候将int_task_code的清除
|
//TODO:取消任务的时候将int_task_code的清除
|
||||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||||
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
|
schBasePoint1.setVehicle_code(null);
|
||||||
|
schBasePoint1.setPoint_status(GoodsEnum.OUT_OF_STOCK.getValue());
|
||||||
|
schBasePoint1.setIs_lock(false);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
|
schBasePointService.updateById(schBasePoint1);
|
||||||
|
}
|
||||||
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
|
schBasePoint.setVehicle_code(taskObj.getVehicle_code());
|
||||||
|
schBasePoint.setPoint_status(GoodsEnum.EMPTY_PALLETS.getValue());
|
||||||
|
schBasePoint.setIs_lock(false);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
|
schBasePointService.updateById(schBasePoint);
|
||||||
|
}
|
||||||
if (ObjectUtil.isEmpty(taskObj)) {
|
if (ObjectUtil.isEmpty(taskObj)) {
|
||||||
throw new BadRequestException("该任务不存在");
|
throw new BadRequestException("该任务不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class MtTask extends AbstractTask {
|
|||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
String vehicle_type = task.getVehicle_type();
|
String vehicle_type = task.getVehicle_type();
|
||||||
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.NBJG.getRegion_code(),
|
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.NBJG.getRegion_code(),
|
||||||
GoodsEnum.OUT_OF_STOCK.getValue(),null, 2);
|
GoodsEnum.OUT_OF_STOCK.getValue(), null, 2);
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
@@ -75,9 +75,6 @@ public class MtTask extends AbstractTask {
|
|||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
|
|
||||||
schBasePoint.setVehicles(task.getVehicle_code());
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint);
|
pointService.updateById(schBasePoint);
|
||||||
@@ -121,14 +118,20 @@ public class MtTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -141,20 +144,17 @@ public class MtTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
schBasePointService.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -64,11 +64,11 @@ public class RackTask extends AbstractTask {
|
|||||||
|
|
||||||
String vehicle_type = task.getVehicle_type();
|
String vehicle_type = task.getVehicle_type();
|
||||||
String regionCode = RegionEnum.ZDZWQ.getRegion_code();
|
String regionCode = RegionEnum.ZDZWQ.getRegion_code();
|
||||||
if(StrUtil.isNotBlank(vehicle_type) && VehicleTypeEnum.TRAY.getVehicleCode().equals(vehicle_type)){
|
if (StrUtil.isNotBlank(vehicle_type) && VehicleTypeEnum.TRAY.getVehicleCode().equals(vehicle_type)) {
|
||||||
regionCode = RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code();
|
regionCode = RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code();
|
||||||
}
|
}
|
||||||
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(regionCode,
|
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(regionCode,
|
||||||
GoodsEnum.OUT_OF_STOCK.getValue(),vehicle_type, 1);
|
GoodsEnum.OUT_OF_STOCK.getValue(), vehicle_type, 1);
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
@@ -86,8 +86,6 @@ public class RackTask extends AbstractTask {
|
|||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
|
|
||||||
schBasePoint.setVehicles(task.getVehicle_code());
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.EMPTY_PALLETS.getValue());
|
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint);
|
pointService.updateById(schBasePoint);
|
||||||
@@ -131,14 +129,20 @@ public class RackTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -151,20 +155,17 @@ public class RackTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
schBasePointService.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class ToStoreHouseTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = null;
|
SchBasePoint schBasePoint = null;
|
||||||
if (task.getVehicle_type().equals(VehicleTypeEnum.FRAME_R02.getVehicleCode()) || task.getVehicle_type().equals(VehicleTypeEnum.FRAME_R01.getVehicleCode())) {
|
if (task.getVehicle_type().equals(VehicleTypeEnum.FRAME_R02.getVehicleCode()) || task.getVehicle_type().equals(VehicleTypeEnum.FRAME_R01.getVehicleCode())) {
|
||||||
schBasePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
schBasePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
||||||
task.getVehicle_type(),GoodsEnum.EMPTY_PALLETS.getValue(),true,task);
|
task.getVehicle_type(), GoodsEnum.EMPTY_PALLETS.getValue(), true, task);
|
||||||
} else {
|
} else {
|
||||||
schBasePoint = schBasePointService.selectByVehicleQty(task.getVehicle_type());
|
schBasePoint = schBasePointService.selectByVehicleQty(task.getVehicle_type());
|
||||||
}
|
}
|
||||||
@@ -79,14 +79,6 @@ public class ToStoreHouseTask extends AbstractTask {
|
|||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
|
|
||||||
/*schBasePoint.setVehicle_code(task.getVehicle_code());
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());*/
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.OUT_OF_STOCK.getValue());
|
|
||||||
schBasePoint.setIs_lock(true);
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,17 +119,21 @@ public class ToStoreHouseTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
.set(SchBasePoint::getVehicle_code,null));
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
.set(SchBasePoint::getVehicle_code,taskObj.getVehicle_code()));
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code()));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -149,20 +145,17 @@ public class ToStoreHouseTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
schBasePointService.updateById(schBasePoint);
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -78,9 +78,7 @@ public class PcOperationCMTask extends AbstractTask {
|
|||||||
.set("remark", null)
|
.set("remark", null)
|
||||||
.eq("task_id", task.getTask_id()));
|
.eq("task_id", task.getTask_id()));
|
||||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
pointService.update(new UpdateWrapper<SchBasePoint>()
|
||||||
.set("ing_task_code", task.getTask_code())
|
|
||||||
.set("is_lock", true)
|
.set("is_lock", true)
|
||||||
.set("point_status", GoodsEnum.OUT_OF_STOCK.getValue())
|
|
||||||
.eq("point_code", structPoint.getPoint_code()));
|
.eq("point_code", structPoint.getPoint_code()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,14 +119,15 @@ public class PcOperationCMTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code, null));
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.eq(SchBasePoint::getPoint_code, point_code2)
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
@@ -144,20 +143,19 @@ public class PcOperationCMTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
String startPoint = taskObj.getPoint_code1();
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
schBasePoint1.setIs_lock(false);
|
||||||
// 起点清空
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
|
schBasePointService.updateById(schBasePoint1);
|
||||||
|
}
|
||||||
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePoint.setIs_lock(false);
|
||||||
pointService.updateById(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
}
|
schBasePointService.updateById(schBasePoint);
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
|
||||||
pointService.updateById(schBasePoint2);
|
|
||||||
}
|
}
|
||||||
|
// 获取参数
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ public class PcOperationCNTask extends AbstractTask {
|
|||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
// 找起点
|
// 找起点
|
||||||
CallEmpVo callMaterVo = JSONObject.parseObject(task.getRequest_param(), CallEmpVo.class);
|
CallEmpVo callMaterVo = JSONObject.parseObject(task.getRequest_param(), CallEmpVo.class);
|
||||||
|
|
||||||
SchBasePoint basePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
SchBasePoint basePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
||||||
callMaterVo.getVehicle_type(),GoodsEnum.EMPTY_PALLETS.getValue(),false,task);
|
callMaterVo.getVehicle_type(),GoodsEnum.EMPTY_PALLETS.getValue(),false,task);
|
||||||
if (basePoint==null){
|
if (basePoint==null){
|
||||||
@@ -72,12 +71,8 @@ public class PcOperationCNTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||||
.set("task_status",TaskStatus.CREATED.getCode())
|
.set("task_status",TaskStatus.CREATED.getCode())
|
||||||
.set("point_code1",basePoint.getPoint_code()).eq("task_id",task.getTask_id()));
|
.set("point_code1",basePoint.getPoint_code())
|
||||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
.eq("task_id",task.getTask_id()));
|
||||||
.set("ing_task_code",task.getTask_code())
|
|
||||||
.set("is_lock",true)
|
|
||||||
.set("point_status", GoodsEnum.OUT_OF_STOCK.getValue())
|
|
||||||
.eq("point_code",basePoint.getPoint_code()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,15 +112,20 @@ public class PcOperationCNTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code,null));
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getVehicle_code,null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code,taskObj.getVehicle_code())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -137,20 +137,19 @@ public class PcOperationCNTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
String startPoint = taskObj.getPoint_code1();
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
schBasePoint1.setIs_lock(false);
|
||||||
// 起点清空
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
|
schBasePointService.updateById(schBasePoint1);
|
||||||
|
}
|
||||||
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePoint.setIs_lock(false);
|
||||||
pointService.updateById(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
}
|
schBasePointService.updateById(schBasePoint);
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
|
||||||
pointService.updateById(schBasePoint2);
|
|
||||||
}
|
}
|
||||||
|
// 获取参数
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
|
|||||||
@@ -122,13 +122,6 @@ public class PcOperationSMTTask extends AbstractTask {
|
|||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
//更新点位
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setIs_lock(true);
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,14 +162,20 @@ public class PcOperationSMTTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -189,18 +188,17 @@ public class PcOperationSMTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class PcOperationSNTTask extends AbstractTask {
|
|||||||
SendVehicleVo sendVehicleVo = JSONObject.parseObject(task.getRequest_param(), SendVehicleVo.class);
|
SendVehicleVo sendVehicleVo = JSONObject.parseObject(task.getRequest_param(), SendVehicleVo.class);
|
||||||
//查询地面点位的载具编码
|
//查询地面点位的载具编码
|
||||||
// 根据对接位查找对应的载具类型
|
// 根据对接位查找对应的载具类型
|
||||||
SchBasePoint schBasePoint = schBasePointService.selectByRegionCode(sendVehicleVo.getRegion_code(),task.getVehicle_code(),"0");
|
SchBasePoint schBasePoint = schBasePointService.selectByRegionCode(sendVehicleVo.getRegion_code(), task.getVehicle_code(), "0");
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
@@ -79,18 +79,11 @@ public class PcOperationSNTTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
//删除组盘信息
|
//删除组盘信息
|
||||||
schBaseVehiclematerialgroupService.remove(new QueryWrapper<SchBaseVehiclematerialgroup>()
|
schBaseVehiclematerialgroupService.remove(new QueryWrapper<SchBaseVehiclematerialgroup>()
|
||||||
.eq("vehicle_code",schBasePoint.getVehicle_code()));
|
.eq("vehicle_code", schBasePoint.getVehicle_code()));
|
||||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||||
.set("task_status",TaskStatus.CREATED.getCode())
|
.set("task_status", TaskStatus.CREATED.getCode())
|
||||||
.set("point_code2",schBasePoint.getPoint_code())
|
.set("point_code2", schBasePoint.getPoint_code())
|
||||||
.eq("task_id",task.getTask_id()));
|
.eq("task_id", task.getTask_id()));
|
||||||
|
|
||||||
//更新点位信息
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setIs_lock(true);
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.EMPTY_PALLETS.getValue());
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,17 +124,21 @@ public class PcOperationSNTTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
.set(SchBasePoint::getVehicle_code,null));
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
.set(SchBasePoint::getIs_lock, false)
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
.set(SchBasePoint::getVehicle_code,taskObj.getVehicle_code()));
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code()));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -153,18 +150,17 @@ public class PcOperationSNTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -92,9 +92,6 @@ public class ProcessingSMTTask extends AbstractTask {
|
|||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
//更新点位
|
//更新点位
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
|
||||||
schBasePoint.setVehicle_code(task.getVehicle_code());
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setIs_lock(true);
|
schBasePoint.setIs_lock(true);
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint);
|
pointService.updateById(schBasePoint);
|
||||||
@@ -138,14 +135,20 @@ public class ProcessingSMTTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -158,18 +161,17 @@ public class ProcessingSMTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ public class SortingCMTTask extends AbstractTask {
|
|||||||
//载具托盘号
|
//载具托盘号
|
||||||
String vehicle_code = jsonObject.getString("vehicle_code");
|
String vehicle_code = jsonObject.getString("vehicle_code");
|
||||||
MdBaseVehicle vehicle_code1 = iMdBaseVehicleService.getOne(new QueryWrapper<MdBaseVehicle>().eq("vehicle_code", vehicle_code));
|
MdBaseVehicle vehicle_code1 = iMdBaseVehicleService.getOne(new QueryWrapper<MdBaseVehicle>().eq("vehicle_code", vehicle_code));
|
||||||
if(ObjectUtil.isEmpty(vehicle_code1)) throw new BadRequestException("载具不存在");
|
if (ObjectUtil.isEmpty(vehicle_code1)) throw new BadRequestException("载具不存在");
|
||||||
SchBasePoint structPoint = schBasePointService.getOne(new QueryWrapper<SchBasePoint>()
|
SchBasePoint structPoint = schBasePointService.getOne(new QueryWrapper<SchBasePoint>()
|
||||||
.eq("vehicle_code", vehicle_code)
|
.eq("vehicle_code", vehicle_code)
|
||||||
.eq("point_status","2")
|
.eq("point_status", "2")
|
||||||
.eq("is_lock",false));
|
.eq("is_lock", false));
|
||||||
if (ObjectUtil.isEmpty(structPoint)) {
|
if (ObjectUtil.isEmpty(structPoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
@@ -94,14 +94,13 @@ public class SortingCMTTask extends AbstractTask {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||||
.set("task_status",TaskStatus.CREATED.getCode())
|
.set("task_status", TaskStatus.CREATED.getCode())
|
||||||
.set("point_code1",structPoint.getPoint_code())
|
.set("point_code1", structPoint.getPoint_code())
|
||||||
.eq("task_id",task.getTask_id()));
|
.set("remark", null)
|
||||||
|
.eq("task_id", task.getTask_id()));
|
||||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
pointService.update(new UpdateWrapper<SchBasePoint>()
|
||||||
.set("ing_task_code",task.getTask_code())
|
.set("is_lock", true)
|
||||||
.set("is_lock",true)
|
.eq("point_code", structPoint.getPoint_code()));
|
||||||
.set("point_status", GoodsEnum.OUT_OF_STOCK.getValue())
|
|
||||||
.eq("point_code",structPoint.getPoint_code()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,15 +140,17 @@ public class SortingCMTTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code,null));
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String endPoint = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(endPoint);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
.eq(SchBasePoint::getPoint_code, endPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -162,18 +163,17 @@ public class SortingCMTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -60,19 +60,17 @@ public class SortingCNTTask extends AbstractTask {
|
|||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
// 找起点
|
// 找起点
|
||||||
SchBasePoint basePoint = schBasePointService.selectEmpVehicleByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_type());
|
SchBasePoint basePoint = schBasePointService.selectEmpVehicleByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_type());
|
||||||
if (basePoint==null){
|
if (basePoint == null) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||||
.set("task_status",TaskStatus.CREATED.getCode())
|
.set("task_status", TaskStatus.CREATED.getCode())
|
||||||
.set("point_code1",basePoint.getPoint_code()).eq("task_id",task.getTask_id()));
|
.set("point_code1", basePoint.getPoint_code())
|
||||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
.set("vehicle_code", basePoint.getVehicle_code())
|
||||||
.set("ing_task_code",task.getTask_code())
|
.set("remark", null)
|
||||||
.set("is_lock",true)
|
.eq("task_id", task.getTask_id()));
|
||||||
.set("point_status", GoodsEnum.OUT_OF_STOCK.getValue())
|
|
||||||
.eq("point_code",basePoint.getPoint_code()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,14 +111,18 @@ public class SortingCNTTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code,null));
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
|
.set(SchBasePoint::getVehicle_code, null));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String endPoint = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(endPoint);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, endPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -133,18 +135,17 @@ public class SortingCNTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -72,8 +72,6 @@ public class SortingSMTTask extends AbstractTask {
|
|||||||
// 获取任务
|
// 获取任务
|
||||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||||
// 配置信息
|
// 配置信息
|
||||||
/*SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
|
|
||||||
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));*/
|
|
||||||
tasks = tasks.stream().sorted(Comparator.comparing(SchBaseTask::getAcs_trace_id, Comparator.nullsLast(Comparator.naturalOrder())).reversed()).collect(Collectors.toList());
|
tasks = tasks.stream().sorted(Comparator.comparing(SchBaseTask::getAcs_trace_id, Comparator.nullsLast(Comparator.naturalOrder())).reversed()).collect(Collectors.toList());
|
||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
TaskUtils.setUpdateByAcs(task);
|
TaskUtils.setUpdateByAcs(task);
|
||||||
@@ -132,12 +130,6 @@ public class SortingSMTTask extends AbstractTask {
|
|||||||
task.setRemark("");
|
task.setRemark("");
|
||||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
|
|
||||||
//更新点位
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,16 +192,19 @@ public class SortingSMTTask extends AbstractTask {
|
|||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -221,18 +216,17 @@ public class SortingSMTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ public class SortingSNTTask extends AbstractTask {
|
|||||||
String requestParam = task.getRequest_param();
|
String requestParam = task.getRequest_param();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(requestParam);
|
JSONObject jsonObject = JSONObject.parseObject(requestParam);
|
||||||
// 根据对接位查找对应的载具类型
|
// 根据对接位查找对应的载具类型
|
||||||
SchBasePoint schBasePoint = schBasePointService.selectByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(),task.getVehicle_code(),"0");
|
SchBasePoint schBasePoint = schBasePointService.selectByRegionCode(RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code(), task.getVehicle_code(), "0");
|
||||||
if(ObjectUtil.isEmpty(schBasePoint)) continue;
|
if (ObjectUtil.isEmpty(schBasePoint)) continue;
|
||||||
jsonObject.put("vehicle_type", schBasePoint.getCan_vehicle_type());
|
jsonObject.put("vehicle_type", schBasePoint.getCan_vehicle_type());
|
||||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
@@ -82,17 +82,11 @@ public class SortingSNTTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
//删除组盘信息
|
//删除组盘信息
|
||||||
schBaseVehiclematerialgroupService.remove(new QueryWrapper<SchBaseVehiclematerialgroup>()
|
schBaseVehiclematerialgroupService.remove(new QueryWrapper<SchBaseVehiclematerialgroup>()
|
||||||
.eq("vehicle_code",schBasePoint.getVehicle_code()));
|
.eq("vehicle_code", schBasePoint.getVehicle_code()));
|
||||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||||
.set("task_status",TaskStatus.CREATED.getCode())
|
.set("task_status", TaskStatus.CREATED.getCode())
|
||||||
.set("point_code2",schBasePoint.getPoint_code())
|
.set("point_code2", schBasePoint.getPoint_code())
|
||||||
.eq("task_id",task.getTask_id()));
|
.eq("task_id", task.getTask_id()));
|
||||||
|
|
||||||
//更新点位信息
|
|
||||||
schBasePoint.setIng_task_code(task.getTask_code());
|
|
||||||
schBasePoint.setPoint_status(GoodsEnum.EMPTY_PALLETS.getValue());
|
|
||||||
PointUtils.setUpdateByAcs(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,14 +127,18 @@ public class SortingSNTTask extends AbstractTask {
|
|||||||
// 起点清空
|
// 起点清空
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
PointUtils.updateByIngTaskCode(schBasePoint);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, startPoint)
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
String point_code2 = taskObj.getPoint_code2();
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
|
.eq(SchBasePoint::getPoint_code, point_code2)
|
||||||
|
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
|
||||||
|
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
.set(SchBasePoint::getIs_lock, false));
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
@@ -153,18 +151,17 @@ public class SortingSNTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code2());
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
// 起点清空
|
schBasePoint1.setIs_lock(false);
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
schBasePointService.updateById(schBasePoint1);
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
}
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
schBasePoint.setIs_lock(false);
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
PointUtils.setUpdateByAcs(schBasePoint);
|
||||||
pointService.updateById(schBasePoint2);
|
schBasePointService.updateById(schBasePoint);
|
||||||
}
|
}
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ public class SortingTwoCNTTask extends AbstractTask {
|
|||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
// 找起点
|
// 找起点
|
||||||
SchBasePoint basePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
SchBasePoint basePoint = schBasePointService.selectByEmptyCage(RegionEnum.DDLK.getRegion_code(),
|
||||||
VehicleTypeEnum.FRAME_R02.getVehicleCode(),GoodsEnum.EMPTY_PALLETS.getValue(),true,task);
|
VehicleTypeEnum.FRAME_R02.getVehicleCode(), GoodsEnum.EMPTY_PALLETS.getValue(), true, task);
|
||||||
if (basePoint==null){
|
if (basePoint == null) {
|
||||||
task.setRemark("未找到所需点位!");
|
task.setRemark("未找到所需点位!");
|
||||||
taskService.updateById(task);
|
taskService.updateById(task);
|
||||||
continue;
|
continue;
|
||||||
@@ -75,14 +75,10 @@ public class SortingTwoCNTTask extends AbstractTask {
|
|||||||
task.setVehicle_code(basePoint.getVehicle_code());
|
task.setVehicle_code(basePoint.getVehicle_code());
|
||||||
task.setRemark(" ");
|
task.setRemark(" ");
|
||||||
taskService.update(task);
|
taskService.update(task);
|
||||||
schBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
|
||||||
.eq(SchBasePoint::getPoint_code,basePoint.getPoint_code())
|
|
||||||
.set(SchBasePoint::getIs_lock,true)
|
|
||||||
.set(SchBasePoint::getPoint_status,GoodsEnum.OUT_OF_STOCK.getValue()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Long getTime(String dateString){
|
private Long getTime(String dateString) {
|
||||||
String pattern = "yyyy-MM-dd HH:mm:ss";
|
String pattern = "yyyy-MM-dd HH:mm:ss";
|
||||||
java.util.Date date = DateUtil.parse(dateString, pattern);
|
java.util.Date date = DateUtil.parse(dateString, pattern);
|
||||||
long timestamp = date.getTime();
|
long timestamp = date.getTime();
|
||||||
@@ -136,20 +132,15 @@ public class SortingTwoCNTTask extends AbstractTask {
|
|||||||
|
|
||||||
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
String point_code1 = taskObj.getPoint_code1();
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
SchBasePoint schBasePoint1 = pointService.selectByPointCode(point_code1);
|
||||||
// 起点清空
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
schBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
.eq(SchBasePoint::getPoint_code, point_code1)
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, startPoint)
|
.set(SchBasePoint::getVehicle_code, null)
|
||||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code,null));
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
|
||||||
}
|
.set(SchBasePoint::getIs_lock, false)
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
.set(SchBasePoint::getUpdate_time, DateUtil.now()));
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
|
||||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
|
||||||
.set(SchBasePoint::getIs_lock, false));
|
|
||||||
}
|
}
|
||||||
// 任务完成
|
// 任务完成
|
||||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||||
@@ -160,20 +151,13 @@ public class SortingTwoCNTTask extends AbstractTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
|
||||||
|
SchBasePoint schBasePoint1 = schBasePointService.selectByPointCode(taskObj.getPoint_code1());
|
||||||
|
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||||
|
schBasePoint1.setIs_lock(false);
|
||||||
|
PointUtils.setUpdateByAcs(schBasePoint1);
|
||||||
|
schBasePointService.updateById(schBasePoint1);
|
||||||
|
}
|
||||||
// 获取参数
|
// 获取参数
|
||||||
String startPoint = taskObj.getPoint_code1();
|
|
||||||
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
|
|
||||||
// 起点清空
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint);
|
|
||||||
pointService.updateById(schBasePoint);
|
|
||||||
}
|
|
||||||
String point_code2 = taskObj.getPoint_code2();
|
|
||||||
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
|
|
||||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
|
||||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
|
||||||
pointService.updateById(schBasePoint2);
|
|
||||||
}
|
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
taskObj.setRemark(GeneralDefinition.TASK_CANCEL);
|
||||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||||
|
|||||||
Reference in New Issue
Block a user