feat: There is no way the Buss and Convert

This commit is contained in:
super_liu
2021-08-20 18:12:08 +08:00
parent c89a90757c
commit fe89ba9c60
27 changed files with 401 additions and 639 deletions
@@ -1,12 +1,28 @@
package com.adc.da.slrs.sarBussStandFile.controller;
import com.adc.da.att.entity.AttFileEO;
import com.adc.da.att.service.IAttFileEOService;
import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result;
import com.adc.da.slrs.sarBussStandFile.service.ISarBussStandFileService;
import com.adc.da.slrs.standardSplit.controller.SarStandFileEOController;
import com.adc.da.slrs.standardSplit.service.SarStandAttrDetailsEOService;
import com.adc.da.slrs.standardSplit.service.SarStandFileEOService;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.adc.da.base.web.BaseController;
import java.util.List;
/**
* <p>
* 企业标准文件详情表 前端控制器
@@ -16,8 +32,39 @@ import com.adc.da.base.web.BaseController;
* @since 2021-07-25
*/
@RestController
@Api(description = "|SarBussStandFile|")
@RequestMapping("/sarBussStandFile/sar-buss-stand-file")
@Api(tags = "|SarBussStandFile|")
@RequestMapping("/${restPath}/lawss/sarBussStandFile")
public class SarBussStandFileController extends BaseController<SarBussStandFile> {
private static final Logger logger = LoggerFactory.getLogger(SarStandFileEOController.class);
@Autowired
private IAttFileEOService attFileEOService;
@Autowired
private SarStandAttrDetailsEOService sarStandAttrDetailsEOService;
public static final String APPLICATION_JSON_UTF8_VALUE = "application/json;charset=UTF-8";
@Autowired
private ISarBussStandFileService sarBussStandFileEOService;
@ApiOperation(value = "|SarBussStandFileEO|查询转换后的文档详情")
@GetMapping("/queryConvertAtt")
/*@RequiresPermissions("lawss:sarLawsFile:list")*/
public ResponseMessage<SarBussStandFile> queryConvertAtt(String attId) throws Exception {
List<SarBussStandFile> getList = sarBussStandFileEOService.selectFileByAttId(attId);
SarBussStandFile sarBussStandFileEO = new SarBussStandFile();
if(getList != null && !getList.isEmpty()){
sarBussStandFileEO = getList.get(0);
AttFileEO attFileEO = attFileEOService.getFileInfo(attId);
if(attFileEO != null){
sarBussStandFileEO.setFileOldName(attFileEO.getOldFileName());
}
// readStandOrLawsLogService.sendReadSOLLog("BUSS",sarBussStandFileEO);
return Result.success(sarBussStandFileEO);
} else {
return Result.success(null);
}
}
}
@@ -30,4 +30,8 @@ public interface SarBussStandFileDao extends BaseMapper<SarBussStandFile> {
int deleteByStandId(String standId);
int insertForeach(List<SarBussStandFile> list); //批量新增
int insertSelective(SarBussStandFile sarBussStandFile);
int updateByPrimaryKeySelective(SarBussStandFile sarBussStandFile);
}
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarBussStandFile.service;
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 企业标准文件详情表 服务类
@@ -13,4 +15,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ISarBussStandFileService extends IService<SarBussStandFile> {
List<SarBussStandFile> selectFileByAttId(String attId) throws Exception;
}
@@ -4,8 +4,11 @@ import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
import com.adc.da.slrs.sarBussStandFile.service.ISarBussStandFileService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 企业标准文件详情表 服务实现类
@@ -17,4 +20,11 @@ import org.springframework.stereotype.Service;
@Service
public class SarBussStandFileServiceImpl extends ServiceImpl<SarBussStandFileDao, SarBussStandFile> implements ISarBussStandFileService {
@Autowired
private SarBussStandFileDao sarStandFileEODao;
@Override
public List<SarBussStandFile> selectFileByAttId(String attId) throws Exception{
return sarStandFileEODao.selectFileByAttId(attId);
}
}