feat: 手持组桶
This commit is contained in:
@@ -7,6 +7,7 @@ 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.AssemblyBucketParam;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyPalletParam;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -67,5 +68,11 @@ public class PdaCommonController {
|
||||
public ResponseEntity<Object> confirmPalletAssembly(@RequestBody @Valid AssemblyPalletParam param) {
|
||||
return new ResponseEntity<>(pdaCommonService.confirmPalletAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/confirmBucketAssembly")
|
||||
@Log("物料组桶-组桶")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmBucketAssembly(@RequestBody @Valid AssemblyBucketParam param) {
|
||||
return new ResponseEntity<>(pdaCommonService.confirmBucketAssembly(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ 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.AssemblyBucketParam;
|
||||
import org.nl.wms.pda.general_management.service.dto.AssemblyPalletParam;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
|
||||
@@ -41,4 +42,6 @@ public interface PdaCommonService {
|
||||
* @return
|
||||
*/
|
||||
PdaResponse inEmptyVehicle(JSONObject param);
|
||||
|
||||
PdaResponse confirmBucketAssembly(AssemblyBucketParam param);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.nl.wms.pda.general_management.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 组桶
|
||||
* @Author: lyd
|
||||
* @Date: 2025/12/2
|
||||
*/
|
||||
@Data
|
||||
public class AssemblyBucketParam {
|
||||
@NotBlank(message = "桶号不能为空")
|
||||
private String bucket_code;
|
||||
@NotBlank(message = "桶自重不能为空")
|
||||
private String bucket_weight;
|
||||
@NotBlank(message = "物料不能为空")
|
||||
private String material_id;
|
||||
@NotBlank(message = "批次号不能为空")
|
||||
private String pcsn;
|
||||
@NotNull(message = "数量不能为空")
|
||||
private BigDecimal qty;
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("defaultPdaBuildParam")
|
||||
public class DefaultPdaBuildParam implements PdaBuildParamService {
|
||||
public class DefaultPdaBuildParamService implements PdaBuildParamService {
|
||||
|
||||
@Resource
|
||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
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;
|
||||
@@ -9,13 +11,18 @@ 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.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
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.IMdPdGroupbucketService;
|
||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
||||
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.AssemblyBucketParam;
|
||||
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;
|
||||
@@ -63,6 +70,8 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
private IMdPbGroupplateService groupplateService;
|
||||
@Resource
|
||||
private IMdPbStoragevehicleinfoService storagevehicleinfoService;
|
||||
@Resource
|
||||
private IMdPdGroupbucketService groupbucketService;
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public PdaResponse callEmptyVehicle(JSONObject param) {
|
||||
@@ -175,4 +184,18 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
||||
vehicleInService.create(param);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse confirmBucketAssembly(AssemblyBucketParam param) {
|
||||
MdPdGroupbucket groupbucket = new MdPdGroupbucket();
|
||||
BeanUtil.copyProperties(param, groupbucket);
|
||||
groupbucket.setId(IdUtil.getStringId());
|
||||
groupbucket.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
groupbucket.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
groupbucket.setCreate_time(DateUtil.now());
|
||||
groupbucket.setQty_unit_id("1585604695483879424");
|
||||
groupbucket.setQty_unit_name("千克");
|
||||
groupbucketService.save(groupbucket);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user