Browse Source

opt: 取消任务优化

master
yanps 1 month ago
parent
commit
cacb1f0867
  1. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java
  2. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/PcOperationCMTask.java
  3. 1
      lms/nladmin-ui/src/views/wms/sch/task/index.vue

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java

@ -191,7 +191,7 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
@Override @Override
public Object createTask(JSONObject entity) { public Object createTask(JSONObject entity) {
Assert.noNullElements(new Object[]{entity.get("point_code2"), entity.get("vehicle_code")},"载具号不能为空!"); Assert.noNullElements(new Object[]{entity.get("point_code2"), entity.get("vehicle_code")}, "载具号不能为空!");
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("device_code", entity.get("point_code2")); param.put("device_code", entity.get("point_code2"));
param.put("config_code", "PcOperationCMTask"); param.put("config_code", "PcOperationCMTask");
@ -202,8 +202,9 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
.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::getIs_lock, true)); .set(SchBasePoint::getIs_lock, true));
vehiclematerialgroupMapper.delete(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class) this.update(Wrappers.lambdaUpdate(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, entity.get("vehicle_code"))); .eq(SchBaseVehiclematerialgroup::getVehicle_code, entity.get("vehicle_code"))
.set(SchBaseVehiclematerialgroup::getIs_delete, true));
return null; return null;
} }

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/PcOperationCMTask.java

@ -14,6 +14,7 @@ import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.acs.service.dto.to.BaseResponse; import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
import org.nl.wms.ext.fab.service.dto.CallMaterVo; import org.nl.wms.ext.fab.service.dto.CallMaterVo;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
import org.nl.wms.sch.point.service.ISchBasePointService; import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint; import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task.service.ISchBaseTaskService;
@ -50,6 +51,8 @@ public class PcOperationCMTask extends AbstractTask {
private ISchBasePointService schBasePointService; private ISchBasePointService schBasePointService;
@Autowired @Autowired
private IMdBaseVehicleService iMdBaseVehicleService; private IMdBaseVehicleService iMdBaseVehicleService;
@Autowired
private ISchBaseVehiclematerialgroupService iSchBaseVehiclematerialgroupService;
@Override @Override
protected void create() throws BadRequestException { protected void create() throws BadRequestException {
@ -155,6 +158,9 @@ public class PcOperationCMTask extends AbstractTask {
PointUtils.setUpdateByAcs(schBasePoint); PointUtils.setUpdateByAcs(schBasePoint);
schBasePointService.updateById(schBasePoint); schBasePointService.updateById(schBasePoint);
} }
iSchBaseVehiclematerialgroupService.update(Wrappers.lambdaUpdate(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, taskObj.getVehicle_code())
.set(SchBaseVehiclematerialgroup::getIs_delete, false));
// 获取参数 // 获取参数
taskObj.setTask_status(TaskStatus.CANCELED.getCode()); taskObj.setTask_status(TaskStatus.CANCELED.getCode());
taskObj.setRemark(GeneralDefinition.TASK_CANCEL); taskObj.setRemark(GeneralDefinition.TASK_CANCEL);

1
lms/nladmin-ui/src/views/wms/sch/task/index.vue

@ -225,6 +225,7 @@
<el-button <el-button
type="text" type="text"
icon="el-icon-close" icon="el-icon-close"
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
@click="doOperate(scope.row, 'b')" @click="doOperate(scope.row, 'b')"
>取消</el-button> >取消</el-button>
<el-button <el-button

Loading…
Cancel
Save