From 930780a650df99ccf1e6e48ee3a2242a1af22746 Mon Sep 17 00:00:00 2001 From: sfd <sun.sunshine@163.com> Date: 星期一, 19 五月 2025 17:10:07 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.50.149:8085/r/aps-backend into dev --- aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlanTaskController.java | 5 +++++ aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java | 9 ++++++++- aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireOrderEndDayMapper.xml | 7 ++++++- aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateStandardRequireOrderEndDayMapper.java | 6 ++---- aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireOrderEndDayServiceImpl.java | 2 +- aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java | 11 +++++++++++ 6 files changed, 33 insertions(+), 7 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlanTaskController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlanTaskController.java index 979cdf9..47c6354 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlanTaskController.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlanTaskController.java @@ -7,6 +7,9 @@ import com.aps.core.domain.ApsPlanTask; import com.aps.core.service.ApsPlanTaskService; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -16,6 +19,7 @@ /** * 璁″垝浠诲姟绠$悊 * */ +@Tag(name = "璁″垝浠诲姟绠$悊", description = "璁″垝浠诲姟绠$悊") @RestController @RequestMapping("/planTask") public class ApsPlanTaskController extends BaseController { @@ -23,6 +27,7 @@ @Autowired private ApsPlanTaskService apsPlanTaskService; + @Operation(summary = "璁″垝浠诲姟绠$悊鍒楄〃", description = "鍒嗛〉鏌ヨ") @RequiresPermissions("planTask:list") @GetMapping("/list") public Page<ApsPlanTask> list(ApsPlanTask task){ diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java index 7ea82bc..15f1b31 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java @@ -8,6 +8,7 @@ import java.io.Serializable; import java.util.Date; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; @@ -22,6 +23,7 @@ @TableName(value ="aps_plan_task") @Data @Builder +@Schema(description = "璁″垝浠诲姟") public class ApsPlanTask extends BaseEntity implements Serializable { @TableField(exist = false) @@ -31,53 +33,62 @@ */ @TableField(value = "id") @TableId(type = IdType.INPUT) + @Schema(description = "涓婚敭ID") private Long id; /** * 浠诲姟鎵规鍙� */ + @Schema(description = "浠诲姟鎵规鍙�") @TableField(value = "batch_num") private String batchNum; /** * 浠诲姟绫诲瀷 */ + @Schema(description = "浠诲姟绫诲瀷") @TableField(value = "task_type") private String taskType; /** * 浠诲姟鐘舵�� */ + @Schema(description = "浠诲姟鐘舵��") @TableField(value = "task_status") private String taskStatus; /** * 鍒涘缓浜� */ + @Schema(description = "鍒涘缓浜�") @TableField(value = "create_by") private String createBy; /** * 鍒涘缓鏃堕棿 */ + @Schema(description = "鍒涘缓鏃堕棿") @TableField(value = "create_time") private Date createTime; /** * 鏇存柊浜� */ + @Schema(description = "鏇存柊浜�") @TableField(value = "update_by") private String updateBy; /** * 鏇存柊鏃堕棿 */ + @Schema(description = "鏇存柊鏃堕棿") @TableField(value = "update_time") private Date updateTime; /** * 鍒犻櫎鏍囪(0,1) */ + @Schema(description = "鍒犻櫎鏍囪(0,1)") @TableField(value = "del_flag") private Integer delFlag; diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateStandardRequireOrderEndDayMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateStandardRequireOrderEndDayMapper.java index 6238f9c..2302483 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateStandardRequireOrderEndDayMapper.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateStandardRequireOrderEndDayMapper.java @@ -1,6 +1,5 @@ package com.aps.core.mapper; -import com.aps.core.domain.ApsPlate.ApsPlateOrderPlanDate; import com.aps.core.domain.ApsPlate.ApsPlateStandardRequireOrderEndDay; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -17,9 +16,8 @@ public interface ApsPlateStandardRequireOrderEndDayMapper extends BaseMapper<ApsPlateStandardRequireOrderEndDay> { Integer batchInsert(List<Long> planIds,String createBy); - Integer batchRemove(List<Long> planIds); - - + Integer batchRemoveByPlanId(List<Long> planIds); + Integer batchRemove(); } diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java index 383f5f6..6469be7 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlanTaskServiceImpl.java @@ -9,8 +9,10 @@ import com.aps.core.enums.PLAN_TASK_STATUS; import com.aps.core.enums.PLAN_TASK_TYPE; import com.aps.core.enums.REDIS_LOCK_KEY; +import com.aps.core.mapper.ApsPlateStandardRequireOrderEndDayMapper; import com.aps.core.service.ApsPlate.IApsPlateStandardRequireBatchService; import com.aps.core.service.ApsPlate.IApsPlateStandardRequireService; +import com.aps.core.service.ApsPlateStandardRequireOrderEndDayService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -46,10 +48,13 @@ @Resource RedisLockUtils redisLockUtils; + @Resource + ApsPlateStandardRequireOrderEndDayMapper orderEndDayMapper; + @Override public Page<ApsPlanTask> pagingList(Page<ApsPlanTask> page ,ApsPlanTask task){ LambdaQueryWrapper<ApsPlanTask> queryWrapper=new LambdaQueryWrapper<>(); - queryWrapper.like( !task.getTaskType().isEmpty(), ApsPlanTask::getTaskType,task.getTaskType()); + queryWrapper.like( null!=task.getTaskType(), ApsPlanTask::getTaskType,task.getTaskType()); return mapper.selectPage(page, queryWrapper); } @@ -105,6 +110,8 @@ this.savePlanTask(batchNum); apsPlateStandardRequireService.generatorPlan(batchNum); this.updateTaskStatus(batchNum, PLAN_TASK_STATUS.FINISHED); + /*娓呴櫎宸茬粡瀛樺湪鐨� 宸ュ崟璁″垝瀹屽伐鏃堕棿*/ + orderEndDayMapper.batchRemove(); log.info("璁″垝浠诲姟鎵ц瀹屾垚!"+batchNum); return success(); }catch (Exception e){ diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireOrderEndDayServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireOrderEndDayServiceImpl.java index 924c909..99058d7 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireOrderEndDayServiceImpl.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireOrderEndDayServiceImpl.java @@ -28,7 +28,7 @@ @Override public int saveBatch(List<Long> planIds) { - mapper.batchRemove(planIds); + mapper.batchRemoveByPlanId(planIds); return mapper.batchInsert(planIds, SecurityUtils.getUsername()); } } diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireOrderEndDayMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireOrderEndDayMapper.xml index eeaab37..48e9542 100644 --- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireOrderEndDayMapper.xml +++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateStandardRequireOrderEndDayMapper.xml @@ -56,7 +56,7 @@ from a </insert> - <update id="batchRemove" parameterType="Long"> + <update id="batchRemoveByPlanId" parameterType="Long"> update aps_plate_standard_require_order_end_day set del_flag=1 where plan_id in @@ -64,5 +64,10 @@ #{planId} </foreach> </update> + <update id="batchRemove" > + update aps_plate_standard_require_order_end_day + set del_flag=1 + where del_flag=0 + </update> </mapper> -- Gitblit v1.9.3