fix:叫料/退料
This commit is contained in:
@@ -79,6 +79,9 @@
|
|||||||
<if test="is_lock != null and is_lock != ''">
|
<if test="is_lock != null and is_lock != ''">
|
||||||
and ivt.lock_type = '0'
|
and ivt.lock_type = '0'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="occupancy_state != null and occupancy_state != ''">
|
||||||
|
and ivt.occupancy_state = #{occupancy_state}
|
||||||
|
</if>
|
||||||
<if test="order_by != null and order_by != ''">
|
<if test="order_by != null and order_by != ''">
|
||||||
order by ${order_by}
|
order by ${order_by}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -68,4 +68,8 @@ public class StrategyStructParam {
|
|||||||
*/
|
*/
|
||||||
private String dis_id;
|
private String dis_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占位状态
|
||||||
|
*/
|
||||||
|
private Integer occupancy_state;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class FIFOAndVehicleHandler extends Decisioner<StrategyStructMaterialVO,
|
|||||||
"stor_code", param.getString("stor_code")
|
"stor_code", param.getString("stor_code")
|
||||||
, "sect_code", param.getString("sect_code")
|
, "sect_code", param.getString("sect_code")
|
||||||
, "is_lock", "false"
|
, "is_lock", "false"
|
||||||
|
, "occupancy_state","2"
|
||||||
, "order_by", "ivt.update_time asc"));
|
, "order_by", "ivt.update_time asc"));
|
||||||
if (ObjectUtils.isEmpty(vechielDtos)) {
|
if (ObjectUtils.isEmpty(vechielDtos)) {
|
||||||
throw new BadRequestException("库存分配失败,失败原因:没有空托盘");
|
throw new BadRequestException("库存分配失败,失败原因:没有空托盘");
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
taskParam.put("point_code2", pointCode );
|
taskParam.put("point_code2", pointCode );
|
||||||
taskParam.put("group_id", groupPlate.getGroup_id() );
|
taskParam.put("group_id", groupPlate.getGroup_id() );
|
||||||
taskParam.put("task_code", dto.getTask_code() );
|
taskParam.put("task_code", dto.getTask_code() );
|
||||||
if(dto.getIsManual()){
|
if(dto.getIsManual() != null && dto.getIsManual()){
|
||||||
taskParam.put("create_mode", "手动" );
|
taskParam.put("create_mode", "手动" );
|
||||||
} else{
|
} else{
|
||||||
taskParam.put("create_mode", "自动" );
|
taskParam.put("create_mode", "自动" );
|
||||||
@@ -363,7 +363,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
taskParam.put("point_code4", sonSchBasePointList.get(1).getPoint_code() );
|
taskParam.put("point_code4", sonSchBasePointList.get(1).getPoint_code() );
|
||||||
taskParam.put("group_id", groupPlate.getGroup_id() );
|
taskParam.put("group_id", groupPlate.getGroup_id() );
|
||||||
taskParam.put("task_code", dto.getTask_code() );
|
taskParam.put("task_code", dto.getTask_code() );
|
||||||
if(dto.getIsManual()){
|
if(dto.getIsManual() != null && dto.getIsManual()){
|
||||||
taskParam.put("create_mode", "手动" );
|
taskParam.put("create_mode", "手动" );
|
||||||
} else{
|
} else{
|
||||||
taskParam.put("create_mode", "自动" );
|
taskParam.put("create_mode", "自动" );
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.nl.wms.basedata_manage.service.dao.*;
|
|||||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
||||||
import org.nl.wms.basedata_manage.service.dto.StrategyStructMaterialVO;
|
import org.nl.wms.basedata_manage.service.dto.StrategyStructMaterialVO;
|
||||||
import org.nl.wms.basedata_manage.service.dto.StrategyStructParam;
|
import org.nl.wms.basedata_manage.service.dto.StrategyStructParam;
|
||||||
|
import org.nl.wms.decision_manage.service.strategyConfig.enums.StragegyTypeEnum;
|
||||||
import org.nl.wms.pda_manage.ios_manage.service.PdaIosOutService;
|
import org.nl.wms.pda_manage.ios_manage.service.PdaIosOutService;
|
||||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||||
import org.nl.wms.sch_manage.enums.StatusEnum;
|
import org.nl.wms.sch_manage.enums.StatusEnum;
|
||||||
@@ -250,7 +251,6 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
queryWrapper.eq(MdMeMaterialbase::getMaterial_id, StatusEnum.VEHICLE_TYPE.code("空料箱"));
|
queryWrapper.eq(MdMeMaterialbase::getMaterial_id, StatusEnum.VEHICLE_TYPE.code("空料箱"));
|
||||||
} else {
|
} else {
|
||||||
queryWrapper.eq(MdMeMaterialbase::getMaterial_id, StatusEnum.VEHICLE_TYPE.code("空托盘"));
|
queryWrapper.eq(MdMeMaterialbase::getMaterial_id, StatusEnum.VEHICLE_TYPE.code("空托盘"));
|
||||||
|
|
||||||
}
|
}
|
||||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getOne(queryWrapper);
|
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getOne(queryWrapper);
|
||||||
if (materDao == null) {
|
if (materDao == null) {
|
||||||
@@ -274,6 +274,8 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
.stor_code(whereJson.getString("stor_code"))
|
.stor_code(whereJson.getString("stor_code"))
|
||||||
.material_code(whereJson.getString("material_id"))
|
.material_code(whereJson.getString("material_id"))
|
||||||
.material_code(whereJson.getString("material_code"))
|
.material_code(whereJson.getString("material_code"))
|
||||||
|
.stragegyType(StragegyTypeEnum.STRAGEGY_TYPE.code("空托盘"))
|
||||||
|
.occupancy_state(2)
|
||||||
.qty(BigDecimal.valueOf(qty))
|
.qty(BigDecimal.valueOf(qty))
|
||||||
.build();
|
.build();
|
||||||
List<StrategyStructMaterialVO> structList = iStructattrService.outBoundSectDiv(strategyStructParam);
|
List<StrategyStructMaterialVO> structList = iStructattrService.outBoundSectDiv(strategyStructParam);
|
||||||
@@ -284,13 +286,12 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
//创建任务
|
//创建任务
|
||||||
JSONObject taskForm = new JSONObject();
|
JSONObject taskForm = new JSONObject();
|
||||||
taskForm.put("task_type", IOSConstant.VEHICLE_OUT_TASK);
|
taskForm.put("task_type", IOSConstant.VEHICLE_OUT_TASK);
|
||||||
taskForm.put("config_code", IOSConstant.VEHICLE_IN_TASK);
|
taskForm.put("config_code", IOSConstant.VEHICLE_OUT_TASK);
|
||||||
taskForm.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
|
taskForm.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
taskForm.put("PickingLocation", r.getStruct_code());
|
taskForm.put("PickingLocation", r.getStruct_code());
|
||||||
taskForm.put("PlacedLocation", whereJson.getString("siteCode"));
|
taskForm.put("PlacedLocation", whereJson.getString("siteCode"));
|
||||||
taskForm.put("vehicle_code", r.getStoragevehicle_code());
|
taskForm.put("vehicle_code", r.getStoragevehicle_code());
|
||||||
VehicleOutTask vehicleOutTask = SpringContextHolder.getBean("VehicleOutTask");
|
VehicleOutTask vehicleOutTask = SpringContextHolder.getBean("VehicleOutTask");
|
||||||
applyTaskMap.get(IOSConstant.VEHICLE_IN_TASK).create(whereJson);
|
|
||||||
vehicleOutTask.create(taskForm);
|
vehicleOutTask.create(taskForm);
|
||||||
});
|
});
|
||||||
//更新组盘记录表
|
//更新组盘记录表
|
||||||
|
|||||||
@@ -139,10 +139,11 @@ public class VehicleInTask extends AbstractTask {
|
|||||||
// 更新终点
|
// 更新终点
|
||||||
iStructattrService.update(
|
iStructattrService.update(
|
||||||
new UpdateWrapper<Structattr>().lambda()
|
new UpdateWrapper<Structattr>().lambda()
|
||||||
.eq(Structattr::getStruct_code, taskObj.getPoint_code2())
|
.eq(Structattr::getStruct_code, taskObj.getPoint_code2())
|
||||||
.set(Structattr::getStoragevehicle_code, taskObj.getVehicle_code())
|
.set(Structattr::getStoragevehicle_code, taskObj.getVehicle_code())
|
||||||
.set(Structattr::getTask_code, null)
|
.set(Structattr::getTask_code, null)
|
||||||
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
.set(Structattr::getOccupancy_state, 2)
|
||||||
|
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
);
|
);
|
||||||
// 更新起点
|
// 更新起点
|
||||||
iSchBasePointService.update(
|
iSchBasePointService.update(
|
||||||
|
|||||||
@@ -4,12 +4,17 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
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.exception.BadRequestException;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.common.utils.IdUtil;;
|
import org.nl.common.utils.IdUtil;;
|
||||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||||
|
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||||
|
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
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.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.dao.SchBaseTask;
|
||||||
import org.nl.wms.sch_manage.service.util.AbstractTask;
|
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.AcsTaskDto;
|
||||||
@@ -41,6 +46,18 @@ public class VehicleOutTask extends AbstractTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private ISchBasePointService iSchBasePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IStructattrService iStructattrService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String create(JSONObject json) {
|
public String create(JSONObject json) {
|
||||||
SchBaseTask task = new SchBaseTask();
|
SchBaseTask task = new SchBaseTask();
|
||||||
@@ -136,6 +153,13 @@ public class VehicleOutTask extends AbstractTask {
|
|||||||
taskObj.setRemark("已完成");
|
taskObj.setRemark("已完成");
|
||||||
taskService.updateById(taskObj);
|
taskService.updateById(taskObj);
|
||||||
outBillService.taskFinish(taskObj);
|
outBillService.taskFinish(taskObj);
|
||||||
|
|
||||||
|
// 更新起点
|
||||||
|
iStructattrService.update(
|
||||||
|
new UpdateWrapper<Structattr>().lambda()
|
||||||
|
.eq(Structattr::getStruct_code, taskObj.getPoint_code1())
|
||||||
|
.set(Structattr::getOccupancy_state, 1)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|||||||
@@ -6,9 +6,14 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.common.base.TableDataInfo;
|
import org.nl.common.base.TableDataInfo;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.logging.annotation.Log;
|
import org.nl.common.logging.annotation.Log;
|
||||||
|
import org.nl.wms.ext_manage.dto.mes.MesBackMaterialRequestDto;
|
||||||
|
import org.nl.wms.ext_manage.service.MesToWmsService;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.IInBillService;
|
import org.nl.wms.warehouse_manage.inAndOut.service.IInBillService;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.MesManualBackMaterialRequestDto;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -27,6 +32,10 @@ public class InBillController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IInBillService iRawAssistIStorService;
|
private IInBillService iRawAssistIStorService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MesToWmsService mesToWmsService;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@Log("查询入库单据")
|
@Log("查询入库单据")
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||||
@@ -112,4 +121,14 @@ public class InBillController {
|
|||||||
public ResponseEntity<Object> getInBillTaskDtl(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> getInBillTaskDtl(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(iRawAssistIStorService.getInBillTaskDtl(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(iRawAssistIStorService.getInBillTaskDtl(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/backMaterial")
|
||||||
|
@Log("人工退料")
|
||||||
|
public ResponseEntity<Object> backMaterial(@RequestBody @Validated MesManualBackMaterialRequestDto manualDto) {
|
||||||
|
MesBackMaterialRequestDto dto = new MesBackMaterialRequestDto();
|
||||||
|
BeanUtils.copyProperties(manualDto, dto);
|
||||||
|
dto.setIsManual(true);
|
||||||
|
return new ResponseEntity<>(mesToWmsService.backMaterial(dto), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,15 +158,4 @@ public class OutBillController {
|
|||||||
dto.setIsManual(true);
|
dto.setIsManual(true);
|
||||||
return new ResponseEntity<>(mesToWmsService.callMaterial(dto), HttpStatus.OK);
|
return new ResponseEntity<>(mesToWmsService.callMaterial(dto), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/backMaterial")
|
|
||||||
@Log("人工退料")
|
|
||||||
public ResponseEntity<Object> backMaterial(@RequestBody @Validated MesManualBackMaterialRequestDto manualDto) {
|
|
||||||
MesBackMaterialRequestDto dto = new MesBackMaterialRequestDto();
|
|
||||||
BeanUtils.copyProperties(manualDto, dto);
|
|
||||||
dto.setIsManual(true);
|
|
||||||
return new ResponseEntity<>(mesToWmsService.backMaterial(dto), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user