opt:换托组盘

This commit is contained in:
zhaoyf
2026-08-21 17:05:24 +08:00
parent 654651e8a5
commit 1baf0ba789
4 changed files with 37 additions and 5 deletions

View File

@@ -58,4 +58,6 @@ public interface IMdPbStoragevehicleinfoService extends IService<MdPbStoragevehi
String getVehicleType(String storagevehicleCode);
void printLabel(Set<String> ids);
void chackAndInsert(String vehicleCode);
}

View File

@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -168,4 +169,29 @@ public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStorageve
}
}
@Override
public void chackAndInsert(String vehicleCode) {
MdPbStoragevehicleinfo one = this.getOne(
new QueryWrapper<MdPbStoragevehicleinfo>().lambda()
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, vehicleCode)
);
if (one == null){
MdPbStoragevehicleinfo entity = new MdPbStoragevehicleinfo();
entity.setStoragevehicle_id(IdUtil.getStringId());
entity.setStoragevehicle_code(vehicleCode);
entity.setStoragevehicle_name("托盘");
entity.setCreate_name(SecurityUtils.getCurrentNickName());
entity.setCreate_time(DateUtil.now());
entity.setCreate_id(SecurityUtils.getCurrentUserId());
entity.setIs_used("1");
entity.setStoragevehicle_type("00");
entity.setVehicle_height(BigDecimal.ZERO);
entity.setVehicle_width(BigDecimal.ZERO);
entity.setVehicle_long(BigDecimal.ZERO);
entity.setOverstruct_type("00");
entity.setOccupystruct_qty(BigDecimal.ONE);
this.save(entity);
}
}
}

View File

@@ -17,10 +17,7 @@ import org.nl.common.utils.MapOf;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
import org.nl.wms.basedata_manage.service.ISectattrService;
import org.nl.wms.basedata_manage.service.IStructattrService;
import org.nl.wms.basedata_manage.service.*;
import org.nl.wms.basedata_manage.service.dao.*;
import org.nl.wms.basedata_manage.service.dto.StrategyMater;
import org.nl.wms.basedata_manage.service.dto.StrategyStructMaterialVO;
@@ -140,6 +137,9 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
*/
@Autowired
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
@Autowired
private IMdPbStoragevehicleinfoService mdPbStoragevehicleinfoService;
/**
* 基础物料服务
*/
@@ -753,6 +753,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
if (StringUtils.isEmpty(changeGroupDto.getVehicle_code()) || changeGroupDto.getItems().isEmpty()){
throw new BadRequestException("请求数据为空");
}
mdPbStoragevehicleinfoService.chackAndInsert(changeGroupDto.getVehicle_code());//检查托盘号
List<ChangeGroupDto.ChangeGroupItem> items = changeGroupDto.getItems();
List<GroupPlate> groupPlates = new ArrayList<>();
for (ChangeGroupDto.ChangeGroupItem item : items) {
@@ -784,6 +785,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
List<ContainerItemDto> dtos = new ArrayList<>();
if(code.startsWith("E5")){
//TODO 获取中鼎组盘信息
throw new BadRequestException("立库托盘请走立库拣选");
}else{
List<GroupPlate> groupPlateList = iMdPbGroupplateService.list(new LambdaQueryWrapper<GroupPlate>()
.eq(GroupPlate::getStoragevehicle_code, code)

View File

@@ -129,13 +129,15 @@ public class PdaIosOutController {
}
@PostMapping("/changeGroup")
@SaIgnore
@Log("换托组盘")
public ResponseEntity changeGroup(ChangeGroupDto changeGroupDto){
public ResponseEntity changeGroup(@RequestBody ChangeGroupDto changeGroupDto){
pdaIosOutService.changeGroup(changeGroupDto);
return ResponseData.build(HttpStatus.OK);
}
@GetMapping("/getContainerItem")
@SaIgnore
@Log("根据容器编号获取托盘物料信息")
public ResponseEntity getContainerItemByCode(String code){
List<ContainerItemDto> list = pdaIosOutService.getContainerItemByCode(code);