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 b93ca2c2a..df48d1e8b 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 @@ -114,7 +114,7 @@ public class AftersalesWorkOrderController extends BladeController { /** - * 客服异常工单 完结处理熟练 + * 客服异常工单 完结处理 */ @PostMapping("/addCompletionEnd") @ApiOperationSupport(order = 4) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 5070469d2..cf65074d3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -308,9 +308,10 @@ ldslNew.tray_name AS trayName, ldslNew.unpack AS unpack, ldslNew.source_type AS sourceType, - count(ldss.id) AS realNum, + + (SELECT count(*) FROM logpm_distribution_stock AS lds WHERE lds.stock_list_id = t.id AND lds.is_deleted = 0) AS realNum, - t.reservation_num as planNum, + t.reservationNum as planNum, ( select GROUP_CONCAT( DISTINCT (allocation_id)) from logpm_warehouse_updown_goods where association_value =ldslNew.cargo_number or association_value in ( SELECT order_package_code from logpm_distribution_parcel_list where conditions=2 and material_code=ldslNew.cargo_number) @@ -322,7 +323,7 @@ ldsl.description_goods, ldsl.id, ldrs.id as deliveryDetailsId, - ldrs.reservation_num + SUM(ldrs.reservation_num) AS reservationNum FROM logpm_distribution_reservation_stocklist ldrs LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index a340f408a..af03418ff 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -389,7 +389,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl { * @return */ List exportGetContrastInfo(QuestDetailDTO questDetailDTO); + + /** + * 查询盘点任务是否结束 + * @param id + */ + void getFinishTask(); } 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 7863a0502..2a1141b9c 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 @@ -63,6 +63,7 @@ import org.springblade.system.feign.IUserSearchClient; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; @@ -1357,6 +1358,35 @@ public class TaskQuestServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); + List taskQuestEntities = baseMapper.selectList(queryWrapper); + taskQuestEntities.forEach( i ->{ + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + long l = format.parse(i.getEndTime()).getTime() / 1000; + long l1 = new Date().getTime() / 1000; + if(l < l1){ + //结束当前任务 + TaskQuestEntity taskQuestEntity = new TaskQuestEntity(); + taskQuestEntity.setId(i.getId()); + taskQuestEntity.setQuestStatus(String.valueOf(3)); + baseMapper.updateById(taskQuestEntity); + } + } catch (ParseException e) { + throw new RuntimeException(e); + } + + + + }); + } + /** * 查询货位上的数据 * @param taskSearchDTO