基础信息管理后端删除文件

highway
A0010407 1 year ago
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…
Cancel
Save