Compare commits

...

2 Commits

Author SHA1 Message Date
841aa2b367 rev: 组盘测试修改 2026-01-12 10:52:08 +08:00
da6188ef83 rev:组盘测试修改 2026-01-12 10:51:48 +08:00
8 changed files with 93 additions and 15 deletions

View File

@@ -39,6 +39,13 @@ public class PdaPublicInterfaceController {
return new ResponseEntity<>(pdaUpdatePointService.queryMaterInfo(whereJson), HttpStatus.OK);
}
@PostMapping("/querySupp")
@Log("查询供应商")
@SaIgnore
public ResponseEntity<Object> querySupp(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(pdaUpdatePointService.querySupp(whereJson), HttpStatus.OK);
}
@PostMapping("/queryRegionDropdown")
@Log("查询区域下拉框")
@SaIgnore

View File

@@ -15,20 +15,32 @@ public interface PdaPublicInterfaceService {
/**
* 查询物料信息
*
* @param whereJson {
* class_code: 物料分类编码
* material_code: 物料编码
* }
* }
* @return PdaResponse
*/
PdaResponse queryMaterInfo(JSONObject whereJson);
/**
* 查询区域下拉框
*
* @param whereJson {
* region_code 区域编码
* }
* }
* @return PdaResponse
*/
PdaResponse queryRegionDropdown(JSONObject whereJson);
/**
* 查询供应商
*
* @param whereJson {
* supp_code 供应商编码、名称
* }
* @return PdaResponse
*/
PdaResponse querySupp(JSONObject whereJson);
}

View File

@@ -37,6 +37,7 @@ import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
import org.nl.wms.warehouse_management.service.VehicleInService;
import org.nl.wms.warehouse_management.service.VehicleOutService;
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
import org.nl.wms.warehouse_management.service.dao.mapper.MdPbGroupplateMapper;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Service;
@@ -76,6 +77,8 @@ public class PdaCommonServiceImpl implements PdaCommonService {
@Resource
private IMdPbGroupplateService groupplateService;
@Resource
private MdPbGroupplateMapper mdPbGroupplateMapper;
@Resource
private IMdPbStoragevehicleinfoService storagevehicleinfoService;
@Resource
private IMdPdGroupbucketService groupbucketService;
@@ -168,22 +171,25 @@ public class PdaCommonServiceImpl implements PdaCommonService {
if (ObjectUtil.isEmpty(bagNo)) {
throw new BadRequestException("袋号不能为空!");
}
List<GroupPlate> groupPlates = groupplateService.getByBagNo(bagNo, "0");
if (groupPlates.size() != 1) {
throw new BadRequestException(groupPlates.size() == 0 ? "组袋记录不存在,请先组袋!" : "组袋记录信息有误,请查询并清理后重试!");
List<JSONObject> bagAssembly = mdPbGroupplateMapper.getBagAssembly(param);
if (bagAssembly.size() != 1) {
throw new BadRequestException(bagAssembly.size() == 0 ? "组袋记录不存在,请先组袋!" : "组袋记录信息有误,请查询并清理后重试!");
}
return PdaResponse.requestParamOk(groupPlates.get(0));
return PdaResponse.requestParamOk(bagAssembly.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);
// 判断此载具状态
JSONObject jsonObject = new JSONObject();
jsonObject.put("vehicle_code", param.getVehicle_code());
groupplateService.checkVehicle(jsonObject);
// 调用PC组盘功能
GroupPlate groupPlate = new GroupPlate();
groupPlate.setVehicle_code(param.getVehicle_code());
groupPlate.setTableData(param.getGroup_plates());
groupplateService.create(groupPlate);
return PdaResponse.requestOk("组盘成功!");
}
@@ -198,6 +204,7 @@ public class PdaCommonServiceImpl implements PdaCommonService {
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());

View File

@@ -2,12 +2,16 @@ 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.query.QueryWrapper;
import org.nl.wms.basedata_manage.service.IMdCsSupplierbaseService;
import org.nl.wms.basedata_manage.service.dao.MdCsSupplierbase;
import org.nl.wms.basedata_manage.service.dao.mapper.MdMeMaterialbaseMapper;
import org.nl.wms.pda.general_management.service.PdaPublicInterfaceService;
import org.nl.wms.pda.util.PdaResponse;
import org.nl.wms.sch_manage.service.ISchBaseRegionService;
import org.nl.wms.sch_manage.service.dao.SchBaseRegion;
import org.nl.wms.warehouse_management.enums.IOSConstant;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -37,6 +41,12 @@ public class PdaUpdatePointServiceImpl implements PdaPublicInterfaceService {
@Resource
private ISchBaseRegionService iSchBaseRegionService;
/**
* 供应商服务类
*/
@Resource
private IMdCsSupplierbaseService iMdCsSupplierbaseService;
@Override
public PdaResponse queryMaterInfo(JSONObject whereJson) {
return PdaResponse.requestParamOk(mdMeMaterialbaseMapper.queryPdaMaterInfo(whereJson));
@@ -58,4 +68,18 @@ public class PdaUpdatePointServiceImpl implements PdaPublicInterfaceService {
});
return PdaResponse.requestParamOk(collect);
}
@Override
public PdaResponse querySupp(JSONObject whereJson) {
String supp_code = whereJson.getString("supp_code");
LambdaQueryWrapper<MdCsSupplierbase> lambda = new QueryWrapper<MdCsSupplierbase>().lambda();
lambda.eq(MdCsSupplierbase::getIs_used, IOSConstant.ONE);
lambda.eq(MdCsSupplierbase::getIs_delete, IOSConstant.ZERO);
if (ObjectUtil.isNotEmpty(supp_code)) {
lambda.like(MdCsSupplierbase::getSupp_code, supp_code)
.or()
.like(MdCsSupplierbase::getSupp_name, supp_code);
}
return PdaResponse.requestParamOk(iMdCsSupplierbaseService.list(lambda));
}
}

View File

@@ -59,7 +59,7 @@ public interface IMdPbGroupplateService extends IService<GroupPlate> {
* 校验载具
*
* @param whereJson {
* storagevehicle_code
* vehicle_code
* }
*/
List<JSONObject> checkVehicle(JSONObject whereJson);

View File

@@ -69,4 +69,14 @@ public interface MdPbGroupplateMapper extends BaseMapper<GroupPlate> {
List<JSONObject> getPalletViewByVehicleCode(String search, List<String> status);
List<JSONObject> getStockGroupInfo(JSONObject param);
/**
* 手持
* 组盘 - 获取袋信息
* @param whereJson {
* bag_no 袋码
* }
* @return List<JSONObject>
*/
List<JSONObject> getBagAssembly(@Param("param") JSONObject whereJson);
}

View File

@@ -212,4 +212,23 @@
ss.sect_code = #{sect_code}
</if>
</select>
<select id="getBagAssembly" resultType="com.alibaba.fastjson.JSONObject">
SELECT
mg.*,
m.material_code,
m.material_name,
c.class_name,
s.supp_name
FROM
md_pb_groupplate mg
LEFT JOIN md_me_materialbase m ON m.material_id = mg.material_id
LEFT JOIN md_pb_classstandard c ON m.material_type_id = c.class_id
LEFT JOIN md_cs_supplierbase s ON s.supp_code = mg.supp_code
WHERE
mg.status = '0'
<if test="param.bag_code != null and param.bag_code != ''">
AND
mg.bag_code = #{param.bag_code}
</if>
</select>
</mapper>

View File

@@ -56,7 +56,6 @@
<rrOperation />
</el-form>
</div>
<rrOperation />
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button