Merge branch 'develop_master' into develop_migration

This commit is contained in:
super_liu
2021-08-24 17:31:22 +08:00
13 changed files with 67 additions and 16 deletions
@@ -21,4 +21,5 @@ public interface SarBussStandValDao extends BaseMapper<SarBussStandVal> {
int deleteDataByStandId(String standId);
int insertForeach(List<SarBussStandVal> list); //批量新增
}
@@ -10,6 +10,7 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
@@ -109,13 +110,24 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
for (SarPublicIdeaAll sarPublicIdeaAll:data){
GetExcelDto getExcelDto=GetExcelDto.builder()
.partCode(sarPublicIdeaAll.getPartCode())
.content(sarPublicIdeaAll.getContent())
.oldText(sarPublicIdeaAll.getOldText())
.newText(sarPublicIdeaAll.getNewText())
.reason(sarPublicIdeaAll.getReason())
.userName(sarPublicIdeaAll.getUserName())
.deptName(sarPublicIdeaAll.getDeptName())
.build();
standExcel.add(getExcelDto);
}
EasyExcel.write(response.getOutputStream(),GetExcelDto.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
List<List<String>> headList=new ArrayList<List<String>>();
headList.add(Lists.newArrayList("章节编号"));
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改前"));
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改后"));
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改理由"));
headList.add(Lists.newArrayList("提出部门"));
headList.add(Lists.newArrayList("提出人"));
EasyExcel.write(response.getOutputStream(),GetExcelDto.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
.doWrite(standExcel);
} catch (Exception e) {
response.reset();
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandIdea.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentLoopMerge;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@@ -23,13 +24,20 @@ import lombok.NoArgsConstructor;
@ColumnWidth(15)
public class GetExcelDto {
@ExcelProperty("章节编号")
// @ExcelProperty("章节编号")
private String partCode;
@ExcelProperty("修改意见内容(包括理由或依据)")
private String content;
@ExcelProperty("提出人")
private String userName;
@ExcelProperty("所在部门")
// @ExcelProperty("修改意见内容(包括理由或依据)")
// private String content;
private String oldText;
private String newText;
private String reason;
// @ExcelProperty("提出部门")
private String deptName;
// @ExcelProperty("提出人")
private String userName;
}
@@ -41,6 +41,8 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
@Autowired
private SarStandardsInfoController sarStandardsInfoController;
@Autowired
private SarStandItemsDao sarStandItemsDao;
public List<ActSarItemsEO> queryItemsByList(SarStandItemsEOPage page, String resType){
List<SarStandItems> itemsEOList = dao.queryItemsByList(page);
@@ -179,6 +181,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
@Override
public String sarStandItemsaveBatch(List<SarStandItems> sarStandItems) {
if (null!=sarStandItems && sarStandItems.size()>0) {
sarStandItemsDao.deleteByStandIdAndFileType(sarStandItems.get(0).getStandId(), sarStandItems.get(0).getFileType());
}
boolean flag=this.saveBatch(sarStandItems);
if (flag){
return "0";
@@ -114,14 +114,14 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
@GetMapping("/queryStandInfo")
@ApiOperation("查询标准信息")
public ResponseMessage queryStandInfo(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
String id){
String id,String cars){
// List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryStandId(id);
// List<String> list1 = new ArrayList();
// for(SarStandProjectLibrary s:list){
// list1.add(s.getStandId());
// }
// System.out.println(list1);
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id);
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id,cars);
return Result.success("200",list);
}
/**
@@ -25,4 +25,5 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
List<SarStandProjectLibrary> selectPagesWorkFlow(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
Integer selectCountWorkFlow(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
List<String> getAllStands();
List<String> getAllStand();
}
@@ -14,7 +14,7 @@ public interface SarStandProjectLibraryService {
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
List<SarStandProjectLibrary> queryByProductLine(String productLine);
List<SarStandProjectLibrary> queryStandId(String standId);
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId);
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars);
void deleteByIds(List<StandProjectRelationDto> ids);
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
@@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import redis.clients.jedis.ScanResult;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -159,8 +161,17 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
return list;
}
@Override
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId) {
List<String> ids=sarStandProjectLibraryDao.getAllStands();
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars) {
System.out.println(cars);
List<String> ids =new ArrayList<>();
if ("1".equals(cars)){
ids=sarStandProjectLibraryDao.getAllStand();
}
else {
ids=sarStandProjectLibraryDao.getAllStands();
}
String id="";
for (String s:ids) {
id="'"+s+"',"+id;
@@ -163,7 +163,7 @@ public class SarStandardComplianceAssessResultController {
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
if (eo.getProductName() != null) queryWrapper.like("product_name", eo.getProductName());
// if (eo.getStandId() != null) queryWrapper.like("STAND_ID", eo.getStandId());
if (eo.getProductId() != null) queryWrapper.like("product_id", eo.getProductId());
// if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
@@ -22,6 +22,10 @@ public class SarStandardComplianceProductAssessEO{
@TableField("type")
private String type;
@ApiModelProperty(value = "项目编号")
@TableField("product_id")
private String productId;
@ApiModelProperty(value = "'项目名称'")
private String productName;