refactor(组刀任务): 设置lombok

This commit is contained in:
Kelvin 2025-01-06 10:02:14 +08:00
parent 039b84258b
commit c10fd69aa3

View File

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