add:增加组桶
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.basedata_manage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 组桶记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-11-24
|
||||
*/
|
||||
public interface IMdPdGroupbucketService extends IService<MdPdGroupbucket> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package org.nl.wms.basedata_manage.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 组桶记录表
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-11-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("md_pd_groupbucket")
|
||||
public class MdPdGroupbucket implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id标识
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 桶号
|
||||
*/
|
||||
private String bucket_code;
|
||||
|
||||
/**
|
||||
* 桶自重
|
||||
*/
|
||||
private BigDecimal bucket_weight;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String pcsn;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 计量单位标识
|
||||
*/
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 计量单位名称
|
||||
*/
|
||||
private String qty_unit_name;
|
||||
|
||||
/**
|
||||
* 组桶人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 组桶人名称
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 组桶时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.basedata_manage.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 组桶记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-11-24
|
||||
*/
|
||||
public interface MdPdGroupbucketMapper extends BaseMapper<MdPdGroupbucket> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.basedata_manage.service.dao.mapper.MdPdGroupbucketMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.basedata_manage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.basedata_manage.service.IMdPdGroupbucketService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPdGroupbucket;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPdGroupbucketMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 组桶记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-11-24
|
||||
*/
|
||||
@Service
|
||||
public class MdPdGroupbucketServiceImpl extends ServiceImpl<MdPdGroupbucketMapper, MdPdGroupbucket> implements IMdPdGroupbucketService {
|
||||
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class PdaUpdatePointServiceImpl implements PdaUpdatePointService {
|
||||
|
||||
mdPbGroupplateMapper.delete(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, pointDao.getVehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, pointDao.getVehicle_code())
|
||||
.in(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"),
|
||||
IOSEnum.GROUP_PLATE_STATUS.code("出库")
|
||||
)
|
||||
|
||||
@@ -297,7 +297,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
// 查询组盘信息
|
||||
GroupPlate plateDao = iMdPbGroupplateService.getOne(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, dao.getVehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, dao.getVehicle_code())
|
||||
);
|
||||
if (ObjectUtil.isEmpty(plateDao)) {
|
||||
throw new BadRequestException("当前点位载具信息不存在组盘信息!");
|
||||
|
||||
@@ -230,7 +230,7 @@ public class CheckBackMoveTask extends AbstractTask {
|
||||
new UpdateWrapper<GroupPlate>().lambda()
|
||||
.set(GroupPlate::getQty, base_qty)
|
||||
.eq(GroupPlate::getMaterial_id, dtlDao.getMaterial_id())
|
||||
.eq(GroupPlate::getStoragevehicle_code, dtlDao.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, dtlDao.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getPcsn, dtlDao.getPcsn())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
);
|
||||
|
||||
@@ -246,7 +246,7 @@ public class EmpVehicleInTask extends AbstractTask {
|
||||
// 删除组盘信息
|
||||
groupPlateMapper.delete(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, taskObj.getVehicle_code())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class HandOutTask extends AbstractTask {
|
||||
// 删除组盘信息
|
||||
groupPlateMapper.delete(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, taskObj.getVehicle_code())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -23,12 +23,17 @@ public class GroupPlate implements Serializable {
|
||||
private String group_id;
|
||||
|
||||
/**
|
||||
* 载具编码
|
||||
* 袋码
|
||||
*/
|
||||
private String storagevehicle_code;
|
||||
private String bag_code;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
* 载具编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
@@ -59,7 +64,7 @@ public class GroupPlate implements Serializable {
|
||||
|
||||
/**
|
||||
* 状态
|
||||
* 1-组盘 2-入库 3-出库
|
||||
* 0-组袋 1-组盘 2-入库 3-出库
|
||||
*/
|
||||
private String status;
|
||||
|
||||
@@ -68,43 +73,6 @@ public class GroupPlate implements Serializable {
|
||||
*/
|
||||
private String supp_code;
|
||||
|
||||
/**
|
||||
* 有效日期
|
||||
*/
|
||||
private String quality_time;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private String produce_time;
|
||||
|
||||
/**
|
||||
* 执行标准
|
||||
*/
|
||||
private String execution_stand;
|
||||
|
||||
/**
|
||||
* 烘干次数
|
||||
*/
|
||||
private Integer bake_num;
|
||||
|
||||
/**
|
||||
* 品质类型
|
||||
* 1-待检,2-合格,3-不合格
|
||||
*/
|
||||
private String quality_type;
|
||||
|
||||
/**
|
||||
* 料箱类型
|
||||
* 1-大料箱,2-小料箱,3-焊条桶
|
||||
*/
|
||||
private String box_type;
|
||||
|
||||
/**
|
||||
* 工单信息
|
||||
*/
|
||||
private String bom_id;
|
||||
|
||||
/**
|
||||
* 组盘人
|
||||
*/
|
||||
@@ -119,14 +87,4 @@ public class GroupPlate implements Serializable {
|
||||
* 组盘时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 出库业务类型
|
||||
*/
|
||||
private String out_type;
|
||||
|
||||
/**
|
||||
* 打印标签后是否删除
|
||||
*/
|
||||
private String is_need_delete;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.nl.wms.warehouse_management.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -10,7 +9,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.wms.basedata_manage.service.IMdCsSupplierbaseService;
|
||||
@@ -26,7 +24,6 @@ import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_management.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.MdPbGroupplateMapper;
|
||||
import org.nl.wms.warehouse_management.service.dto.GroupPlateDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -81,7 +78,7 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
@Transactional
|
||||
public void create(GroupPlate dto) {
|
||||
// 校验载具信息
|
||||
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(dto.getStoragevehicle_code());
|
||||
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(dto.getVehicle_code());
|
||||
if (ObjectUtil.isEmpty(vehicleDao.getWeigth())) {
|
||||
throw new BadRequestException("请先维护载具重量信息!");
|
||||
}
|
||||
@@ -89,10 +86,10 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
// 校验此载具是否已经组盘
|
||||
List<GroupPlate> groupList = this.list(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, dto.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, dto.getVehicle_code())
|
||||
);
|
||||
if (ObjectUtil.isNotEmpty(groupList)) {
|
||||
throw new BadRequestException("当前载具已经组盘【" + dto.getStoragevehicle_code() + "】");
|
||||
throw new BadRequestException("当前载具已经组盘【" + dto.getVehicle_code() + "】");
|
||||
}
|
||||
|
||||
dto.setGroup_id(IdUtil.getStringId());
|
||||
@@ -100,14 +97,8 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getByCode("KG");
|
||||
dto.setQty_unit_id(unitDao.getMeasure_unit_id());
|
||||
dto.setQty_unit_name(unitDao.getUnit_name());
|
||||
dto.setBox_type(vehicleDao.getStoragevehicle_type());
|
||||
// 状态默认组盘
|
||||
dto.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("组盘"));
|
||||
MdMeMaterialbase mater = iMdMeMaterialbaseService.getById(dto.getMaterial_id());
|
||||
DateTime parse = DateUtil.parse(dto.getProduce_time().substring(0, 10));
|
||||
String quality_time = DateUtil.offsetDay(parse, mater.getQuality_time()).toString();
|
||||
dto.setQuality_time(quality_time.substring(0,10));
|
||||
dto.setProduce_time(dto.getProduce_time().substring(0,10));
|
||||
dto.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
dto.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
dto.setCreate_time(DateUtil.now());
|
||||
@@ -117,11 +108,6 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
@Override
|
||||
@Transactional
|
||||
public void update(GroupPlate dto) {
|
||||
MdMeMaterialbase mater = iMdMeMaterialbaseService.getById(dto.getMaterial_id());
|
||||
DateTime parse = DateUtil.parse(dto.getProduce_time().substring(0, 10));
|
||||
String quality_time = DateUtil.offsetDay(parse, mater.getQuality_time()).toString();
|
||||
dto.setQuality_time(quality_time.substring(0,10));
|
||||
dto.setProduce_time(dto.getProduce_time().substring(0,10));
|
||||
this.updateById(dto);
|
||||
}
|
||||
|
||||
|
||||
@@ -1182,7 +1182,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getMaterial_id, ioStorInvDis.getMaterial_id())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
);
|
||||
@@ -1192,10 +1192,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
groupPlate.setQty(BigDecimal.valueOf(sub_qty));
|
||||
}
|
||||
groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库"));
|
||||
groupPlate.setOut_type(ioStorInv.getBill_type());
|
||||
if (ioStorInvDis.getIs_check().equals(IOSConstant.ZERO)) {
|
||||
groupPlate.setIs_need_delete(IOSConstant.ONE);
|
||||
}
|
||||
groupPlateMapper.updateById(groupPlate);
|
||||
|
||||
}
|
||||
@@ -1278,7 +1274,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getMaterial_id, ioStorInvDis.getMaterial_id())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
);
|
||||
@@ -1288,10 +1284,6 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
groupPlate.setQty(BigDecimal.valueOf(sub_qty));
|
||||
}
|
||||
groupPlate.setStatus(IOSEnum.GROUP_PLATE_STATUS.code("出库"));
|
||||
groupPlate.setOut_type(ioStorInv.getBill_type());
|
||||
if (ioStorInvDis.getIs_check().equals(IOSConstant.ZERO)) {
|
||||
groupPlate.setIs_need_delete(IOSConstant.ONE);
|
||||
}
|
||||
groupPlateMapper.updateById(groupPlate);
|
||||
|
||||
// 查询该明细下是否还有未完成的分配明细
|
||||
|
||||
@@ -622,7 +622,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
groupPlateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getMaterial_id, ioStorInvDis.getMaterial_id())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"))
|
||||
);
|
||||
@@ -693,7 +693,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
groupPlateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
.eq(GroupPlate::getPcsn, ioStorInvDis.getPcsn())
|
||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, ioStorInvDis.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getMaterial_id, ioStorInvDis.getMaterial_id())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"))
|
||||
);
|
||||
|
||||
@@ -206,7 +206,7 @@ public class StIvtCheckmstServiceImpl extends ServiceImpl<StIvtCheckmstMapper, S
|
||||
new UpdateWrapper<GroupPlate>().lambda()
|
||||
.set(GroupPlate::getQty, dtlDao.getFac_qty())
|
||||
.eq(GroupPlate::getMaterial_id, dtlDao.getMaterial_id())
|
||||
.eq(GroupPlate::getStoragevehicle_code, dtlDao.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, dtlDao.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getPcsn, dtlDao.getPcsn())
|
||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
);
|
||||
|
||||
@@ -313,7 +313,7 @@ public class UpdateIvtUtils {
|
||||
private void updateGroupNum(MdPbStoragevehicleext extDao) {
|
||||
GroupPlate groupPlate = groupPlateMapper.selectOne(
|
||||
new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, extDao.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getVehicle_code, extDao.getStoragevehicle_code())
|
||||
.eq(GroupPlate::getMaterial_id, extDao.getMaterial_id())
|
||||
.eq(GroupPlate::getPcsn, extDao.getPcsn())
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user