| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.core.utils.uuid.IdUtils; |
| | | import com.aps.common.security.utils.SecurityUtils; |
| | | import com.aps.core.domain.ApsPlant; |
| | | import com.aps.core.domain.ApsPlateOrderPlanDate; |
| | | import com.aps.core.domain.ApsPlateOrderPlanManager; |
| | | import com.aps.core.mapper.ApsPlantMapper; |
| | | import com.aps.core.domain.ApsPlateOrderPlanRequireDate; |
| | | import com.aps.core.domain.ApsPlateStandardRequire; |
| | | import com.aps.core.mapper.ApsPlateOrderPlanManagerMapper; |
| | | import com.aps.core.service.IApsPlantService; |
| | | import com.aps.core.service.IApsPlateOrderPlanManagerService; |
| | | import com.aps.core.service.IApsPlateStandardRequireService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 钣金工单计划管理接口 Service业务层处理 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-04-14 |
| | | */ |
| | | @Service |
| | | public class ApsPlateOrderPlanManagerServiceImpl implements IApsPlateOrderPlanManagerService |
| | | { |
| | | public class ApsPlateOrderPlanManagerServiceImpl implements IApsPlateOrderPlanManagerService { |
| | | @Autowired |
| | | private ApsPlateOrderPlanManagerMapper apsPlateOrderPlanManagerMapper; |
| | | |
| | | @Autowired |
| | | private IApsPlateStandardRequireService apsPlateStandardRequireService; |
| | | |
| | | /** |
| | | * 查询钣金工单计划管理 |
| | |
| | | public List<ApsPlateOrderPlanManager> selectApsPlanOrderManager(ApsPlateOrderPlanManager apsPlateOrderPlanManager) { |
| | | return apsPlateOrderPlanManagerMapper.selectApsPlanOrderManager(apsPlateOrderPlanManager); |
| | | } |
| | | |
| | | /** |
| | | * 查询钣金工单计划标准需求 |
| | | * |
| | | * @param workOrderNo 工单号 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ApsPlateStandardRequire> selectApsPlanStandardRequire(String workOrderNo) { |
| | | return apsPlateOrderPlanManagerMapper.selectApsPlanStandardRequire(workOrderNo); |
| | | } |
| | | |
| | | /** |
| | | * 批量更新计划时间 |
| | | * |
| | | * @param apsPlateOrderPlanDate |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void updatePlanDate(ApsPlateOrderPlanDate apsPlateOrderPlanDate) { |
| | | if (apsPlateOrderPlanDate.getIsCustom()) { |
| | | apsPlateOrderPlanDate.setUpdateBy(SecurityUtils.getUsername()); |
| | | apsPlateOrderPlanManagerMapper.updatePlanDateByCustom(apsPlateOrderPlanDate); |
| | | } else { |
| | | List<ApsPlateOrderPlanRequireDate> planRequireDates = apsPlateOrderPlanManagerMapper.selectPlanRequireIds(apsPlateOrderPlanDate.getPlanIds()); |
| | | planRequireDates.forEach(planRequireDate -> { |
| | | planRequireDate.setUpdateBy(SecurityUtils.getUsername()); |
| | | apsPlateOrderPlanManagerMapper.updatePlanDateByBatch(planRequireDate); |
| | | }); |
| | | } |
| | | // apsPlateStandardRequireService.generatorPlan(); |
| | | } |
| | | } |