aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java
@@ -165,7 +165,7 @@ * @return 返回操作结果的AjaxResult对象 */ @PostMapping("/confirmPart") public AjaxResult confirmPart(ApsPlatePlanTemp planTemp) { public AjaxResult confirmPart(@RequestBody ApsPlatePlanTemp planTemp) { return toAjax(apsPlatePlanService.confirmPlan(planTemp)); } /** aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipingPlanController.java
@@ -144,9 +144,11 @@ { return toAjax(apsGasPipingPlanService.deleteApsGasPipingPlanByIds(ids)); } /** * 气体管路计划导入 */ @RequiresPermissions("gasPiping:import") @PostMapping("/importData") public AjaxResult importData(MultipartFile file) throws Exception { ExcelUtil<ApsGasPipingPlanTemp> util = new ExcelUtil<ApsGasPipingPlanTemp>(ApsGasPipingPlanTemp.class); @@ -198,8 +200,8 @@ * @Author: wwj * @Date: 2025/4/9 */ @GetMapping("/confirmGasPiping") public AjaxResult confirmGasPiping(ApsGasPipingPlanTemp apsGasPipingPlanTemp) { @PostMapping("/confirmGasPiping") public AjaxResult confirmGasPiping(@RequestBody ApsGasPipingPlanTemp apsGasPipingPlanTemp) { return toAjax(apsGasPipingPlanService.confirmGasPiping(apsGasPipingPlanTemp)); } } aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipingPlanTempController.java
@@ -31,7 +31,7 @@ /** * 查询气体管路计划管理-临时列表 */ @RequiresPermissions("gasPipingTemp:gasPipingTemp:list") @RequiresPermissions("gasPiping:import") @GetMapping("/list") public TableDataInfo list(ApsGasPipingPlanTemp apsGasPipingPlanTemp) { aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipingPlanMapper.java
@@ -60,4 +60,9 @@ * @return 结果 */ public int deleteApsGasPipingPlanByIds(String[] ids); /** * 批量删除气体管路计划管理 * @return 结果 */ int removeAllPlans(); } aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlatePlanMapper.java
@@ -62,4 +62,6 @@ public int deleteApsPlatePlanByIds(String[] ids); public int insertPlatePlanFromTempByBatchNumber(String batchNumber); int removeAllPlatePlans(); } aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingPlanServiceImpl.java
@@ -15,6 +15,7 @@ import com.aps.core.mapper.ApsGasPipingPlanMapper; import com.aps.core.domain.ApsGasPipingPlan; import com.aps.core.service.IApsGasPipingPlanService; import org.springframework.transaction.annotation.Transactional; /** * 气体管路计划管理Service业务层处理 @@ -104,8 +105,11 @@ return apsGasPipingPlanMapper.deleteApsGasPipingPlanById(id); } @Transactional @Override public int confirmGasPiping(ApsGasPipingPlanTemp apsGasPipingPlanTemp) { //删除所有计划 apsGasPipingPlanMapper.removeAllPlans(); //查询临时表数据 List<ApsGasPipingPlanTemp> apsGasPipingPlanTemps=apsGasPipingPlanTempMapper.selectApsGasPipingPlanTempList(apsGasPipingPlanTemp); int count=0; aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlatePlanServiceImpl.java
@@ -1,7 +1,9 @@ package com.aps.core.service.impl; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; import com.aps.common.core.utils.DateUtils; import com.aps.common.core.utils.uuid.IdUtils; @@ -111,6 +113,8 @@ @Override public int confirmPlan(ApsPlatePlanTemp tempPlan) { //先删除所有 apsPlatePlanMapper.removeAllPlatePlans(); //查询临时表数据 List<ApsPlatePlanTemp> apsPartPlanTemps=apsPlatePlanTempMapper.selectApsPlatePlanTempList(tempPlan); int count=0; @@ -121,6 +125,7 @@ ApsPlatePlan platePlan=new ApsPlatePlan(); BeanUtils.copyProperties(apsPartPlanTemps.get(i), platePlan); platePlan.setId(IdUtils.fastUUID()); platePlan.setCreateTime(DateUtils.getNowDate()); //插入正式表,并记录 apsPlatePlanMapper.insertApsPlatePlan(platePlan); count++; aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanMapper.xml
@@ -79,6 +79,8 @@ <if test="isStockComplete != null "> and is_stock_complete = #{isStockComplete}</if> <if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if> <if test="hasRisk != null "> and has_risk = #{hasRisk}</if> and del_flag ='0' </where> </select> @@ -216,4 +218,8 @@ #{id} </foreach> </delete> <update id="removeAllPlans" > update aps_gas_piping_plan set del_flag='1' where del_flag ='0' </update> </mapper> aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanTempMapper.xml
@@ -51,6 +51,7 @@ <include refid="selectApsGasPipingPlanTempVo"/> <where> <if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if> and del_flag='0' </where> </select> aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml
@@ -83,6 +83,7 @@ <if test="isStockComplete != null "> and is_stock_complete = #{isStockComplete}</if> <if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if> <if test="hasRisk != null "> and has_risk = #{hasRisk}</if> and del_flag='0' </where> </select> @@ -129,6 +130,7 @@ <if test="isStockComplete != null">is_stock_complete,</if> <if test="hasTurnback != null">has_turnback,</if> <if test="hasRisk != null">has_risk,</if> create_time, </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null and id != ''">#{id},</if> @@ -166,6 +168,7 @@ <if test="isStockComplete != null">#{isStockComplete},</if> <if test="hasTurnback != null">#{hasTurnback},</if> <if test="hasRisk != null">#{hasRisk},</if> #{createTime}, </trim> </insert> @@ -229,6 +232,8 @@ from aps_plate_plan_temp where batch_number = #{batch_number} </insert> <update id="removeAllPlatePlans" parameterType="String"> update aps_plate_plan set del_flag='1' where del_flag ='0' </update> </mapper>