Merge remote-tracking branch 'origin/develop_1' into develop_master

# Conflicts:
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardsInfo/service/impl/SarStandardsInfoServiceImpl.java
This commit is contained in:
yuezhihang
2021-08-24 15:34:27 +08:00
11 changed files with 62 additions and 15 deletions
+6
View File
@@ -127,6 +127,12 @@
<artifactId>hanlp</artifactId>
<version>portable-1.7.5</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -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;
}
@@ -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;
@@ -249,6 +249,10 @@
)
</select>
<select id="getAllStands" resultType="java.lang.String">
SELECT DISTINCT ID FROM sar_standards_info
SELECT DISTINCT STAND_ID FROM sar_stand_items
</select>
<select id="getAllStand" resultType="java.lang.String">
SELECT DISTINCT ID FROM sar_standards_info where VALID_FLAG=0
</select>
</mapper>