rev:测试修改
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
package org.nl.wms.basedata_manage.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wms.basedata_manage.service.IMdPdGroupbucketService;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 组桶 控制层
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author Liuxy
|
|
||||||
* @since 2025-11-24
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("/api/groupBucket")
|
|
||||||
@Slf4j
|
|
||||||
public class GroupBucketController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private final IMdPdGroupbucketService iMdPdGroupbucketService;
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,7 @@ import org.nl.common.utils.CodeUtil;
|
|||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.basedata_manage.service.IMdPbMeasureunitService;
|
import org.nl.wms.basedata_manage.service.IMdPbMeasureunitService;
|
||||||
|
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
||||||
import org.nl.wms.basedata_manage.service.IMdPdGroupbucketService;
|
import org.nl.wms.basedata_manage.service.IMdPdGroupbucketService;
|
||||||
import org.nl.wms.basedata_manage.service.dao.MdPbMeasureunit;
|
import org.nl.wms.basedata_manage.service.dao.MdPbMeasureunit;
|
||||||
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
||||||
@@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -40,6 +42,12 @@ public class MdPdGroupbucketServiceImpl extends ServiceImpl<MdPdGroupbucketMappe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMdPbMeasureunitService iMdPbMeasureunitService;
|
private IMdPbMeasureunitService iMdPbMeasureunitService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 载具服务
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IMdPbStoragevehicleinfoService storagevehicleinfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> getBucketInfoByBucket(String vehicleCode) {
|
public List<JSONObject> getBucketInfoByBucket(String vehicleCode) {
|
||||||
return this.baseMapper.getBucketInfoByBucket(vehicleCode);
|
return this.baseMapper.getBucketInfoByBucket(vehicleCode);
|
||||||
@@ -59,7 +67,8 @@ public class MdPdGroupbucketServiceImpl extends ServiceImpl<MdPdGroupbucketMappe
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void create(MdPdGroupbucket dto) {
|
public void create(MdPdGroupbucket dto) {
|
||||||
dto.setBucket_code(CodeUtil.getNewCode("BUCKED_CODE"));
|
// 查询桶码是否存在
|
||||||
|
storagevehicleinfoService.getByCode(dto.getBucket_code());
|
||||||
dto.setId(IdUtil.getStringId());
|
dto.setId(IdUtil.getStringId());
|
||||||
dto.setCreate_id(SecurityUtils.getCurrentUserId());
|
dto.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
dto.setCreate_name(SecurityUtils.getCurrentNickName());
|
dto.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
|||||||
@@ -92,11 +92,11 @@ public class PdaCommonController {
|
|||||||
public ResponseEntity<Object> confirmPalletAssembly(@RequestBody @Valid AssemblyPalletParam param) {
|
public ResponseEntity<Object> confirmPalletAssembly(@RequestBody @Valid AssemblyPalletParam param) {
|
||||||
return new ResponseEntity<>(pdaCommonService.confirmPalletAssembly(param), HttpStatus.OK);
|
return new ResponseEntity<>(pdaCommonService.confirmPalletAssembly(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@PostMapping("/byBuckCode")
|
@PostMapping("/queryRecordNoBucked")
|
||||||
@Log("物料组桶-获取桶号")
|
@Log("物料组桶-查询证书编号")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> byBuckCode(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> queryRecordNoBucked(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(pdaCommonService.byBuckCode(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(pdaCommonService.queryRecordNo(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@PostMapping("/confirmBucketAssembly")
|
@PostMapping("/confirmBucketAssembly")
|
||||||
@Log("物料组桶-组桶")
|
@Log("物料组桶-组桶")
|
||||||
|
|||||||
@@ -78,13 +78,4 @@ public interface PdaCommonService {
|
|||||||
* @return PdaResponse
|
* @return PdaResponse
|
||||||
*/
|
*/
|
||||||
PdaResponse byBagCodeInfo(JSONObject whereJson);
|
PdaResponse byBagCodeInfo(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料组桶-获取桶号
|
|
||||||
* @param whereJson {
|
|
||||||
* bag_code: 袋码
|
|
||||||
* }
|
|
||||||
* @return PdaResponse
|
|
||||||
*/
|
|
||||||
PdaResponse byBuckCode(JSONObject whereJson);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.nl.system.service.dict.ISysDictService;
|
|||||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
||||||
import org.nl.wms.basedata_manage.service.IMdPdGroupbucketService;
|
import org.nl.wms.basedata_manage.service.IMdPdGroupbucketService;
|
||||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||||
|
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||||
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
||||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
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.PdaCommonService;
|
||||||
@@ -45,6 +46,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -203,7 +205,11 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponse confirmBucketAssembly(AssemblyBucketParam param) {
|
public PdaResponse confirmBucketAssembly(AssemblyBucketParam param) {
|
||||||
List<JSONObject> infoByBucket = groupbucketService.getBucketInfoByBucket(param.getBucket_code());
|
String bucket_code = param.getBucket_code();
|
||||||
|
// 查询桶码是否存在
|
||||||
|
storagevehicleinfoService.getByCode(bucket_code);
|
||||||
|
|
||||||
|
List<JSONObject> infoByBucket = groupbucketService.getBucketInfoByBucket(bucket_code);
|
||||||
if (infoByBucket.size() > 0) {
|
if (infoByBucket.size() > 0) {
|
||||||
throw new BadRequestException("该桶已绑定过!");
|
throw new BadRequestException("该桶已绑定过!");
|
||||||
}
|
}
|
||||||
@@ -296,12 +302,4 @@ public class PdaCommonServiceImpl implements PdaCommonService {
|
|||||||
result.put("bag_code", bag_code);
|
result.put("bag_code", bag_code);
|
||||||
return PdaResponse.requestParamOk(result);
|
return PdaResponse.requestParamOk(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public PdaResponse byBuckCode(JSONObject whereJson) {
|
|
||||||
String bucket_code = CodeUtil.getNewCode("BUCKED_CODE");
|
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
result.put("bucket_code", bucket_code);
|
|
||||||
return PdaResponse.requestParamOk(result);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,4 +107,9 @@ public class IOSConstant {
|
|||||||
*/
|
*/
|
||||||
public final static String NBC001 = "NBC001";
|
public final static String NBC001 = "NBC001";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类编码:原料称量
|
||||||
|
*/
|
||||||
|
public final static String CL001 = "CL001";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,12 +237,20 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
|||||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(material_id);
|
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(material_id);
|
||||||
// 查询分类
|
// 查询分类
|
||||||
MdPbClassstandard classDao = iMdPbClassstandardService.getById(materDao.getMaterial_type_id());
|
MdPbClassstandard classDao = iMdPbClassstandardService.getById(materDao.getMaterial_type_id());
|
||||||
|
if (ObjectUtil.isEmpty(classDao)) {
|
||||||
|
throw new BadRequestException("请先配置该物料的物料分类!");
|
||||||
|
}
|
||||||
|
|
||||||
String class_code = classDao.getClass_code();
|
String class_code = classDao.getClass_code();
|
||||||
switch (class_code) {
|
switch (class_code) {
|
||||||
case IOSConstant.YL001:
|
case IOSConstant.YL001:
|
||||||
// 原料
|
// 原料
|
||||||
bag_code = CodeUtil.getNewCode("CLASS_CODE_YL");
|
bag_code = CodeUtil.getNewCode("CLASS_CODE_YL");
|
||||||
break;
|
break;
|
||||||
|
case IOSConstant.CL001:
|
||||||
|
// 原料称量
|
||||||
|
bag_code = CodeUtil.getNewCode("CLASS_CODE_YL");
|
||||||
|
break;
|
||||||
case IOSConstant.FL001:
|
case IOSConstant.FL001:
|
||||||
// 辅料
|
// 辅料
|
||||||
bag_code = CodeUtil.getNewCode("CLASS_CODE_FL");
|
bag_code = CodeUtil.getNewCode("CLASS_CODE_FL");
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="桶码" prop="bucket_code">
|
<el-form-item label="桶码" prop="bucket_code">
|
||||||
<el-input v-model="form.bag_code" disabled placeholder="系统生成" style="width: 200px;" />
|
<el-input v-model="form.bucket_code" :disabled="crud.status.edit > 0" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -228,8 +228,8 @@ export default {
|
|||||||
material_code: [
|
material_code: [
|
||||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
vehicle_code: [
|
bucket_code: [
|
||||||
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
{ required: true, message: '桶码不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
pcsn: [
|
pcsn: [
|
||||||
{ required: true, message: '批次不能为空', trigger: 'blur' }
|
{ required: true, message: '批次不能为空', trigger: 'blur' }
|
||||||
|
|||||||
Reference in New Issue
Block a user