rev:托盘拣选出库修改

This commit is contained in:
zhangzq
2024-12-05 13:20:43 +08:00
parent e721e02a63
commit 04ce7f40fd
3 changed files with 12 additions and 8 deletions

View File

@@ -151,6 +151,11 @@ public class MdGruopDickServiceImpl extends ServiceImpl<MdGruopDickMapper, MdGru
.eq("is_delete",false) .eq("is_delete",false)
.in("vehicle_code", map.keySet())); .in("vehicle_code", map.keySet()));
if (tmpCount1.size()>0){ if (tmpCount1.size()>0){
List<MdPbVehicleMater> collect = tmpCount1.stream().filter(mdPbVehicleMater -> mdPbVehicleMater.getNeed_pick()&&mdPbVehicleMater.getVehicle_code().contains("T")).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(collect)){
String vehicles = collect.stream().map(MdPbVehicleMater::getVehicle_code).collect(Collectors.joining(","));
throw new BadRequestException("载具"+vehicles+"为拣选回库无需组盘");
}
throw new BadRequestException("组盘失败:载具已经存在组盘信息"+tmpCount1.stream().map(MdPbVehicleMater::getVehicle_code).collect(Collectors.joining(","))); throw new BadRequestException("组盘失败:载具已经存在组盘信息"+tmpCount1.stream().map(MdPbVehicleMater::getVehicle_code).collect(Collectors.joining(",")));
} }
this.saveBatch(map.values()); this.saveBatch(map.values());

View File

@@ -29,6 +29,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
/** /**
* <p> * <p>
* 出入库单主表 前端控制器 * 出入库单主表 前端控制器
@@ -52,7 +54,7 @@ public class IOStorageController {
@PostMapping("out") @PostMapping("out")
@SaIgnore @SaIgnore
@Log("出库却润") @Log("手持出库解绑")
public ResponseEntity<Object> outStorage(@RequestBody JSONObject form) { public ResponseEntity<Object> outStorage(@RequestBody JSONObject form) {
String vehicle_code = form.getString("vehicle_code"); String vehicle_code = form.getString("vehicle_code");
MdPbVehicleMater one = iMdPbVehicleMaterService.getOne(new QueryWrapper<MdPbVehicleMater>() MdPbVehicleMater one = iMdPbVehicleMaterService.getOne(new QueryWrapper<MdPbVehicleMater>()
@@ -70,14 +72,10 @@ public class IOStorageController {
throw new BadRequestException(String.format("当前载具%s业务流程%s未完成",vehicle_code,parent_id)); throw new BadRequestException(String.format("当前载具%s业务流程%s未完成",vehicle_code,parent_id));
} }
} }
//单据校验"针对托盘库拣选 //单据校验"针对托盘库做条件判断
if (vehicle_code.contains("T")){ if (vehicle_code.contains("T")){
int count = iPmFormDataService.count(new QueryWrapper<PmFormData>() if (one.getNeed_pick() && one.getQty().compareTo(BigDecimal.ZERO)>0){
.eq("form_type", "Picking") throw new BadRequestException(one.getRemark());
.eq("vehicle_code", vehicle_code)
.lt("status", StatusEnum.FORM_STATUS.code("完成")));
if (count>0){
throw new BadRequestException(String.format("当前载具%s为拣选出库请先进行拣选操作",vehicle_code));
} }
} }
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>() iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()

View File

@@ -102,6 +102,7 @@ public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMappe
.eq("id", vehicleMater.getId()); .eq("id", vehicleMater.getId());
if (vehicleCode.contains("T") && subtract.intValue()>0){ if (vehicleCode.contains("T") && subtract.intValue()>0){
update.set("need_pick",true); update.set("need_pick",true);
update.set("remark","托盘"+vehicleMater.getVehicle_code()+"为人工拣选,请先拣选"+vehicleMater.getFrozen_qty()+",在直接回库!");
} }
vehicleMaterService.update(update); vehicleMaterService.update(update);
StIvtStructivtflow record = new StIvtStructivtflow(); StIvtStructivtflow record = new StIvtStructivtflow();