package com.aps.core.service.impl; import java.util.List; import com.aps.common.core.utils.DateUtils; import com.aps.common.core.utils.uuid.IdUtils; import com.aps.core.domain.ApsGasPipingPlanTemp; import com.aps.core.domain.ApsPartPlan; import com.aps.core.domain.ApsPartPlanTemp; import com.aps.core.mapper.ApsGasPipingPlanTempMapper; import com.aps.core.mapper.ApsPartPlanMapper; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; 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业务层处理 * * @author wwj * @date 2025-04-09 */ @Service public class ApsGasPipingPlanServiceImpl implements IApsGasPipingPlanService { @Autowired private ApsGasPipingPlanMapper apsGasPipingPlanMapper; @Autowired private ApsGasPipingPlanTempMapper apsGasPipingPlanTempMapper; /** * 查询气体管路计划管理 * * @param id 气体管路计划管理主键 * @return 气体管路计划管理 */ @Override public ApsGasPipingPlan selectApsGasPipingPlanById(String id) { return apsGasPipingPlanMapper.selectApsGasPipingPlanById(id); } /** * 查询气体管路计划管理列表 * * @param apsGasPipingPlan 气体管路计划管理 * @return 气体管路计划管理 */ @Override public List selectApsGasPipingPlanList(ApsGasPipingPlan apsGasPipingPlan) { return apsGasPipingPlanMapper.selectApsGasPipingPlanList(apsGasPipingPlan); } /** * 新增气体管路计划管理 * * @param apsGasPipingPlan 气体管路计划管理 * @return 结果 */ @Override public int insertApsGasPipingPlan(ApsGasPipingPlan apsGasPipingPlan) { apsGasPipingPlan.setId(IdUtils.fastUUID()); apsGasPipingPlan.setCreateTime(DateUtils.getNowDate()); return apsGasPipingPlanMapper.insertApsGasPipingPlan(apsGasPipingPlan); } /** * 修改气体管路计划管理 * * @param apsGasPipingPlan 气体管路计划管理 * @return 结果 */ @Override public int updateApsGasPipingPlan(ApsGasPipingPlan apsGasPipingPlan) { return apsGasPipingPlanMapper.updateApsGasPipingPlan(apsGasPipingPlan); } /** * 批量删除气体管路计划管理 * * @param ids 需要删除的气体管路计划管理主键 * @return 结果 */ @Override public int deleteApsGasPipingPlanByIds(String[] ids) { return apsGasPipingPlanMapper.deleteApsGasPipingPlanByIds(ids); } /** * 删除气体管路计划管理信息 * * @param id 气体管路计划管理主键 * @return 结果 */ @Override public int deleteApsGasPipingPlanById(String id) { return apsGasPipingPlanMapper.deleteApsGasPipingPlanById(id); } @Transactional @Override public int confirmGasPiping(ApsGasPipingPlanTemp apsGasPipingPlanTemp) { //删除所有计划 apsGasPipingPlanMapper.removeAllPlans(); //查询临时表数据 List apsGasPipingPlanTemps=apsGasPipingPlanTempMapper.selectApsGasPipingPlanTempList(apsGasPipingPlanTemp); int count=0; String[] ids=new String[apsGasPipingPlanTemps.size()]; for (int i = 0; i