Merge branch 'develop_master' into 'FOTON'
Develop master See merge request LiuChao/foton-slrs-system-rest!283
This commit is contained in:
@@ -70,9 +70,21 @@ public class BusProcessEvaluationHis implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String updateTime;
|
||||
|
||||
@ApiModelProperty(value = "onlyOffice 是否编辑 0 未编辑 1 已编辑")
|
||||
@TableField("EDIT_STATUS")
|
||||
private String editStatus;
|
||||
|
||||
@ApiModelProperty(value = "onlyOffice 编辑文件存储路径")
|
||||
@TableField("EDIT_FILE_PATH")
|
||||
private String editFilePath;
|
||||
|
||||
@ApiModelProperty(value = "逻辑状态")
|
||||
@TableField("FLAG")
|
||||
private String flag;
|
||||
|
||||
@ApiModelProperty(value = "onlyOffice 访问编辑文件全路径")
|
||||
@TableField(exist = false)
|
||||
private String downLoadUrl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -53,14 +53,14 @@ public class WaterMarkUtil {
|
||||
under.setGState(gs);
|
||||
under.restoreState();
|
||||
under.beginText();
|
||||
under.setFontAndSize(base, 50);
|
||||
under.setFontAndSize(base, 30);
|
||||
under.setTextMatrix(30, 30);
|
||||
under.setColorFill(BaseColor.LIGHT_GRAY);
|
||||
for (int y = 0; y < 5; y++) {
|
||||
for (int x = 0; x < 10; x++) {
|
||||
// 水印文字成45度角倾斜
|
||||
for (int y = 0; y < 50; y++) {
|
||||
for (int x = 0; x < 50; x++) {
|
||||
// 水印文字成45度角倾斜 x位置 y位置 角度
|
||||
under.showTextAligned(Element.ALIGN_LEFT
|
||||
, waterMarkName, 100 + 300 * x, 300 * y, 40);
|
||||
, waterMarkName, 40 + 120 * x, 100 * y, 40);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
|
||||
// // 添加自定义拦截器,并拦截对应 url
|
||||
// addInterceptor.addPathPatterns("/**");
|
||||
addInterceptor.addPathPatterns("/**");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ public class CodeGen {
|
||||
|
||||
private static final String PACKAGE_PATH="/adc-da-slrs/src/main";
|
||||
|
||||
private static final String AUTHOR="super_liu";
|
||||
private static final String AUTHOR="zhaokaiyao";
|
||||
|
||||
private static final String DB_IP="127.0.0.1:3306/foton_slrs_test";
|
||||
private static final String DB_IP="123.56.177.15:3306/foton_slrs_test2";
|
||||
|
||||
private static final String DB_USER="root";
|
||||
|
||||
private static final String DB_PWD="root";
|
||||
private static final String DB_PWD="RsLDRj3dXtSwYjBI";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.adc.da.slrs.fileMaterialCenter.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
||||
import com.adc.da.slrs.fileMaterialCenter.service.IFileMaterialService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-14
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "资料中心")
|
||||
@RequestMapping("/fileMaterialCenter/file-material")
|
||||
public class FileMaterialController extends BaseController<FileMaterial> {
|
||||
|
||||
@Autowired
|
||||
IFileMaterialService iFileMaterialService;
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("新增文件资料组")
|
||||
public ResponseMessage addFileMaterial(FileMaterial material){
|
||||
boolean save = iFileMaterialService.save(material);
|
||||
|
||||
return Result.success(save);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除文件资料组")
|
||||
public ResponseMessage deleteMaterial(String id){
|
||||
List<String> idList = Arrays.asList(id.split(id));
|
||||
boolean b = iFileMaterialService.removeByIds(idList);
|
||||
|
||||
return Result.success(b);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询文件资料组")
|
||||
public ResponseMessage<IPage<FileMaterial>> getFileMaterial(FileMaterialPage queryPage){
|
||||
IPage<FileMaterial> fileMaterial = iFileMaterialService.getFileMaterial(queryPage);
|
||||
|
||||
return Result.success(fileMaterial);
|
||||
}
|
||||
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改文件资料组")
|
||||
public ResponseMessage updateFileMaterial(FileMaterial fileMaterial){
|
||||
boolean b = iFileMaterialService.updateById(fileMaterial);
|
||||
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/type")
|
||||
@ApiOperation("获取类型")
|
||||
public ResponseMessage<List<String>> getFileMaterialType(){
|
||||
List<String> fileMaterialType = iFileMaterialService.getFileMaterialType();
|
||||
|
||||
return Result.success(fileMaterialType);
|
||||
}
|
||||
|
||||
@PutMapping("/topping")
|
||||
@ApiModelProperty("置顶")
|
||||
public ResponseMessage topping(String id){
|
||||
int topping = iFileMaterialService.topping(id);
|
||||
|
||||
return Result.success(topping);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.fileMaterialCenter.dao;
|
||||
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-14
|
||||
*/
|
||||
public interface FileMaterialDao extends BaseMapper<FileMaterial> {
|
||||
|
||||
|
||||
int topping(@Param("id") String id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.adc.da.slrs.fileMaterialCenter.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.Tag;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="FileMaterial对象", description="")
|
||||
public class FileMaterial extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@TableField("data_type")
|
||||
private String dataType;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
@TableField("data_title")
|
||||
private String dataTitle;
|
||||
|
||||
@ApiModelProperty(value = "上传时间")
|
||||
@TableField("data_upload_time")
|
||||
private Date dataUploadTime;
|
||||
|
||||
@ApiModelProperty(value = "文件id")
|
||||
@TableField("attach_file_id")
|
||||
private String attachFileId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "点击量")
|
||||
@TableField("click_count")
|
||||
private Integer clickCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "置顶")
|
||||
@TableField("is_top")
|
||||
private Integer isTop;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.fileMaterialCenter.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhaokaiyao
|
||||
*/
|
||||
@Data
|
||||
public class FileMaterialPage {
|
||||
|
||||
private String dataTitle;
|
||||
|
||||
private String dataType;
|
||||
|
||||
private String startDataUploadTime;
|
||||
|
||||
private String endDataUploadTime;
|
||||
|
||||
|
||||
private Integer page;
|
||||
|
||||
private Integer pageSize;
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.adc.da.slrs.fileMaterialCenter.service;
|
||||
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import javafx.scene.paint.Material;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-14
|
||||
*/
|
||||
public interface IFileMaterialService extends IService<FileMaterial> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询文件资料组
|
||||
* @param queryPage
|
||||
* @return
|
||||
*/
|
||||
IPage<FileMaterial> getFileMaterial(FileMaterialPage queryPage);
|
||||
|
||||
|
||||
/**
|
||||
* 获取类型
|
||||
* @return
|
||||
*/
|
||||
List<String> getFileMaterialType();
|
||||
|
||||
/**
|
||||
* 置顶
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int topping(String id);
|
||||
|
||||
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.adc.da.slrs.fileMaterialCenter.service.impl;
|
||||
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||
import com.adc.da.slrs.fileMaterialCenter.dao.FileMaterialDao;
|
||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
||||
import com.adc.da.slrs.fileMaterialCenter.service.IFileMaterialService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.management.Query;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-14
|
||||
*/
|
||||
@Service
|
||||
public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMaterial> implements IFileMaterialService {
|
||||
|
||||
@Autowired
|
||||
FileMaterialDao fileMaterialDao;
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<FileMaterial> getFileMaterial(FileMaterialPage queryPage) {
|
||||
|
||||
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (queryPage.getDataType()!=null){
|
||||
queryWrapper.eq("data_type",queryPage.getDataTitle());
|
||||
}
|
||||
|
||||
if (queryPage.getDataTitle()!=null){
|
||||
queryWrapper.like("data_title",queryPage.getDataTitle());
|
||||
}
|
||||
|
||||
if (queryPage.getStartDataUploadTime()!=null && queryPage.getEndDataUploadTime()!=null){
|
||||
|
||||
|
||||
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||||
queryWrapper.between("data_upload_time",
|
||||
sdf.format(queryPage.getStartDataUploadTime()),
|
||||
sdf.format(queryPage.getEndDataUploadTime()));
|
||||
}
|
||||
|
||||
return this.page(new Page<>(queryPage.getPage(),queryPage.getPageSize()),queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getFileMaterialType() {
|
||||
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.select("data_type");
|
||||
return this.listObjs(queryWrapper, item -> item.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int topping(String id) {
|
||||
return fileMaterialDao.topping(id);
|
||||
}
|
||||
}
|
||||
+1
@@ -78,6 +78,7 @@ public class QualityEvaluationController extends BaseController<QualityEvaluatio
|
||||
qualityEvaluation.setLawId(form.getLawId()) ;
|
||||
qualityEvaluation.setUserId(form.getUserId()) ;
|
||||
qualityEvaluation.setEvaluationType(form.getEvaluationType());
|
||||
qualityEvaluation.setProcessNode(form.getProcessNode());
|
||||
|
||||
List<QualityEvaluation> evaluationForm = iQualityEvaluationService.getEvaluationForm(qualityEvaluation);
|
||||
|
||||
|
||||
+3
@@ -25,4 +25,7 @@ public class FormVO {
|
||||
|
||||
@ApiModelProperty("评分类型")
|
||||
private String evaluationType;
|
||||
|
||||
@ApiModelProperty("流程节点名称")
|
||||
private String processNode;
|
||||
}
|
||||
|
||||
+36
-2
@@ -72,7 +72,8 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
public IPage<QualityEvaluation> getHistory(QualityEvaluation query) {
|
||||
QueryWrapper<QualityEvaluation> queryWrapper = new QueryWrapper<>();
|
||||
// Page<QualityEvaluation> page = new Page<>(query.getPage(), query.getPageSize());
|
||||
Page<QualityEvaluation> page = new Page<>(1, 20);
|
||||
//没有page和pageSize无法分页
|
||||
Page<QualityEvaluation> page = new Page<>(1, 100000);
|
||||
|
||||
|
||||
if (query.getUserId()!=null){ //指定用户
|
||||
@@ -84,6 +85,9 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
queryWrapper.eq("evaluation_type",query.getEvaluationType());
|
||||
}
|
||||
|
||||
if (query.getLawId()!=null){ //指定评价指标
|
||||
queryWrapper.eq("law_id",query.getLawId());
|
||||
}
|
||||
queryWrapper.eq("`index`.value_type","number");
|
||||
//sql计算每个用户的评分
|
||||
return qualityEvaluationDao.getHistory(page,queryWrapper);
|
||||
@@ -112,6 +116,10 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
queryWrapper.eq("evaluation_type",query.getEvaluationType());
|
||||
}
|
||||
|
||||
if (query.getProcessNode()!=null && !"".equals(query.getProcessNode()) ){
|
||||
queryWrapper.eq("process_node",query.getProcessNode());
|
||||
}
|
||||
|
||||
return qualityEvaluationDao.getEvaluationForm(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -140,9 +148,35 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
result.put("dynamic",0.0);
|
||||
result.put("quality",0.0);
|
||||
|
||||
|
||||
/**
|
||||
* 同一节点为多人评价时,需要取多人评价的平均分用以计算最终得分。
|
||||
* 各环节评分权重分别设置为30%、40%、30%,
|
||||
* 即:标准编写质量最终得分=征求意见会签人评价平均分*30%+技术委员会专家评价平均分*40%+标准法规工程师和标准法规部主管领导评价平均分*30%。
|
||||
*/
|
||||
result.putAll(list.stream()
|
||||
.collect(Collectors.groupingBy(QualityEvaluation::getEvaluationType,
|
||||
Collectors.averagingDouble(item ->Double.valueOf(item.getScore()) ))));
|
||||
Collectors.averagingDouble(item ->{
|
||||
|
||||
Double score;
|
||||
switch (item.getProcessNode()){
|
||||
case "会签征求意见":
|
||||
score=Double.valueOf(item.getScore()) * 0.3;
|
||||
break;
|
||||
case "技术委员会负责人/起草中心主任审核":
|
||||
score=Double.valueOf(item.getScore()) * 0.4;
|
||||
break;
|
||||
case "标准法规工程师复审":
|
||||
score=Double.valueOf(item.getScore()) * 0.3;
|
||||
break;
|
||||
case "标准法规部部长审核":
|
||||
score=Double.valueOf(item.getScore()) * 0.3;
|
||||
break;
|
||||
default: score=Double.valueOf(item.getScore());
|
||||
}
|
||||
|
||||
return score;
|
||||
} ))));
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
+5
-5
@@ -28,12 +28,12 @@ public class IssueTrackController {
|
||||
@PutMapping()
|
||||
@ApiOperation("新增重点标准跟踪清单项目")
|
||||
public ResponseMessage addIssueTrack(@RequestBody IssueTrack issueTrack){
|
||||
boolean b = issueTrackService.addIssueTrack(issueTrack);
|
||||
int b = issueTrackService.addIssueTrack(issueTrack);
|
||||
|
||||
if (b){
|
||||
return Result.success("200","成功", true);
|
||||
if (b>0){
|
||||
return Result.success("200","信息已存在,更新!", true);
|
||||
}else{
|
||||
return Result.error("100","数据不能相同", false);
|
||||
return Result.error("100","新增成功!", false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class IssueTrackController {
|
||||
if (b){
|
||||
return Result.success("200","成功", true);
|
||||
}else{
|
||||
return Result.error("100","数据不能相同", false);
|
||||
return Result.error("100","标准或政策已存在", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ public class IssueTrack {
|
||||
@TableField("product_type")
|
||||
private String productType;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@TableField("impl_time")
|
||||
private Date implTime;
|
||||
private String implTime;
|
||||
|
||||
@TableField("impl_require")
|
||||
private String implRequire;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import java.util.Map;
|
||||
|
||||
public interface IIssueTrackService {
|
||||
|
||||
public boolean addIssueTrack(IssueTrack obj);
|
||||
public int addIssueTrack(IssueTrack obj);
|
||||
|
||||
public boolean removeIssueTrack(List<String> idList);
|
||||
|
||||
|
||||
+14
-5
@@ -25,14 +25,22 @@ public class IssueTrackServiceImpl extends ServiceImpl<IssueTrackDao, IssueTrack
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addIssueTrack(IssueTrack obj) {
|
||||
public int addIssueTrack(IssueTrack obj) {
|
||||
|
||||
QueryWrapper<IssueTrack> countWrapper = new QueryWrapper<>();
|
||||
countWrapper.eq("law_id",obj.getLawId())
|
||||
.eq("del_flag",0);
|
||||
int count = this.count(countWrapper);
|
||||
|
||||
QueryWrapper<IssueTrack> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("law_id",obj.getLawId());
|
||||
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
this.saveOrUpdate(obj,wrapper);
|
||||
|
||||
return this.saveOrUpdate(obj,wrapper);
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
@@ -56,12 +64,13 @@ public class IssueTrackServiceImpl extends ServiceImpl<IssueTrackDao, IssueTrack
|
||||
@Override
|
||||
public boolean updateIssueTrack(IssueTrack obj) {
|
||||
QueryWrapper<IssueTrack> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("law_id",obj.getLawId());
|
||||
wrapper.eq("law_id",obj.getLawId())
|
||||
.eq("del_flag","0")
|
||||
.ne("id",obj.getId());
|
||||
IssueTrack one = this.getOne(wrapper);
|
||||
if (one==null){
|
||||
if (one!=null){
|
||||
return false;
|
||||
}else {
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
return this.updateById(obj);
|
||||
}
|
||||
|
||||
+3
-1
@@ -194,6 +194,8 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
@GetMapping(value = "/exportStandardsInfoExcel")
|
||||
public void exportStandardsInfoExcel(String exportContent, String exportType, String exportName,String userId, HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
List<SarLawsStandInfo> data = sarLawsInfoEOService.getExportData(exportType,exportContent,userId);
|
||||
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
@@ -204,7 +206,7 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
||||
response.setContentType("application/force-download");
|
||||
// 导出所有数据
|
||||
List<SarLawsStandInfo> data = sarLawsInfoEOService.getExportData(exportType,exportContent,userId);
|
||||
// List<SarLawsStandInfo> data = sarLawsInfoEOService.getExportData(exportType,exportContent,userId);
|
||||
workbook = LawsStandExportUtil.exportDatas(data);
|
||||
|
||||
os = response.getOutputStream();
|
||||
|
||||
+9
-2
@@ -184,7 +184,12 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
|
||||
for(TsResource resource:TsResources){
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
// TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
/**
|
||||
* 没有把改节点查出
|
||||
*/
|
||||
TsResourceQueryWrapper.isNotNull("PARENT_ID");
|
||||
|
||||
if(StringUtils.isNotBlank(tsResource.getSorDivide())){
|
||||
TsResourceQueryWrapper.in("ID",getMenuIdList);
|
||||
}
|
||||
@@ -323,7 +328,9 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<TsResource> recursionGetListChildrenStand(TsResource resource,List<TsResource> children){
|
||||
List<TsResource> tsResources = children.stream().filter(resource1 -> resource1.getParentId().equals(resource.getId())).collect(Collectors.toList());
|
||||
List<TsResource> tsResources = children.stream()
|
||||
.filter(resource1 -> resource1.getParentId().equals(resource.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(!tsResources.isEmpty()){
|
||||
tsResources = tsResources.stream().sorted(Comparator.comparing(resource1 -> resource1.getDisplaySeq())).collect(Collectors.toList());
|
||||
tsResources.forEach(resource1 -> {
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
}
|
||||
}else {
|
||||
page.setOrderBy("ITEMS_NUM");
|
||||
page.setOrder("DESC");
|
||||
page.setOrder("ASC");
|
||||
}
|
||||
|
||||
//分页查询的总数
|
||||
|
||||
+3
-2
@@ -9,6 +9,7 @@ import com.adc.da.slrs.sarStandIssueControlProduct.entity.StandIssueControlProdu
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.StandWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExcelVO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExportVO;
|
||||
import com.adc.da.slrs.sarStandWarning.service.Impl.EarlyWarningEOServiceImpl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
@@ -148,11 +149,11 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
// List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||
List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||
List<WarningExportVO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||
|
||||
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), StandWarningEO.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
EasyExcel.write(response.getOutputStream(), WarningExportVO.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(exportExcel);
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarStandWarning.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.StandWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExportVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -14,6 +15,6 @@ public interface EarlyWarningEODao extends BaseMapper<EarlyWarningEO> {
|
||||
IPage<StandWarningEO> selectWarningPage(IPage<StandWarningEO> page, @Param("waringEO") StandWarningEO warningEO);
|
||||
|
||||
|
||||
List<StandWarningEO> exportWarning(@Param("idList") List<String> ids);
|
||||
List<WarningExportVO> exportWarning(@Param("idList") List<String> ids);
|
||||
|
||||
}
|
||||
|
||||
+12
-7
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarStandWarning.entity;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -47,17 +48,19 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String standType;
|
||||
|
||||
@ExcelProperty("标准号")
|
||||
@ExcelProperty(value = "标准编号",index = 1)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("标准号")
|
||||
@TableField(exist = false)
|
||||
private String standCode;
|
||||
|
||||
@ExcelProperty("标准名称")
|
||||
@ExcelProperty(value = "标准名称",index = 2)
|
||||
@ColumnWidth(40)
|
||||
@ApiModelProperty("标准名称")
|
||||
@TableField(exist = false)
|
||||
private String standName;
|
||||
|
||||
@ExcelProperty("发布日期")
|
||||
@ExcelProperty(value = "发布日期",index = 5)
|
||||
@ApiModelProperty("发布日期")
|
||||
@TableField(exist = false)
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@@ -67,12 +70,12 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private Date lastTime;
|
||||
|
||||
@ExcelProperty("适用车型")
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("适用车型")
|
||||
@TableField(exist = false)
|
||||
private String applyType;
|
||||
|
||||
@ExcelProperty("责任工程师")
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("责任工程师")
|
||||
@TableField(exist = false)
|
||||
private String dutyEngineer;
|
||||
@@ -82,12 +85,14 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String itemsId;
|
||||
|
||||
@ExcelProperty("条款(分解单)编号")
|
||||
@ExcelProperty(value = "条款编号",index = 3)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("条款(分解单)编号")
|
||||
@TableField(exist = false)
|
||||
private String itemsNum;
|
||||
|
||||
@ExcelProperty("条款(分解单)名称")
|
||||
@ExcelProperty(value = "条款名称",index = 4)
|
||||
@ColumnWidth(40)
|
||||
@ApiModelProperty("条款(分解单)名称")
|
||||
@TableField(exist = false)
|
||||
private String itemsName;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.sarStandWarning.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WarningExportVO extends EarlyWarningEO {
|
||||
|
||||
|
||||
|
||||
@ExcelProperty(value = "实施日期",index = 6)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("实施日期")
|
||||
private String SSRQ;
|
||||
|
||||
|
||||
@ExcelProperty(value = "新车型实施日期",index = 7)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("新车型实施日期")
|
||||
private String XCXSSRQ;
|
||||
|
||||
@ExcelProperty(value = "在产车实施日期",index = 8)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("在产车实施日期")
|
||||
private String ZCCSSRQ;
|
||||
|
||||
@ExcelProperty(value = "类型",index = 0)
|
||||
@ApiModelProperty("标准类别显示")
|
||||
private String standTypeShow;
|
||||
|
||||
@ExcelProperty(value = "适用车型",index = 9)
|
||||
@ColumnWidth(20)
|
||||
@ApiModelProperty("适用车型展示")
|
||||
private String applyTypeShow;
|
||||
|
||||
|
||||
}
|
||||
+2
-1
@@ -4,6 +4,7 @@ package com.adc.da.slrs.sarStandWarning.service;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.StandWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExcelVO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExportVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -22,5 +23,5 @@ public interface EarlyWarningEOService extends IService<EarlyWarningEO> {
|
||||
|
||||
IPage<StandWarningEO> getStandWarning(StandWarningEO queryPage);
|
||||
|
||||
List<StandWarningEO> getExportExcel(WarningExcelVO excelVO);
|
||||
List<WarningExportVO> getExportExcel(WarningExcelVO excelVO);
|
||||
}
|
||||
|
||||
+3
-2
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarStandWarning.dao.EarlyWarningEODao;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.StandWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExcelVO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningExportVO;
|
||||
import com.adc.da.slrs.sarStandWarning.service.EarlyWarningEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -120,8 +121,8 @@ public class EarlyWarningEOServiceImpl extends ServiceImpl<EarlyWarningEODao, Ea
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<StandWarningEO> getExportExcel(WarningExcelVO excelVO){
|
||||
List<StandWarningEO> standWarningEOList = earlyWarningEODao.exportWarning( excelVO.getIds());
|
||||
public List<WarningExportVO> getExportExcel(WarningExcelVO excelVO){
|
||||
List<WarningExportVO> standWarningEOList = earlyWarningEODao.exportWarning( excelVO.getIds());
|
||||
// IPage<StandWarningEO> standWarningEOIPage = earlyWarningEODao.selectWarningPage(null, null, null);
|
||||
|
||||
return standWarningEOList;
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.fileMaterialCenter.dao.FileMaterialDao">
|
||||
|
||||
<update id="topping">
|
||||
UPDATE file_material
|
||||
SET is_top = (
|
||||
(
|
||||
SELECT
|
||||
Max(is_top)
|
||||
FROM
|
||||
(SELECT * FROM file_material) AS x
|
||||
) + 1
|
||||
)
|
||||
WHERE
|
||||
id = #{id}
|
||||
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.fileMaterialCerter.dao.MaterialDao">
|
||||
|
||||
</mapper>
|
||||
+5
-2
@@ -10,6 +10,7 @@
|
||||
eva.user_id,
|
||||
`index`.value_type as valueType,
|
||||
eva.evaluation_type as evaluationType,
|
||||
process_node as processNode,
|
||||
avg(eva.score * `index`.weight) AS score,
|
||||
min(eva.create_time) as createTiem,
|
||||
max(eva.modify_time) as modifyTime
|
||||
@@ -23,8 +24,9 @@
|
||||
eva.user_id,
|
||||
index_type,
|
||||
valueType,
|
||||
evaluationType
|
||||
ORDER BY modifyTime DESC
|
||||
evaluationType,
|
||||
process_node
|
||||
ORDER BY modifyTime DESC,process_node ASC
|
||||
|
||||
</select>
|
||||
|
||||
@@ -38,6 +40,7 @@
|
||||
score,
|
||||
reason,
|
||||
evaluation_index as evaluationIndex,
|
||||
process_node as processNode,
|
||||
quality_evaluation.create_time AS createTime,
|
||||
quality_evaluation.modify_time AS modifyTime,
|
||||
`index`.value_type AS valueType,
|
||||
|
||||
+133
-4
@@ -283,7 +283,7 @@
|
||||
parameterType="com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage">
|
||||
select
|
||||
DISTINCT SAR_LAWS_STAND_INFO.ID,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TYPE,
|
||||
laws_type_show.DIC_TYPE_NAME as LAWS_TYPE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NUMBER,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NAME,
|
||||
SAR_LAWS_STAND_INFO.LAWS_EN_NAME,
|
||||
@@ -293,8 +293,8 @@
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START,
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYCX,
|
||||
laws_sycx_show.DIC_TYPE_NAME as LAWS_SYCX,
|
||||
laws_syqy_show.DIC_TYPE_NAME as LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS,
|
||||
SAR_LAWS_STAND_INFO.LAWS_YEAR,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM,
|
||||
@@ -305,7 +305,7 @@
|
||||
SAR_LAWS_STAND_INFO.MODIFY_TIME,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow
|
||||
from SAR_LAWS_STAND_INFO
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
<include refid="export_condition"/>
|
||||
order by
|
||||
<if test='orderByA != null and orderByA != "" and order1 != null and order1 != ""'>
|
||||
${orderByA} ${order1},
|
||||
@@ -313,4 +313,133 @@
|
||||
SAR_LAWS_STAND_INFO.id
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="export_condition">
|
||||
left join SAR_LAWS_MENU ON SAR_LAWS_STAND_INFO.id = SAR_LAWS_MENU.laws_id
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--适用车型-->
|
||||
LEFT JOIN TS_DICTYPE laws_sycx_show ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_SYCX
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--适用区域-->
|
||||
LEFT JOIN TS_DICTYPE laws_syqy_show ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_SYQY
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--政策分类-->
|
||||
LEFT JOIN TS_DICTYPE laws_type_show ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_TYPE
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
left join SAR_LAWS_ATTR_INFO on (SAR_LAWS_ATTR_INFO.LAWS_ID = SAR_LAWS_STAND_INFO.id and SAR_LAWS_ATTR_INFO.valid_flag=0)
|
||||
where 1=1 and SAR_LAWS_STAND_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 基本搜索项 -->
|
||||
<if test="lawsType != null and lawsType != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TYPE like concat(concat('%',#{lawsType}),'%')
|
||||
</if>
|
||||
<if test="lawsNumber != null and lawsNumber != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NUMBER like concat(concat('%',#{lawsNumber}),'%')
|
||||
</if>
|
||||
<if test="numberName != null and numberName != ''">
|
||||
and (LAWS_NAME like concat(concat('%',#{numberName}),'%')
|
||||
or SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{numberName}),'%'))
|
||||
</if>
|
||||
<if test="lawsName != null and lawsName != ''">
|
||||
and LAWS_NAME like concat(concat('%',#{lawsName}),'%')
|
||||
</if>
|
||||
<if test="lawsEnName != null and lawsEnName != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{lawsEnName}),'%')
|
||||
</if>
|
||||
<if test="lawsNo != null and lawsNo != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NO like concat(concat('%',#{lawsNo}),'%')
|
||||
</if>
|
||||
<if test="issueTime != null and issueTime != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.ISSUE_TIME,'%Y-%m-%d') = #{issueTime}
|
||||
</if>
|
||||
<if test="issueCompany != null and issueCompany != ''">
|
||||
and SAR_LAWS_STAND_INFO.ISSUE_COMPANY like concat(concat('%',#{issueCompany}),'%')
|
||||
</if>
|
||||
<if test="commentCycleStart != null and commentCycleStart != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START ,'%Y-%m-%d') = DATE_FORMAT(#{commentCycleStart},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="commentCycleEnd != null and commentCycleEnd != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END ,'%Y-%m-%d') = DATE_FORMAT(#{commentCycleEnd},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="lawsTextState != null and lawsTextState != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE = #{lawsTextState}
|
||||
</if>
|
||||
<if test="lawsSyqy != null and lawsSyqy != ''">
|
||||
and FIND_IN_SET(#{lawsSyqy},SAR_LAWS_STAND_INFO.LAWS_SYQY)
|
||||
</if>
|
||||
<if test="lawsSycx != null and lawsSycx != ''">
|
||||
and FIND_IN_SET(#{lawsSycx},SAR_LAWS_STAND_INFO.LAWS_SYCX)
|
||||
</if>
|
||||
<if test="isRelateAccess != null and isRelateAccess != ''">
|
||||
and SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS = #{isRelateAccess}
|
||||
</if>
|
||||
<if test="lawsYear != null and lawsYear != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_YEAR like concat(concat('%',#{lawsYear}),'%')
|
||||
</if>
|
||||
<if test="lawsNotisyncNum != null and lawsNotisyncNum != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM like concat(concat('%',#{lawsNotisyncNum}),'%')
|
||||
</if>
|
||||
<if test="lawsBulletin != null and lawsBulletin != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_BULLETIN like concat(concat('%',#{lawsBulletin}),'%')
|
||||
</if>
|
||||
<if test="lawsLabel != null and lawsLabel != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_LABEL like concat(concat('%',#{lawsLabel}),'%')
|
||||
</if>
|
||||
<if test="lawsRemark != null and lawsRemark != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_REMARK like concat(concat('%',#{lawsRemark}),'%')
|
||||
</if>
|
||||
<!-- 国家、地区 -->
|
||||
<if test="country != null and country != ''">
|
||||
and SAR_LAWS_STAND_INFO.country = #{country}
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null">
|
||||
and SAR_LAWS_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_LAWS_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null">
|
||||
and SAR_LAWS_STAND_INFO.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="collectMenuId != null and collectMenuId != ''">
|
||||
and SAR_LAWS_STAND_INFO.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
and (collect_type='INLAND_STAND' or collect_type='FOREIGN_STAND')
|
||||
and TS_PERSON_COLLECT.user_id=#{userId}
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="advanceSearchStr != null and advanceSearchStr != ''">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
+28
-10
@@ -38,8 +38,6 @@
|
||||
|
||||
<sql id="stand_where">
|
||||
|
||||
|
||||
|
||||
<if test="waringEO.standCode != null and waringEO.standCode != ''">
|
||||
AND trim(replace(CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
@@ -74,18 +72,35 @@
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
<select id="exportWarning" resultType="com.adc.da.slrs.sarStandWarning.entity.StandWarningEO">
|
||||
|
||||
<sql id="export_column">
|
||||
warning.id AS ID,
|
||||
sarInfo.ID AS STAND_ID,
|
||||
sarInfo.STAND_TYPE,
|
||||
CONCAT(sarInfo.STAND_SORT,' ',sarInfo.STAND_NUMBER,'-',sarInfo.STAND_YEAR) AS STAND_CODE,
|
||||
sarInfo.STAND_NAME,
|
||||
sarInfo.PUT_TIME,
|
||||
attr.SSRQ as SSRQ,
|
||||
case stand_type
|
||||
when 'INLAND' then '国内标准'
|
||||
when 'FOREIGN' then '国外标准'
|
||||
ELSE ''
|
||||
END
|
||||
as standTypeShow
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="exportWarning" resultType="com.adc.da.slrs.sarStandWarning.entity.WarningExportVO">
|
||||
|
||||
SELECT WARNING_RESULT.* FROM
|
||||
(
|
||||
|
||||
SELECT
|
||||
<include refid="stand_column"/>
|
||||
,
|
||||
attr.CLLX AS
|
||||
APPLY_TYPE ,
|
||||
attr
|
||||
.ZRGCS AS DUTY_ENGINEER ,
|
||||
<include refid="export_column"/> ,
|
||||
dicType.DIC_TYPE_NAME AS applyTypeShow,
|
||||
attr.CLLX AS APPLY_TYPE ,
|
||||
attr.ZRGCS AS DUTY_ENGINEER ,
|
||||
NULL AS ITEMS_ID ,
|
||||
NULL AS ITEMS_NUM , NULL AS ITEMS_NAME ,
|
||||
NULL AS POLICY_ID ,
|
||||
@@ -97,6 +112,7 @@
|
||||
FROM sar_stand_warning AS warning
|
||||
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
||||
LEFT JOIN ts_dictype as dicType on dicType.DIC_TYPE_CODE =attr.CLLX
|
||||
<where>
|
||||
POWER = '1'
|
||||
AND (MARK = 'stand')
|
||||
@@ -116,7 +132,8 @@
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
<include refid="stand_column"/> ,
|
||||
<include refid="export_column"/> ,
|
||||
dicType.DIC_TYPE_NAME AS applyTypeShow,
|
||||
items.APPLY_ARCTIC AS APPLY_TYPE ,
|
||||
items.DUTY_ENGINEER AS DUTY_ENGINEER ,
|
||||
items.ID AS ITEMS_ID ,
|
||||
@@ -133,6 +150,7 @@
|
||||
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_items AS items ON items.STAND_ID = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||
LEFT JOIN ts_dictype as dicType on dicType.DIC_TYPE_CODE =items.APPLY_ARCTIC
|
||||
<where>
|
||||
POWER = '1'
|
||||
AND (MARK = 'item')
|
||||
|
||||
Reference in New Issue
Block a user