From cad96f45112f41e2ae24f56a8174b46c379d6dcf Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Tue, 21 Nov 2023 01:47:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=98=E7=82=B9=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/feign/IBasicMaterialClient.java | 1 + .../feign/IBasicdataClientClient.java | 15 +- .../warehouse/entity/QuestDetailEntity.java | 22 ++ .../logpm/warehouse/vo/QuestContrastVO.java | 89 +++++++ .../logpm/warehouse/vo/TaskPackagelistVO.java | 2 +- .../AftersalesWorkOrderController.java | 2 +- .../service/IAftersalesWorkOrderService.java | 6 + .../impl/AftersalesWorkOrderServiceImpl.java | 19 ++ .../feign/BasicdataClientClient.java | 7 +- .../api/WarehouseTaskApiController.java | 13 +- .../controller/TaskQuestController.java | 53 ++++ .../logpm/warehouse/dto/QuestDetailDTO.java | 1 + .../warehouse/mapper/TaskQuestMapper.java | 8 + .../warehouse/mapper/TaskQuestMapper.xml | 74 +++++- .../warehouse/service/ITaskQuestService.java | 32 +++ .../service/impl/TaskQuestServiceImpl.java | 237 +++++++++++++++--- 16 files changed, 525 insertions(+), 56 deletions(-) create mode 100644 blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java diff --git a/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/feign/IBasicMaterialClient.java b/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/feign/IBasicMaterialClient.java index 6add3714c..e72f70a2b 100644 --- a/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/feign/IBasicMaterialClient.java +++ b/blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/feign/IBasicMaterialClient.java @@ -41,6 +41,7 @@ public interface IBasicMaterialClient { String GETMATERIAL = API_PREFIX + "/getMaterial"; String GETMATERIALID = API_PREFIX + "/getMaterialId"; String ADDMATERIAL = API_PREFIX + "/addMaterial"; + String GETMATERIALLIKE = API_PREFIX + "/getMaterialLike"; /** * 获取物料基础信息列表 diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java index 10ebe490e..a8c480d16 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java @@ -45,14 +45,15 @@ public interface IBasicdataClientClient { String BASICDATACLIENTUSERENTITYLISTBYUSERID = API_PREFIX + "/BasicdataClientUserEntityListByUserId"; /** - * 获取基础客户表列表 - * - * @param current 页号 - * @param size 页数 - * @return BladePage - */ + * 获取基础客户表列表 + * + * @param current 页号 + * @param size 页数 + * @param customerName + * @return BladePage + */ @GetMapping(TOP) - BladePage top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + BladePage top(@RequestParam("current") Integer current, @RequestParam("size") Integer size,@RequestParam("code") String customerName); @GetMapping(API_PREFIX+"/findByName") BasicdataClientEntity findByName(@RequestParam String customerName); diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java index cbadd589f..483d3fa98 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java @@ -48,6 +48,13 @@ public class QuestDetailEntity extends TenantEntity { */ @ApiModelProperty(value = "预留1") private String reserve1; + + /** + * 预留1 + */ + @ApiModelProperty(value = "预留1") + @TableField(exist = false) + private String code; /** * 预留2 */ @@ -141,6 +148,21 @@ public class QuestDetailEntity extends TenantEntity { */ @ApiModelProperty(value = "货位") private String positionCode; + /** + * 货位 + */ + @ApiModelProperty(value = "一级品") + private String firsts; + /** + * 货位 + */ + @ApiModelProperty(value = "二级品") + private String second; + /** + * 货位 + */ + @ApiModelProperty(value = "三级品") + private String thirdProduct; /** * 托盘码 */ diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java new file mode 100644 index 000000000..5b4850305 --- /dev/null +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java @@ -0,0 +1,89 @@ +package com.logpm.warehouse.vo; + +import lombok.Data; + +/** + * 对比数据实体 + */ +@Data +public class QuestContrastVO { + + /** + * 订单自编号 + */ + private String orderCode; + /** + * 品牌名称 + */ + private String brandName; + /** + * 商场 名称 + */ + private String mallName; + /*** + * 客户名称 + */ + private String customerName; + /** + * 三级名称 + */ + private String thirdProduct; + /** + * 物料名称 + */ + private String materialName; + /** + * 总件数 + */ + private String totalNumber; + /** + * 在库数据 + */ + private String handQuantity; + /** + * 所在托盘 + */ + private String pallet; + /** + * 货物信息 + */ + private String goodsAllocation; + /** + * 盘点人 + */ + private String updateUser; + /** + * 盘点时间 + */ + private String updateTime; + /** + * 盘点数据 + */ + private String questNum; + /** + * 差异数 + */ + private String differenceNum; + /** + * 托盘码 + */ + private String trayCode; + + private String trayId; + + private String positionCode; + + private String allocationId; + /** + * 更新的货物信息 + */ + private String groundingPositionCode; + /** + * 货物状态 + */ + private String questStatusName; + + + + +} diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java index 195ed0cfb..8acb32c29 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java @@ -26,7 +26,7 @@ public class TaskPackagelistVO { * 运单号 */ @ApiModelProperty(value = "运单号") - private String waybillNub; + private String waybillNumber; /** * 库位信息 diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index e9dfaef5c..85bd20167 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java @@ -118,7 +118,7 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入aftersalesWorkOrder") public R submit(@Valid @RequestBody AftersalesWorkOrderEntity aftersalesWorkOrder) { - return R.status(aftersalesWorkOrderService.saveOrUpdate(aftersalesWorkOrder)); + return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder)); } /** diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java index 77313edec..d4e28452f 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java @@ -49,4 +49,10 @@ public interface IAftersalesWorkOrderService extends BaseService exportAftersalesWorkOrder(Wrapper queryWrapper); + /** + * 工单添加和修改 + * @param aftersalesWorkOrder + * @return + */ + boolean saveOrUpdateOwn(AftersalesWorkOrderEntity aftersalesWorkOrder); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index 903871926..30e6eecbe 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -16,6 +16,7 @@ */ package com.logpm.aftersales.service.impl; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; import com.logpm.aftersales.vo.AftersalesWorkOrderVO; import com.logpm.aftersales.excel.AftersalesWorkOrderExcel; @@ -51,4 +52,22 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl 0 ? true : false; + + }else{ + //修改 + + return baseMapper.updateById(aftersalesWorkOrder) > 0 ? true : false; + } + } + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java index e7355e3f6..9943410cb 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java @@ -18,6 +18,7 @@ package com.logpm.basicdata.feign; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.basicdata.entity.BasicdataClientEntity; @@ -52,11 +53,13 @@ public class BasicdataClientClient implements IBasicdataClientClient { @Override @GetMapping(TOP) - public BladePage top(Integer current, Integer size) { + public BladePage top(Integer current, Integer size, String customerName) { Query query = new Query(); query.setCurrent(current); query.setSize(size); - IPage page = basicdataClientService.page(Condition.getPage(query)); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like(ObjectUtils.isNotNull(customerName),"client_name",customerName); + IPage page = basicdataClientService.page(Condition.getPage(query),queryWrapper); return BladePage.of(page); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java index 2c0073d46..ba3cb2ee4 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java @@ -128,7 +128,7 @@ public class WarehouseTaskApiController { * @return */ @PostMapping("/addDataInfo") - public R addDataInfo(TaskSearchDTO taskSearchDTO){ + public R addDataInfo(@RequestBody TaskSearchDTO taskSearchDTO){ //当前登录人选择的仓库 BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if(Objects.isNull(myCurrentWarehouse)){ @@ -140,7 +140,16 @@ public class WarehouseTaskApiController { } - + /** + * 查询商场名称 + */ + @GetMapping("/getMaterialName") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查询商场名称", notes = "code,type") + public R getMaterialName(Query query,TaskSearchDTO taskSearchDTO) { + R r = taskQuestService.getMaterialName(taskSearchDTO,Condition.getPage(query)); + return r; + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java index 0473a8286..12ff908ed 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java @@ -16,7 +16,9 @@ */ package com.logpm.warehouse.controller; +import com.logpm.warehouse.dto.QuestDetailDTO; import com.logpm.warehouse.dto.TaskQuestDTO; +import com.logpm.warehouse.vo.QuestContrastVO; import com.logpm.warehouse.vo.QuestDetailVO; import com.logpm.warehouse.wrapper.TaskQuestVOWrapper; import io.swagger.annotations.Api; @@ -108,6 +110,47 @@ public class TaskQuestController extends BladeController { return R.data(list); } + + /** + * 查询盘点数据 + * @return + */ + @GetMapping("/getDetailInfo") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "盘点任务 查询盘点数据", notes = "传入id") + public R> selectDataInfo(QuestDetailDTO questDetailDTO,Query query){ + IPage page = taskQuestService.selectTaskDataInfo(questDetailDTO,Condition.getPage(query)); + return R.data(page); + } + + /** + * 查询盘点对比数据 + * @return + */ + @GetMapping("/getContrastInfo") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "盘点任务 查询盘点对比数据", notes = "传入id") + public R> getContrastInfo(QuestDetailDTO questDetailDTO, Query query){ + List page = taskQuestService.getContrastInfo(questDetailDTO,Condition.getPage(query)); + return R.data(page); + } + + /** + * 修改盘点数据 + * @return + */ + @PutMapping("/updateDetailInfo") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "盘点任务 修改盘点数据", notes = "传入id") + public R> updateDataInfo(@RequestBody List questDetailDTO){ + Boolean b = taskQuestService.updateDataInfo(questDetailDTO); + return b ? R.success("修改成功!") : R.fail("修改失败!"); + } + + + + + /** * 盘点任务 分页 */ @@ -150,6 +193,16 @@ public class TaskQuestController extends BladeController { return R.status(taskQuestService.updateByIdCustom(taskQuest)); } + /** + * 盘点任务 修改时间 + */ + @PutMapping("/updateDate") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改时间", notes = "传入taskQuest") + public R updateDate(@Valid @RequestBody TaskQuestDTO taskQuest) { + return R.status(taskQuestService.updateDate(taskQuest)); + } + /** * 盘点任务 新增或修改 */ diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java index 668fbe006..44015e91a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java @@ -31,6 +31,7 @@ import lombok.EqualsAndHashCode; public class QuestDetailDTO extends QuestDetailEntity { private static final long serialVersionUID = 1L; + private String questNum;//任务编号 private Integer stockNum;//在库数量 diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java index 649e5284f..3bbb70af9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java @@ -151,4 +151,12 @@ public interface TaskQuestMapper extends BaseMapper { */ Integer updetaQuestDetailChildList(@Param("questNum")String questNum,@Param("list") List q); + IPage selectTaskInfoIPage(IPage page,@Param("questNum")String questNum,@Param("param") QuestDetailEntity q); + + /** + * 查询盘点对比数据 + * @param questNum + * @return + */ + List selectContrastDataInfo(@Param("questNum")String questNum,@Param("param")QuestDetailEntity questDetail); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml index 1d911260b..ef079a39f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml @@ -108,6 +108,9 @@ `is_new` int(20) NULL DEFAULT NULL COMMENT '是否是新增数据', `grounding_position_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上架后的完整库位', `material_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码(库存品)', + `firsts` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '一级品', + `second` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '二级品', + `third_product` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三级品', `market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)', `incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)', `material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)', @@ -122,14 +125,15 @@ INSERT INTO ${questNum}(`id`, `tenant_id`, `create_user`, `create_time`, `update_user`, `update_time`, `create_dept`, `is_deleted`, `status`, `reserve1`, `reserve2`, `reserve3`, `reserve4`, `reserve5`, `order_code`, `quest_id`, `order_id`, `quest_type`, `quest_target`, `order_package_code`, `order_package_id`, `category_name`, `stock_id`, `quest_status`, `stock_num`, `warehouse_id`, `position_code`, `tray_code`, `tray_id`, - `allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `incoming_batch`, `material_name`, - `waybill_number`) VALUES + `allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `firsts`, `second`, + `third_product`, `incoming_batch`, `material_name`, `waybill_number`) VALUES (#{item.id}, #{item.tenantId}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, #{item.createDept}, #{item.isDeleted} , #{item.status}, #{item.reserve1}, #{item.reserve2}, #{item.reserve3}, #{item.reserve4}, #{item.reserve5}, #{item.orderCode}, #{item.questId}, #{item.orderId} , #{item.questType}, #{item.questTarget}, #{item.orderPackageCode}, #{item.orderPackageId}, #{item.categoryName}, #{item.stockId}, #{item.questStatus}, #{item.stockNum}, #{item.warehouseId} , #{item.positionCode}, #{item.trayCode}, #{item.trayId}, #{item.allocationId}, #{item.groundingAllocationId}, - #{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber} + #{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.firsts} , #{item.second} , + #{item.thirdProduct} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber} ) @@ -147,6 +151,7 @@ and tray_id =#{param.trayId } and order_code =#{param.orderCode } and order_package_code =#{param.orderPackageCode } + and CONCAT(order_package_code, order_code) like concat('%',#{param.code},'%') + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java index c99558473..f9593c56b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java @@ -18,6 +18,7 @@ package com.logpm.warehouse.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.dto.QuestDetailDTO; import com.logpm.warehouse.dto.TaskQuestDTO; import com.logpm.warehouse.dto.TaskSearchDTO; import com.logpm.warehouse.entity.QuestDetailEntity; @@ -199,4 +200,35 @@ public interface ITaskQuestService extends BaseService { * @return */ R addDataInfo(TaskSearchDTO taskSearchDTO); + + /** + * 查询盘点数据 + * @param questDetailDTO + * @return + */ + IPage selectTaskDataInfo(QuestDetailDTO questDetailDTO, IPage page); + + /** + * 修改盘点数据 + * @param questDetailDTO + * @return + */ + Boolean updateDataInfo(List questDetailDTO); + + /** + * 延迟盘点时间 + * @param taskQuest + * @return + */ + boolean updateDate(TaskQuestDTO taskQuest); + + List getContrastInfo(QuestDetailDTO questDetailDTO, IPage page); + + /** + * 查询商家信息 + * @param taskSearchDTO + * @param page + * @return + */ + R getMaterialName(TaskSearchDTO taskSearchDTO, IPage page); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java index 9340eee1f..89f9c1b7f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java @@ -17,7 +17,6 @@ package com.logpm.warehouse.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.Query; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; @@ -47,11 +46,11 @@ import com.logpm.warehouse.vo.*; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springblade.common.constant.common.IsOrNoConstant; -import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.mp.support.BladePage; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; @@ -98,8 +97,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = new ArrayList<>(); taskSearchDTO.getQuestDetailIds().forEach( i ->{ QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setUpdateUser(user.getUserId()); + questDetail.setUpdateTime(new Date()); questDetail.setId(Long.valueOf(i)); questDetail.setQuestStatus(1); list.add(questDetail); @@ -703,9 +710,21 @@ public class TaskQuestServiceImpl extends BaseServiceImpl entityList = new ArrayList<>(); entityList.add(questDetail); baseMapper.insertQuestDetail( questNum,entityList); @@ -730,6 +749,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = new ArrayList<>(); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setId(i.getId()); + questDetail.setQuestStatus(1); //已盘 + questDetail.setUpdateUser(user.getUserId()); + questDetail.setUpdateTime(new Date()); + list.add(questDetail); + baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(),list); }else{ //修改 List collect = childList.stream().filter( ii -> ObjectUtils.isNotNull(ii.getQuestNum()) && ii.getQuestNum() > 0).collect(Collectors.toList()); @@ -754,12 +782,119 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectTaskDataInfo(QuestDetailDTO questDetailDTO,IPage page) { + QuestDetailEntity questDetail = new QuestDetailEntity(); + BeanUtil.copyProperties(questDetailDTO,questDetail); +// List questDetailEntities = baseMapper.selectTaskInfo(questDetailDTO.getQuestNum(), questDetail); + IPage questDetailEntityIPage = baseMapper.selectTaskInfoIPage(page, questDetailDTO.getQuestNum(), questDetail); + IPage page1 = new Page<>(); + List questDetailVOS = new ArrayList<>(); + questDetailEntityIPage.getRecords().stream().forEach( i ->{ + QuestDetailVO questDetailVO = new QuestDetailVO(); + BeanUtil.copyProperties(i,questDetailVO); + questDetailVOS.add(questDetailVO); + + }); + page1.setRecords(questDetailVOS); + page1.setTotal(questDetailEntityIPage.getTotal()); + page1.setCurrent(questDetailEntityIPage.getCurrent()); + page1.setPages(questDetailEntityIPage.getPages()); + page1.setSize(questDetailEntityIPage.getSize()); + return page1; + + + } + + /** + * 批量修改盘点数据 + * @param questDetailDTO + * @return + */ + @Override + public Boolean updateDataInfo(List questDetailDTO) { + if(ObjectUtils.isNotNull(questDetailDTO)){ + + questDetailDTO.stream().collect(Collectors.groupingBy(QuestDetailDTO::getQuestNum)).forEach((k,v) ->{ + + List list = new ArrayList<>(); + v.stream().forEach( i ->{ + if(ObjectUtils.isNotNull(i.getQuestId())){ + QuestDetailEntity questDetail = new QuestDetailEntity(); + BeanUtil.copyProperties(i,questDetail); + if(ObjectUtils.isNotNull(i.getPositionCode())){ + i.setGroundingPositionCode(i.getPositionCode()); + i.setPositionCode(null); + } + list.add(questDetail); + + } + }); + + if(!list.isEmpty()){ + baseMapper.updatePositionCodeList(k,list); + } + }); + return true; + }else{ + return false; + } + + } + + /** + * 修改延期时间 + * @param taskQuest + * @return + */ + @Override + public boolean updateDate(TaskQuestDTO taskQuest) { + TaskQuestEntity questDetail = new TaskQuestEntity(); + BeanUtil.copyProperties(taskQuest,questDetail); + return baseMapper.updateById(questDetail) > 0 ? true : false; + } + + /** + * 查询盘点对比数据 + * @param questDetailDTO + * @param page + * @return + */ + @Override + public List getContrastInfo(QuestDetailDTO questDetailDTO, IPage page) { + + List list = baseMapper.selectContrastDataInfo(questDetailDTO.getQuestNum(),questDetailDTO); + + + + + return null; + } + + /** + * 查询商场数据 + * @param taskSearchDTO + * @param page + * @return + */ + @Override + public R getMaterialName(TaskSearchDTO taskSearchDTO, IPage page) { + BladePage top = basicdataClientClient.top((int) page.getCurrent(), (int) page.getSize(), taskSearchDTO.getCode()); + return R.data(top); + } + /** * 查询货位上的数据 * @param taskSearchDTO * @return */ public R getAllocationInfo(TaskSearchDTO taskSearchDTO){ +// List lists = new ArrayList<>(); TaskDataVO taskDataVO = new TaskDataVO(); String questNum = taskSearchDTO.getQuestNum(); Long questId = taskSearchDTO.getQuestId(); @@ -768,7 +903,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntities = baseMapper.selectTaskInfo(questNum,questDetail); if(ObjectUtils.isNull(questDetailEntities)){ return R.success("没有数据!!"); @@ -777,18 +912,19 @@ public class TaskQuestServiceImpl extends BaseServiceImpl parcelList = distributionParcelListClient.getParcelList(distributionParcelList); - if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据 - continue; - } +// DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity(); +// distributionParcelList.setId(questDetailEntity.getOrderPackageId()); +// List parcelList = distributionParcelListClient.getParcelList(distributionParcelList); +// if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据 +// continue; +// } }else{ //没有 @@ -797,20 +933,38 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum+"_child", questDetailChildEntity); + if(ObjectUtils.isNotNull(questDetailChildEntities)){ + //有处理的数 + packagelistVO.setQuestChildVOList(questDetailChildEntities); + } list.add(packagelistVO); } taskDataVO.setList(list); - return R.data(list); +// lists.add(taskDataVO); + return R.data(taskDataVO); } @Override public List selectallocationList(TaskSearchDTO taskSearchDTO) { try { - TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId()); - List list = baseMapper.selectallocationList(taskQuestEntity.getQuestNum(),taskSearchDTO); + + List list = baseMapper.selectallocationList(taskSearchDTO.getQuestNum(),taskSearchDTO); + if(list.isEmpty()){ + //查询货物信息 + WarehouseGoodsAllocationEntity byId = warehouseGoodsAllocationService.getById(taskSearchDTO.getAllocationId()); + if(ObjectUtils.isNotNull(byId)){ + TaskallocationVO taskallocationVO = new TaskallocationVO(); + taskallocationVO.setAllocationId(taskSearchDTO.getAllocationId()); + taskallocationVO.setPositionCode(byId.getGoodsAllocationName()); + list.add(taskallocationVO); + } + } + return list; }catch (Exception e){ log.debug(e.getMessage()); @@ -835,16 +989,20 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId()); QuestDetailEntity questDetail = new QuestDetailEntity(); questDetail.setQuestId( taskSearchDTO.getQuestId()); - questDetail.setQuestType(3); + if(ObjectUtils.isNotNull(taskSearchDTO.getCode())){ + questDetail.setCode(taskSearchDTO.getCode()); + }else{ + questDetail.setQuestType(3); + } + questDetail.setWarehouseId(taskSearchDTO.getWarehouseId()); IPage taskPageList = new Page<>(); - List questDetailEntityList = baseMapper.selectTaskInfo( taskQuestEntity.getQuestNum(),questDetail); + List questDetailEntityList = baseMapper.selectTaskInfo( taskSearchDTO.getQuestNum(),questDetail); if (Func.isEmpty(questDetailEntityList)){ return null; } - Map> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget)); + /*Map> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget)); //订制品 List questDetailEntities = questDetailMap.get(1); List zeroQuestDetailEntities = questDetailMap.get(2); @@ -902,7 +1060,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list1,String type,Long warehouseId){ + private TaskDataVO getTaskTrayInfoOwn(TaskSearchDTO taskSearchDTO,List list1,String type,Long warehouseId){ TaskDataVO taskDataVO = new TaskDataVO(); List taskPackagelistVOS = new ArrayList<>(); list1.stream().collect(Collectors.groupingBy(QuestDetailEntity::getTrayId)) @@ -1081,10 +1239,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(taskSearchDTO.getQuestNum()+"_child", questDetailChildEntity); + if(ObjectUtils.isNotNull(questDetailChildEntities)){ + //有处理的数 + packagelistVO.setQuestChildVOList(questDetailChildEntities); + } taskPackagelistVOS.add(packagelistVO); // TaskQuestEntity taskQuestEntity = baseMapper.selectById(p.getQuestId()); // num.set(num.get() + p.getStockNum()); @@ -1165,7 +1332,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailList = getQuestDetailList( taskSearchDTO, myCurrentWarehouse.getId(), trayByTrayCode.getId()); - return R.data(getTaskTrayInfoOwn(questDetailList, String.valueOf(taskSearchDTO.getTypeState()), myCurrentWarehouse.getId())); + return R.data(getTaskTrayInfoOwn(taskSearchDTO,questDetailList, String.valueOf(taskSearchDTO.getTypeState()), myCurrentWarehouse.getId())); } @@ -1869,6 +2036,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntities = baseMapper.selectTaskInfo(questNum,detailEntity); @@ -1886,12 +2054,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum, questDetailChildEntity); + questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId()); + List questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum+"_child", questDetailChildEntity); if(ObjectUtils.isNotNull(questDetailChildEntities)){ //有处理的数 packagelistVO.setQuestChildVOList(questDetailChildEntities);