Merge branch 'develop_master' into FOTON
This commit is contained in:
+72
-1
@@ -5,14 +5,23 @@ import com.adc.da.base.web.BaseController;
|
|||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
|
import com.adc.da.slrs.sarStandardsInfo.entity.ActSarItemsEO;
|
||||||
|
import com.adc.da.workFlow.entity.GetQBZXDExcelDto;
|
||||||
import com.adc.da.workFlow.service.ActSarItemsBussEOService;
|
import com.adc.da.workFlow.service.ActSarItemsBussEOService;
|
||||||
import com.adc.da.workFlow.service.ActSarItemsLawsEOService;
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/${restPath}/lawss/actSarItemsBuss")
|
@RequestMapping("/${restPath}/lawss/actSarItemsBuss")
|
||||||
@Api(description = "|ActSarItemsBuss|")
|
@Api(description = "|ActSarItemsBuss|")
|
||||||
@@ -50,4 +59,66 @@ public class ActSarItemsBussEOController extends BaseController<ActSarItemsEO> {
|
|||||||
public void autoUpdIndex(@RequestParam("pid") String pid,@RequestParam("bussId") String bussId) {
|
public void autoUpdIndex(@RequestParam("pid") String pid,@RequestParam("bussId") String bussId) {
|
||||||
actSarItemsEOService.autoUpdIndex(pid,bussId);
|
actSarItemsEOService.autoUpdIndex(pid,bussId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "导出全部意见-企标制修订-技术标准-起草单位高级经理审核节点")
|
||||||
|
@PostMapping("/exportAllBZZXDJSBZ")
|
||||||
|
public void getAllStandYJCL(HttpServletResponse response, @RequestBody Map<String, String> params){
|
||||||
|
try {
|
||||||
|
net.sf.json.JSONArray jsonArray = net.sf.json.JSONArray.fromObject(params.get("json"));
|
||||||
|
List<Map<String, String>> data = (List<Map<String, String>>) jsonArray;
|
||||||
|
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
String textName="意见信息";
|
||||||
|
|
||||||
|
Map<String,String> map=new HashMap<>();
|
||||||
|
map.put("1","采纳");
|
||||||
|
map.put("2","部分采纳");
|
||||||
|
map.put("3","不采纳");
|
||||||
|
String fileName = URLEncoder.encode(textName, "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
|
||||||
|
data = data.stream().sorted(Comparator.comparing(m->m.get("modelNum"))).collect(Collectors.toList());
|
||||||
|
List<GetQBZXDExcelDto> standExcel=new ArrayList<>();
|
||||||
|
int i=0;
|
||||||
|
for (Map<String, String> idea : data){
|
||||||
|
i++;
|
||||||
|
GetQBZXDExcelDto getExcelDto = GetQBZXDExcelDto.builder()
|
||||||
|
.partCode(idea.get("modelNum"))
|
||||||
|
.oldText(idea.get("modelUpdBefore"))
|
||||||
|
.newText(idea.get("modelUpdAfter"))
|
||||||
|
.reason(idea.get("modelContent"))
|
||||||
|
.userName(idea.get("zrUserIdName"))
|
||||||
|
.deptName(idea.get("zrDeptIdName"))
|
||||||
|
.state(map.get(idea.get("opinionsAdopted")))
|
||||||
|
.cause(idea.get("opinionsAdoptedCont"))
|
||||||
|
.num(String.valueOf(i))
|
||||||
|
.build();
|
||||||
|
standExcel.add(getExcelDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
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("提出部门"));
|
||||||
|
headList.add(Lists.newArrayList("责任人"));
|
||||||
|
headList.add(Lists.newArrayList("意见是否采纳"));
|
||||||
|
headList.add(Lists.newArrayList("采纳原因"));
|
||||||
|
EasyExcel.write(response.getOutputStream(), GetQBZXDExcelDto.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||||
|
.doWrite(standExcel);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
response.reset();
|
||||||
|
response.setContentType("application/json");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
try {
|
||||||
|
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||||
|
} catch (IOException ioException) {
|
||||||
|
ioException.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.adc.da.workFlow.entity;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@HeadRowHeight(20)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
public class GetQBZXDExcelDto {
|
||||||
|
private String num; // 序号
|
||||||
|
|
||||||
|
private String partCode; // 条款号
|
||||||
|
|
||||||
|
private String oldText; // 修改前
|
||||||
|
|
||||||
|
private String newText; // 修改后
|
||||||
|
|
||||||
|
private String reason; // 修改理由
|
||||||
|
|
||||||
|
private String deptName; // 提出部门
|
||||||
|
|
||||||
|
private String userName; // 责任人
|
||||||
|
|
||||||
|
private String state; // 意见是否采纳
|
||||||
|
|
||||||
|
private String cause; // 采纳理由
|
||||||
|
|
||||||
|
}
|
||||||
@@ -64,6 +64,7 @@ public class ActSarItemsPlanService {
|
|||||||
esRevisePlanDTO.setDraftTime(object.getDate("firstDraftTime"));
|
esRevisePlanDTO.setDraftTime(object.getDate("firstDraftTime"));
|
||||||
esRevisePlanDTO.setReleaseTime(object.getDate("planTime"));
|
esRevisePlanDTO.setReleaseTime(object.getDate("planTime"));
|
||||||
esRevisePlanDTO.setBussSort(object.getString("bussSort"));
|
esRevisePlanDTO.setBussSort(object.getString("bussSort"));
|
||||||
|
esRevisePlanDTO.setLxd(object.getString("LXD"));
|
||||||
if(StringUtils.isNotBlank(object.getString("esName")) && StringUtils.isNotBlank(object.getString("bussSort"))){
|
if(StringUtils.isNotBlank(object.getString("esName")) && StringUtils.isNotBlank(object.getString("bussSort"))){
|
||||||
EsRevisePlan qw = new EsRevisePlan();
|
EsRevisePlan qw = new EsRevisePlan();
|
||||||
qw.setEsName(object.getString("esName"));
|
qw.setEsName(object.getString("esName"));
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||||||
//从excl中导入标准
|
//从excl中导入标准
|
||||||
addInterceptor.excludePathPatterns("/api/ImportExcel/import");
|
addInterceptor.excludePathPatterns("/api/ImportExcel/import");
|
||||||
|
|
||||||
|
//企标制修订-技术标准 意见导出
|
||||||
|
addInterceptor.excludePathPatterns("/api/lawss/actSarItemsBuss/exportAllBZZXDJSBZ");
|
||||||
//标准征求意见导出
|
//标准征求意见导出
|
||||||
addInterceptor.excludePathPatterns("/api/slrs/sar-public-idea-all/tuallStand");
|
addInterceptor.excludePathPatterns("/api/slrs/sar-public-idea-all/tuallStand");
|
||||||
// 标准征求意见流程意见导出
|
// 标准征求意见流程意见导出
|
||||||
|
|||||||
+42
-1
@@ -5,16 +5,19 @@ import com.adc.da.http.PageInfo;
|
|||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||||
|
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao;
|
||||||
|
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,6 +35,8 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IEsRevisePlanService iEsRevisePlanService;
|
IEsRevisePlanService iEsRevisePlanService;
|
||||||
|
@Autowired
|
||||||
|
private QualityEvaluationDao qualityEvaluationDao;
|
||||||
|
|
||||||
@ApiOperation(value = "获取所有企标计划")
|
@ApiOperation(value = "获取所有企标计划")
|
||||||
@GetMapping("getAllPlans")
|
@GetMapping("getAllPlans")
|
||||||
@@ -54,6 +59,42 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
revisePlan.setArea(area);
|
revisePlan.setArea(area);
|
||||||
|
//查评分
|
||||||
|
if (ObjectUtils.isNotEmpty(revisePlan.getStandId())) {
|
||||||
|
List<Double> last = new ArrayList<>();
|
||||||
|
List<QualityEvaluation> evaluations = qualityEvaluationDao.getEvaluationForm(new QueryWrapper<QualityEvaluation>().eq("law_id", revisePlan.getStandId()).eq("evaluation_type", "quality"));
|
||||||
|
for (QualityEvaluation evaluation : evaluations) {
|
||||||
|
Double score;
|
||||||
|
String value;
|
||||||
|
if (evaluation.getProcessNode()==null){
|
||||||
|
value="";
|
||||||
|
}else {
|
||||||
|
value=evaluation.getProcessNode();
|
||||||
|
}
|
||||||
|
String evaluationScore = ObjectUtils.isEmpty(evaluation.getScore()) ? "0" : evaluation.getScore();
|
||||||
|
switch (value){
|
||||||
|
case "征求意见":
|
||||||
|
score=Double.valueOf(evaluationScore) * 0.3;
|
||||||
|
break;
|
||||||
|
case "技术委员会评审、评审意见修改":
|
||||||
|
score=Double.valueOf(evaluationScore) * 0.4;
|
||||||
|
break;
|
||||||
|
case "重新技术委员会评审、评审意见修改":
|
||||||
|
score=Double.valueOf(evaluationScore) * 0.4;
|
||||||
|
break;
|
||||||
|
case "标准化复审":
|
||||||
|
score=Double.valueOf(evaluationScore) * 0.15;
|
||||||
|
break;
|
||||||
|
case "标准法规部高级经理审核":
|
||||||
|
score=Double.valueOf(evaluationScore) * 0.15;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: score=Double.valueOf(evaluationScore);
|
||||||
|
}
|
||||||
|
last.add(score);
|
||||||
|
}
|
||||||
|
revisePlan.setScore(last.stream().mapToDouble(Double::doubleValue).sum());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PageInfo<EsRevisePlan> pageInfo = getPageInfo(esRevisePlan.getPager(),esRevisePlans);
|
PageInfo<EsRevisePlan> pageInfo = getPageInfo(esRevisePlan.getPager(),esRevisePlans);
|
||||||
return Result.success(pageInfo);
|
return Result.success(pageInfo);
|
||||||
|
|||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.controller;
|
||||||
|
|
||||||
|
import com.adc.da.base.web.BaseController;
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLogForm;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanLogService;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(description = "|EsRevisePlanLog|")
|
||||||
|
@RequestMapping("api/esRevisePlanLog/log")
|
||||||
|
public class EsRevisePlanLogController extends BaseController<EsRevisePlanLog> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEsRevisePlanLogService esRevisePlanLogService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询当前计划的日志信息")
|
||||||
|
@GetMapping("/queryLogsByPlanId")
|
||||||
|
public ResponseMessage<Object> queryLogsByPlanId(@RequestParam String planId){
|
||||||
|
List<EsRevisePlanLog> esRevisePlanLogs = esRevisePlanLogService.queryLogsByPlanId(planId);
|
||||||
|
return Result.success(esRevisePlanLogs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加日志")
|
||||||
|
@PostMapping("/addLog")
|
||||||
|
public ResponseMessage<Object> addLog(EsRevisePlanLogForm form){
|
||||||
|
esRevisePlanLogService.addLog(JSON.parseObject(form.getJson()));
|
||||||
|
return Result.success("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.dao;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface EsRevisePlanLogDao extends BaseMapper<EsRevisePlanLog> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前企标计划的日志
|
||||||
|
* @param planId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EsRevisePlanLog> queryLogsByPlanId(@Param("planId") String planId);
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import com.adc.da.base.page.BasePage;
|
import com.adc.da.base.page.BasePage;
|
||||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||||
|
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
@@ -51,6 +52,19 @@ public class EsRevisePlan extends BasePage {
|
|||||||
@ApiModelProperty(value = "工作组组长")
|
@ApiModelProperty(value = "工作组组长")
|
||||||
private String wgLeader;
|
private String wgLeader;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企标ID")
|
||||||
|
private String standId;
|
||||||
|
@ApiModelProperty(value = "实际标准发布时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
private Date actualTime;
|
||||||
|
@ApiModelProperty(value = "企标编号")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String standNumber;
|
||||||
|
@ApiModelProperty(value = "质量评分")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double score;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "起草人姓名")
|
@ApiModelProperty(value = "起草人姓名")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="EsRevisePlanLog对象", description="企标制修订计划日志")
|
||||||
|
public class EsRevisePlanLog extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@TableId(value = "id",type = IdType.ID_WORKER_STR)
|
||||||
|
private String id;
|
||||||
|
@ApiModelProperty(value = "企标计划id")
|
||||||
|
private String planId;
|
||||||
|
@ApiModelProperty(value = "日志内容")
|
||||||
|
private String content;
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public EsRevisePlanLog() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public EsRevisePlanLog(String id, String planId, String content, Date createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.planId = planId;
|
||||||
|
this.content = content;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class EsRevisePlanLogForm {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "json")
|
||||||
|
private String json;
|
||||||
|
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.service;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface IEsRevisePlanLogService extends IService<EsRevisePlanLog> {
|
||||||
|
/**
|
||||||
|
* 获取当前企标计划的日志
|
||||||
|
* @param planId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EsRevisePlanLog> queryLogsByPlanId(String planId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加日志
|
||||||
|
* @param qbfsForm
|
||||||
|
*/
|
||||||
|
void addLog(JSONObject qbfsForm);
|
||||||
|
}
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.login.util.UserUtils;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanLogDao;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanLogService;
|
||||||
|
import com.adc.da.sys.entity.UserEO;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class EsRevisePlanLogServiceImpl extends ServiceImpl<EsRevisePlanLogDao, EsRevisePlanLog> implements IEsRevisePlanLogService {
|
||||||
|
@Autowired
|
||||||
|
private EsRevisePlanLogDao esRevisePlanLogDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前企标计划的日志
|
||||||
|
* @param planId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<EsRevisePlanLog> queryLogsByPlanId(String planId) {
|
||||||
|
return esRevisePlanLogDao.queryLogsByPlanId(planId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加日志
|
||||||
|
* @param qbfsForm
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addLog(JSONObject qbfsForm) {
|
||||||
|
if (ObjectUtils.isNotEmpty(qbfsForm.get("type"))) {
|
||||||
|
String esId = (String) qbfsForm.get("esId");
|
||||||
|
String esId1 = (String) qbfsForm.get("esId1");
|
||||||
|
String esId2 = (String) qbfsForm.get("esId2");
|
||||||
|
String esName = (String) qbfsForm.get("esName");
|
||||||
|
Date date = new Date();
|
||||||
|
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
|
||||||
|
UserEO userEO= UserUtils.getUser();
|
||||||
|
//日志内容
|
||||||
|
String msg = userEO.getUname() + " " + now + " ";
|
||||||
|
switch ((String)qbfsForm.get("type")){
|
||||||
|
case "1":
|
||||||
|
//合并
|
||||||
|
String esName1 = (String) qbfsForm.get("esName1");
|
||||||
|
String esName2 = (String) qbfsForm.get("esName2");
|
||||||
|
msg = msg + "将《" + esName1 + "》和《"+ esName2 +"》合并为《"+ esName +"》,该计划已取消;";
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
//延期
|
||||||
|
String releaseTime = (String) qbfsForm.get("releaseTime");
|
||||||
|
String draftTime = (String) qbfsForm.get("draftTime");
|
||||||
|
String yqDraftTime = (String) qbfsForm.get("yqDraftTime");
|
||||||
|
String yqReleaseTime = (String) qbfsForm.get("yqReleaseTime");
|
||||||
|
msg = msg + "延期了《" + esName + "》 , “计划标准初稿完成时间”由“" + draftTime + "”改为“" + yqDraftTime + "”," +
|
||||||
|
"“计划标准发布时间”由“" + releaseTime + "”改为“" + yqReleaseTime + "”;";
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
//取消
|
||||||
|
msg = msg + "取消了《" + esName + "》;";
|
||||||
|
break;
|
||||||
|
case "4":
|
||||||
|
//更名
|
||||||
|
String renameEs = (String) qbfsForm.get("renameEs");
|
||||||
|
msg = msg + "修改了《" + esName + "》 , “企标名称”由“" + esName + "”改为“" + renameEs + "”;";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(esId)&&ObjectUtils.isEmpty(esId1)&&ObjectUtils.isEmpty(esId2)) {
|
||||||
|
esRevisePlanLogDao.insert(new EsRevisePlanLog(null,esId,msg,date));
|
||||||
|
} else if (ObjectUtils.isEmpty(esId)&&ObjectUtils.isNotEmpty(esId1)&&ObjectUtils.isNotEmpty(esId2)) {
|
||||||
|
esRevisePlanLogDao.insert(new EsRevisePlanLog(null,esId1,msg,date));
|
||||||
|
esRevisePlanLogDao.insert(new EsRevisePlanLog(null,esId2,msg,date));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+17
-4
@@ -1,14 +1,18 @@
|
|||||||
package com.adc.da.slrs.esRevisePlan.service.impl;
|
package com.adc.da.slrs.esRevisePlan.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.login.util.UserUtils;
|
||||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||||
import com.adc.da.slrs.esMatingRelation.service.IEsMatingRelationService;
|
import com.adc.da.slrs.esMatingRelation.service.IEsMatingRelationService;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanLogDao;
|
||||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog;
|
||||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||||
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
|
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||||
|
import com.adc.da.sys.entity.UserEO;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -16,10 +20,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +45,8 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
|||||||
IEsStandRelationService esStandRelationService;
|
IEsStandRelationService esStandRelationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarBussionessStandService iSarBussionessStandService;
|
private ISarBussionessStandService iSarBussionessStandService;
|
||||||
|
@Autowired
|
||||||
|
private EsRevisePlanLogDao esRevisePlanLogDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
||||||
@@ -137,6 +141,8 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
|||||||
}
|
}
|
||||||
}else if ("4".equals(esRevisePlan.getPlanStatus())){
|
}else if ("4".equals(esRevisePlan.getPlanStatus())){
|
||||||
upd.setPlanStatus("4");
|
upd.setPlanStatus("4");
|
||||||
|
upd.setStandId(esRevisePlan.getStandId());
|
||||||
|
upd.setActualTime(new Date());
|
||||||
}
|
}
|
||||||
esRevisePlanDao.updateById(upd);
|
esRevisePlanDao.updateById(upd);
|
||||||
}
|
}
|
||||||
@@ -151,6 +157,13 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
|||||||
return "企标名称不能重复,请更换新的企标名称";
|
return "企标名称不能重复,请更换新的企标名称";
|
||||||
}else {
|
}else {
|
||||||
esRevisePlanDao.insertOne(esRevisePlan);
|
esRevisePlanDao.insertOne(esRevisePlan);
|
||||||
|
//加日志
|
||||||
|
String esName = esRevisePlan.getEsName();
|
||||||
|
String id = esRevisePlan.getId();
|
||||||
|
Date date = new Date();
|
||||||
|
String msg = UserUtils.getUser().getUname() + " " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date) + " "
|
||||||
|
+"创建了《"+ esName +"》";
|
||||||
|
esRevisePlanLogDao.insert(new EsRevisePlanLog(null,id,msg,date));
|
||||||
return "操作成功";
|
return "操作成功";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -2,6 +2,8 @@ package com.adc.da.slrs.fileMaterialCenter.entity;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhaokaiyao
|
* @author zhaokaiyao
|
||||||
*/
|
*/
|
||||||
@@ -24,4 +26,6 @@ public class FileMaterialPage {
|
|||||||
private Integer page;
|
private Integer page;
|
||||||
|
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
|
private List<String> treeIdList;
|
||||||
}
|
}
|
||||||
|
|||||||
+36
@@ -1,13 +1,21 @@
|
|||||||
package com.adc.da.slrs.fileMaterialCenter.service.impl;
|
package com.adc.da.slrs.fileMaterialCenter.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial;
|
||||||
import com.adc.da.slrs.fileMaterialCenter.dao.FileMaterialDao;
|
import com.adc.da.slrs.fileMaterialCenter.dao.FileMaterialDao;
|
||||||
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
import com.adc.da.slrs.fileMaterialCenter.entity.FileMaterialPage;
|
||||||
import com.adc.da.slrs.fileMaterialCenter.service.IFileMaterialService;
|
import com.adc.da.slrs.fileMaterialCenter.service.IFileMaterialService;
|
||||||
|
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||||
|
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||||
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
|
import com.adc.da.slrs.tsRoleMeunData.entity.TsRoleMenuData;
|
||||||
|
import com.adc.da.slrs.tsRoleMeunData.service.ITsRoleMenuDataService;
|
||||||
|
import com.adc.da.util.LoginUserUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -15,6 +23,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import javax.management.Query;
|
import javax.management.Query;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -29,6 +38,12 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
FileMaterialDao fileMaterialDao;
|
FileMaterialDao fileMaterialDao;
|
||||||
|
@Autowired
|
||||||
|
private TsUserDao tsUserDao;
|
||||||
|
@Autowired
|
||||||
|
private ITsPositionService tsPositionService;
|
||||||
|
@Autowired
|
||||||
|
private ITsRoleMenuDataService iTsRoleMenuDataService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -39,6 +54,27 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
|
|||||||
}else {
|
}else {
|
||||||
page=new Page<>(queryPage.getPage(),queryPage.getPageSize());
|
page=new Page<>(queryPage.getPage(),queryPage.getPageSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取当前登录人
|
||||||
|
String loginUserId = LoginUserUtil.getUserId();
|
||||||
|
|
||||||
|
List<String> positionIds = tsUserDao.selectPositionIds(loginUserId);
|
||||||
|
List<String> roleIds = tsPositionService.getRoleIdsByPositionIds(positionIds);
|
||||||
|
QueryWrapper<TsRoleMenuData> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.in("ROLE_ID", roleIds);
|
||||||
|
List<TsRoleMenuData> tsRoleMenuData = iTsRoleMenuDataService.list(wrapper);
|
||||||
|
List<String> treeIdList = tsRoleMenuData.stream().map(TsRoleMenuData::getMenuId).distinct().collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isEmpty(treeIdList)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if(StringUtils.isEmpty(queryPage.getTreeId())) {
|
||||||
|
queryPage.setTreeIdList(treeIdList);
|
||||||
|
} else {
|
||||||
|
// 查看菜单是否有数据权限
|
||||||
|
if (!treeIdList.contains(queryPage.getTreeId())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
return fileMaterialDao.getFileMaterialPage(page,queryPage);
|
return fileMaterialDao.getFileMaterialPage(page,queryPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.adc.da.sys.service.IDicTypeEOService;
|
|||||||
import com.adc.da.util.exception.AdcDaBaseException;
|
import com.adc.da.util.exception.AdcDaBaseException;
|
||||||
import com.adc.da.util.http.ResponseMessage;
|
import com.adc.da.util.http.ResponseMessage;
|
||||||
import com.adc.da.util.http.Result;
|
import com.adc.da.util.http.Result;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
@@ -52,9 +53,10 @@ public class exportWkExcel {
|
|||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.HSSF);
|
exportParams.setType(ExcelType.HSSF);
|
||||||
exportParams.setSheetName(exportName);
|
exportParams.setSheetName(exportName);
|
||||||
List<String> types=new ArrayList<>();
|
// List<String> types=new ArrayList<>();
|
||||||
types.add("BUSSSTANDCLASS");
|
// types.add("BUSSSTANDCLASS");
|
||||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCodeByType(types);
|
// Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCodeByType(types);
|
||||||
|
Map<String, Object> dicTypeEO = getBussStandTypeData();
|
||||||
workbook = ExcelExportUtilByWk.getHSSFWorkbook(exportParams, exportExcel.class,workbook,"1",dicTypeEO);
|
workbook = ExcelExportUtilByWk.getHSSFWorkbook(exportParams, exportExcel.class,workbook,"1",dicTypeEO);
|
||||||
os = response.getOutputStream();
|
os = response.getOutputStream();
|
||||||
workbook.write(os);
|
workbook.write(os);
|
||||||
@@ -66,6 +68,24 @@ public class exportWkExcel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 静态加载企标类别下拉框
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static Map<String,Object> getBussStandTypeData(){
|
||||||
|
Map<String,Object> resultMap = new HashMap<>();
|
||||||
|
List<Map<String,String>> bussStandTypeList = new ArrayList<>();
|
||||||
|
char letter = 'A';
|
||||||
|
for(letter = 'A'; letter <= 'Z'; ++letter){
|
||||||
|
Map<String,String> typeMap = new HashMap<>();
|
||||||
|
typeMap.put("Q/FT "+letter,"Q/FT "+letter);
|
||||||
|
bussStandTypeList.add(typeMap);
|
||||||
|
}
|
||||||
|
resultMap.put("BUSSSTANDCLASS",bussStandTypeList);
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
@ApiOperation(value = "|SarFileSplitItemsEO|导入")
|
||||||
@PostMapping(value = "/importData")
|
@PostMapping(value = "/importData")
|
||||||
public ResponseMessage<?> importSplitItemsZip(@RequestParam(value = "importFileId", required = false) String importFileId) throws Exception {
|
public ResponseMessage<?> importSplitItemsZip(@RequestParam(value = "importFileId", required = false) String importFileId) throws Exception {
|
||||||
|
|||||||
+2
-1
@@ -1844,6 +1844,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
//获取文件信息
|
//获取文件信息
|
||||||
AttFileEO fileInfo = attFileEOService.getFileInfo(fileAttId);
|
AttFileEO fileInfo = attFileEOService.getFileInfo(fileAttId);
|
||||||
String checkResult = encryptFileUtils.checkFileIsEncryFile(fileInfo);
|
String checkResult = encryptFileUtils.checkFileIsEncryFile(fileInfo);
|
||||||
|
logger.debug(checkResult);
|
||||||
switch (checkResult){
|
switch (checkResult){
|
||||||
case "NOFILE":
|
case "NOFILE":
|
||||||
fileLog.append(" 检查结果为 不存在该数据 ");
|
fileLog.append(" 检查结果为 不存在该数据 ");
|
||||||
@@ -1858,7 +1859,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
fileLog.setLength(0);
|
fileLog.setLength(0);
|
||||||
break;
|
break;
|
||||||
case "ENCRYPT":
|
case "ENCRYPT":
|
||||||
fileLog.append(" 检查结果为 读取文件为空 ");
|
fileLog.append(" 检查结果为 文件加密 ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -3598,6 +3598,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
//获取文件信息
|
//获取文件信息
|
||||||
AttFileEO fileInfo = attFileEOService.getFileInfo(fileAttId);
|
AttFileEO fileInfo = attFileEOService.getFileInfo(fileAttId);
|
||||||
String checkResult = encryptFileUtils.checkFileIsEncryFile(fileInfo);
|
String checkResult = encryptFileUtils.checkFileIsEncryFile(fileInfo);
|
||||||
|
logger.debug(checkResult);
|
||||||
switch (checkResult){
|
switch (checkResult){
|
||||||
case "NOFILE":
|
case "NOFILE":
|
||||||
fileLog.append(" 检查结果为 不存在该数据 ");
|
fileLog.append(" 检查结果为 不存在该数据 ");
|
||||||
@@ -3612,7 +3613,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
fileLog.setLength(0);
|
fileLog.setLength(0);
|
||||||
break;
|
break;
|
||||||
case "ENCRYPT":
|
case "ENCRYPT":
|
||||||
fileLog.append(" 检查结果为 读取文件为空 ");
|
fileLog.append(" 检查结果为 文件加密 ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.adc.da.slrs.zlTree.entity.ZlTree;
|
|||||||
import com.adc.da.slrs.zlTree.entity.ZlTreeData;
|
import com.adc.da.slrs.zlTree.entity.ZlTreeData;
|
||||||
import com.adc.da.slrs.zlTree.service.IZlTreeDataService;
|
import com.adc.da.slrs.zlTree.service.IZlTreeDataService;
|
||||||
import com.adc.da.slrs.zlTree.service.IZlTreeService;
|
import com.adc.da.slrs.zlTree.service.IZlTreeService;
|
||||||
|
import com.adc.da.util.LoginUserUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -64,7 +65,6 @@ public class ZlTreeController extends BaseController<ZlTree> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("查询树结构")
|
@ApiOperation("查询树结构")
|
||||||
public ResponseMessage<List<TreeData>> getFileMaterial(){
|
public ResponseMessage<List<TreeData>> getFileMaterial(){
|
||||||
@@ -72,6 +72,13 @@ public class ZlTreeController extends BaseController<ZlTree> {
|
|||||||
return Result.success(fileMaterial);
|
return Result.success(fileMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/permissConfig")
|
||||||
|
@ApiOperation("查询树结构-角色管理")
|
||||||
|
public ResponseMessage<List<TreeData>> getFileMaterialM(){
|
||||||
|
List<TreeData> fileMaterial = iZlTreeService.getLeftTreeM();
|
||||||
|
return Result.success(fileMaterial);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改树节点")
|
@ApiOperation("修改树节点")
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ public interface IZlTreeService extends IService<ZlTree> {
|
|||||||
*/
|
*/
|
||||||
List<TreeData> getLeftTree();
|
List<TreeData> getLeftTree();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色管理-查询树结构
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<TreeData> getLeftTreeM();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取类型
|
* 获取类型
|
||||||
|
|||||||
+37
-1
@@ -1,10 +1,15 @@
|
|||||||
package com.adc.da.slrs.zlTree.service.impl;
|
package com.adc.da.slrs.zlTree.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||||
|
import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
||||||
|
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||||
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
import com.adc.da.slrs.zlTree.dao.ZlTreeDao;
|
import com.adc.da.slrs.zlTree.dao.ZlTreeDao;
|
||||||
import com.adc.da.slrs.zlTree.entity.TreeData;
|
import com.adc.da.slrs.zlTree.entity.TreeData;
|
||||||
import com.adc.da.slrs.zlTree.entity.ZlTree;
|
import com.adc.da.slrs.zlTree.entity.ZlTree;
|
||||||
import com.adc.da.slrs.zlTree.entity.ZlTreeData;
|
import com.adc.da.slrs.zlTree.entity.ZlTreeData;
|
||||||
import com.adc.da.slrs.zlTree.service.IZlTreeService;
|
import com.adc.da.slrs.zlTree.service.IZlTreeService;
|
||||||
|
import com.adc.da.util.LoginUserUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -31,10 +36,41 @@ public class ZlTreeServiceImpl extends ServiceImpl<ZlTreeDao, ZlTree> implements
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ZlTreeDao zlTreeDao;
|
ZlTreeDao zlTreeDao;
|
||||||
|
@Autowired
|
||||||
|
private ITsUserService tsUserService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TreeData> getLeftTree() {
|
public List<TreeData> getLeftTree() {
|
||||||
|
// 获取当前登录人
|
||||||
|
String loginUserId = LoginUserUtil.getUserId();
|
||||||
|
// 查询当前登录人的权限菜单
|
||||||
|
List<String> recourceIdList = tsUserService.getResourceUserId(loginUserId);
|
||||||
|
|
||||||
|
TreeData res=new TreeData();
|
||||||
|
QueryWrapper<ZlTree> wrapper=new QueryWrapper<>();
|
||||||
|
wrapper.lambda().in(ZlTree::getId, recourceIdList);
|
||||||
|
wrapper.orderByAsc("length(sort),sort");
|
||||||
|
List<ZlTree> list=this.list(wrapper);
|
||||||
|
List<TreeData> treeData=new ArrayList<>();
|
||||||
|
//代码遍历生成树
|
||||||
|
for (ZlTree zlTree:list) {
|
||||||
|
if (StringUtils.isNotBlank(zlTree.getParentId())){
|
||||||
|
TreeData zlTreeData=new TreeData();
|
||||||
|
BeanUtils.copyProperties(zlTree,zlTreeData);
|
||||||
|
treeData.add(zlTreeData);
|
||||||
|
}else {
|
||||||
|
BeanUtils.copyProperties(zlTree,res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//递归生成树
|
||||||
|
digui(res,treeData);
|
||||||
|
List<TreeData> treeData1=new ArrayList<>();
|
||||||
|
treeData1.add(res);
|
||||||
|
return treeData1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TreeData> getLeftTreeM() {
|
||||||
TreeData res=new TreeData();
|
TreeData res=new TreeData();
|
||||||
QueryWrapper<ZlTree> wrapper=new QueryWrapper<>();
|
QueryWrapper<ZlTree> wrapper=new QueryWrapper<>();
|
||||||
wrapper.orderByAsc("length(sort),sort");
|
wrapper.orderByAsc("length(sort),sort");
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public class EncryptFileUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String hexString = bytesToHexString(b);
|
String hexString = bytesToHexString(b);
|
||||||
|
logger.debug(hexString);
|
||||||
if(readFlag){
|
if(readFlag){
|
||||||
if(StringUtils.isNotBlank(hexString)){
|
if(StringUtils.isNotBlank(hexString)){
|
||||||
if(StringUtils.equals(hexString,ENCRYPT_FILE_HEX)){
|
if(StringUtils.equals(hexString,ENCRYPT_FILE_HEX)){
|
||||||
@@ -67,6 +68,42 @@ public class EncryptFileUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String checkFileIsEncrypt(String readFilePath){
|
||||||
|
boolean readFlag = true;
|
||||||
|
byte[] b = new byte[160];
|
||||||
|
InputStream inputStream = null;
|
||||||
|
try {
|
||||||
|
inputStream = new FileInputStream(readFilePath);
|
||||||
|
inputStream.read(b, 0, 160);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e.getMessage(),e);
|
||||||
|
readFlag = false;
|
||||||
|
} finally {
|
||||||
|
if (inputStream != null) {
|
||||||
|
try {
|
||||||
|
inputStream.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String hexString = bytesToHexString(b);
|
||||||
|
logger.debug(hexString);
|
||||||
|
if(readFlag){
|
||||||
|
if(StringUtils.isNotBlank(hexString)){
|
||||||
|
if(StringUtils.equals(hexString,ENCRYPT_FILE_HEX)){
|
||||||
|
return "ENCRYPT";
|
||||||
|
}else{
|
||||||
|
return "UNENCRYPT";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return "READNO";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return "READERR";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将文件头转换成16进制字符串
|
* 将文件头转换成16进制字符串
|
||||||
*
|
*
|
||||||
@@ -89,6 +126,12 @@ public class EncryptFileUtils {
|
|||||||
return stringBuilder.toString();
|
return stringBuilder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String filePath ="E:\\FOTONFILE\\sypv9xbkukd6g5fey8w1.DOC";
|
||||||
|
String s = EncryptFileUtils.checkFileIsEncrypt(filePath);
|
||||||
|
System.out.println(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 本地写TXT文件
|
* 本地写TXT文件
|
||||||
|
|||||||
@@ -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.esRevisePlan.dao.EsRevisePlanLogDao">
|
||||||
|
|
||||||
|
<resultMap id="BaseInfoMap" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<id column="plan_id" property="planId" />
|
||||||
|
<id column="content" property="content" />
|
||||||
|
<id column="create_time" property="createTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="queryLogsByPlanId" resultType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlanLog">
|
||||||
|
|
||||||
|
select * from es_revise_plan_log where plan_id = #{planId} order by create_time desc
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -62,6 +62,8 @@
|
|||||||
<result property="drafter" column="drafter"></result>
|
<result property="drafter" column="drafter"></result>
|
||||||
<result property="resPerson" column="res_person"></result>
|
<result property="resPerson" column="res_person"></result>
|
||||||
<result property="wgLeader" column="wg_leader"></result>
|
<result property="wgLeader" column="wg_leader"></result>
|
||||||
|
<result property="standId" column="stand_id"></result>
|
||||||
|
<result property="actualTime" column="actual_time"></result>
|
||||||
<result property="draftTime" column="draft_time"></result>
|
<result property="draftTime" column="draft_time"></result>
|
||||||
<result property="releaseTime" column="release_time"></result>
|
<result property="releaseTime" column="release_time"></result>
|
||||||
<result property="unit" column="unit"></result>
|
<result property="unit" column="unit"></result>
|
||||||
@@ -201,6 +203,9 @@
|
|||||||
es_revise_plan.drafter,
|
es_revise_plan.drafter,
|
||||||
es_revise_plan.res_person,
|
es_revise_plan.res_person,
|
||||||
es_revise_plan.wg_leader,
|
es_revise_plan.wg_leader,
|
||||||
|
es_revise_plan.stand_id,
|
||||||
|
es_revise_plan.actual_time,
|
||||||
|
(SELECT STAND_CODE from sar_bussioness_stand WHERE sar_bussioness_stand.ID = es_revise_plan.stand_id) as standNumber,
|
||||||
es_revise_plan.draft_time,
|
es_revise_plan.draft_time,
|
||||||
es_revise_plan.release_time,
|
es_revise_plan.release_time,
|
||||||
es_revise_plan.unit,
|
es_revise_plan.unit,
|
||||||
|
|||||||
+9
-1
@@ -18,7 +18,8 @@
|
|||||||
</update>
|
</update>
|
||||||
<select id="getFileMaterialPage" resultType="com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial">
|
<select id="getFileMaterialPage" resultType="com.adc.da.slrs.fileMaterialCenter.entity.FileMaterial">
|
||||||
SELECT
|
SELECT
|
||||||
fm.*,zd.id as treeId,zt.name as treeName
|
fm.id, fm.data_type, fm.data_title, fm.data_upload_time, fm.data_explain, fm.attach_file_id, fm.click_count,
|
||||||
|
fm.is_top, fm.del_flag, fm.is_show, zd.id as treeId, zt.name as treeName
|
||||||
FROM
|
FROM
|
||||||
file_material fm
|
file_material fm
|
||||||
LEFT JOIN zl_data zd ON zd.data_id=fm.id
|
LEFT JOIN zl_data zd ON zd.data_id=fm.id
|
||||||
@@ -28,6 +29,12 @@
|
|||||||
<if test="flieM.treeId != null and flieM.treeId != ''">
|
<if test="flieM.treeId != null and flieM.treeId != ''">
|
||||||
and zd.id=#{flieM.treeId}
|
and zd.id=#{flieM.treeId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="flieM.treeIdList != null">
|
||||||
|
and zd.id in
|
||||||
|
<foreach collection="flieM.treeIdList" open="(" separator="," close=")" index="index" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="flieM.id != null and flieM.id != ''">
|
<if test="flieM.id != null and flieM.id != ''">
|
||||||
and fm.id=#{flieM.id}
|
and fm.id=#{flieM.id}
|
||||||
</if>
|
</if>
|
||||||
@@ -43,6 +50,7 @@
|
|||||||
<if test="flieM.endDataUploadTime != null ">
|
<if test="flieM.endDataUploadTime != null ">
|
||||||
AND fm.data_upload_time <= #{flieM.endDataUploadTime}
|
AND fm.data_upload_time <= #{flieM.endDataUploadTime}
|
||||||
</if>
|
</if>
|
||||||
|
group by fm.id
|
||||||
order by fm.data_upload_time desc
|
order by fm.data_upload_time desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ALTER TABLE `es_revise_plan`
|
||||||
|
ADD COLUMN `stand_id` varchar(255) NULL AFTER `LXD`;
|
||||||
|
ADD COLUMN `actual_time` datetime NULL AFTER `stand_id`;
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
CREATE TABLE `es_revise_plan_log` (
|
||||||
|
`id` varchar(250) NOT NULL ,
|
||||||
|
`plan_id` varchar(250) NULL ,
|
||||||
|
`content` longtext NULL ,
|
||||||
|
`create_time` datetime NULL ,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user