Merge branch 'master' of http://47.111.78.178:8012/liuxy/HuaDongYiYaoWMS
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package org.nl.common.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
@Data
|
||||
public class PdaSelectVo implements Serializable {
|
||||
private String text;
|
||||
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.common.utils;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
public class CollectionUtils {
|
||||
public static <T, U> List<U> convertList(Collection<T> from, Function<T, U> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return from.stream().map(func).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package org.nl.wms.pda.general_management.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pda.general_management.service.PdaCommonService;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyBagParam;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 手持普通搬运任务
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/24
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/pdaCommon")
|
||||
@Slf4j
|
||||
public class PdaCommonController {
|
||||
|
||||
@Resource
|
||||
private PdaCommonService pdaCommonService;
|
||||
@PostMapping("/callEmptyVehicle")
|
||||
@Log("空载具出库-呼叫出库")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> callEmptyVehicle(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaCommonService.callEmptyVehicle(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/getSectList")
|
||||
@Log("空载具出库-库区下拉框")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getSectList(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaCommonService.getSectList(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/confirmBagAssembly")
|
||||
@Log("物料组袋-确认组袋")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmBagAssembly(@RequestBody @Valid AssemblyBagParam param) {
|
||||
return new ResponseEntity<>(pdaCommonService.confirmBagAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/getBagAssembly")
|
||||
@Log("物料组盘-获取组袋信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getBagAssembly(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(pdaCommonService.getBagAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/confirmPalletAssembly")
|
||||
@Log("物料组盘-获取组袋信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmPalletAssembly(@RequestBody @Valid AssemblyPalletParam param) {
|
||||
return new ResponseEntity<>(pdaCommonService.confirmPalletAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.nl.wms.pda.general_management.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 预处理功能
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/pdaPreTreatment")
|
||||
@Slf4j
|
||||
public class PdaPreTreatmentController {
|
||||
|
||||
@Resource
|
||||
private PdaPreTreatmentService pdaPreTreatmentService;
|
||||
|
||||
@PostMapping("/getPalletAssembly")
|
||||
@Log("原辅料入库(直接入库)-获取组袋信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getPalletAssembly(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(pdaPreTreatmentService.getPalletAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/confirmPalletAssemblyIn")
|
||||
@Log("原辅料入库(直接入库)-入库")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmPalletAssemblyIn(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(pdaPreTreatmentService.confirmPalletAssemblyIn(param), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.nl.wms.pda.general_management.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyBagParam;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyPalletParam;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/24
|
||||
*/
|
||||
public interface PdaCommonService {
|
||||
PdaResponse callEmptyVehicle(JSONObject param);
|
||||
|
||||
PdaResponse getSectList(JSONObject param);
|
||||
|
||||
/**
|
||||
* 确认组袋
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
PdaResponse confirmBagAssembly(AssemblyBagParam param);
|
||||
|
||||
/**
|
||||
* 获取组袋信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
PdaResponse getBagAssembly(JSONObject param);
|
||||
|
||||
/**
|
||||
* 吨袋组盘
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
PdaResponse confirmPalletAssembly(AssemblyPalletParam param);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.nl.wms.pda.general_management.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
public interface PdaPreTreatmentService {
|
||||
PdaResponse getPalletAssembly(JSONObject param);
|
||||
|
||||
/**
|
||||
* 确认入库
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
PdaResponse confirmPalletAssemblyIn(JSONObject param);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.nl.wms.pda.general_management.service.dto;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import lombok.Data;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 组袋参数
|
||||
*
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
@Data
|
||||
public class AssemblyBagParam {
|
||||
@NotBlank(message = "id不能为空")
|
||||
private String bagNo;
|
||||
@NotBlank(message = "物料不能为空")
|
||||
private String materialId;
|
||||
@NotBlank(message = "供应商不能为空")
|
||||
private String suppCode;
|
||||
@NotBlank(message = "批次号不能为空")
|
||||
private String pcsn;
|
||||
@NotNull(message = "数量不能为空")
|
||||
private BigDecimal qty;
|
||||
|
||||
public static GroupPlate buildGroupObj(AssemblyBagParam param) {
|
||||
GroupPlate groupPlate = new GroupPlate();
|
||||
groupPlate.setGroup_id(IdUtil.getStringId());
|
||||
groupPlate.setBag_code(param.bagNo);
|
||||
groupPlate.setPcsn(param.getPcsn());
|
||||
groupPlate.setQty(param.getQty());
|
||||
groupPlate.setMaterial_id(param.materialId);
|
||||
groupPlate.setStatus("0");
|
||||
groupPlate.setSupp_code(param.suppCode);
|
||||
groupPlate.setQty_unit_id("1585604695483879424");
|
||||
groupPlate.setQty_unit_name("千克");
|
||||
groupPlate.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
groupPlate.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
groupPlate.setCreate_time(DateUtil.now());
|
||||
return groupPlate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.pda.general_management.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 吨袋组盘实体
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
@Data
|
||||
public class AssemblyPalletParam {
|
||||
@NotBlank(message = "托盘码不能为空")
|
||||
private String vehicle_code;
|
||||
@NotNull(message = "吨袋信息不能为空")
|
||||
private List<GroupPlate> group_plates;
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.vo.PdaSelectVo;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CollectionUtils;
|
||||
import org.nl.system.service.dict.ISysDictService;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.pda.general_management.service.PdaCommonService;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyBagParam;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyPalletParam;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
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.VehicleOutService;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/24
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
|
||||
@Resource
|
||||
private VehicleOutService vehicleOutService;
|
||||
@Resource
|
||||
private IStructattrService iStructattrService;
|
||||
@Resource
|
||||
private ISchBaseTaskService taskService;
|
||||
/**
|
||||
* 空载具出库任务类
|
||||
*/
|
||||
@Resource
|
||||
private EmpVehicleOutTask empVehicleOutTask;
|
||||
@Resource
|
||||
private RedissonClient redissonClient;
|
||||
@Resource
|
||||
private ISysDictService dictService;
|
||||
@Resource
|
||||
private IMdPbGroupplateService groupplateService;
|
||||
@Resource
|
||||
private IMdPbStoragevehicleinfoService storagevehicleinfoService;
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public PdaResponse callEmptyVehicle(JSONObject param) {
|
||||
log.info("手持请求呼叫空托盘:{}", param);
|
||||
RLock lock = redissonClient.getLock("lock:callEmptyVehicle");
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
if (ObjectUtil.isEmpty(param.getString("sect_code"))) {
|
||||
throw new BadRequestException("库区不能为空!");
|
||||
}
|
||||
// 判断任务是否创建
|
||||
String pointCode = param.getString("point_code");
|
||||
List<SchBaseTask> tasks = taskService.getTaskByQuery(new LambdaQueryWrapper<SchBaseTask>()
|
||||
.eq(SchBaseTask::getPoint_code2, pointCode));
|
||||
if (tasks.size() > 0) {
|
||||
throw new BadRequestException("该点位已创建过任务!");
|
||||
}
|
||||
|
||||
|
||||
// 根据库区找空载具
|
||||
List<Structattr> attrList = vehicleOutService.autoDivStruct(param);
|
||||
|
||||
Structattr structattr = attrList.get(0);
|
||||
if (ObjectUtil.isEmpty(structattr)) {
|
||||
throw new BadRequestException("暂时没有可用的空载具!");
|
||||
}
|
||||
|
||||
// 锁定仓位
|
||||
iStructattrService.update(
|
||||
new UpdateWrapper<Structattr>().lambda()
|
||||
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("空托盘出库锁"))
|
||||
.eq(Structattr::getStruct_code, structattr.getStruct_code())
|
||||
);
|
||||
|
||||
// 创建任务
|
||||
JSONObject jsonTask = new JSONObject();
|
||||
jsonTask.put("point_code1", structattr.getStruct_code());
|
||||
jsonTask.put("point_code2", pointCode);
|
||||
jsonTask.put("vehicle_code", structattr.getStoragevehicle_code());
|
||||
empVehicleOutTask.create(jsonTask);
|
||||
} else {
|
||||
throw new BadRequestException("正在处理中,请稍后再试!");
|
||||
}
|
||||
} finally {
|
||||
if (tryLock) {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
return PdaResponse.requestOk("空盘任务创建成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse getSectList(JSONObject param) {
|
||||
String code = param.getString("code");
|
||||
if (null == code) {
|
||||
code = "EP_SECT_CODE";
|
||||
}
|
||||
List<Dict> epSectCode = dictService.getDictByName(code);
|
||||
List<PdaSelectVo> collect = CollectionUtils.convertList(epSectCode, dict -> {
|
||||
PdaSelectVo selectVo = new PdaSelectVo();
|
||||
selectVo.setText(dict.getLabel());
|
||||
selectVo.setValue(dict.getValue());
|
||||
return selectVo;
|
||||
});
|
||||
return PdaResponse.requestParamOk(collect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse confirmBagAssembly(AssemblyBagParam param) {
|
||||
List<GroupPlate> list = groupplateService.list(new LambdaQueryWrapper<GroupPlate>()
|
||||
.eq(GroupPlate::getBag_code, param.getBagNo())
|
||||
.le(GroupPlate::getStatus, "2"));
|
||||
if (list.size() > 0) {
|
||||
throw new BadRequestException("吨袋[" + param.getBagNo() + "]已经组袋过,请检查!");
|
||||
}
|
||||
GroupPlate groupPlate = AssemblyBagParam.buildGroupObj(param);
|
||||
groupplateService.save(groupPlate);
|
||||
return PdaResponse.requestOk("组袋成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse getBagAssembly(JSONObject param) {
|
||||
String bagNo = param.getString("bag_no");
|
||||
if (ObjectUtil.isEmpty(bagNo)) {
|
||||
throw new BadRequestException("袋号不能为空!");
|
||||
}
|
||||
List<GroupPlate> groupPlates = groupplateService.getByBagNo(bagNo, "0");
|
||||
if (groupPlates.size() != 1) {
|
||||
throw new BadRequestException(groupPlates.size() == 0 ? "组袋记录不存在,请先组袋!" : "组袋记录信息有误,请查询并清理后重试!");
|
||||
}
|
||||
return PdaResponse.requestParamOk(groupPlates.get(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse confirmPalletAssembly(AssemblyPalletParam param) {
|
||||
storagevehicleinfoService.getByCode(param.getVehicle_code());
|
||||
List<GroupPlate> groupPlates = param.getGroup_plates();
|
||||
for (GroupPlate groupPlate : groupPlates) {
|
||||
groupPlate.setVehicle_code(param.getVehicle_code());
|
||||
groupPlate.setStatus("1");
|
||||
}
|
||||
groupplateService.updateBatchById(groupPlates);
|
||||
return PdaResponse.requestOk("组盘成功!");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.pda.general_management.service.PdaPreTreatmentService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2025/11/25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PdaPreTreatmentServiceImpl implements PdaPreTreatmentService {
|
||||
@Resource
|
||||
private ISchBasePointService pointService;
|
||||
@Resource
|
||||
private IMdPbGroupplateService groupplateService;
|
||||
@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("输入内容有误或者点位未绑定托盘号,请检查!");
|
||||
}
|
||||
List<JSONObject> groups = groupplateService.getPalletView(search);
|
||||
return PdaResponse.requestParamOk(groups);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse confirmPalletAssemblyIn(JSONObject param) {
|
||||
log.info("拆包缓冲间确认入库:{}", param);
|
||||
// param:search(点位), rows
|
||||
String search = param.getString("search");
|
||||
if (ObjectUtil.isEmpty(search)) {
|
||||
throw new BadRequestException("请输入点位编码!");
|
||||
}
|
||||
SchBasePoint startPoint = pointService.getByPointCode(search, true);
|
||||
if (ObjectUtil.isEmpty(startPoint)) {
|
||||
throw new BadRequestException("输入的点位不存在或者点位已被禁用, 请检查输入点位是否正确或是否被禁用!");
|
||||
}
|
||||
// 1 创建入库单、明细、分配明细
|
||||
JSONObject insertInvObj = new JSONObject();
|
||||
|
||||
// 2 调用分配
|
||||
|
||||
// 3 创建任务
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,15 @@ public class PdaResponse<T> {
|
||||
.message("操作成功!")
|
||||
.build();
|
||||
}
|
||||
/**
|
||||
* 带信息反馈
|
||||
* @return ErpResponse
|
||||
*/
|
||||
public static PdaResponse requestOk(String message) {
|
||||
return PdaResponse.builder()
|
||||
.message(message)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 带数据反馈
|
||||
|
||||
@@ -124,4 +124,12 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
* @param dao 实体类
|
||||
*/
|
||||
void cleanMaterial(SchBasePoint dao);
|
||||
|
||||
/**
|
||||
* 获取点位信息
|
||||
* @param pointCode
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
SchBasePoint getByPointCode(String pointCode, boolean flag);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.sch_manage.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
@@ -76,4 +77,6 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
|
||||
* @return List<SchBaseTask>
|
||||
*/
|
||||
List<SchBaseTask> getTaskConfigList(String config_code);
|
||||
|
||||
List<SchBaseTask> getTaskByQuery(LambdaQueryWrapper<SchBaseTask> lam);
|
||||
}
|
||||
|
||||
@@ -309,4 +309,12 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
dao.setIng_task_code("");
|
||||
this.updateById(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchBasePoint getByPointCode(String pointCode, boolean flag) {
|
||||
LambdaQueryWrapper<SchBasePoint> lam = new QueryWrapper<SchBasePoint>().lambda();
|
||||
lam.eq(SchBasePoint::getPoint_code, pointCode)
|
||||
.eq(flag, SchBasePoint::getIs_used, true);
|
||||
return getOne(lam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,4 +170,11 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchBaseTask> getTaskByQuery(LambdaQueryWrapper<SchBaseTask> lam) {
|
||||
lam.eq(SchBaseTask::getIs_delete, "0")
|
||||
.le(SchBaseTask::getTask_status, TaskStatus.EXECUTING.getCode());
|
||||
return list(lam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,4 +86,14 @@ public interface IMdPbGroupplateService extends IService<GroupPlate> {
|
||||
* @param dto 实体类
|
||||
*/
|
||||
void printDelete(GroupPlate dto);
|
||||
|
||||
/**
|
||||
* 根据袋号获取可用组盘信息
|
||||
* @param bagNo
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
List<GroupPlate> getByBagNo(String bagNo, String status);
|
||||
|
||||
List<JSONObject> getPalletView(String search);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ package org.nl.wms.warehouse_management.service;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -34,4 +36,11 @@ public interface VehicleOutService {
|
||||
* }
|
||||
*/
|
||||
void create(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 根据区域编码获取分配的仓位
|
||||
* @param whereJson: sect_code
|
||||
* @return
|
||||
*/
|
||||
List<Structattr> autoDivStruct(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -63,4 +63,6 @@ public interface MdPbGroupplateMapper extends BaseMapper<GroupPlate> {
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> pdaGetPointDtl(@Param("param") JSONObject whereJson);
|
||||
|
||||
List<JSONObject> getPalletView(String search);
|
||||
}
|
||||
|
||||
@@ -136,4 +136,19 @@
|
||||
|
||||
</where>
|
||||
</select>
|
||||
<select id="getPalletView" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
g.*,
|
||||
m.material_code,
|
||||
m.material_name,
|
||||
m.material_spec,
|
||||
m.material_model,
|
||||
m.material_type_id,
|
||||
s.supp_name
|
||||
FROM
|
||||
`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'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.warehouse_management.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -178,4 +179,17 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
set.add(dto.getGroup_id());
|
||||
delete(set);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GroupPlate> getByBagNo(String bagNo, String status) {
|
||||
LambdaQueryWrapper<GroupPlate> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq(GroupPlate::getBag_code, bagNo)
|
||||
.le(GroupPlate::getStatus, status);
|
||||
return list(lam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> getPalletView(String search) {
|
||||
return this.baseMapper.getPalletView(search);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@ public class VehicleOutServiceImpl implements VehicleOutService {
|
||||
* }
|
||||
* @return List<Structattr> 仓位实体类即可
|
||||
*/
|
||||
private List<Structattr> autoDivStruct(JSONObject whereJson) {
|
||||
@Override
|
||||
public List<Structattr> autoDivStruct(JSONObject whereJson) {
|
||||
|
||||
// 根据库区查询对应载具
|
||||
List<Structattr> attrList = iStructattrService.list(new LambdaQueryWrapper<>(Structattr.class)
|
||||
|
||||
Reference in New Issue
Block a user