diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProRouteLineMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProRouteLineMapper.java deleted file mode 100644 index e694a96f..00000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProRouteLineMapper.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.op.mes.mapper; - -import java.util.List; - -import com.op.mes.domain.ProRouteLine; -import org.apache.ibatis.annotations.Mapper; - -/** - * 工艺线体关联Mapper接口 - * - * @author Open Platform - * @date 2023-07-13 - */ -@Mapper -public interface ProRouteLineMapper { - /** - * 查询工艺线体关联 - * - * @param recordId 工艺线体关联主键 - * @return 工艺线体关联 - */ - public ProRouteLine selectProRouteLineByRecordId(String recordId); - - /** - * 查询工艺线体关联列表 - * - * @param proRouteLine 工艺线体关联 - * @return 工艺线体关联集合 - */ - public List selectProRouteLineList(ProRouteLine proRouteLine); - - /** - * 新增工艺线体关联 - * - * @param proRouteLine 工艺线体关联 - * @return 结果 - */ - public int insertProRouteLine(ProRouteLine proRouteLine); - - /** - * 修改工艺线体关联 - * - * @param proRouteLine 工艺线体关联 - * @return 结果 - */ - public int updateProRouteLine(ProRouteLine proRouteLine); - - /** - * 删除工艺线体关联 - * - * @param recordId 工艺线体关联主键 - * @return 结果 - */ - public int deleteProRouteLineByRecordId(String recordId); - - /** - * 批量删除工艺线体关联 - * - * @param recordIds 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteProRouteLineByRecordIds(String[] recordIds); - - public List getRouteProdLineListUndo(ProRouteLine proRouteLine); - List getRouteProdLineListDo(ProRouteLine proRouteLine); - - void deleteByRouteId(ProRouteLine proRouteLine); -} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteLineServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteLineServiceImpl.java deleted file mode 100644 index 13063604..00000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteLineServiceImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.op.mes.service.impl; - -import java.util.Date; -import java.util.List; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.op.common.core.utils.DateUtils; -import com.op.common.core.utils.uuid.IdUtils; -import com.op.common.security.utils.SecurityUtils; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.op.mes.mapper.ProRouteLineMapper; -import com.op.mes.domain.ProRouteLine; -import com.op.mes.service.IProRouteLineService; - -/** - * 工艺线体关联Service业务层处理 - * - * @author Open Platform - * @date 2023-07-13 - */ -@Service -public class ProRouteLineServiceImpl implements IProRouteLineService { - @Autowired - private ProRouteLineMapper proRouteLineMapper; - - /** - * 查询工艺线体关联 - * - * @param recordId 工艺线体关联主键 - * @return 工艺线体关联 - */ - @Override - @DS("#header.poolName") - public ProRouteLine selectProRouteLineByRecordId(String recordId) { - return proRouteLineMapper.selectProRouteLineByRecordId(recordId); - } - - /** - * 查询工艺线体关联列表 - * - * @param proRouteLine 工艺线体关联 - * @return 工艺线体关联 - */ - @Override - @DS("#header.poolName") - public List selectProRouteLineList(ProRouteLine proRouteLine) { - return proRouteLineMapper.selectProRouteLineList(proRouteLine); - } - - /** - * 新增工艺线体关联 - * - * @param proRouteLine 工艺线体关联 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int insertProRouteLine(ProRouteLine proRouteLine) { - Date now = DateUtils.getNowDate(); - if(StringUtils.isNotBlank(proRouteLine.getRouteId())){ - //删除之前的关联关系 - proRouteLineMapper.deleteByRouteId(proRouteLine); - } - if(proRouteLine.getSelectedValues()!=null){ - ProRouteLine proRouteLineDto =null; - for(String lineCode:proRouteLine.getSelectedValues()){ - proRouteLineDto = new ProRouteLine(); - proRouteLineDto.setRecordId(IdUtils.fastSimpleUUID()); - proRouteLineDto.setCreateTime(now); - proRouteLineDto.setCreateBy(SecurityUtils.getUsername()); - proRouteLineDto.setRouteId(proRouteLine.getRouteId()); - proRouteLineDto.setItemCode(lineCode); - proRouteLineMapper.insertProRouteLine(proRouteLineDto); - } - } - //新增关联关系 - return 1; - } - - /** - * 修改工艺线体关联 - * - * @param proRouteLine 工艺线体关联 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int updateProRouteLine(ProRouteLine proRouteLine) { - proRouteLine.setUpdateTime(DateUtils.getNowDate()); - return proRouteLineMapper.updateProRouteLine(proRouteLine); - } - - /** - * 批量删除工艺线体关联 - * - * @param recordIds 需要删除的工艺线体关联主键 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int deleteProRouteLineByRecordIds(String[] recordIds) { - return proRouteLineMapper.deleteProRouteLineByRecordIds(recordIds); - } - - /** - * 删除工艺线体关联信息 - * - * @param recordId 工艺线体关联主键 - * @return 结果 - */ - @Override - @DS("#header.poolName") - public int deleteProRouteLineByRecordId(String recordId) { - return proRouteLineMapper.deleteProRouteLineByRecordId(recordId); - } - - @Override - @DS("#header.poolName") - public ProRouteLine getList(ProRouteLine proRouteLine) { - ProRouteLine dto = new ProRouteLine(); - List unSelected= proRouteLineMapper.getRouteProdLineListUndo(proRouteLine); - dto.setUnSelect(unSelected); - List selected= proRouteLineMapper.getRouteProdLineListDo(proRouteLine); - dto.setSelected(selected); - return dto; - } -}