Merge branch 'master' of http://47.111.78.178:8012/liuxy/HuaDongYiYaoWMS
This commit is contained in:
@@ -43,6 +43,12 @@ public class PdaCommonController {
|
||||
public ResponseEntity<Object> getSectList(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaCommonService.getSectList(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/inEmptyVehicle")
|
||||
@Log("空载具入库-呼叫入库")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> inEmptyVehicle(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaCommonService.inEmptyVehicle(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/confirmBagAssembly")
|
||||
@Log("物料组袋-确认组袋")
|
||||
@SaIgnore
|
||||
@@ -56,7 +62,7 @@ public class PdaCommonController {
|
||||
return new ResponseEntity<>(pdaCommonService.getBagAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/confirmPalletAssembly")
|
||||
@Log("物料组盘-获取组袋信息")
|
||||
@Log("物料组盘-组盘")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmPalletAssembly(@RequestBody @Valid AssemblyPalletParam param) {
|
||||
return new ResponseEntity<>(pdaCommonService.confirmPalletAssembly(param), HttpStatus.OK);
|
||||
|
||||
@@ -6,7 +6,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pda.general_management.service.PdaPreTreatmentService;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyPalletParam;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -15,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 预处理功能
|
||||
|
||||
@@ -34,4 +34,11 @@ public interface PdaCommonService {
|
||||
* @return
|
||||
*/
|
||||
PdaResponse confirmPalletAssembly(AssemblyPalletParam param);
|
||||
|
||||
/**
|
||||
* 空托盘入库
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
PdaResponse inEmptyVehicle(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.util.tasks.EmpVehicleOutTask;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_management.service.VehicleInService;
|
||||
import org.nl.wms.warehouse_management.service.VehicleOutService;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.redisson.api.RLock;
|
||||
@@ -44,6 +45,8 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
@Resource
|
||||
private VehicleOutService vehicleOutService;
|
||||
@Resource
|
||||
private VehicleInService vehicleInService;
|
||||
@Resource
|
||||
private IStructattrService iStructattrService;
|
||||
@Resource
|
||||
private ISchBaseTaskService taskService;
|
||||
@@ -156,7 +159,7 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
|
||||
@Override
|
||||
public PdaResponse confirmPalletAssembly(AssemblyPalletParam param) {
|
||||
storagevehicleinfoService.getByCode(param.getVehicle_code());
|
||||
// storagevehicleinfoService.getByCode(param.getVehicle_code());
|
||||
List<GroupPlate> groupPlates = param.getGroup_plates();
|
||||
for (GroupPlate groupPlate : groupPlates) {
|
||||
groupPlate.setVehicle_code(param.getVehicle_code());
|
||||
@@ -165,4 +168,11 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
groupplateService.updateBatchById(groupPlates);
|
||||
return PdaResponse.requestOk("组盘成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse inEmptyVehicle(JSONObject param) {
|
||||
log.info("手持请求空托盘入库:{}", param);
|
||||
vehicleInService.create(param);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -11,12 +12,17 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.basedata_manage.service.ISectattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
||||
import org.nl.wms.pda.general_management.service.PdaCommonService;
|
||||
import org.nl.wms.pda.general_management.service.PdaPreTreatmentService;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyPalletParam;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_management.service.IRawAssistIStorService;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDtl;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||
@@ -25,10 +31,12 @@ import org.nl.wms.warehouse_management.service.dto.IOStorInvDisDto;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
@@ -51,21 +59,21 @@ public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
private IOStorInvDtlMapper ioStorInvDtlMapper;
|
||||
@Resource
|
||||
private RedissonClient redissonClient;
|
||||
@Resource
|
||||
private PdaCommonService pdaCommonService;
|
||||
@Resource
|
||||
private ISchBaseTaskService taskService;
|
||||
@Override
|
||||
public PdaResponse getPalletAssembly(JSONObject param) {
|
||||
String search = param.getString("search");
|
||||
if (ObjectUtil.isEmpty(search)) {
|
||||
throw new BadRequestException("请输入点位编码或者托盘编码!");
|
||||
}
|
||||
SchBasePoint point = pointService.getByPointCode(search, false);
|
||||
if (ObjectUtil.isNotEmpty(point)) {
|
||||
search = point.getVehicle_code();
|
||||
}
|
||||
if (ObjectUtil.isEmpty(search)) {
|
||||
throw new BadRequestException("输入内容有误或者点位未绑定托盘号,请检查!");
|
||||
throw new BadRequestException("请输入袋号编码!");
|
||||
}
|
||||
List<JSONObject> groups = groupplateService.getPalletView(search);
|
||||
return PdaResponse.requestParamOk(groups);
|
||||
if (groups.size() != 1) {
|
||||
throw new BadRequestException(groups.size() == 0 ? "组袋记录不存在,请先组袋!" : "组袋记录信息有误,请查询并清理后重试!");
|
||||
}
|
||||
return PdaResponse.requestParamOk(groups.get(0));
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@@ -85,12 +93,24 @@ public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
if (ObjectUtil.isEmpty(startPoint)) {
|
||||
throw new BadRequestException("输入的点位不存在或者点位已被禁用, 请检查输入点位是否正确或是否被禁用!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(startPoint.getVehicle_code())) {
|
||||
throw new BadRequestException("点位载具号为空!");
|
||||
}
|
||||
Sectattr sectattr = sectattrService.findByCode("WYL01", true);
|
||||
if (ObjectUtil.isEmpty(sectattr)) {
|
||||
throw new BadRequestException("库区【物料室原料区】不存在或者被禁用!");
|
||||
}
|
||||
// 判断任务是否创建
|
||||
List<SchBaseTask> tasks = taskService.getTaskByQuery(new LambdaQueryWrapper<SchBaseTask>()
|
||||
.eq(SchBaseTask::getPoint_code1, search));
|
||||
if (tasks.size() > 0) {
|
||||
throw new BadRequestException("该点位已创建过任务!");
|
||||
}
|
||||
// 0 组盘
|
||||
doGroupPallat(param, startPoint);
|
||||
|
||||
// 1 创建入库单、明细、分配明细
|
||||
Map<String, Object> invObj = doBuildInvObj(param.getJSONArray("rows"));
|
||||
Map<String, Object> invObj = doBuildInvObj(param, startPoint);
|
||||
String invId = rawAssistIStorService.insertDtl(invObj);
|
||||
// 2 调用分配 (WYL01)
|
||||
Map<String, Object> divObj = buildDivStructData(sectattr, invId);
|
||||
@@ -109,17 +129,33 @@ public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
private void doGroupPallat(JSONObject param, SchBasePoint startPoint) {
|
||||
JSONArray rows = param.getJSONArray("rows");
|
||||
List<String> bagCode = rows
|
||||
.stream()
|
||||
.map(HashMap.class::cast)
|
||||
.map(p -> MapUtil.getStr(p, "bag_code"))
|
||||
.collect(Collectors.toList());
|
||||
List<GroupPlate> list = groupplateService.list(new LambdaQueryWrapper<GroupPlate>()
|
||||
.in(GroupPlate::getBag_code, bagCode)
|
||||
.eq(GroupPlate::getStatus, "0"));
|
||||
AssemblyPalletParam palletParam = new AssemblyPalletParam();
|
||||
palletParam.setVehicle_code(startPoint.getVehicle_code());
|
||||
palletParam.setGroup_plates(list);
|
||||
pdaCommonService.confirmPalletAssembly(palletParam);
|
||||
}
|
||||
|
||||
private Map<String, Object> buildTaskData(SchBasePoint startPoint, String invId) {
|
||||
Map<String, Object> jsonMst = new HashMap<>();
|
||||
jsonMst.put("point_code", startPoint.getPoint_code());
|
||||
// 组织明细数据
|
||||
IOStorInvDtl dtlDao = ioStorInvDtlMapper.selectOne(
|
||||
List<IOStorInvDtl> dtlDao = ioStorInvDtlMapper.selectList(
|
||||
new QueryWrapper<IOStorInvDtl>().lambda()
|
||||
.eq(IOStorInvDtl::getIostorinv_id, invId)
|
||||
);
|
||||
// 查找分配明细
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("iostorinvdtl_id",dtlDao.getIostorinvdtl_id());
|
||||
map.put("iostorinvdtl_id",dtlDao.get(0).getIostorinvdtl_id());
|
||||
List<IOStorInvDisDto> disDtl = rawAssistIStorService.getDisDtl(map);
|
||||
// 类型转换
|
||||
ArrayList<LinkedHashMap> tableMater = new ArrayList<>();
|
||||
@@ -130,8 +166,7 @@ public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
|
||||
private Map<String, Object> buildDivStructData(Sectattr sect, String invId) {
|
||||
Map<String, Object> divObj = new HashMap<>();
|
||||
divObj.put("sect_code", sect.getSect_code());
|
||||
divObj.put("stor_code", sect.getStor_id());
|
||||
divObj.put("sect_id", sect.getSect_id());
|
||||
divObj.put("checked", true);
|
||||
List<IOStorInvDis> ioStorInvDis = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<IOStorInvDis>()
|
||||
.eq(IOStorInvDis::getIostorinv_id, invId));
|
||||
@@ -145,7 +180,8 @@ public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
return divObj;
|
||||
}
|
||||
|
||||
private Map<String, Object> doBuildInvObj(JSONArray rows) {
|
||||
private Map<String, Object> doBuildInvObj(JSONObject param, SchBasePoint startPoint) {
|
||||
JSONArray rows = param.getJSONArray("rows");
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
ArrayList<HashMap> tableData = new ArrayList<>();
|
||||
res.put("tableData", tableData);
|
||||
@@ -153,16 +189,17 @@ public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
res.put("stor_id", "1582991156504039424");
|
||||
res.put("bill_status", "10");
|
||||
res.put("detail_count", rows.size());
|
||||
res.put("bill_type", "0011");
|
||||
res.put("bill_type", "0001");
|
||||
res.put("biz_date", DateUtil.format(new Date(), "yyyy-MM-dd"));
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
HashMap<String, Object> table = new HashMap<>();
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
table.put("group_id", row.getString("group_id"));
|
||||
table.put("storagevehicle_code", row.getString(""));
|
||||
table.put("storagevehicle_code", startPoint.getVehicle_code());
|
||||
table.put("material_id", row.getString("material_id"));
|
||||
table.put("pcsn", row.getString("pcsn"));
|
||||
table.put("qty", row.getBigDecimal("qty"));
|
||||
table.put("plan_qty", row.getBigDecimal("qty"));
|
||||
table.put("qty_unit_id", row.getString("qty_unit_id"));
|
||||
table.put("qty_unit_name", row.getString("qty_unit_name"));
|
||||
table.put("status", "01");
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
package org.nl.wms.sch_manage.service.util.tasks;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.sch_manage.enums.TaskEnum;
|
||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.util.ACSTaskTypeEnum;
|
||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||
import org.nl.wms.sch_manage.service.util.AcsTaskDto;
|
||||
import org.nl.wms.sch_manage.service.util.TaskType;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IRawAssistIStorService;
|
||||
import org.nl.wms.warehouse_management.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.IOStorInvDisMapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 原辅料入库
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/27
|
||||
*/
|
||||
@Component(value = "RawInTask")
|
||||
@TaskType("RawInTask")
|
||||
public class RawInTask extends AbstractTask {
|
||||
@Resource
|
||||
private ISchBaseTaskService taskService;
|
||||
@Resource
|
||||
private IRawAssistIStorService rawAssistIStorService;
|
||||
|
||||
@Resource
|
||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||
@Resource
|
||||
private ISchBasePointService pointService;
|
||||
@Override
|
||||
public String create(JSONObject json) {
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
task.setTask_id(IdUtil.getStringId());
|
||||
task.setTask_code(CodeUtil.getNewCode("TASK_CODE"));
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
task.setConfig_code(HandInTask.class.getSimpleName());
|
||||
task.setPoint_code1(json.getString("point_code1"));
|
||||
task.setPoint_code2(json.getString("point_code2"));
|
||||
task.setVehicle_code(json.getString("vehicle_code"));
|
||||
task.setMaterial_id(json.getString("material_id"));
|
||||
task.setMaterial_qty(json.getBigDecimal("material_qty"));
|
||||
task.setGroup_id(json.getString("group_id"));
|
||||
task.setRequest_param(json.toString());
|
||||
task.setTask_type(TaskEnum.TASK_TYPE.code("料箱"));
|
||||
task.setPriority(json.getString("Priority"));
|
||||
task.setIs_wait(json.getString("is_wait"));
|
||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
task.setCreate_time(DateUtil.now());
|
||||
taskService.save(task);
|
||||
|
||||
// 下发任务
|
||||
// this.sendTaskOne(task.getTask_id());
|
||||
return task.getTask_id();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcsTaskDto sendAcsParam(String taskId) {
|
||||
SchBaseTask taskDao = taskService.getById(taskId);
|
||||
|
||||
// 组织下发给acs的数据
|
||||
AcsTaskDto acsTaskDto = new AcsTaskDto();
|
||||
acsTaskDto.setExt_task_id(taskDao.getTask_id());
|
||||
acsTaskDto.setTask_code(taskDao.getTask_code());
|
||||
acsTaskDto.setStart_device_code(taskDao.getPoint_code1());
|
||||
acsTaskDto.setNext_device_code(taskDao.getPoint_code2());
|
||||
acsTaskDto.setVehicle_code(taskDao.getVehicle_code());
|
||||
|
||||
acsTaskDto.setVehicle_type(IOSConstant.ONE);
|
||||
acsTaskDto.setIs_wait(IOSConstant.ZERO);
|
||||
acsTaskDto.setTask_type(ACSTaskTypeEnum.CTU_TASK.getCode());
|
||||
|
||||
acsTaskDto.setPriority(IOSConstant.ONE);
|
||||
acsTaskDto.setAgv_system_type(IOSConstant.THREE);
|
||||
acsTaskDto.setIs_get_pause(IOSConstant.ZERO);
|
||||
acsTaskDto.setIs_put_pause(IOSConstant.ZERO);
|
||||
|
||||
return acsTaskDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateStatus(String task_code, TaskStatus status) {
|
||||
// 校验任务
|
||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||
if (taskObj.getTask_status().equals(TaskStatus.FINISHED.getCode())) {
|
||||
throw new BadRequestException("该任务已完成!");
|
||||
}
|
||||
if (taskObj.getTask_status().equals(TaskStatus.CANCELED.getCode())) {
|
||||
throw new BadRequestException("该任务已取消!");
|
||||
}
|
||||
// 根据传来的类型去对任务进行操作
|
||||
if (status.equals(TaskStatus.EXECUTING)) {
|
||||
taskObj.setTask_status(TaskStatus.EXECUTING.getCode());
|
||||
taskObj.setRemark("执行中");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
if (status.equals(TaskStatus.FINISHED)) {
|
||||
this.finishTask(taskObj);
|
||||
}
|
||||
if (status.equals(TaskStatus.CANCELED)) {
|
||||
this.cancelTask(taskObj);
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelTask(SchBaseTask taskObj) {
|
||||
// 取消任务
|
||||
taskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
||||
.set(SchBaseTask::getIs_delete, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
.set(SchBaseTask::getTask_status, TaskStatus.CANCELED.getCode())
|
||||
.set(SchBaseTask::getRemark, "已取消")
|
||||
.eq(SchBaseTask::getTask_id, taskObj.getTask_id())
|
||||
);
|
||||
//分配表清除任务
|
||||
ioStorInvDisMapper.update(new IOStorInvDis(), new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getTask_id, null)
|
||||
.set(IOStorInvDis::getPoint_code, null)
|
||||
.set(IOStorInvDis::getIs_issued, 0)
|
||||
.set(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("未生成"))
|
||||
.eq(IOStorInvDis::getTask_id, taskObj.getTask_id())
|
||||
);
|
||||
|
||||
// 更新任务状态
|
||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||
taskObj.setRemark("已取消");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
|
||||
private void finishTask(SchBaseTask taskObj) {
|
||||
// 任务完成
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("已完成");
|
||||
taskService.updateById(taskObj);
|
||||
rawAssistIStorService.taskFinish(taskObj);
|
||||
// 更新起点
|
||||
pointService.update(
|
||||
new UpdateWrapper<SchBasePoint>().lambda()
|
||||
.set(SchBasePoint::getVehicle_code, "")
|
||||
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
|
||||
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
|
||||
.set(SchBasePoint::getIng_task_code, "")
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceFinish(String task_code) {
|
||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("该任务不存在");
|
||||
}
|
||||
rawAssistIStorService.taskFinish(taskObj);
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
taskObj.setRemark("已完成");
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_code) {
|
||||
SchBaseTask taskObj = taskService.getByCode(task_code);
|
||||
if (ObjectUtil.isEmpty(taskObj)) {
|
||||
throw new BadRequestException("该任务不存在");
|
||||
}
|
||||
if (!TaskStatus.CREATE.getCode().equals(taskObj.getTask_status())) {
|
||||
throw new BadRequestException("任务状态必须为生成才能取消任务");
|
||||
}
|
||||
this.cancelTask(taskObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void taskConfirm(String task_code) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,8 @@ public enum IOSEnum {
|
||||
BILL_STATUS(MapOf.of("生成","10", "分配中", "20", "分配完", "30", "完成", "99")),
|
||||
|
||||
// 入库业务类型
|
||||
IN_BILL_TYPE(MapOf.of( "手工入库", "0009"
|
||||
IN_BILL_TYPE(MapOf.of( "手工入库", "0009",
|
||||
"原辅料入库", "0001"
|
||||
)),
|
||||
|
||||
// 出库业务类型
|
||||
@@ -45,7 +46,8 @@ public enum IOSEnum {
|
||||
STRATEGY_TYPE(MapOf.of("入库", "1", "出库", "2", "通用", "3")),
|
||||
|
||||
// 入库任务配置类编码
|
||||
IN_CONFIG_CODE(MapOf.of("0009", "HandInTask"
|
||||
IN_CONFIG_CODE(MapOf.of("0009", "HandInTask",
|
||||
"0001", "RawInTask"
|
||||
)),
|
||||
|
||||
// 出库任务配置类编码
|
||||
|
||||
@@ -149,6 +149,6 @@
|
||||
`md_pb_groupplate` g
|
||||
LEFT JOIN md_me_materialbase m ON m.material_id = g.material_id
|
||||
LEFT JOIN md_cs_supplierbase s ON s.supp_code = g.supp_code
|
||||
WHERE g.vehicle_code = #{search} AND g.`status` = '1'
|
||||
WHERE g.bag_code = #{search} AND g.`status` = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -253,6 +253,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
dis.put("material_id", row.get("material_id"));
|
||||
dis.put("pcsn", row.get("pcsn"));
|
||||
dis.put("storagevehicle_code", row.get("storagevehicle_code"));
|
||||
dis.put("bag_code", row.get("bag_code"));
|
||||
dis.put("work_status", IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||
dis.put("is_issued", BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
dis.put("qty_unit_id", row.get("qty_unit_id"));
|
||||
|
||||
Reference in New Issue
Block a user