分堆打包接口新增备注信息

This commit is contained in:
liuzhaotian
2025-03-25 15:29:00 +08:00
parent 27917a4854
commit 24d1649854
8 changed files with 44 additions and 146 deletions
@@ -4,21 +4,7 @@ package com.cf.imes.module.executor.controller.admin.manage.pack;
import com.cf.imes.framework.common.pojo.CommonResult; import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageResult; import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.DeleteOtherPartsReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.*;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OtherPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackDetailsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackPageReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackageDetailsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackingReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PlateDetailsRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO; import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO;
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO; import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO;
import com.cf.imes.module.executor.service.manage.pack.PackService; import com.cf.imes.module.executor.service.manage.pack.PackService;
@@ -28,14 +14,7 @@ import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
@@ -199,33 +178,6 @@ public class PackController {
// @GetMapping("/print")
// @Operation(summary = "包裹订单打印")
// @PreAuthorize("@ss.hasPermission('manage:pack:query')")
public CommonResult<PrintOrderPackRespVO> printOrderPack (@Valid PrintOrderPackReqVO reqVO) {
return success(packService.printOrderPack(reqVO));
}
// @PostMapping("/insertParts")
// @Operation(summary = "新增配件包裹")
// @PreAuthorize("@ss.hasPermission('manage:pack:insert')")
public CommonResult<OrderPackRespVO> addNewPartsPack (@Valid @RequestBody OrderPackReqVO reqVO) {
return success(packService.addNewPartsPack(reqVO));
}
@PostMapping("/insertOtherPack") @PostMapping("/insertOtherPack")
@Operation(summary = "新增外部配件-即新增一个包裹") @Operation(summary = "新增外部配件-即新增一个包裹")
@PreAuthorize("@ss.hasPermission('manage:pack:external-parts')") @PreAuthorize("@ss.hasPermission('manage:pack:external-parts')")
@@ -67,6 +67,10 @@ public class PackRespVO {
private String splitter; private String splitter;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime; private LocalDateTime createTime;
@@ -100,6 +100,22 @@ public class PlateDetailsRespVO {
private String remark; private String remark;
@Schema(description = "排版面")
@ExcelProperty("排版面")
private String holeFace;
@Schema(description = "排孔类型")
@ExcelProperty("排孔类型")
private String holeArrange;
@Schema(description = "开门类型")
@ExcelProperty("开门类型")
private String openDoorType;
@Schema(description = "加工组名称集合") @Schema(description = "加工组名称集合")
private List<GroupNameList> processGroupNameList; private List<GroupNameList> processGroupNameList;
@@ -315,7 +315,7 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
List<PlateDetailsRespVO> selectOrderNoPackPlateList(@Param("orderId") Long orderId, @Param("organId") Long organId); List<PlateDetailsRespVO> selectOrderNoPackPlateList(@Param("orderId") Long orderId, @Param("organId") Long organId);
List<PlateDetailsRespVO> selectOrderPlateList(@Param("orderIds") List<Long> orderIds, @Param("organId") Long organId); List<PlateDetailsRespVO> selectOrderPackPlateList(@Param("orderIds") List<Long> orderIds, @Param("organId") Long organId);
IPage<PackageDetailsRespVO> selectPackPlateList(@Param("page") IPage page, @Param("packageId") Long packageId, @Param("organId") Long organId); IPage<PackageDetailsRespVO> selectPackPlateList(@Param("page") IPage page, @Param("packageId") Long packageId, @Param("organId") Long organId);
} }
@@ -3,19 +3,7 @@ package com.cf.imes.module.executor.service.manage.pack;
import com.cf.imes.framework.common.pojo.PageResult; import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.DeleteOtherPartsReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.*;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OtherPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackPageReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackageDetailsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PlateDetailsRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO; import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO;
import java.util.List; import java.util.List;
@@ -44,9 +32,6 @@ public interface PackService {
// 查看配件列表分页 // 查看配件列表分页
List<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO); List<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO);
@@ -54,7 +39,7 @@ public interface PackService {
// 拆包 // 拆包
OrderPackRespVO unpacking(Long packageID); OrderPackRespVO unpacking(Long packageId);
@@ -66,9 +51,6 @@ public interface PackService {
List<OrderPackRespVO> selectPack(Long orderId); List<OrderPackRespVO> selectPack(Long orderId);
// 包裹订单打印
PrintOrderPackRespVO printOrderPack(PrintOrderPackReqVO reqVO);
// 删除包裹及其关联的包裹信息(删除全部) // 删除包裹及其关联的包裹信息(删除全部)
void deleteOrderPack(PackReqVO reqVO); void deleteOrderPack(PackReqVO reqVO);
@@ -90,11 +72,6 @@ public interface PackService {
// 新增配件-即新增一个包裹
OrderPackRespVO addNewPartsPack(OrderPackReqVO reqVO);
// 查询预打包优化信息 // 查询预打包优化信息
String getPrePackInfo(Long orderId); String getPrePackInfo(Long orderId);
@@ -4,11 +4,7 @@ package com.cf.imes.module.executor.service.manage.pack;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO; import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.cf.imes.framework.common.enums.OrderItemTypeEnum; import com.cf.imes.framework.common.enums.*;
import com.cf.imes.framework.common.enums.OrderPackageStatusEnum;
import com.cf.imes.framework.common.enums.OrderPackageTypeEnum;
import com.cf.imes.framework.common.enums.OrderStatusEnum;
import com.cf.imes.framework.common.enums.UserSettingTypeEnum;
import com.cf.imes.framework.common.pojo.PageResult; import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.Assert.AssertUtils; import com.cf.imes.framework.common.util.Assert.AssertUtils;
import com.cf.imes.framework.common.util.json.JsonUtils; import com.cf.imes.framework.common.util.json.JsonUtils;
@@ -19,21 +15,7 @@ import com.cf.imes.module.executor.api.plan.OrderPlanApi;
import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PackPlateList; import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PackPlateList;
import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackOptimizeInfo; import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackOptimizeInfo;
import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.prePack.PrePackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.DeleteOtherPartsReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.*;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.GroupNameList;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OtherPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackPageReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackageDetailsReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PlateAndPartIdList;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PlateDetailsRespVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackReqVO;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackRespVO;
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO; import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO;
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO; import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO; import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
@@ -70,15 +52,7 @@ import java.util.Objects;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.framework.common.util.string.SearchUtil.insertSeparator; import static com.cf.imes.framework.common.util.string.SearchUtil.insertSeparator;
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId; import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.CURRENTLY_NO_CONFIGURATION_AVAILABLE; import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.NO_PRODUCTION_ORDER_INFORMATION_AVAILABLE;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.ORDER_DATE_ERROR;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.ORDER_NO_DATA_ERROR;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.ORDER_PACK_DATA_ERROR;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.ORDER_PACK_DATA_NULL_ERROR;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.ORDER_PACK_ERROR;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.PART_PACK_DATA_ERROR;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.THE_CURRENT_PACKAGE_TYPE_IS_INCORRECT;
@Service @Service
@Validated @Validated
@@ -172,14 +146,7 @@ public class PackServiceImpl implements PackService {
@Override @Override
public List<PlateDetailsRespVO> getOrdersPlateList(List<Long> orderIds) { public List<PlateDetailsRespVO> getOrdersPlateList(List<Long> orderIds) {
// List<OrderDO> orderDOS = ordersMapper.selectBatchIds(orderIds); List<PlateDetailsRespVO> plateDetailsRespVOS = orderPlateMapper.selectOrderPackPlateList(orderIds,getUserOrganId());
// orderDOS.forEach(f->{
// if(OrderPackageStatusEnum.PACKAGED.equals(f.getPackaged())){
//// throw exception(ORDER_IS_PACK_ERROR,f.getId());
// }
// });
List<PlateDetailsRespVO> plateDetailsRespVOS = orderPlateMapper.selectOrderPlateList(orderIds,getUserOrganId());
if (plateDetailsRespVOS.isEmpty()) { if (plateDetailsRespVOS.isEmpty()) {
@@ -573,16 +540,6 @@ public class PackServiceImpl implements PackService {
} }
// 包裹订单打印
@Override
public PrintOrderPackRespVO printOrderPack(PrintOrderPackReqVO reqVO) {
PrintOrderPackRespVO printOrderPackRespVO = ordersMapper.selectOrderPack(reqVO.getOrderId(), reqVO.getPackageNo(), getUserOrganId());
printOrderPackRespVO.setPlateList(orderItemMapper.selectPrintPlateList(reqVO.getOrderId(), reqVO.getPackageNo(), getUserOrganId()));
return printOrderPackRespVO;
}
// 删除包裹及其关联的包裹信息(删除全部) // 删除包裹及其关联的包裹信息(删除全部)
@@ -741,25 +698,6 @@ public class PackServiceImpl implements PackService {
} }
// 新增配件-即新增一个包裹
@Override
@Transactional(rollbackFor = Exception.class)
public OrderPackRespVO addNewPartsPack(OrderPackReqVO reqVO) {
OrderPackageDO orderPackageDO = new OrderPackageDO();
orderPackageDO.setOrderId(reqVO.getOrderId());
orderPackageDO.setType(reqVO.getPackageType());
orderPackageDO.setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
orderPackageDO.setPackageNo(generatePackageNo());
orderPackageMapper.insert(orderPackageDO);
orderItemMapper.insertPartsId(orderPackageDO.getId(), reqVO.getAddPartsIdList(), reqVO.getOrderId(), getUserOrganId());
return typeConversion(orderPackageDO);
}
// 查询预打包优化信息 // 查询预打包优化信息
@Override @Override
public String getPrePackInfo(Long orderId) { public String getPrePackInfo(Long orderId) {
@@ -480,6 +480,7 @@
<result property="phoneNumber" column="phoneNumber"/> <result property="phoneNumber" column="phoneNumber"/>
<result property="salesman" column="salesman"/> <result property="salesman" column="salesman"/>
<result property="splitter" column="splitter"/> <result property="splitter" column="splitter"/>
<result property="remark" column="remark"/>
<result property="createTime" column="createTime"/> <result property="createTime" column="createTime"/>
<result property="packId" column="packId"/> <result property="packId" column="packId"/>
<result property="packCount" column="packCount"/> <result property="packCount" column="packCount"/>
@@ -535,7 +536,8 @@
address as address, address as address,
salesman as salesman, salesman as salesman,
splitter as splitter, splitter as splitter,
packaged as packaged packaged as packaged,
remark as remark
from orders from orders
<where> <where>
@@ -899,6 +899,9 @@
<result property="profiling" column="profiling"/> <result property="profiling" column="profiling"/>
<result property="rowHole" column="rowHole"/> <result property="rowHole" column="rowHole"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="holeFace" column="holeFace"/>
<result property="holeArrange" column="holeArrange"/>
<result property="openDoorType" column="openDoorType"/>
<collection property="processGroupNameList" javaType="java.util.List" ofType="com.cf.imes.module.executor.controller.admin.manage.pack.vo.GroupNameList"> <collection property="processGroupNameList" javaType="java.util.List" ofType="com.cf.imes.module.executor.controller.admin.manage.pack.vo.GroupNameList">
<result property="name" column="name"/> <result property="name" column="name"/>
@@ -930,7 +933,10 @@
op.remark as remark, op.remark as remark,
op.is_special_shaped as specialShaped, op.is_special_shaped as specialShaped,
op.is_sculpt as profiling, op.is_sculpt as profiling,
op.is_row_hole as rowHole op.is_row_hole as rowHole,
op.hole_face as holeFace,
op.hole_arrange as holeArrange,
op.open_door_type as openDoorType
from order_plate op from order_plate op
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
@@ -944,7 +950,7 @@
</select> </select>
<select id="selectOrderPlateList" <select id="selectOrderPackPlateList"
parameterType="java.lang.Long" parameterType="java.lang.Long"
resultMap="PlateDetailsMap"> resultMap="PlateDetailsMap">
@@ -968,7 +974,10 @@
op.remark as remark, op.remark as remark,
op.is_special_shaped as specialShaped, op.is_special_shaped as specialShaped,
op.is_sculpt as profiling, op.is_sculpt as profiling,
op.is_row_hole as rowHole op.is_row_hole as rowHole,
op.hole_face as holeFace,
op.hole_arrange as holeArrange,
op.open_door_type as openDoorType
from order_plate op from order_plate op
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id