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
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();
param.put("device_code", entity.get("point_code2"));
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_status, GoodsEnum.OUT_OF_STOCK.getValue())
.set(SchBasePoint::getIs_lock, true));
vehiclematerialgroupMapper.delete(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, entity.get("vehicle_code")));
this.update(Wrappers.lambdaUpdate(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, entity.get("vehicle_code"))
.set(SchBaseVehiclematerialgroup::getIs_delete, true));
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.fab.service.dto.CallMaterVo;
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.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
@ -50,6 +51,8 @@ public class PcOperationCMTask extends AbstractTask {
private ISchBasePointService schBasePointService;
@Autowired
private IMdBaseVehicleService iMdBaseVehicleService;
@Autowired
private ISchBaseVehiclematerialgroupService iSchBaseVehiclematerialgroupService;
@Override
protected void create() throws BadRequestException {
@ -155,6 +158,9 @@ public class PcOperationCMTask extends AbstractTask {
PointUtils.setUpdateByAcs(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.setRemark(GeneralDefinition.TASK_CANCEL);

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

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

Loading…
Cancel
Save