基础信息管理后端删除文件
parent
c377584661
commit
82ec2f40b4
@ -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<ProRouteLine> 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<ProRouteLine> getRouteProdLineListUndo(ProRouteLine proRouteLine);
|
||||
List<ProRouteLine> getRouteProdLineListDo(ProRouteLine proRouteLine);
|
||||
|
||||
void deleteByRouteId(ProRouteLine proRouteLine);
|
||||
}
|
@ -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<ProRouteLine> 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<ProRouteLine> unSelected= proRouteLineMapper.getRouteProdLineListUndo(proRouteLine);
|
||||
dto.setUnSelect(unSelected);
|
||||
List<ProRouteLine> selected= proRouteLineMapper.getRouteProdLineListDo(proRouteLine);
|
||||
dto.setSelected(selected);
|
||||
return dto;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue