diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java index f5b4b2b..2a17f14 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java @@ -12,6 +12,7 @@ import com.ktg.mes.md.mapper.*; import com.ktg.mes.wm.domain.*; import com.ktg.mes.wm.mapper.*; import com.ktg.mes.wm.service.IWmsInPlanService; +import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ktg.mes.wm.service.IWmsZdTaskService; @@ -23,88 +24,57 @@ import static org.apache.commons.lang3.SystemUtils.getUserName; /** * 组装任务Service业务层处理 - * + * * @author yinjinlu * @date 2024-11-01 */ @Service -public class WmsZdTaskServiceImpl implements IWmsZdTaskService -{ - @Autowired - private BaseKnifeMapper baseKnifeMapper; - - @Autowired - private BomRouteMapper bomRouteMapper; - - @Autowired - private MdItemMapper mdItemMapper; - - @Autowired - private BaseTechnologyBomMapper baseTechnologyBomMapper; - - @Autowired - private WmsZdTaskMapper wmsZdTaskMapper; - - @Autowired - private WmStorageAreaMapper wmStorageAreaMapper; - - @Autowired - private IWmsInPlanService wmsInPlanService; - - @Autowired - private WmsInTaskMapper wmsInTaskMapper; - - @Autowired - private WmsOutPlanMapper wmsOutPlanMapper; - - @Autowired - private WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper; - - @Autowired - private WmsOutTaskMapper wmsOutTaskMapper; - - @Autowired - private ProductionArrangementsMapper productionArrangementsMapper; - - @Autowired - private BaseKnifeLockedMapper baseKnifeLockedMapper; - - @Autowired - private MyConfig myConfig; +@RequiredArgsConstructor +public class WmsZdTaskServiceImpl implements IWmsZdTaskService { + private final BaseKnifeMapper baseKnifeMapper; + private final BomRouteMapper bomRouteMapper; + private final MdItemMapper mdItemMapper; + private final BaseTechnologyBomMapper baseTechnologyBomMapper; + private final WmsZdTaskMapper wmsZdTaskMapper; + private final WmStorageAreaMapper wmStorageAreaMapper; + private final IWmsInPlanService wmsInPlanService; + private final WmsInTaskMapper wmsInTaskMapper; + private final WmsOutPlanMapper wmsOutPlanMapper; + private final WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper; + private final WmsOutTaskMapper wmsOutTaskMapper; + private final ProductionArrangementsMapper productionArrangementsMapper; + private final BaseKnifeLockedMapper baseKnifeLockedMapper; /** * 查询组装任务 - * + * * @param wmsZdTaskId 组装任务主键 * @return 组装任务 */ @Override - public WmsZdTask selectWmsZdTaskByWmsZdTaskId(String wmsZdTaskId) - { + public WmsZdTask selectWmsZdTaskByWmsZdTaskId(String wmsZdTaskId) { return wmsZdTaskMapper.selectWmsZdTaskByWmsZdTaskId(wmsZdTaskId); } /** * 查询组装任务列表 - * + * * @param wmsZdTask 组装任务 * @return 组装任务 */ @Override - public List selectWmsZdTaskList(WmsZdTask wmsZdTask) - { + public List selectWmsZdTaskList(WmsZdTask wmsZdTask) { return wmsZdTaskMapper.selectWmsZdTaskList(wmsZdTask); } /** * 新增组装任务 - * + * * @param wmsZdTask 组装任务 * @return 结果 */ @Override - public int insertWmsZdTask(WmsZdTask wmsZdTask) - { + public int insertWmsZdTask(WmsZdTask wmsZdTask) { wmsZdTask.setCreateTime(DateUtils.getNowDate()); wmsZdTask.setCreateBy(getUserName()); return wmsZdTaskMapper.insertWmsZdTask(wmsZdTask); @@ -112,13 +82,12 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService /** * 修改组装任务 - * + * * @param wmsZdTask 组装任务 * @return 结果 */ @Override - public int updateWmsZdTask(WmsZdTask wmsZdTask) - { + public int updateWmsZdTask(WmsZdTask wmsZdTask) { wmsZdTask.setUpdateTime(DateUtils.getNowDate()); wmsZdTask.setUpdateBy(getUserName()); return wmsZdTaskMapper.updateWmsZdTask(wmsZdTask); @@ -126,25 +95,23 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService /** * 批量删除组装任务 - * + * * @param wmsZdTaskIds 需要删除的组装任务主键 * @return 结果 */ @Override - public int deleteWmsZdTaskByWmsZdTaskIds(String[] wmsZdTaskIds) - { + public int deleteWmsZdTaskByWmsZdTaskIds(String[] wmsZdTaskIds) { return wmsZdTaskMapper.deleteWmsZdTaskByWmsZdTaskIds(wmsZdTaskIds); } /** * 删除组装任务信息 - * + * * @param wmsZdTaskId 组装任务主键 * @return 结果 */ @Override - public int deleteWmsZdTaskByWmsZdTaskId(String wmsZdTaskId) - { + public int deleteWmsZdTaskByWmsZdTaskId(String wmsZdTaskId) { return wmsZdTaskMapper.deleteWmsZdTaskByWmsZdTaskId(wmsZdTaskId); } @@ -383,7 +350,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService return AjaxResult.success(); } - public String getProductRfid(Long itemId, int i){ + public String getProductRfid(Long itemId, int i) { MdItem mdItem = mdItemMapper.selectMdItemById(itemId); // 获取最大的RFID 然后加1 : RFID为物料的编码加序号