Merge branch 'develop_master' into origin/Three
This commit is contained in:
@@ -3,28 +3,35 @@ package com.adc.da.scheduled;
|
||||
import com.adc.da.scheduled.dao.SarStandardInfoDao;
|
||||
import com.adc.da.scheduled.dao.SarStandardItemDao;
|
||||
import com.adc.da.scheduled.dao.SarStandardWarningDao;
|
||||
import com.adc.da.scheduled.entity.DataDTO;
|
||||
import com.adc.da.scheduled.entity.WarningEO;
|
||||
import com.adc.da.scheduled.entity.TermDTO;
|
||||
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@EnableScheduling
|
||||
@@ -55,13 +62,15 @@ public class ScheduledJob {
|
||||
@Autowired
|
||||
private SarStandAttrInfoDao sarStandAttrInfoDao; //属性字段表
|
||||
|
||||
@Autowired
|
||||
private IWarningDateService iWarningDateService;// 预警日期
|
||||
|
||||
|
||||
// @PostConstruct //程序启动时执行一次
|
||||
@Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void WarningSchedulingTasks() {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(ScheduledJob.class);
|
||||
|
||||
/**
|
||||
* 1.查询标准属性字段表(sar_stand_attr_info) XCXSSEQ ZCCSSRQ ZRGCS
|
||||
@@ -78,98 +87,44 @@ public class ScheduledJob {
|
||||
4:在产车标准预警
|
||||
1:新车条款预警
|
||||
2:在产车条款预警
|
||||
|
||||
2021/12/1 日需求修改
|
||||
分为标准预警与条款预警
|
||||
mark:标识预警的种类 stand 标准 item 条款
|
||||
*/
|
||||
|
||||
//删除不在预警范围的标准
|
||||
QueryWrapper<EarlyWarningEO> earlyWarningEOQW = new QueryWrapper<>();
|
||||
earlyWarningEOQW.lt("PUT_TIME",LocalDate.now());
|
||||
int remove = sarStandardWarningDao.delete(earlyWarningEOQW);
|
||||
System.out.println(remove);
|
||||
int remove = sarStandardWarningDao.autoCancelWarning();
|
||||
|
||||
logger.info("==========================================================================");
|
||||
logger.info("取消"+remove+"条预警");
|
||||
logger.info("开始执行预警!!!");
|
||||
logger.info("==========================================================================");
|
||||
|
||||
System.out.println("开始执行预警!!!");
|
||||
TermDTO term = new TermDTO(); //预警期限(当前日期至3个月后)
|
||||
|
||||
DataDTO term = new DataDTO(); //预警期限(当前日期至3个月后)
|
||||
List<WarningDate> warningDateList = sarStandardWarningDao.getWarningDate(term); //查询符合预警期限的标准 多个
|
||||
|
||||
LinkedList<WarningEO> warningList = new LinkedList<>();//需预警的标准和条款列表集合
|
||||
//分解单(条款) 新车型 mark=1
|
||||
List<WarningEO> itemForXCXSSRQ = sarStandardItemDao.selectWithinTerm(term, "XCXSSRQ");
|
||||
for (WarningEO warningEO : itemForXCXSSRQ) {
|
||||
warningEO.setId(UUIDUtils.randomUUID20())
|
||||
.setPower("1")
|
||||
.setMark("1")
|
||||
.setPutTime(warningEO.getXCXSSRQ())
|
||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||
}
|
||||
warningList.addAll(itemForXCXSSRQ);
|
||||
|
||||
//分解单(条款) 在产车型 mark=2
|
||||
List<WarningEO> itemForZCCSSRQ = sarStandardItemDao.selectWithinTerm(term, "ZCCSSRQ");
|
||||
for (WarningEO warningEO : itemForZCCSSRQ) {
|
||||
warningEO.setId(UUIDUtils.randomUUID20())
|
||||
.setPower("1")
|
||||
.setMark("2")
|
||||
.setPutTime(warningEO.getZCCSSRQ())
|
||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||
|
||||
}
|
||||
warningList.addAll(itemForZCCSSRQ);
|
||||
|
||||
//标准 新车型 预警 mark=3
|
||||
List<WarningEO> standInfoXCXSSRQ = sarStandardInfoDao.selectWithinTerm(term, "XCXSSRQ");
|
||||
for (WarningEO warningEO : standInfoXCXSSRQ) {
|
||||
warningEO.setId(UUIDUtils.randomUUID20())
|
||||
/**
|
||||
* //如果插入的值均为NULL,则根据索引的原理,
|
||||
* 全NULL值不被记录在索引上,所以插入全NULL值时,可以有重复的
|
||||
* 则此处设为 '-1'
|
||||
*/
|
||||
.setItemsId("-1")
|
||||
.setPower("1")
|
||||
.setMark("3")
|
||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||
|
||||
|
||||
//实施日期达到预警时间,但在产车实施日期不在时间内
|
||||
/**
|
||||
* 2021/9/9取消限制
|
||||
*/
|
||||
// if (term.isTerm(warningEO.getXCXSSRQ())){
|
||||
// warningEO.setPutTime(warningEO.getXCXSSRQ());
|
||||
// }
|
||||
warningEO.setPutTime(warningEO.getXCXSSRQ());
|
||||
|
||||
}
|
||||
warningList.addAll(standInfoXCXSSRQ);
|
||||
|
||||
|
||||
//标准 在产车型 mark=4
|
||||
List<WarningEO> standInfoZCCSSRQ = sarStandardInfoDao.selectWithinTerm(term, "ZCCSSRQ");
|
||||
for (WarningEO warningEO : standInfoZCCSSRQ) {
|
||||
warningEO.setId(UUIDUtils.randomUUID20())
|
||||
/**
|
||||
* 同上
|
||||
*/
|
||||
.setItemsId("-1")
|
||||
.setPower("1")
|
||||
.setMark("4")
|
||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||
//实施日期达到预警时间,但在产车实施日期不在时间内
|
||||
/**
|
||||
* 2021/9/9取消限制
|
||||
*/
|
||||
// if (term.isTerm(warningEO.getZCCSSRQ())){
|
||||
// warningEO.setPutTime(warningEO.getZCCSSRQ());
|
||||
// }
|
||||
warningEO.setPutTime(warningEO.getZCCSSRQ());
|
||||
}
|
||||
warningList.addAll(standInfoZCCSSRQ);
|
||||
warningDateList.forEach(item->{
|
||||
item.setId(UUIDUtils.randomUUID20());
|
||||
});
|
||||
iWarningDateService.remove(null); //清空标准的日期子表
|
||||
iWarningDateService.saveBatch(warningDateList); // 保存进入标准的日期子表 保存标准的实施日期 新车型实施日期 在产车实施日期 多个
|
||||
List<EarlyWarningEO> warningList = sarStandardWarningDao.getWarningId(term); //联接标准的日期子表 和分解单表 查询符合预警期限的标准和分解项
|
||||
|
||||
warningList.forEach(item->{
|
||||
item.setId(UUIDUtils.randomUUID20());
|
||||
});
|
||||
//持久化至预警表 忽略标准id和标志位都一样的数据
|
||||
if (warningList.size()!=0){
|
||||
//此表的STAND_ID和MARK字段以及ITEMS_ID字段需个建立唯一性约束
|
||||
int count = sarStandardWarningDao.ignoreInsert(warningList);
|
||||
System.out.println("已预警 " + count + " 条标准或条款!!");
|
||||
logger.info("==================================预警结束======================================");
|
||||
logger.info("==================================预警结束======================================");
|
||||
logger.info("已预警"+ count+"条标准或条款!!");
|
||||
logger.info("==================================预警结束======================================");
|
||||
logger.info("==================================预警结束======================================");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +145,7 @@ public class ScheduledJob {
|
||||
public void TextStatusSchedulingTasks() {
|
||||
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||
|
||||
DataDTO data = new DataDTO(LocalDate.now(), LocalDate.now());
|
||||
TermDTO data = new TermDTO(LocalDate.now(), LocalDate.now());
|
||||
|
||||
/**
|
||||
*实施日期是当前系统时间的标准文本状态变为'现行有效'
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.adc.da.scheduled.dao;
|
||||
|
||||
|
||||
import com.adc.da.scheduled.entity.DataDTO;
|
||||
import com.adc.da.scheduled.entity.WarningEO;
|
||||
import com.adc.da.scheduled.entity.TermDTO;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -12,7 +11,7 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarStandardInfoDao{
|
||||
|
||||
public List<WarningEO> selectWithinTerm(DataDTO date, String str);
|
||||
public List<String> selectWithinTerm(TermDTO date, String str);
|
||||
|
||||
public int updateStandardInfo(@Param("id")String id, @Param("textStatus") String textStatus);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.adc.da.scheduled.dao;
|
||||
|
||||
import com.adc.da.scheduled.entity.DataDTO;
|
||||
import com.adc.da.scheduled.entity.TermDTO;
|
||||
import com.adc.da.scheduled.entity.WarningEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
@@ -11,6 +11,6 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface SarStandardItemDao extends BaseMapper{
|
||||
|
||||
public List<WarningEO> selectWithinTerm(DataDTO date, String str);
|
||||
public List<WarningEO> selectWithinTerm(TermDTO date, String str);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
package com.adc.da.scheduled.dao;
|
||||
|
||||
import com.adc.da.scheduled.entity.WarningEO;
|
||||
import com.adc.da.scheduled.entity.TermDTO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface SarStandardWarningDao extends BaseMapper<EarlyWarningEO> {
|
||||
|
||||
public int ignoreInsert(@Param(value = "warningEOS") LinkedList<WarningEO> warningEOS);
|
||||
public int ignoreInsert(@Param(value = "warningEOS") List<EarlyWarningEO> warningEOS);
|
||||
|
||||
|
||||
public int autoCancelWarning();
|
||||
|
||||
public List<EarlyWarningEO> getWarningId(TermDTO term);
|
||||
|
||||
public List<WarningDate> getWarningDate(TermDTO term);
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@ import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DataDTO {
|
||||
public class TermDTO {
|
||||
/**
|
||||
* 预警的期限为系统日期的次日至3个月后
|
||||
*/
|
||||
@@ -28,14 +28,14 @@ public class DataDTO {
|
||||
|
||||
// private String str;
|
||||
|
||||
public DataDTO() {
|
||||
public TermDTO() {
|
||||
LocalDate starDate = LocalDate.now();//系统当前日期
|
||||
LocalDate endDate = LocalDate.now().plusMonths(3);//系统当前日期3个月后
|
||||
|
||||
convertToStr(starDate,endDate);
|
||||
}
|
||||
|
||||
public DataDTO(LocalDate startDate,LocalDate endDate){
|
||||
public TermDTO(LocalDate startDate, LocalDate endDate){
|
||||
convertToStr(startDate,endDate);
|
||||
}
|
||||
|
||||
+26
@@ -6,6 +6,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
@@ -52,24 +53,49 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
return Result.success(iEsRevisePlanService.getOnePlan(id));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取是否存在重复名企标名称接口")
|
||||
@GetMapping("/getDataByName")
|
||||
public ResponseMessage<Object> getDataByName(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.getDataByName(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划")
|
||||
@PostMapping("modPlan")
|
||||
public ResponseMessage<Object> modPlan(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.modPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划")
|
||||
@PostMapping("/modPlanByWk")
|
||||
public ResponseMessage<Object> modPlanByWk(@RequestBody EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.modPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加企标计划")
|
||||
@PostMapping("addPlan")
|
||||
public ResponseMessage<Object> addPlan(EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.addPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加企标计划")
|
||||
@PostMapping("/addPlanByWk")
|
||||
public ResponseMessage<Object> addPlanByWk(@RequestBody EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.addPlan(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除单个企标计划")
|
||||
@GetMapping("delPlan")
|
||||
public ResponseMessage<Object> delPlan(String id){
|
||||
return Result.success(iEsRevisePlanService.delPlan(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除单个企标计划")
|
||||
@GetMapping("delPlanByWk")
|
||||
public ResponseMessage<Object> delPlanByWk(@RequestParam("id") String id){
|
||||
return Result.success(iEsRevisePlanService.delPlans(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量删除企标计划")
|
||||
@GetMapping("delPlans")
|
||||
public ResponseMessage<Object> delPlans(String ids){
|
||||
|
||||
@@ -19,6 +19,7 @@ public interface EsRevisePlanDao extends BaseMapper<EsRevisePlan> {
|
||||
Integer getQueryTotal(EsRevisePlan esRevisePlan);
|
||||
List<EsRevisePlan> selectAll(EsRevisePlan esRevisePlan);//查询所有
|
||||
List<EsRevisePlan> queryAll(EsRevisePlan esRevisePlan);//多条件查询
|
||||
List<EsRevisePlan> selectPageByName(EsRevisePlan esRevisePlan);//多条件查询
|
||||
EsRevisePlan selectOne(String id);//查询详情
|
||||
|
||||
int updateOne(EsRevisePlan esRevisePlan);//编辑
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.adc.da.slrs.esRevisePlan.entity;
|
||||
import java.util.Date;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -46,15 +47,29 @@ public class EsRevisePlan extends BasePage {
|
||||
@ApiModelProperty(value = "工作组组长")
|
||||
private String wgLeader;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "起草人姓名")
|
||||
private String drafterName;
|
||||
|
||||
@ApiModelProperty(value = "评审责任人姓名")
|
||||
private String resPersonName;
|
||||
|
||||
@ApiModelProperty(value = "工作组组长姓名")
|
||||
private String wgLeaderName;
|
||||
|
||||
@ApiModelProperty(value = "计划标准初稿完成时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date draftTime;
|
||||
|
||||
@ApiModelProperty(value = "计划标准发布时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date releaseTime;
|
||||
|
||||
@ApiModelProperty(value = "起草责任单位")
|
||||
private String unit;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -18,8 +18,9 @@ public interface IEsRevisePlanService extends IService<EsRevisePlan> {
|
||||
List<EsRevisePlan> queryAllPlans(EsRevisePlan esRevisePlan);//多条件查询
|
||||
EsRevisePlan getOnePlan(String id);//查询详情
|
||||
|
||||
int modPlan(EsRevisePlan esRevisePlan);//编辑
|
||||
int addPlan(EsRevisePlan esRevisePlan);//插入
|
||||
String modPlan(EsRevisePlan esRevisePlan);//编辑
|
||||
String addPlan(EsRevisePlan esRevisePlan);//插入
|
||||
int delPlan(String id);//删除
|
||||
int delPlans(String ids);//批量删除
|
||||
List<EsRevisePlan> getDataByName(EsRevisePlan esRevisePlan);
|
||||
}
|
||||
|
||||
+23
-4
@@ -23,6 +23,8 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
|
||||
@Autowired
|
||||
EsRevisePlanDao esRevisePlanDao;
|
||||
@Autowired
|
||||
IEsRevisePlanService esRevisePlanService;
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
||||
@@ -46,14 +48,26 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
}
|
||||
|
||||
@Override
|
||||
public int modPlan(EsRevisePlan esRevisePlan) {
|
||||
return esRevisePlanDao.updateOne(esRevisePlan);
|
||||
public String modPlan(EsRevisePlan esRevisePlan) {
|
||||
List<EsRevisePlan> esRevisePlans=esRevisePlanDao.selectPageByName(esRevisePlan);
|
||||
if (esRevisePlans.size()>0){
|
||||
return "企标名称不能重复,请更换新的企标名称。";
|
||||
}else {
|
||||
esRevisePlanDao.updateOne(esRevisePlan);
|
||||
return "操作成功";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addPlan(EsRevisePlan esRevisePlan) {
|
||||
public String addPlan(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlan.setId(UUIDUtils.randomUUID(32));
|
||||
return esRevisePlanDao.insertOne(esRevisePlan);
|
||||
List<EsRevisePlan> esRevisePlans=esRevisePlanDao.selectPageByName(esRevisePlan);
|
||||
if (esRevisePlans.size()>0){
|
||||
return "企标名称不能重复,请更换新的企标名称";
|
||||
}else {
|
||||
esRevisePlanDao.insertOne(esRevisePlan);
|
||||
return "操作成功";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,4 +80,9 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
String[] str = ids.split(",");
|
||||
return esRevisePlanDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> getDataByName(EsRevisePlan esRevisePlan) {
|
||||
return esRevisePlanDao.selectPageByName(esRevisePlan);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -38,10 +38,14 @@ public class SarBussionessStand extends BaseEntity {
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@ApiModelProperty(value = "企标标准号")
|
||||
@TableField("STAND_CODE")
|
||||
private String standCode;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@TableField("STAND_NUMBER")
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@TableField("STAND_NAME")
|
||||
private String standName;
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IEvaluationIndexService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.EvaluationIndex;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.xml.ws.Response;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|EvaluationIndex|")
|
||||
@RequestMapping("/${restPath}/sarEnterpriseStandardEvaluation/evaluation-index")
|
||||
public class EvaluationIndexController extends BaseController<EvaluationIndex> {
|
||||
@Autowired
|
||||
private IEvaluationIndexService iEvaluationIndexService;
|
||||
|
||||
|
||||
@ApiOperation("获取评价指标")
|
||||
@GetMapping("getEvaluationIndex")
|
||||
public ResponseMessage<List<EvaluationIndex>> getEvaluationIndex(EvaluationIndex query){
|
||||
List<EvaluationIndex> evaluationIndex = iEvaluationIndexService.getEvaluationIndex(query);
|
||||
|
||||
return Result.success(evaluationIndex);
|
||||
}
|
||||
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.FormVO;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IQualityEvaluationService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|QualityEvaluation|")
|
||||
@RequestMapping("/${restPath}/sarEnterpriseStandardEvaluation/quality-evaluation")
|
||||
public class QualityEvaluationController extends BaseController<QualityEvaluation> {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IQualityEvaluationService iQualityEvaluationService;
|
||||
|
||||
|
||||
@ApiOperation("提交评价表")
|
||||
@PostMapping("submitEvaluationForm")
|
||||
public ResponseMessage submitEvaluationForm(@RequestBody FormVO form){
|
||||
|
||||
|
||||
if (form.getFormData()!=null && !form.getFormData().isEmpty()){
|
||||
List<QualityEvaluation> tableData = form.getTableData();
|
||||
String lawId = form.getLawId();
|
||||
String userId = form.getUserId();
|
||||
tableData.forEach(item->{
|
||||
item.setUserId(userId);
|
||||
item.setLawId(lawId);
|
||||
|
||||
if ( item.getEvaluationIndex()!=null && "3U9lb".equals( item.getEvaluationIndex() ) ){
|
||||
|
||||
JSONObject jsonObject = JSONObject.parseObject(form.getFormData());
|
||||
item.setScore(jsonObject.getString("revise"));
|
||||
item.setReason(jsonObject.getString("reviseReason"));
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Boolean i = iQualityEvaluationService.submitEvaluationForm(form);
|
||||
|
||||
return Result.success(i);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询评分表")
|
||||
@PostMapping("getEvaluationForm")
|
||||
public ResponseMessage getEvaluationForm(@RequestBody FormVO form){
|
||||
|
||||
QualityEvaluation qualityEvaluation = new QualityEvaluation();
|
||||
qualityEvaluation.setLawId(form.getLawId()) ;
|
||||
qualityEvaluation.setUserId(form.getUserId()) ;
|
||||
|
||||
iQualityEvaluationService.getEvaluationForm(qualityEvaluation);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查看评分历史")
|
||||
@GetMapping("getHistory")
|
||||
public ResponseMessage<IPage<QualityEvaluation>> getHistory(QualityEvaluation query){
|
||||
IPage<QualityEvaluation> history = iQualityEvaluationService.getHistory(query);
|
||||
|
||||
return Result.success(history);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询评价分数")
|
||||
@GetMapping("getScore")
|
||||
public ResponseMessage<Map<String,Double>> getScore(String lawId){
|
||||
Map<String, Double> score = iQualityEvaluationService.getScore(lawId);
|
||||
|
||||
return Result.success(score);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao;
|
||||
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.EvaluationIndex;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
public interface EvaluationIndexDao extends BaseMapper<EvaluationIndex> {
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao;
|
||||
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.BusinessDeptIssue;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
public interface QualityEvaluationDao extends BaseMapper<QualityEvaluation> {
|
||||
|
||||
|
||||
|
||||
public IPage<QualityEvaluation> getHistory(IPage<QualityEvaluation> page,@Param(Constants.WRAPPER) QueryWrapper<QualityEvaluation> queryWrapper);
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="EvaluationIndex对象", description="")
|
||||
public class EvaluationIndex extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("code") //评价指标编码
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "显示顺序")
|
||||
@TableField("index_sort")
|
||||
private Integer indexSort;
|
||||
|
||||
@ApiModelProperty(value = "权重")
|
||||
@TableField("weight")
|
||||
private String weight;
|
||||
|
||||
@ApiModelProperty(value = "指标类型(动态评价指标,质量评价指标")
|
||||
@TableField("index_type")
|
||||
private String indexType;
|
||||
|
||||
@ApiModelProperty(value = "一级指标名称")
|
||||
@TableField("one_index_title")
|
||||
private String oneIndexTitle;
|
||||
|
||||
@ApiModelProperty(value = "二级指标名称")
|
||||
@TableField("two_index_title")
|
||||
private String twoIndexTitle;
|
||||
|
||||
@ApiModelProperty(value = "三级指标名称")
|
||||
@TableField("three_index_title")
|
||||
private String threeIndexTitle;
|
||||
|
||||
@ApiModelProperty(value = "指标值类型")
|
||||
@TableField("value_type")
|
||||
private String valueType;
|
||||
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class FormVO {
|
||||
|
||||
@ApiModelProperty("提交的评分表")
|
||||
private List<QualityEvaluation> tableData;
|
||||
|
||||
@ApiModelProperty("企标法规id")
|
||||
@JsonProperty("standId") //前后分离 前端字段
|
||||
private String lawId;
|
||||
|
||||
@ApiModelProperty("提交的用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("附加")
|
||||
private String formData;
|
||||
|
||||
@ApiModelProperty("评分类型")
|
||||
private String evaluationType;
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="QualityEvaluation对象", description="")
|
||||
public class QualityEvaluation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
@TableField("law_id")
|
||||
@ApiModelProperty(value = "企标id")
|
||||
private String lawId;
|
||||
|
||||
@TableField("user_id")
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
@TableField("is_need_revise")
|
||||
@ApiModelProperty(value = "是否需要修订(废弃)")
|
||||
private String isNeedRevise;
|
||||
|
||||
@JsonProperty("code") //前后分离 前端字段
|
||||
@TableField("evaluation_index")
|
||||
@ApiModelProperty(value = "评价指标")
|
||||
private String evaluationIndex;
|
||||
|
||||
@JsonProperty("indexType") //前后分离 前端字段
|
||||
@TableField("evaluation_type")
|
||||
@ApiModelProperty(value = "评分类型")
|
||||
private String evaluationType;
|
||||
|
||||
@JsonProperty("commentReason") //前后分离 前端字段
|
||||
@TableField("reason")
|
||||
@ApiModelProperty(value = "打分理由")
|
||||
private String reason;
|
||||
|
||||
@JsonProperty("targetScore") //前后分离 前端字段
|
||||
@TableField("score")
|
||||
@ApiModelProperty(value = "打分")
|
||||
private String score;
|
||||
|
||||
@ApiModelProperty(value = "指标值类型")
|
||||
@TableField(exist = false)
|
||||
private String valueType;
|
||||
|
||||
@TableField("process_node")
|
||||
@ApiModelProperty(value = "流程节点")
|
||||
private String processNode;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.service;
|
||||
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.EvaluationIndex;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
public interface IEvaluationIndexService extends IService<EvaluationIndex> {
|
||||
|
||||
|
||||
public List<EvaluationIndex> getEvaluationIndex(EvaluationIndex query);
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.service;
|
||||
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.FormVO;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
public interface IQualityEvaluationService extends IService<QualityEvaluation> {
|
||||
|
||||
public Boolean submitEvaluationForm(FormVO form);
|
||||
|
||||
public IPage<QualityEvaluation> getHistory(QualityEvaluation query);
|
||||
|
||||
|
||||
public List<QualityEvaluation> getEvaluationForm(QualityEvaluation query);
|
||||
|
||||
|
||||
Map<String,Double> getScore(String lawId);
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.EvaluationIndex;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.EvaluationIndexDao;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IEvaluationIndexService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
@Service
|
||||
public class EvaluationIndexServiceImpl extends ServiceImpl<EvaluationIndexDao, EvaluationIndex> implements IEvaluationIndexService {
|
||||
|
||||
|
||||
// @Autowired
|
||||
// private EvaluationIndexDao evaluationIndexDao;
|
||||
|
||||
@Override
|
||||
public List<EvaluationIndex> getEvaluationIndex(EvaluationIndex query) {
|
||||
QueryWrapper<EvaluationIndex> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (query.getIndexType()!=null){
|
||||
queryWrapper.eq("index_type",query.getIndexType());
|
||||
}
|
||||
|
||||
queryWrapper.orderByAsc("index_sort");
|
||||
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.EvaluationIndex;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.FormVO;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IEvaluationIndexService;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IQualityEvaluationService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
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.apache.commons.collections.IterableMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.PipedReader;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhaokaiyao
|
||||
* @since 2021-12-03
|
||||
*/
|
||||
@Service
|
||||
public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationDao, QualityEvaluation> implements IQualityEvaluationService {
|
||||
|
||||
@Autowired
|
||||
private QualityEvaluationDao qualityEvaluationDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean submitEvaluationForm(FormVO form) {
|
||||
|
||||
//
|
||||
// queryWrapper.eq("user_id",form.get)
|
||||
// .eq("evaluation_type","dynamic");
|
||||
|
||||
Optional.ofNullable(form.getEvaluationType())
|
||||
.ifPresent( item->{
|
||||
if ("dynamic".equals(form.getEvaluationType())){
|
||||
QueryWrapper<QualityEvaluation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("law_id",form.getLawId()) //清除此用户在动态评分中已存在的评分
|
||||
.eq("user_id",form.getUserId())
|
||||
.eq("evaluation_type","dynamic");
|
||||
this.remove(queryWrapper);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
List<QualityEvaluation> tableData = form.getTableData();
|
||||
tableData.forEach(item->{
|
||||
|
||||
item.setId( UUIDUtils.randomUUID20());
|
||||
if ("number".equals(item.getValueType()) ){
|
||||
item.setScore(String.valueOf (Double.valueOf(item.getScore()) * 2) );
|
||||
|
||||
}
|
||||
});
|
||||
return this.saveBatch(tableData);
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
|
||||
|
||||
if (query.getUserId()!=null){ //指定用户
|
||||
queryWrapper.eq("user_id", query.getUserId())
|
||||
.orderBy(true,true, "crate_time","modify_time");
|
||||
}
|
||||
|
||||
if (query.getEvaluationType()!=null){ //指定评价指标
|
||||
queryWrapper.eq("evaluation_type",query.getEvaluationType());
|
||||
}
|
||||
|
||||
//sql计算每个用户的评分
|
||||
return qualityEvaluationDao.getHistory(page,queryWrapper);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<QualityEvaluation> getEvaluationForm(QualityEvaluation query) {
|
||||
QueryWrapper<QualityEvaluation> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.select("UNAME as userName","score","reason","create_time as createTime","modify_time as modifyTime","idx.value_type as valueType")
|
||||
.last("JOIN ts_user user ON quality_evaluation.user_id = user.USID" +
|
||||
"LEFT JOIN evaluation_index as idx on iex.id=quality_evaluation.evaluation_index");
|
||||
|
||||
|
||||
if (query.getLawId()!=null){
|
||||
queryWrapper.eq("law_id",query.getLawId()); //指定企标id
|
||||
}
|
||||
|
||||
if (query.getUserId()!=null){ //指定用户
|
||||
queryWrapper.eq("quality_evaluation.user_id", query.getUserId());
|
||||
|
||||
}
|
||||
|
||||
if (query.getEvaluationType()!=null){ //指定评价指标
|
||||
queryWrapper.eq("evaluation_type",query.getEvaluationType());
|
||||
}
|
||||
|
||||
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private IEvaluationIndexService iEvaluationIndexService;
|
||||
|
||||
@Override
|
||||
public Map<String, Double> getScore(String lawId) {
|
||||
|
||||
|
||||
QueryWrapper<QualityEvaluation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("law_id",lawId);
|
||||
List<QualityEvaluation> list = this.list(queryWrapper);
|
||||
|
||||
return list.stream()
|
||||
.collect(Collectors.groupingBy(QualityEvaluation::getEvaluationType,
|
||||
Collectors.averagingDouble(item -> getScoreSingle(item))));
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Double getScoreSingle(QualityEvaluation item){
|
||||
|
||||
QueryWrapper<EvaluationIndex> indexQuery = new QueryWrapper<>();
|
||||
indexQuery.select("code","weight");
|
||||
|
||||
List<EvaluationIndex> indexList = iEvaluationIndexService.list(indexQuery);
|
||||
|
||||
Map<String, Float> weightMap = indexList.stream()
|
||||
.collect(Collectors.toMap(EvaluationIndex::getCode, obj -> Float.valueOf(obj.getWeight())));
|
||||
|
||||
|
||||
|
||||
String score = item.getScore();
|
||||
return ((score == null || (Float.valueOf(item.getScore()) < 0.0)) ? 0.0 : Float.valueOf(score) * weightMap.get(item.getEvaluationIndex()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -118,4 +118,12 @@ public class TsUserVO {
|
||||
@ApiModelProperty(value = "岗位")
|
||||
@TableField(exist = false)
|
||||
private List<TsPosition> positions;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
@TableField(exist = false)
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位Id")
|
||||
@TableField(exist = false)
|
||||
private String unitId;
|
||||
}
|
||||
|
||||
+10
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RestController
|
||||
@@ -65,4 +66,13 @@ public class IssueTrackController {
|
||||
return Result.error("100","数据不能相同", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/isPresent")
|
||||
@ApiOperation("查询国内外标准和政策是否存在重点跟踪清单中")
|
||||
public ResponseMessage<List<Map<String,String>>> isPresent(String ids){
|
||||
List<Map<String, String>> maps = issueTrackService.idIsPresentIssueTrack(Arrays.asList(ids.split(",")));
|
||||
return Result.success(maps);
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarIssueTrack.entity.IssueTrackVo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IIssueTrackService {
|
||||
|
||||
@@ -15,4 +16,7 @@ public interface IIssueTrackService {
|
||||
public IPage<IssueTrack> getIssueTrack(IssueTrackVo objVo);
|
||||
|
||||
public boolean updateIssueTrack(IssueTrack obj);
|
||||
|
||||
|
||||
public List<Map<String,String>> idIsPresentIssueTrack(List<String> idList);
|
||||
}
|
||||
|
||||
+32
-12
@@ -12,8 +12,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Service
|
||||
public class IssueTrackServiceImpl extends ServiceImpl<IssueTrackDao, IssueTrack> implements IIssueTrackService {
|
||||
@@ -26,17 +27,12 @@ public class IssueTrackServiceImpl extends ServiceImpl<IssueTrackDao, IssueTrack
|
||||
@Override
|
||||
public boolean addIssueTrack(IssueTrack obj) {
|
||||
QueryWrapper<IssueTrack> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("law_id",obj.getLawId())
|
||||
.eq("del_flag","0");
|
||||
wrapper.eq("law_id",obj.getLawId());
|
||||
|
||||
IssueTrack one = this.getOne(wrapper);
|
||||
if (one==null){
|
||||
return false;
|
||||
}else {
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
return this.save(obj);
|
||||
}
|
||||
obj.setId(UUIDUtils.randomUUID20());
|
||||
obj.setDelFlag("0");
|
||||
|
||||
return this.saveOrUpdate(obj,wrapper);
|
||||
|
||||
|
||||
}
|
||||
@@ -71,4 +67,28 @@ public class IssueTrackServiceImpl extends ServiceImpl<IssueTrackDao, IssueTrack
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,String>> idIsPresentIssueTrack(List<String> idList){
|
||||
|
||||
QueryWrapper<IssueTrack> wrapper = new QueryWrapper<>();
|
||||
|
||||
wrapper.select("law_id")
|
||||
.in("law_id",idList);
|
||||
List<IssueTrack> issueTracks = issueTrackDao.selectList(wrapper);
|
||||
Set<String> lawIdSet = issueTracks.stream()
|
||||
.map(item -> item.getLawId()).collect(Collectors.toSet());
|
||||
|
||||
return idList.stream()
|
||||
.map(item -> {
|
||||
HashMap<String, String> resultMap = new HashMap<>();
|
||||
if (lawIdSet.contains(item)) {
|
||||
resultMap.put(item, "1");
|
||||
} else {
|
||||
resultMap.put(item, "0");
|
||||
}
|
||||
return resultMap;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
IPage<SarLawsAttrDetailedList> pageRes = new Page<>(sarFindDto.getPage(), sarFindDto.getSize());
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("detailed_list_id", sarFindDto.getId());
|
||||
IPage<SarLawsAttrDetailedList> selectPage = sarLawsAttrDetailedListDao.selectPage(pageRes,wrapper);
|
||||
IPage<SarLawsAttrDetailedList> selectPage = sarLawsAttrDetailedListDao.selectPage(pageRes,wrapper); //??????
|
||||
//查询标准id
|
||||
List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(sarFindDto.getId(),(sarFindDto.getPage())-1,sarFindDto.getSize(),sarFindDto);
|
||||
if (CollectionUtils.isEmpty(lawsIds)){
|
||||
|
||||
+9
@@ -11,6 +11,8 @@ import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.service.ISarLawsDetailedListService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.impl.SarStandardsInfoServiceImpl;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -39,6 +41,9 @@ import static com.adc.da.login.util.UserUtils.getUserName;
|
||||
@Service
|
||||
public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedListDao, SarLawsDetailedList> implements ISarLawsDetailedListService {
|
||||
|
||||
@Autowired
|
||||
SarStandardsInfoDao sarStandardsInfoDao;
|
||||
|
||||
@Autowired
|
||||
public SarLawsDetailedListDao sarLawsDetailedListDao;
|
||||
@Autowired
|
||||
@@ -582,6 +587,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
timeDto.add(dto);
|
||||
}
|
||||
service.updateDetailedLaws(detailedUpDto.getId(), timeDto);
|
||||
|
||||
//更新标准是否纳入认证清单
|
||||
sarStandardsInfoDao.updateISRELATEACCESSById("1",Arrays.asList(detailedUpDto.getInforlist().split(",")) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
-6
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarModelTree.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModuleTree;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModelTreeService;
|
||||
import com.adc.da.slrs.sarModelTree.service.ISarModuleTreeService;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
|
||||
@@ -38,17 +39,18 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarModelTree>> getAll(){
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(null);
|
||||
// TODO List<SarModelTree> tsResources = iSarModuleTreeService.getAll(null);
|
||||
// List<SarModuleTree> tsResources = iSarModuleTreeService.getAll(null);
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(null);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("根据父ID查询子所有资源")
|
||||
@GetMapping("/childByList")
|
||||
public ResponseMessage<List<SarModelTree>> childByList(String ids){
|
||||
SarModelTree tree = new SarModelTree();
|
||||
tree.setId(ids);
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(tree);
|
||||
public ResponseMessage<List<SarModelTree>> childByList(SarModelTree parentTree){
|
||||
// List<SarModuleTree> tsResources = iSarModuleTreeService.recursionGetChildren(parentTree);
|
||||
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(parentTree);
|
||||
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
@@ -65,4 +65,11 @@ public class SarModelTree extends BaseEntity {
|
||||
@TableField(exist=false)
|
||||
private List<String> childMenuIds;
|
||||
|
||||
@TableField("HAS_CHILDREN")
|
||||
private String hasChildren;
|
||||
|
||||
@TableField(exist = false)
|
||||
private boolean leaf;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +70,13 @@ public class SarModuleTree {
|
||||
@TableField("CREATIONDATE")
|
||||
private String creationdate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer level;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String model;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String nextCondition;
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,15 +1,16 @@
|
||||
package com.adc.da.slrs.sarModelTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModuleTree;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISarModuleTreeService {
|
||||
|
||||
List<SarModelTree> getAll(SarModelTree sarModelTree);
|
||||
List<SarModuleTree> getAll(SarModuleTree root);
|
||||
|
||||
List<SarModelTree> recursionGetChildren(SarModelTree parent);
|
||||
List<SarModuleTree> recursionGetChildren(SarModuleTree parent);
|
||||
|
||||
public Head analysisJsonAndStorage(String json);
|
||||
|
||||
|
||||
+36
-5
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -32,6 +34,17 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
// for(SarModelTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
// }
|
||||
list.forEach(item->{
|
||||
switch (item.getHasChildren()){
|
||||
case "0":
|
||||
item.setLeaf(true);
|
||||
break;
|
||||
case "1":
|
||||
item.setLeaf(false);
|
||||
break;
|
||||
}
|
||||
item.setId(item.getName());
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -44,11 +57,29 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
public List<SarModelTree> recursionGetChildren(SarModelTree parent){
|
||||
QueryWrapper<SarModelTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
// sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
List<SarModelTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarModelTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
}
|
||||
return children;
|
||||
// for(SarModelTree sarMenu:children){
|
||||
// sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
// }
|
||||
|
||||
List<SarModelTree> collect = children.stream()
|
||||
.filter(item -> !parent.getModel().equals(item.getModel())).collect(Collectors.toList());
|
||||
|
||||
collect.forEach(item-> {
|
||||
switch (item.getHasChildren()) {
|
||||
case "0":
|
||||
item.setLeaf(true);
|
||||
break;
|
||||
case "1":
|
||||
item.setLeaf(false);
|
||||
break;
|
||||
}
|
||||
item.setId(item.getName());
|
||||
});
|
||||
|
||||
|
||||
return collect;
|
||||
}
|
||||
}
|
||||
|
||||
+55
-15
@@ -15,9 +15,11 @@ import com.google.gson.JsonParser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@@ -27,16 +29,27 @@ public class SarModuleTreeServiceImpl extends ServiceImpl<SarModuleTreeDao, SarM
|
||||
private SarModuleTreeServiceImpl sarModuleTreeService;
|
||||
|
||||
/**
|
||||
* @param sarModelTree
|
||||
* @return 所有的根节点
|
||||
*/
|
||||
@Override
|
||||
public List<SarModelTree> getAll(SarModelTree sarModelTree) {
|
||||
public List<SarModuleTree> getAll(SarModuleTree root) {
|
||||
QueryWrapper<SarModuleTree> treeQueryWrapper = new QueryWrapper<>();
|
||||
treeQueryWrapper.groupBy("FTVSTYPE1");
|
||||
List<SarModuleTree> moduleTreeList = this.baseMapper.selectList(treeQueryWrapper);
|
||||
treeQueryWrapper.select("FTVSTYPE1")
|
||||
.groupBy("FTVSTYPE1");
|
||||
|
||||
List<Map<String, Object>> moduleTreeList = this.baseMapper.selectMaps(treeQueryWrapper);
|
||||
|
||||
List<SarModuleTree> collect = moduleTreeList.stream()
|
||||
.map(item -> {
|
||||
SarModuleTree sarModuleTree = new SarModuleTree();
|
||||
sarModuleTree.setNextCondition(item.get("FTVSTYPE1").toString());
|
||||
sarModuleTree.setLevel(1);
|
||||
sarModuleTree.setModel(item.get("FTVSTYPE1").toString());
|
||||
return sarModuleTree;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
//返回转换元素后的数组
|
||||
return listTransform(moduleTreeList);
|
||||
return collect;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,20 +58,47 @@ public class SarModuleTreeServiceImpl extends ServiceImpl<SarModuleTreeDao, SarM
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SarModelTree> recursionGetChildren(SarModelTree parent) {
|
||||
public List<SarModuleTree> recursionGetChildren(SarModuleTree parent) {
|
||||
|
||||
QueryWrapper<SarModuleTree> treeQueryWrapper = new QueryWrapper<>();
|
||||
treeQueryWrapper.eq("GUID",parent.getId());
|
||||
List<SarModuleTree> moduleTreeList = this.baseMapper.selectList(treeQueryWrapper);
|
||||
Integer level =parent.getLevel();
|
||||
|
||||
switch (parent.getLevel()){
|
||||
case 1:
|
||||
level=2;
|
||||
break;
|
||||
case 6:
|
||||
return null;
|
||||
}
|
||||
|
||||
String column="FTVSTYPE"+(level+1);
|
||||
|
||||
treeQueryWrapper.select(column)
|
||||
.eq("FTVSTYPE"+parent.getLevel(),parent.getNextCondition())
|
||||
.groupBy(column);
|
||||
|
||||
List<Map<String, Object>> moduleTreeList = this.baseMapper.selectMaps(treeQueryWrapper);
|
||||
|
||||
Integer finalLevel = level;
|
||||
List<SarModuleTree> collect = moduleTreeList.stream()
|
||||
.map(item -> {
|
||||
SarModuleTree sarModuleTree = new SarModuleTree();
|
||||
sarModuleTree.setNextCondition(item.get(column).toString()); //查询子节点条件
|
||||
sarModuleTree.setLevel(finalLevel + 1);
|
||||
//拼接前端显示名称
|
||||
// switch (finalLevel){
|
||||
// case 3:
|
||||
// sarModuleTree.setModel(item.get(column).toString());//前端显示名称
|
||||
// break;
|
||||
// case
|
||||
// }
|
||||
|
||||
|
||||
Map<String, List<SarModuleTree>> collect = moduleTreeList.stream().collect(Collectors.groupingBy(SarModuleTree::getFtvstype1));
|
||||
collect.forEach((k, v)->{
|
||||
SarModelTree modelTree = new SarModelTree();
|
||||
//TODO 生成树型结构
|
||||
// modelTree
|
||||
});
|
||||
return null;
|
||||
return sarModuleTree;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
return collect;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandIdea.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -21,4 +22,8 @@ import java.util.List;
|
||||
public interface SarPublicIdeaAllDao extends BaseMapper<SarPublicIdeaAll> {
|
||||
|
||||
List<SarPublicIdeaAll> getPublicIdea(@Param("unique")String unique);
|
||||
|
||||
List<SarPublicIdeaAll> getAllDataByIdea(@Param("page")Integer page,@Param("size")Integer size, @Param("ideaId")String ideaId);
|
||||
|
||||
Integer getAllDataByIdeaCount( @Param("ideaId")String ideaId);
|
||||
}
|
||||
|
||||
+7
-4
@@ -48,10 +48,13 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("idea_id", detAllStandDto.getIdeaId());
|
||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(), detAllStandDto.getSize());
|
||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||
List<SarPublicIdeaAll> sarPublicIdeaAlls=sarPublicIdeaAllDao.getAllDataByIdea(detAllStandDto.getPage(),detAllStandDto.getSize(),detAllStandDto.getIdeaId());
|
||||
Integer a=sarPublicIdeaAllDao.getAllDataByIdeaCount(detAllStandDto.getIdeaId());
|
||||
Page userIPage=new Page();
|
||||
userIPage.setTotal(a);
|
||||
userIPage.setRecords(sarPublicIdeaAlls);
|
||||
userIPage.setSize(detAllStandDto.getSize());
|
||||
userIPage.setCurrent(detAllStandDto.getPage());
|
||||
System.out.println("总条数" + userIPage.getTotal());
|
||||
System.out.println("总页数" + userIPage.getPages());
|
||||
List<SarPublicIdeaAll> list = userIPage.getRecords();
|
||||
|
||||
+24
-1
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -53,6 +53,29 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "项目评估流程分解单查询")
|
||||
@GetMapping("/workflowFindItems")
|
||||
public ResponseMessage workflowFindItems( @RequestParam("ids") String ids,@RequestParam("types") String types){
|
||||
List<String> id=new ArrayList<>(Arrays.asList(ids.split(",")));
|
||||
List<String> type=new ArrayList<>(Arrays.asList(types.split(",")));
|
||||
Map<String,String> map=new HashMap<>();
|
||||
int i =0 ;
|
||||
for (String s:type) {
|
||||
if (null!=map.get(s)){
|
||||
map.put(s,map.get(s)+","+id.get(i));
|
||||
}else {
|
||||
map.put(s,id.get(i));
|
||||
}
|
||||
}
|
||||
List<SarStandItemsDto> ItemDto = new ArrayList<>();
|
||||
map.entrySet().forEach(stringStringEntry -> {
|
||||
if (!"BDR".equals(stringStringEntry.getKey())){
|
||||
ItemDto.addAll(ServiceImpl.findAllItems(stringStringEntry.getKey(),stringStringEntry.getValue().split(",")));
|
||||
}
|
||||
});
|
||||
return Result.success("200",ItemDto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分解单查询")
|
||||
@GetMapping("/querySarItemAndInterpretation")
|
||||
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
|
||||
|
||||
+28
-23
@@ -155,24 +155,24 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
page.setPageSize(findStandDto.getSize());
|
||||
page.setUserId(null);
|
||||
List<SarStandardsInfo> pageInfo = null;
|
||||
try {
|
||||
pageInfo = sarStandardsInfoService.getSarStandardsInfoPageBak(page);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// try {
|
||||
// pageInfo = sarStandardsInfoService.getSarStandardsInfoPageBak(page);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
List<String> standId = new ArrayList<>();
|
||||
for (SarStandardsInfo standardsInfo : pageInfo){
|
||||
if (standardsInfo.getAttrInfoCaseMap().get("FBGBJBD")!=null || standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
||||
standId.add(standardsInfo.getId());
|
||||
}
|
||||
}
|
||||
// for (SarStandardsInfo standardsInfo : pageInfo){
|
||||
//// if (standardsInfo.getAttrInfoCaseMap().get("FBGBJBD")!=null || standardsInfo.getAttrInfoCaseMap().get("fbgbjbd")!=null){
|
||||
// standId.add(standardsInfo.getId());
|
||||
//// }
|
||||
// }
|
||||
|
||||
List<LawsDto> list=new ArrayList<>();
|
||||
if (standId==null || standId.size()==0){
|
||||
list = null;
|
||||
}else {
|
||||
// if (standId==null || standId.size()==0){
|
||||
// list = null;
|
||||
// }else {
|
||||
list = sarLawsAttrDetailedListDao.selectLawsByIdC((findStandDto.getPage()-1)*findStandDto.getSize(),findStandDto.getPage()*findStandDto.getSize(),standId,findStandDto.getStandName(), findStandDto.getStandType(),findStandDto.getFileType());
|
||||
}
|
||||
// }
|
||||
IPage<LawsDto> page1=new Page<>();
|
||||
page1.setRecords(list);
|
||||
page1.setTotal(sarLawsAttrDetailedListDao.selectLawsByIdCount(standId,findStandDto.getStandName(),findStandDto.getStandType(),findStandDto.getFileType()).size());
|
||||
@@ -195,6 +195,7 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
||||
List<SarStandItemsDto> list=dao.selectAllItemsByIds(type,ids);
|
||||
List<SarStandItemsDto> res=new ArrayList<>();
|
||||
List<SarStandItemsDto> chinese=new ArrayList<>();
|
||||
if (null == list || list.isEmpty()){
|
||||
return list;
|
||||
}else {
|
||||
@@ -206,20 +207,24 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
if (a>0){
|
||||
mark=mark.substring(0,a);
|
||||
}
|
||||
if (null != map.get(Integer.valueOf(mark))){
|
||||
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
||||
}else {
|
||||
integerList.add(Integer.valueOf(mark));
|
||||
List<SarStandItemsDto> middle=new ArrayList<>();
|
||||
middle.add(sarStandItemsDto);
|
||||
map.put(Integer.valueOf(mark),middle);
|
||||
}
|
||||
try {
|
||||
if (null != map.get(Integer.valueOf(mark))) {
|
||||
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
||||
} else {
|
||||
integerList.add(Integer.valueOf(mark));
|
||||
List<SarStandItemsDto> middle = new ArrayList<>();
|
||||
middle.add(sarStandItemsDto);
|
||||
map.put(Integer.valueOf(mark), middle);
|
||||
}
|
||||
}catch (Exception e){
|
||||
chinese.add(sarStandItemsDto);
|
||||
}
|
||||
});
|
||||
Collections.sort(integerList);
|
||||
integerList.forEach(integer -> {
|
||||
res.addAll(map.get(integer));
|
||||
});
|
||||
|
||||
res.addAll(chinese);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
+37
@@ -144,6 +144,29 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id,cars);
|
||||
return Result.success("200",list);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @param id
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@GetMapping("/queryStandInfoNew")
|
||||
@ApiOperation("查询标准信息")
|
||||
public ResponseMessage queryStandInfoNew(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
|
||||
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.queryStandInfoNew(current,pageSize,id,cars);
|
||||
return Result.success("200",list);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
@@ -192,6 +215,20 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
sarStandProjectLibraryService.batchInsert(list);
|
||||
return Result.success("200","新增成功",list);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-15
|
||||
**/
|
||||
@PostMapping("/batchInsertAdd")
|
||||
@ApiOperation("调取标准")
|
||||
public ResponseMessage batchInsertAdd(@RequestBody List<StandProjectRelationDto> list){
|
||||
sarStandProjectLibraryService.batchInsertAdd(list);
|
||||
return Result.success("200","新增成功",list);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param standAttrInfoExcelDto
|
||||
|
||||
+2
@@ -29,6 +29,8 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
||||
List<String> getAllStands();
|
||||
List<String> getAllStand();
|
||||
List<SarStandProjectLibrary> updateByProjectId(@Param("id")String id, @Param("version")String version);
|
||||
List<SarStandProjectLibrary> updateByProjectIdBath(@Param("id")List<String> id, @Param("version")String version);
|
||||
void deleteByProjectId(@Param("projectId")String projectId);
|
||||
|
||||
List<String> selectListByids(@Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
+4
@@ -59,4 +59,8 @@ public class StandAttrInfoDto {
|
||||
//关联模块--乘用车vpps中文名称
|
||||
@ExcelProperty("关联模块--乘用车vpps中文名称")
|
||||
private String CYCVPPSCN;
|
||||
|
||||
private Long unCount;
|
||||
|
||||
private String endTimes;
|
||||
}
|
||||
+3
@@ -22,8 +22,11 @@ public interface SarStandProjectLibraryService {
|
||||
List<SarStandProjectLibrary> queryByProductLine(String productLine);
|
||||
List<SarStandProjectLibrary> queryStandId(String standId);
|
||||
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars);
|
||||
|
||||
IPage<StandAttrInfoDto> queryStandInfoNew(int current, int pageSize, String standId, String cars);
|
||||
void deleteByIds(List<StandProjectRelationDto> ids);
|
||||
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
|
||||
void batchInsertAdd(@Param("ids") List<StandProjectRelationDto> list);
|
||||
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
|
||||
public Head AnalysisJsonAndStorage(String jsonStr);
|
||||
|
||||
|
||||
+88
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -370,6 +371,73 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StandAttrInfoDto> queryStandInfoNew(int current, int pageSize, String standId, String cars) {
|
||||
|
||||
//cars传回值为1时判断是从车型项目库中调取
|
||||
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE","(select count(*) from sar_stand_unqualified" +
|
||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ","(select count(*) from sar_stand_unqualified" +
|
||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '2' ) as counts ",
|
||||
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
||||
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
|
||||
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
||||
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
||||
System.out.println("总条数"+userIPage1.getTotal());
|
||||
System.out.println("总页数"+userIPage1.getPages());
|
||||
|
||||
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQ","ZCCSSRQ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
|
||||
|
||||
Page<SarStandAttrInfo> page2 = new Page<>(current, pageSize);
|
||||
IPage<SarStandAttrInfo> userIPage2 = sarStandAttrInfoDao.selectPage(page2, wrapper2);
|
||||
System.out.println("总条数"+userIPage2.getTotal());
|
||||
System.out.println("总页数"+userIPage2.getPages());
|
||||
List<StandAttrInfoDto> list = new ArrayList<>();
|
||||
List<SarStandardsInfo> list1 = userIPage1.getRecords();
|
||||
List<SarStandAttrInfo> list2 = userIPage2.getRecords();
|
||||
for(SarStandardsInfo s:list1){
|
||||
StandAttrInfoDto p =new StandAttrInfoDto();
|
||||
p.setStandId(s.getId());
|
||||
p.setStandNumber(s.getStandNumber());
|
||||
p.setStandSort(s.getStandSort());
|
||||
p.setStandYear(s.getStandYear());
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandType(s.getStandType());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
if (s.getUnCount()==0L && s.getCounts()>0L) {
|
||||
p.setUnCount(s.getUnCount());
|
||||
}else if (s.getUnCount() == 0L && s.getCounts()==0L){
|
||||
p.setUnCount(2L);
|
||||
}else {
|
||||
p.setUnCount(1L);
|
||||
}
|
||||
p.setEndTimes(s.getEndTimes());
|
||||
for (SarStandAttrInfo a:list2){
|
||||
if(s.getId().equals(a.getStandId())){
|
||||
p.setCYCVPPSBM(a.getCycvppsbm());
|
||||
p.setCYCVPPSCN(a.getCycvppscn());
|
||||
p.setSSRQ(a.getSsrq());
|
||||
p.setXCXSSRQ(a.getXcxssrq());
|
||||
p.setZCCSSRQ(a.getZccssrq());
|
||||
p.setKCCVPPSBM(a.getKccvppsbm());
|
||||
p.setKCCVPPSCN(a.getKccvppscn());
|
||||
p.setZRBM(a.getZrbm());
|
||||
}
|
||||
}
|
||||
list.add(p);
|
||||
}
|
||||
IPage<StandAttrInfoDto> userIPage = new Page<>();
|
||||
userIPage.setRecords(list);
|
||||
userIPage.setTotal(userIPage1.getTotal());
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
@Override
|
||||
public void deleteByIds(List<StandProjectRelationDto> ids) {
|
||||
sarStandProjectLibraryDao.deleteByIds(ids);
|
||||
@@ -385,6 +453,26 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchInsertAdd(List<StandProjectRelationDto> list) {
|
||||
List<String> ids=new ArrayList<>();
|
||||
List<String> projectIds=new ArrayList<>();
|
||||
list.forEach(standProjectRelationDto -> {
|
||||
if (!ids.contains(standProjectRelationDto.getStandId())) {
|
||||
ids.add(standProjectRelationDto.getStandId());
|
||||
}});
|
||||
List<String> standProjectRelationDtos=sarStandProjectLibraryDao.selectListByids(ids);
|
||||
List<StandProjectRelationDto> ins=new ArrayList<>();
|
||||
list.forEach(standProjectRelationDto -> {
|
||||
if (!standProjectRelationDtos.contains(standProjectRelationDto.getProjectId())){
|
||||
ins.add(standProjectRelationDto);
|
||||
projectIds.add(standProjectRelationDto.getProjectId());
|
||||
}
|
||||
});
|
||||
sarStandProjectLibraryDao.batchInsert(ins);
|
||||
sarStandProjectLibraryDao.updateByProjectIdBath(projectIds, TimeVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto ,String id) {
|
||||
List<String> ids = standAttrInfoExcelDto.getIds();
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ public class BusinessDeptIssue {
|
||||
|
||||
@ExcelIgnore
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@ExcelProperty("责任部门")
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ public class ProductDeptIssue {
|
||||
private String responseDept;
|
||||
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@TableField("is_close")
|
||||
|
||||
+3
@@ -51,6 +51,9 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@TableField("STAND_NAME")
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "项目编号")
|
||||
@TableField("product_id")
|
||||
private String productId;
|
||||
// @ExcelProperty("标准编号")
|
||||
// @ApiModelProperty(value = "标准编号")
|
||||
// @TableField("STAND_NUMBER")
|
||||
|
||||
+51
-4
@@ -4,10 +4,15 @@ package com.adc.da.slrs.sarStandWarning.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.sarStandIssueControlProduct.entity.SarStandIssueControlProduct;
|
||||
import com.adc.da.slrs.sarStandIssueControlProduct.entity.StandIssueControlProductExcelVO;
|
||||
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.service.Impl.EarlyWarningEOServiceImpl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -17,10 +22,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/sys/EarlyWarning")
|
||||
@@ -59,6 +63,16 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
@ApiOperation("标准预警查询")
|
||||
public ResponseMessage<IPage<StandWarningEO>> getStandWaring(StandWarningEO queryPageEO){
|
||||
IPage<StandWarningEO> standWarning = earlyWarningEOService.getStandWarning(queryPageEO);
|
||||
standWarning.getRecords().forEach(item->{
|
||||
|
||||
Optional.ofNullable(item.getSSRQ())
|
||||
.ifPresent(SSRQ -> item.setSSRQ(item.getSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
|
||||
Optional.ofNullable(item.getXCXSSRQ())
|
||||
.ifPresent(SSRQ ->item.setXCXSSRQ(item.getXCXSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
|
||||
Optional.ofNullable(item.getZCCSSRQ())
|
||||
.ifPresent(SSRQ ->item.setZCCSSRQ(item.getZCCSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
|
||||
|
||||
});
|
||||
return Result.success(standWarning);
|
||||
}
|
||||
|
||||
@@ -113,4 +127,37 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
|
||||
return Result.success("200",listMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/exprotWarning")
|
||||
@ApiOperation("导出预警")
|
||||
public void exportStandardsInfoExcel(WarningExcelVO excelVO, HttpServletResponse response) throws Exception {
|
||||
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
||||
if(excelVO.getExportName()==null){
|
||||
excelVO.setExportName("标准预警");
|
||||
}
|
||||
String fileName = URLEncoder.encode(excelVO.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
|
||||
|
||||
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), SarStandIssueControlProduct.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(exportExcel);
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
// 重置response
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -7,8 +7,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EarlyWarningEODao extends BaseMapper<EarlyWarningEO> {
|
||||
|
||||
IPage<StandWarningEO> selectWarningPage(IPage<StandWarningEO> page, @Param("waringEO") StandWarningEO warningEO);
|
||||
IPage<StandWarningEO> selectWarningPage(IPage<StandWarningEO> page, @Param("waringEO") StandWarningEO warningEO,@Param("idList") List<String> ids);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandWarning.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public interface WarningDateDao extends BaseMapper<WarningDate> {
|
||||
}
|
||||
+28
-10
@@ -1,6 +1,8 @@
|
||||
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.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -25,63 +27,79 @@ public class EarlyWarningEO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("id")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("标准id")
|
||||
@TableField("STAND_ID")
|
||||
private String standId;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("标准类别")
|
||||
@TableField("STAND_TYPE")
|
||||
@TableField(exist = false)
|
||||
private String standType;
|
||||
|
||||
@ExcelProperty("标准号")
|
||||
@ApiModelProperty("标准号")
|
||||
@TableField("STAND_CODE")
|
||||
@TableField(exist = false)
|
||||
private String standCode;
|
||||
|
||||
@ExcelProperty("标准名称")
|
||||
@ApiModelProperty("标准名称")
|
||||
@TableField("STAND_NAME")
|
||||
@TableField(exist = false)
|
||||
private String standName;
|
||||
|
||||
@ExcelProperty("发布日期")
|
||||
@ApiModelProperty("发布日期")
|
||||
@TableField("PUT_TIME")
|
||||
@TableField(exist = false)
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date putTime;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Date lastTime;
|
||||
|
||||
@ExcelProperty("适用车型")
|
||||
@ApiModelProperty("适用车型")
|
||||
@TableField("APPLY_TYPE")
|
||||
@TableField(exist = false)
|
||||
private String applyType;
|
||||
|
||||
@ExcelProperty("责任工程师")
|
||||
@ApiModelProperty("责任工程师")
|
||||
@TableField("DUTY_ENGINEER")
|
||||
@TableField(exist = false)
|
||||
private String dutyEngineer;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("条款(分解单)id")
|
||||
@TableField("ITEMS_ID")
|
||||
@TableField(exist = false)
|
||||
private String itemsId;
|
||||
|
||||
@ExcelProperty("条款(分解单)编号")
|
||||
@ApiModelProperty("条款(分解单)编号")
|
||||
@TableField("ITEMS_NUM")
|
||||
@TableField(exist = false)
|
||||
private String itemsNum;
|
||||
|
||||
@ExcelProperty("条款(分解单)名称")
|
||||
@ApiModelProperty("条款(分解单)名称")
|
||||
@TableField("ITEMS_NAME")
|
||||
@TableField(exist = false)
|
||||
private String itemsName;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("POLICY_ID")
|
||||
private String policyId;
|
||||
|
||||
@TableField("POLICY_NAME")
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String policyName;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("MARK")
|
||||
private String mark;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("POWER")
|
||||
private String power;
|
||||
|
||||
|
||||
+20
-1
@@ -1,5 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandWarning.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -11,62 +13,79 @@ import java.util.Date;
|
||||
@Accessors(chain = true)
|
||||
public class StandWarningEO extends EarlyWarningEO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("新车型实施日期")
|
||||
@ApiModelProperty("新车型实施日期")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String XCXSSRQ;
|
||||
|
||||
@ExcelProperty("在产车实施日期")
|
||||
@ApiModelProperty("在产车实施日期")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String ZCCSSRQ;
|
||||
|
||||
@ExcelProperty("实施日期")
|
||||
@ApiModelProperty("实施日期")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String SSRQ;
|
||||
|
||||
|
||||
@ExcelProperty("标准编号")
|
||||
private String standNum;
|
||||
|
||||
@ExcelProperty("标准类别")
|
||||
private String standSort;
|
||||
|
||||
@ExcelProperty("标准年份")
|
||||
private String standYear;
|
||||
|
||||
@ExcelProperty("发布日期")
|
||||
private String issueTime;
|
||||
|
||||
@ExcelIgnore
|
||||
private Integer page;
|
||||
|
||||
@ExcelIgnore
|
||||
private Integer pageSize;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询新车型实施日期开始")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String startXCXSSRQ;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询新车型实施日期结束")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String endXCXSSRQ;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询在产车实施日期开始")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String startZCCSSRQ;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询在产车实施日期结束")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String endZCCSSRQ;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询实施日期开始")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String startSSRQ;
|
||||
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询实施日期结束")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String endSSRQ;
|
||||
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询发布日期开始")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String startPutTime;
|
||||
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty("范围查询发布日期结束")
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private String endPutTime;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.slrs.sarStandWarning.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("warning_date")
|
||||
public class WarningDate {
|
||||
|
||||
@TableField("id")
|
||||
private String id;
|
||||
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
|
||||
@TableField("SSRQ")
|
||||
private String SSRQ;
|
||||
|
||||
@TableField("time_Name")
|
||||
private String timeName;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.adc.da.slrs.sarStandWarning.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class WarningExcelVO {
|
||||
@ApiModelProperty("文件名")
|
||||
String exportName;
|
||||
@ApiModelProperty("导出的ID列表")
|
||||
List<String> ids;
|
||||
}
|
||||
+3
@@ -3,6 +3,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.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -20,4 +21,6 @@ public interface EarlyWarningEOService extends IService<EarlyWarningEO> {
|
||||
|
||||
|
||||
IPage<StandWarningEO> getStandWarning(StandWarningEO queryPage);
|
||||
|
||||
List<StandWarningEO> getExportExcel(WarningExcelVO excelVO);
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.adc.da.slrs.sarStandWarning.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
public interface IWarningDateService extends IService<WarningDate> {
|
||||
|
||||
}
|
||||
+13
-5
@@ -1,12 +1,11 @@
|
||||
package com.adc.da.slrs.sarStandWarning.service.Impl;
|
||||
|
||||
|
||||
import com.adc.da.scheduled.entity.DataDTO;
|
||||
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.service.EarlyWarningEOService;
|
||||
import com.adc.da.sys.util.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -16,9 +15,7 @@ import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service("EarlyWarningEOService")
|
||||
@@ -115,9 +112,20 @@ public class EarlyWarningEOServiceImpl extends ServiceImpl<EarlyWarningEODao, Ea
|
||||
@Override
|
||||
public IPage<StandWarningEO> getStandWarning(StandWarningEO queryPage) {
|
||||
IPage<StandWarningEO> iPage = new Page<>(queryPage.getPage(),queryPage.getPageSize());
|
||||
return earlyWarningEODao.selectWarningPage(iPage,queryPage);
|
||||
return earlyWarningEODao.selectWarningPage(iPage,queryPage,null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出预警
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<StandWarningEO> getExportExcel(WarningExcelVO excelVO){
|
||||
IPage<StandWarningEO> standWarningEOIPage = earlyWarningEODao.selectWarningPage(null, null, excelVO.getIds());
|
||||
return standWarningEOIPage.getRecords();
|
||||
}
|
||||
|
||||
|
||||
private IPage<EarlyWarningEO> getEarlyWarningEOIPage(int current,int pageSize, QueryWrapper<EarlyWarningEO> wrapper) {
|
||||
wrapper.eq("power",1);
|
||||
Page<EarlyWarningEO> page = new Page<>(current, pageSize);
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.adc.da.slrs.sarStandWarning.service.Impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class WarningDateServiceImpl extends ServiceImpl<WarningDateDao, WarningDate> implements IWarningDateService {
|
||||
}
|
||||
+47
-16
@@ -19,7 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import oracle.ucp.proxy.annotation.Post;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -60,7 +59,7 @@ public class SarStandardComplianceAssessResultController {
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,type");
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
}
|
||||
@@ -175,6 +174,46 @@ public class SarStandardComplianceAssessResultController {
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "标准涉及项目复合性详情")
|
||||
@GetMapping("/productNewDetail")
|
||||
public ResponseMessage<Map<String,IPage<SarStandardComplianceProductAssess>>> selectProductDetail(SarStandardComplianceProductAssessEO eo) throws Exception {
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
Map<String,IPage<SarStandardComplianceProductAssess>> map=new HashMap<>();
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper.eq("product_id", eo.getProductId());
|
||||
queryWrapper.isNotNull("research_completion_time");
|
||||
queryWrapper.orderByAsc("product_name");
|
||||
queryWrapper.orderByAsc("standard_item");
|
||||
Page p1=new Page();
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
BeanUtils.copyProperties(page,p1);
|
||||
p1.setRecords(page.getRecords());
|
||||
p1.setTotal(page.getTotal());
|
||||
map.put("unfit",p1);
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper1.eq("product_id", eo.getProductId());
|
||||
queryWrapper1.ne("research_compliance","");
|
||||
queryWrapper1.orderByAsc("product_name");
|
||||
queryWrapper1.orderByAsc("standard_item");
|
||||
IPage<SarStandardComplianceProductAssess> page1 = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper1);
|
||||
map.put("fit",page1);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "标准涉及项目复合性")
|
||||
@GetMapping("/productNew")
|
||||
public ResponseMessage<IPage<unCountDTO>> selectProduct(unCountDTO eo) throws Exception {
|
||||
Page iPage = new Page<>();
|
||||
iPage.setCurrent(eo.getCurrent());
|
||||
iPage.setSize(eo.getSize());
|
||||
|
||||
IPage<unCountDTO> page = iSarStandardComplianceProductAssessService.selectPages(iPage, eo);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "插入标准涉及项目符合性清单")
|
||||
@PostMapping("/add")
|
||||
public ResponseMessage insertProduct(@RequestBody List<SarStandardComplianceProductAssess> eo) throws Exception {
|
||||
@@ -195,20 +234,12 @@ public class SarStandardComplianceAssessResultController {
|
||||
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
|
||||
if (eo.getPosition() == 1) {
|
||||
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
|
||||
//如果查询条件里标准编号不为空,查询
|
||||
if (eo.getStandNumber() != null) queryWrapper.like("STAND_NUMBER",eo.getStandNumber());
|
||||
//如果查询条件里标准名称不为空,查询
|
||||
if (eo.getStandName() != null) queryWrapper.like("STAND_NAME",eo.getStandName());
|
||||
//如果查询条件里具体章条不为空,查询
|
||||
if (eo.getSpecificItem() != null) queryWrapper.like("specific_item",eo.getSpecificItem());
|
||||
|
||||
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
|
||||
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
|
||||
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
|
||||
while (page.getRecords().remove(null)) ;
|
||||
return Result.success(page);
|
||||
List<SarInterpretationNationalStandard> standards=iSarInterpretationNationalStandardService.getAllDatas(eo);
|
||||
Integer datasCount=iSarInterpretationNationalStandardService.getAllDatasCount(eo);
|
||||
iPage.setTotal(datasCount);
|
||||
iPage.setRecords(standards);
|
||||
while (iPage.getRecords().remove(null)) ;
|
||||
return Result.success(iPage);
|
||||
} else {
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
+7
@@ -1,9 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.InterpretationEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -16,4 +19,8 @@ public interface SarInterpretationNationalStandardDao extends BaseMapper<SarInte
|
||||
|
||||
boolean updateData(@Param("find") SarInterpretationNationalStandard findStandDto);
|
||||
|
||||
List<SarInterpretationNationalStandard> getAllDatas(InterpretationEO sarInterpretationNationalStandard);
|
||||
|
||||
Integer getAllDatasCout(InterpretationEO sarInterpretationNationalStandard);
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -1,7 +1,14 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssessEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +20,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface SarStandardComplianceProductAssessDao extends BaseMapper<SarStandardComplianceProductAssess> {
|
||||
|
||||
List<unCountDTO> selectPages(@Param("page")Long page,@Param("pageSize")Long size,@Param("product") unCountDTO productAssess);
|
||||
|
||||
List<Integer> selectPagesCount(@Param("product")unCountDTO productAssess);
|
||||
|
||||
}
|
||||
|
||||
+16
-1
@@ -1,7 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@@ -121,7 +120,23 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "评估时间")
|
||||
@TableField("evaluation_time")
|
||||
private String evaluationTime;
|
||||
|
||||
@ApiModelProperty(value = "评估人")
|
||||
@TableField("evaluation_people")
|
||||
private String evaluationPeople;
|
||||
|
||||
@ApiModelProperty(value = "评估人")
|
||||
@TableField("evaluation_people_name")
|
||||
private String evaluationPeopleName;
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "符合不符合")
|
||||
@TableField(exist = false)
|
||||
private String bfh;
|
||||
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class unCountDTO {
|
||||
|
||||
private String standId;
|
||||
|
||||
private String productName;
|
||||
|
||||
private String productId;
|
||||
|
||||
private String productNumber;
|
||||
|
||||
private String productLine;
|
||||
|
||||
private String projectGroup;
|
||||
|
||||
private String projectManager;
|
||||
|
||||
private String uName;
|
||||
|
||||
private String unCount;
|
||||
|
||||
private Long current;
|
||||
|
||||
private Long size;
|
||||
|
||||
//项目编号
|
||||
private String sarId;
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.InterpretationEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -18,4 +19,8 @@ public interface ISarInterpretationNationalStandardService extends IService<SarI
|
||||
String saveBath(List<SarInterpretationNationalStandard> sarInterpretationNationalStandards);
|
||||
|
||||
boolean updateData(SarInterpretationNationalStandard findStandDto);
|
||||
|
||||
List<SarInterpretationNationalStandard> getAllDatas(InterpretationEO sarInterpretationNationalStandard);
|
||||
|
||||
Integer getAllDatasCount(InterpretationEO sarInterpretationNationalStandard);
|
||||
}
|
||||
|
||||
+7
@@ -1,7 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +18,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface ISarStandardComplianceProductAssessService extends IService<SarStandardComplianceProductAssess> {
|
||||
|
||||
IPage<unCountDTO> selectPages(Page page, @Param("product") unCountDTO productAssess);
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.InterpretationEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarInterpretationNationalStandardDao;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
|
||||
@@ -55,4 +56,14 @@ public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<Sa
|
||||
public boolean updateData(SarInterpretationNationalStandard findStandDto) {
|
||||
return sarInterpretationNationalStandardDao.updateData(findStandDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarInterpretationNationalStandard> getAllDatas(InterpretationEO sarInterpretationNationalStandard) {
|
||||
return sarInterpretationNationalStandardDao.getAllDatas(sarInterpretationNationalStandard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getAllDatasCount(InterpretationEO sarInterpretationNationalStandard) {
|
||||
return sarInterpretationNationalStandardDao.getAllDatasCout(sarInterpretationNationalStandard);
|
||||
}
|
||||
}
|
||||
|
||||
+28
@@ -2,10 +2,17 @@ package com.adc.da.slrs.sarStandardComplianceAssessResult.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssessEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarStandardComplianceProductAssessService;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -17,4 +24,25 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class SarStandardComplianceProductAssessServiceImpl extends ServiceImpl<SarStandardComplianceProductAssessDao, SarStandardComplianceProductAssess> implements ISarStandardComplianceProductAssessService {
|
||||
|
||||
@Autowired
|
||||
SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<unCountDTO> selectPages(Page pages, unCountDTO productAssess) {
|
||||
IPage<unCountDTO> productAssessIPage= new Page<>();
|
||||
List<unCountDTO> res=sarStandardComplianceProductAssessDao.selectPages(pages.getCurrent(),pages.getSize(),productAssess);
|
||||
res.forEach(unCountDTO -> {unCountDTO.setStandId(productAssess.getStandId());
|
||||
unCountDTO.setType(productAssess.getType());});
|
||||
productAssessIPage.setRecords(res);
|
||||
List<Integer> a=sarStandardComplianceProductAssessDao.selectPagesCount(productAssess);
|
||||
if (null!=a) {
|
||||
productAssessIPage.setTotal(a.size());
|
||||
}else {
|
||||
productAssessIPage.setTotal(0);
|
||||
}
|
||||
productAssessIPage.setCurrent(pages.getCurrent());
|
||||
productAssessIPage.setSize(pages.getSize());
|
||||
return productAssessIPage;
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -46,6 +46,7 @@ import java.net.URLEncoder;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -110,9 +111,24 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
|
||||
|
||||
// 去掉日期时分秒
|
||||
rows.forEach(item->{
|
||||
|
||||
Optional.ofNullable(item.getSSRQ())
|
||||
.ifPresent(SSRQ -> item.setSSRQ(item.getSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
|
||||
Optional.ofNullable(item.getXCXSSRQ())
|
||||
.ifPresent(SSRQ ->item.setXCXSSRQ(item.getXCXSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
|
||||
Optional.ofNullable(item.getZCCSSRQ())
|
||||
.ifPresent(SSRQ ->item.setZCCSSRQ(item.getZCCSSRQ().replaceAll("\\s[0-6][0-9]\\:[0-6][0-9]\\:[0-6][0-9]", "")));
|
||||
|
||||
});
|
||||
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void nowOrderFunc(SarStandardsInfoEOPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
|
||||
+2
@@ -70,4 +70,6 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> selectStandardsInfoBynumber(SarStandardsInfoEOPage page);
|
||||
|
||||
int updateISRELATEACCESSById(@Param("IS_RELATE_ACCESS") String ACCESS,@Param("list") List<String> list);
|
||||
|
||||
}
|
||||
|
||||
+12
@@ -142,6 +142,18 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@TableField("STAND_SYSTEM")
|
||||
private String standSystem;
|
||||
|
||||
@ApiModelProperty(value = "为符合数量")
|
||||
@TableField(exist = false)
|
||||
private Long unCount;
|
||||
|
||||
@ApiModelProperty(value = "为符合数量")
|
||||
@TableField(exist = false)
|
||||
private Long counts;
|
||||
|
||||
@ApiModelProperty(value = "整改完成时间")
|
||||
@TableField(exist = false)
|
||||
private String endTimes;
|
||||
|
||||
|
||||
// 以下为非表中字段
|
||||
@TableField(exist = false)
|
||||
|
||||
+27
@@ -3,6 +3,9 @@ package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
||||
import com.adc.da.slrs.sarStandWarning.service.Impl.WarningDateServiceImpl;
|
||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
@@ -123,6 +126,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Value("${file.path}")
|
||||
private String filePath;//文件存储路径
|
||||
|
||||
@Autowired
|
||||
WarningDateServiceImpl warningDateService;
|
||||
|
||||
@Autowired
|
||||
private ITsPositionService iTsPositionService;
|
||||
|
||||
@@ -1001,10 +1007,14 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
return Pattern.matches(verifyType,str);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void createStandPutTime(String standId, Map<String, String> multiTimeMap) throws Exception {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (multiTimeMap != null && multiTimeMap.size() > 0) {
|
||||
List<SarStandPutTime> standTimeList = new ArrayList<>();
|
||||
List<WarningDate> warningDateList = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<String, String> entry : multiTimeMap.entrySet()) {
|
||||
String value = entry.getValue();
|
||||
String field = entry.getKey();
|
||||
@@ -1025,6 +1035,16 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandPutTimeEO.setPutTime(date);
|
||||
standTimeList.add(sarStandPutTimeEO);
|
||||
}
|
||||
|
||||
|
||||
if ("SSRQ".equals(field) || "XCXSSRQ".equals(field) || "ZCCSSRQ".equals(field)){
|
||||
WarningDate warningDate = new WarningDate();
|
||||
warningDate.setId(UUIDUtils.randomUUID20());
|
||||
warningDate.setLawId(standId);
|
||||
warningDate.setSSRQ(val);
|
||||
warningDate.setTimeName(field);
|
||||
warningDateList.add(warningDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1032,6 +1052,13 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
if (standTimeList != null && !standTimeList.isEmpty()) {
|
||||
sarStandPutTimeEODao.insertForeach(standTimeList);
|
||||
}
|
||||
|
||||
if (warningDateList != null && warningDateList.size()>0){
|
||||
QueryWrapper<WarningDate> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("law_id",standId);
|
||||
warningDateService.remove(wrapper);
|
||||
warningDateService.saveBatch(warningDateList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ public class SarVppsTree extends BaseEntity {
|
||||
@TableField("TYPE")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("查询子节点条件")
|
||||
@TableField(exist = false)
|
||||
private String nextCondition;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> roleIds;
|
||||
@@ -82,4 +85,6 @@ public class SarVppsTree extends BaseEntity {
|
||||
private List<String> childMenuIds;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+16
-7
@@ -31,7 +31,10 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
||||
.eq("LEVEL",0);
|
||||
List<SarVppsTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
|
||||
list.forEach(item->item.setVppsCode("10"));
|
||||
list.forEach(item->{
|
||||
item.setCode(item.getVppsCode()+item.getChineseName());
|
||||
item.setId("10");
|
||||
});
|
||||
// for(SarVppsTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
// }
|
||||
@@ -47,14 +50,20 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
||||
public List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
|
||||
QueryWrapper<SarVppsTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
// sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
|
||||
sarMenuQueryWrapper.eq("LEVEL", parent.getLevel()+1)
|
||||
.eq("TYPE",parent.getType())
|
||||
.like("VPPS_CODE",parent.getVppsCode());
|
||||
.eq("TYPE",parent.getType());
|
||||
|
||||
|
||||
if(parent.getLevel()!=0){
|
||||
sarMenuQueryWrapper.like("VPPS_CODE",parent.getId());
|
||||
}
|
||||
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
// for(SarVppsTree sarMenu:children){
|
||||
// sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
// }
|
||||
|
||||
children.forEach(item->{
|
||||
item.setId(item.getVppsCode());
|
||||
item.setCode(item.getVppsCode()+item.getChineseName());
|
||||
});
|
||||
return children;
|
||||
}
|
||||
}
|
||||
|
||||
+2276
File diff suppressed because it is too large
Load Diff
+209
@@ -0,0 +1,209 @@
|
||||
package com.adc.da.slrs.standardSplit.EventUtils;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2021年11月28日 12:28
|
||||
*/
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文本差异高亮算法
|
||||
*
|
||||
* @Author : cron
|
||||
* @Date: 2020-01-15
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class EventEditHistoryHighLightUtil {
|
||||
|
||||
/**
|
||||
* 传入2个字符串进行相比高亮显示
|
||||
* eg:
|
||||
* 原数据一:王五张三
|
||||
* 原数据二:张三李四
|
||||
* <span style='color:red'>王五</span>张三
|
||||
* 张三<span style='color:red'>李四</span>
|
||||
*/
|
||||
|
||||
public static String[] getHighLightDifferentOld(String a, String b) {
|
||||
String[] temp = getDiff(a, b);
|
||||
String[] result = {getHighLight(a, temp[0]), getHighLight(b, temp[1])};
|
||||
return result;
|
||||
}
|
||||
|
||||
private static String getHighLight(String source, String temp) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
char[] sourceChars = source.toCharArray();
|
||||
char[] tempChars = temp.toCharArray();
|
||||
boolean flag = false;
|
||||
for (int i = 0; i < sourceChars.length; i++) {
|
||||
if (tempChars[i] != ' ') {
|
||||
if (i == 0) {
|
||||
sb.append("<span style='color:red'>").append(sourceChars[i]);
|
||||
} else if (flag) {
|
||||
sb.append(sourceChars[i]);
|
||||
} else {
|
||||
sb.append("<span style='color:red'>").append(sourceChars[i]);
|
||||
}
|
||||
flag = true;
|
||||
if (i == sourceChars.length - 1) {
|
||||
sb.append("</span>");
|
||||
}
|
||||
} else if (flag) {
|
||||
sb.append("</span>").append(sourceChars[i]);
|
||||
flag = false;
|
||||
} else {
|
||||
sb.append(sourceChars[i]);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String[] getDiff(String a, String b) {
|
||||
String[] result = null;
|
||||
//选取长度较小的字符串用来穷举子串
|
||||
if (a.length() < b.length()) {
|
||||
result = getDiff(a, b, 0, a.length());
|
||||
} else {
|
||||
result = getDiff(b, a, 0, b.length());
|
||||
result = new String[]{result[1], result[0]};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将a的指定部分与b进行比较生成比对结果
|
||||
*/
|
||||
private static String[] getDiff(String a, String b, int start, int end) {
|
||||
String[] result = new String[]{a, b};
|
||||
int len = result[0].length();
|
||||
while (len > 0) {
|
||||
for (int i = start; i < end - len + 1; i++) {
|
||||
String sub = result[0].substring(i, i + len);
|
||||
int idx = -1;
|
||||
if ((idx = result[1].indexOf(sub)) != -1) {
|
||||
result[0] = setEmpty(result[0], i, i + len);
|
||||
result[1] = setEmpty(result[1], idx, idx + len);
|
||||
if (i > 0) {
|
||||
//递归获取空白区域左边差异
|
||||
result = getDiff(result[0], result[1], 0, i);
|
||||
}
|
||||
if (i + len < end) {
|
||||
//递归获取空白区域右边差异
|
||||
result = getDiff(result[0], result[1], i + len, end);
|
||||
}
|
||||
len = 0;//退出while循环
|
||||
break;
|
||||
}
|
||||
}
|
||||
len = len / 2;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将字符串s指定的区域设置成空格
|
||||
*/
|
||||
public static String setEmpty(String s, int start, int end) {
|
||||
char[] array = s.toCharArray();
|
||||
for (int i = start; i < end; i++) {
|
||||
array[i] = ' ';
|
||||
}
|
||||
return new String(array);
|
||||
}
|
||||
|
||||
//--------------new -------------------------
|
||||
|
||||
public static String[] getHighLightDifferent(String altbe, String altaf) {
|
||||
//字符串1 altbe 字符串2 altaf
|
||||
List<Integer> beList = rememberSpacing(altbe);
|
||||
List<Integer> afList = rememberSpacing(altaf);
|
||||
altbe = altbe.replace(" ", "");
|
||||
altaf = altaf.replace(" ", "");
|
||||
LinkedList<DiffMatchPatch.Diff> t = new DiffMatchPatch().diff_main(altbe, altaf);
|
||||
StringBuffer s1 = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
Integer indexBe = 0;
|
||||
Integer indexAf = 0;
|
||||
for (DiffMatchPatch.Diff diff : t) {
|
||||
StringBuffer diffTextBe = new StringBuffer(diff.text);
|
||||
StringBuffer diffTextAf = new StringBuffer(diff.text);
|
||||
if ("EQUAL".equalsIgnoreCase(diff.operation.toString())) {
|
||||
addSpacing(beList, indexBe, diffTextBe);
|
||||
addSpacing(afList, indexAf, diffTextAf);
|
||||
s1.append(diffTextBe);
|
||||
s2.append(diffTextAf);
|
||||
indexBe += diffTextBe.length();
|
||||
indexAf += diffTextAf.length();
|
||||
}
|
||||
indexBe = appendString2("DELETE", diff, s1, s2, beList, indexBe);
|
||||
indexAf = appendString2("INSERT", diff, s2, s1, afList, indexAf);
|
||||
}
|
||||
String[] result = new String[2];
|
||||
result[0] = s1.toString();
|
||||
result[1] = s2.toString();
|
||||
return result;
|
||||
}
|
||||
|
||||
// public static void appendString(String type, Diff diff, StringBuffer sbOne, StringBuffer sbTwo) {
|
||||
// if (type.equals(diff.operation.toString())) {
|
||||
// if (" ".equals(diff.text)) {
|
||||
// sbOne.append(" ");
|
||||
// sbTwo.append(" ");
|
||||
// } else {
|
||||
// sbOne.append("<em class='f-required'>").append(diff.text).append("</em>");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private static List<Integer> rememberSpacing(String str) {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
if (' ' == str.charAt(i)) {
|
||||
list.add(i);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void addSpacing(List<Integer> list, Integer index, StringBuffer str) {
|
||||
for (Integer o : list) {
|
||||
if (o >= index && o < index + str.length()) {
|
||||
str.insert(o - index, ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Integer appendString2(String type, DiffMatchPatch.Diff diff, StringBuffer sbOne,
|
||||
StringBuffer sbTwo, List<Integer> list, Integer i) {
|
||||
Integer result = i;
|
||||
if (type.equals(diff.operation.toString())) {
|
||||
StringBuffer sb = new StringBuffer(diff.text);
|
||||
for (Integer o : list) {
|
||||
if (o >= i && o < i + sb.length()) {
|
||||
sb.insert(o - i, ' ');
|
||||
}
|
||||
}
|
||||
sbOne.append("<span style='color:red;'>").append(sb).append("</span>");
|
||||
result = i + sb.length();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String a = "测试测试测试仅关注界面和功能,数据准确性在暂不测试";
|
||||
String b = "提交留言数据仅关注界面和功能,数据准确性在暂不测试";
|
||||
String[] anb = getHighLightDifferent(a, b);
|
||||
System.out.println(Arrays.toString(anb));
|
||||
|
||||
// String altbe = "提交留言数据仅关注界面和 功能,数据准确性在暂不测试";
|
||||
// String altaf = "提交留言数据仅关注界面和功能,数据准确性在暂不测试提交 留言数据仅关注界面和功能,数据准确性在暂不测试";
|
||||
// String[] highLightDifferentNew = getHighLightDifferent(altbe, altaf);
|
||||
// System.out.println(Arrays.toString(highLightDifferentNew));
|
||||
}
|
||||
|
||||
}
|
||||
+27
-4
@@ -5,8 +5,10 @@ import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarStandCompareHisEODao;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEOPage;
|
||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitInfoEOService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarItemsCompareHisEOService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarStandCompareHisEOService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarStandItemsCompareHisEOService;
|
||||
@@ -36,6 +38,9 @@ public class SarStandCompareHisEOController extends BaseController<SarStandCompa
|
||||
@Autowired
|
||||
private SarStandCompareHisEOService sarStandCompareHisEOService;
|
||||
|
||||
@Autowired
|
||||
private SarFileSplitInfoEOService sarFileSplitInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private SarStandItemsCompareHisEOService sarStandItemsCompareHisEOService;
|
||||
|
||||
@@ -124,17 +129,35 @@ public class SarStandCompareHisEOController extends BaseController<SarStandCompa
|
||||
|
||||
@ApiOperation(value = "条款比对")
|
||||
@PostMapping("/clauseComparison")
|
||||
public ResponseMessage<Map<String,Object>> clauseComparison(String oldItemId, String newItemId, String standHisId) throws Exception {
|
||||
Map<String,Object> resultMap = sarStandCompareHisEOService.clauseComparison(oldItemId,newItemId,standHisId);
|
||||
public ResponseMessage<Map<String,Object>> clauseComparison(String oldItemId, String newItemId, String standHisId,String flag) throws Exception {
|
||||
Map<String,Object> resultMap = sarStandCompareHisEOService.clauseComparisonEvent(oldItemId,newItemId,standHisId,flag);
|
||||
return Result.success(resultMap);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "全文比对")
|
||||
@PostMapping("/fullTextComparison")
|
||||
public ResponseMessage<String> fullTextComparison(String leftStandard, String rightStandard) throws Exception {
|
||||
String id=UUIDUtils.randomUUID(32);
|
||||
SarStandCompareHisEO sarStandCompareHisEO =new SarStandCompareHisEO();
|
||||
SarFileSplitInfoEO leftInfo = sarFileSplitInfoEOService.selectByPrimaryKey(leftStandard);
|
||||
SarFileSplitInfoEO rightInfo = sarFileSplitInfoEOService.selectByPrimaryKey(rightStandard);
|
||||
//保存标准比对历史表数据
|
||||
SarStandCompareHisEO sarStandCompareHisEO = new SarStandCompareHisEO();
|
||||
// String id = UUIDUtils.randomUUID20();
|
||||
String id=UUIDUtils.randomUUID(32);
|
||||
sarStandCompareHisEO.setId(id);
|
||||
sarStandCompareHisEO.setOldStandId(leftStandard);
|
||||
sarStandCompareHisEO.setNewStandId(rightStandard);
|
||||
sarStandCompareHisEO.setOldFileType(leftInfo.getFileType());
|
||||
sarStandCompareHisEO.setNewFileType(rightInfo.getFileType());
|
||||
sarStandCompareHisEO.setOldStandName(leftInfo.getStandNameSplit());
|
||||
sarStandCompareHisEO.setNewStandName(rightInfo.getStandNameSplit());
|
||||
sarStandCompareHisEO.setOldStandNum(leftInfo.getStandNumSplit());
|
||||
sarStandCompareHisEO.setNewStandNum(rightInfo.getStandNumSplit());
|
||||
sarStandCompareHisEO.setOldSarType(leftInfo.getSarType());
|
||||
sarStandCompareHisEO.setNewSarType(rightInfo.getSarType());
|
||||
sarStandCompareHisEO.setCreateTime(new Date());
|
||||
sarStandCompareHisEO.setModifyTime(new Date());
|
||||
sarStandCompareHisEO.setCreateUser(LoginUserUtil.getUserId());
|
||||
sarStandCompareHisEO.setModifyUser(LoginUserUtil.getUserId());
|
||||
sarStandCompareHisEO.setCompareStatus("比对中");
|
||||
sarStandCompareHisEO.setCompareType("全文比对");
|
||||
sarStandCompareHisEO.setCreateTime(new Date());
|
||||
|
||||
+2
@@ -21,5 +21,7 @@ public interface SarStandCompareHisEOService {
|
||||
|
||||
Map<String,Object> clauseComparison(String oldItemId, String newItemId, String standHisId);
|
||||
|
||||
Map<String,Object> clauseComparisonEvent(String oldItemId, String newItemId, String standHisId,String flag);
|
||||
|
||||
Map<String,Object> fullTextComparison(String leftStandard, String rightStandard,String id) throws Exception;
|
||||
}
|
||||
|
||||
+1
@@ -383,6 +383,7 @@ public class SarFileSplitMenuEOServiceImpl implements SarFileSplitMenuEOService
|
||||
sarFileSplitItemsEO.setModifyTime(new Date());
|
||||
sarFileSplitItemsEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
sarFileSplitItemsEO.setModifyUser(LoginUserUtil.getUserId());
|
||||
sarFileSplitItemsEO.setEditFlag(String.valueOf(UUID.randomUUID()));
|
||||
result += sarFileSplitItemsEODao.insertSelective(sarFileSplitItemsEO);
|
||||
|
||||
// SAR_FILE_ITEMS_VAL 添加数据,
|
||||
|
||||
+134
-14
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.standardSplit.service.impl;
|
||||
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.standardSplit.EventUtils.EventEditHistoryHighLightUtil;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarStandAttrDetailsEODao;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarStandCompareHisEODao;
|
||||
import com.adc.da.slrs.standardSplit.entity.*;
|
||||
@@ -14,6 +15,7 @@ import com.adc.da.utils.treetool.TreeNode;
|
||||
import com.adc.da.utils.util.CompHanLPUtils;
|
||||
import com.adc.da.utils.util.DiffUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -112,6 +114,138 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
return sarStandCompareHisEODao.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> clauseComparisonEvent(String oldItemId, String newItemId, String standHisId, String flag) {
|
||||
Map<String,Object> resultMap = new HashMap<String, Object>();
|
||||
String oldTxt = "";
|
||||
SarFileSplitItemsValEOPage oldPage = new SarFileSplitItemsValEOPage();
|
||||
oldPage.setItemId(oldItemId);
|
||||
oldPage.setType("TEXT");
|
||||
oldPage.setOrderBy("DISPLAY_SEQ,ID");
|
||||
List<SarFileSplitItemsValEO> oldList = sarFileSplitItemsValEOService.queryByList(oldPage);
|
||||
if(oldList!=null && !oldList.isEmpty()){
|
||||
for(int i = 1;i<=oldList.size();i++){
|
||||
if(i==oldList.size()) {
|
||||
oldTxt += oldList.get(i-1).getItemContent();
|
||||
}else{
|
||||
oldTxt += oldList.get(i-1).getItemContent() + "i#2\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
String newTxt = "";
|
||||
SarFileSplitItemsValEOPage newPage = new SarFileSplitItemsValEOPage();
|
||||
newPage.setItemId(newItemId);
|
||||
newPage.setType("TEXT");
|
||||
newPage.setOrderBy("DISPLAY_SEQ,ID");
|
||||
List<SarFileSplitItemsValEO> newList = sarFileSplitItemsValEOService.queryByList(newPage);
|
||||
if(newList!=null && !newList.isEmpty()){
|
||||
for(int i = 1;i<=newList.size();i++){
|
||||
if(i==newList.size()) {
|
||||
newTxt += newList.get(i-1).getItemContent();
|
||||
}else{
|
||||
newTxt += newList.get(i-1).getItemContent() + "i#2\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
String similarityDegree="";
|
||||
double similarity = 100.00;
|
||||
if(!StringUtils.isNotBlank(oldTxt.trim()) && !StringUtils.isNotBlank(newTxt.trim())){
|
||||
similarityDegree = "100.00";
|
||||
}else if(StringUtils.isNotBlank(oldTxt.trim()) && StringUtils.isNotBlank(newTxt.trim())){
|
||||
similarity = CompHanLPUtils.findSimilarity(oldTxt.trim(), newTxt.trim());
|
||||
NumberFormat nf = java.text.NumberFormat.getPercentInstance();
|
||||
//nf.setMaximumIntegerDigits(2);//小数点前保留几位
|
||||
nf.setMinimumFractionDigits(2);// 小数点后保留几位
|
||||
similarityDegree = nf.format(similarity);
|
||||
}else{
|
||||
similarity = 0.00;
|
||||
similarityDegree = "0.00";
|
||||
}
|
||||
resultMap.put("similarityDegree",similarityDegree);
|
||||
List<String> leftString = new ArrayList<>();
|
||||
List<String> rightString = new ArrayList<>();
|
||||
if(similarity >= 0.6){
|
||||
// DiffUtils diffUtils = new DiffUtils();
|
||||
// List<String> htmlDiffStr = diffUtils.getHtmlDiffStr(oldTxt.trim(), newTxt.trim());
|
||||
// List<String> stringList1 = Arrays.asList(htmlDiffStr.get(0).split("<br/>"));
|
||||
// for(String left : stringList1){
|
||||
// StringBuilder stringBuilder = new StringBuilder(left);
|
||||
// stringBuilder.append("</br>");
|
||||
// leftString.add(stringBuilder.toString());
|
||||
// }
|
||||
// List<String> stringList2 = Arrays.asList(htmlDiffStr.get(1).split("<br/>"));
|
||||
// for(String right : stringList2){
|
||||
// StringBuilder stringBuilder = new StringBuilder(right);
|
||||
// stringBuilder.append("</br>");
|
||||
// rightString.add(stringBuilder.toString());
|
||||
// }
|
||||
String[] anb = EventEditHistoryHighLightUtil.getHighLightDifferent(oldTxt.trim(), newTxt.trim());
|
||||
if(StringUtils.isNotBlank(flag) && flag.equals("2")){
|
||||
anb[0] = anb[0].replaceAll("red;", "#000000;background-color: red;").replaceAll("i#2\n", "<br/>");
|
||||
anb[1] = anb[1].replaceAll("red;", "#000000;background-color: rgb(51, 145, 206);").replaceAll("i#2\n", "<br/>");
|
||||
}else {
|
||||
anb[0] = anb[0].replaceAll("red;", "#000000;background-color: rgb(51, 145, 206);").replaceAll("i#2\n", "<br/>");
|
||||
anb[1] = anb[1].replaceAll("red;", "#000000;background-color: red;").replaceAll("i#2\n", "<br/>");
|
||||
}
|
||||
resultMap.put("leftString",anb[0]);
|
||||
resultMap.put("rightString",anb[1]);
|
||||
}else{
|
||||
String oldTxtTemp = oldTxt.replace("i#2\n", "<br/>");
|
||||
List<String> stringList1 = Arrays.asList(oldTxtTemp.split("<br/>"));
|
||||
for(String left : stringList1){
|
||||
StringBuilder stringBuilder = new StringBuilder(left);
|
||||
stringBuilder.append("</div>");
|
||||
stringBuilder.insert(0,"<div>");
|
||||
leftString.add(stringBuilder.toString());
|
||||
}
|
||||
resultMap.put("leftString",leftString);
|
||||
String newTxtTemp = newTxt.replace("i#2\n", "<br/>");
|
||||
List<String> stringList2 = Arrays.asList(newTxtTemp.split("<br/>"));
|
||||
for(String right : stringList2){
|
||||
StringBuilder stringBuilder = new StringBuilder(right);
|
||||
stringBuilder.append("</div>");
|
||||
stringBuilder.insert(0,"<div>");
|
||||
rightString.add(stringBuilder.toString());
|
||||
}
|
||||
resultMap.put("rightString",rightString);
|
||||
}
|
||||
//往条款比对历史表中添加数据
|
||||
if(standHisId != null && !standHisId.isEmpty()){
|
||||
SarFileSplitItemsEO leftEo = sarFileSplitItemsEOService.selectByPrimaryKey(oldItemId);
|
||||
SarFileSplitItemsEO rightEo = sarFileSplitItemsEOService.selectByPrimaryKey(newItemId);
|
||||
String leftItemsText = "";
|
||||
if(leftString != null && !leftString.isEmpty()){
|
||||
for(String left : leftString){
|
||||
leftItemsText += left;
|
||||
}
|
||||
}
|
||||
String rightItemsText = "";
|
||||
if(rightString != null && !rightString.isEmpty()){
|
||||
for(String right : rightString){
|
||||
rightItemsText += right;
|
||||
}
|
||||
}
|
||||
SarItemsCompareHisEO sarItemsCompareHisEO = new SarItemsCompareHisEO();
|
||||
sarItemsCompareHisEO.setId(UUIDUtils.randomUUID20());
|
||||
sarItemsCompareHisEO.setOldItemsId(leftEo.getId());
|
||||
sarItemsCompareHisEO.setOldItemsName(leftEo.getItemsName());
|
||||
sarItemsCompareHisEO.setOldItemsNum(leftEo.getItemsNum());
|
||||
sarItemsCompareHisEO.setOldItemsText(leftItemsText);
|
||||
sarItemsCompareHisEO.setNewItemsId(rightEo.getId());
|
||||
sarItemsCompareHisEO.setNewItemsName(rightEo.getItemsName());
|
||||
sarItemsCompareHisEO.setNewItemsNum(rightEo.getItemsNum());
|
||||
sarItemsCompareHisEO.setNewItemsText(rightItemsText);
|
||||
sarItemsCompareHisEO.setStandHisId(standHisId);
|
||||
sarItemsCompareHisEO.setSimilarityDegree(similarityDegree);
|
||||
sarItemsCompareHisEO.setCreateUser(LoginUserUtil.getUserId());
|
||||
sarItemsCompareHisEO.setModifyUser(LoginUserUtil.getUserId());
|
||||
sarItemsCompareHisEO.setModifyTime(new Date());
|
||||
sarItemsCompareHisEO.setCreateTime(new Date());
|
||||
sarItemsCompareHisEOService.insertSelective(sarItemsCompareHisEO);
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> clauseComparison(String oldItemId, String newItemId, String standHisId) {
|
||||
Map<String,Object> resultMap = new HashMap<String, Object>();
|
||||
@@ -326,20 +460,6 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
SarStandCompareHisEO sarStandCompareHisEO = new SarStandCompareHisEO();
|
||||
// String id = UUIDUtils.randomUUID20();
|
||||
sarStandCompareHisEO.setId(id);
|
||||
sarStandCompareHisEO.setOldStandId(leftStandId);
|
||||
sarStandCompareHisEO.setNewStandId(rightStandId);
|
||||
sarStandCompareHisEO.setOldFileType(leftInfo.getFileType());
|
||||
sarStandCompareHisEO.setNewFileType(rightInfo.getFileType());
|
||||
sarStandCompareHisEO.setOldStandName(leftInfo.getStandNameSplit());
|
||||
sarStandCompareHisEO.setNewStandName(rightInfo.getStandNameSplit());
|
||||
sarStandCompareHisEO.setOldStandNum(leftInfo.getStandNumSplit());
|
||||
sarStandCompareHisEO.setNewStandNum(rightInfo.getStandNumSplit());
|
||||
sarStandCompareHisEO.setOldSarType(leftInfo.getSarType());
|
||||
sarStandCompareHisEO.setNewSarType(rightInfo.getSarType());
|
||||
sarStandCompareHisEO.setCreateTime(new Date());
|
||||
sarStandCompareHisEO.setModifyTime(new Date());
|
||||
sarStandCompareHisEO.setCreateUser(LoginUserUtil.getUserId());
|
||||
sarStandCompareHisEO.setModifyUser(LoginUserUtil.getUserId());
|
||||
sarStandCompareHisEO.setCompareType(compareType);
|
||||
sarStandCompareHisEO.setCompareStatus("比对完成");
|
||||
dao.updateByPrimaryKeySelective(sarStandCompareHisEO);
|
||||
|
||||
@@ -58,5 +58,12 @@ public class WgDept extends BaseEntity {
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
}
|
||||
|
||||
@@ -44,5 +44,14 @@ public class WgNetInfo extends BaseEntity {
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.utils.util;
|
||||
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -11,7 +12,10 @@ import java.sql.Clob;
|
||||
import java.sql.SQLException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 处理各类型字段
|
||||
@@ -99,11 +103,17 @@ public class FieldConvertUtil {
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
public static String changeTimeValue (String timeStr) {
|
||||
if (StringUtils.isNotBlank(timeStr)) {
|
||||
timeStr = "str_to_date('" + timeStr + "','%Y-%m-%d %H:%i:%s')";
|
||||
} else {
|
||||
timeStr = "null";
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(timeStr)) {
|
||||
List<String> timeList = Arrays.asList(timeStr.split(","));
|
||||
|
||||
List<String> collect = timeList.stream()
|
||||
.map(item -> "str_to_date('" + item + "','%Y-%m-%d %H:%i:%s')")
|
||||
.collect(Collectors.toList());
|
||||
timeStr ="concat(" + String.join(", \',\' ,", collect) + ")";
|
||||
} else {
|
||||
timeStr = "null";
|
||||
}
|
||||
return timeStr;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
wg_leader,
|
||||
draft_time,
|
||||
release_time,
|
||||
unit
|
||||
unit,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
|
||||
</sql>
|
||||
<resultMap id="BaseInfoMap" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
|
||||
<id property="id" column="id"></id>
|
||||
@@ -206,4 +209,12 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectPageByName" resultMap="BaseInfoMap">
|
||||
select <include refid="BaseInfo"></include> from es_revise_plan
|
||||
where es_name = #{esName}
|
||||
<if test="id != null and id != '' ">
|
||||
and id != #{id}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+5
@@ -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.evaluationIndex.dao.EvaluationIndexDao">
|
||||
|
||||
</mapper>
|
||||
+12
-3
@@ -37,19 +37,20 @@
|
||||
<result column="standSortShow" property="standSortShow" />
|
||||
<result column="stand_year" property="standYear" />
|
||||
<result column="text_status_buss" property="textStatusBuss" />
|
||||
<result column="stand_number" property="standNumber" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_BUSSIONESS_STAND table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
modify_time, creation_time, valid_flag, stand_status, replaced_stand_num,replace_stand_num,
|
||||
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort,text_status_buss
|
||||
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort,text_status_buss,stand_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List_show" >
|
||||
SAR_BUSSIONESS_STAND.modify_time,
|
||||
SAR_BUSSIONESS_STAND.creation_time, SAR_BUSSIONESS_STAND.valid_flag,
|
||||
SAR_BUSSIONESS_STAND.apply_country, SAR_BUSSIONESS_STAND.stand_nature,SAR_BUSSIONESS_STAND.stand_sort,SAR_BUSSIONESS_STAND.stand_year,
|
||||
stand_status, replaced_stand_num,replace_stand_num,put_time,issue_time,stand_en_name,
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss,SAR_BUSSIONESS_STAND.stand_number
|
||||
</sql>
|
||||
|
||||
<sql id="Group_Column_List_show" >
|
||||
@@ -168,6 +169,7 @@
|
||||
<if test="standNature != null" >stand_Nature,</if>
|
||||
<if test="standSort != null" >stand_sort,</if>
|
||||
<if test="standYear != null" >stand_year,</if>
|
||||
<if test="standNumber != null" >stand_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
@@ -187,6 +189,7 @@
|
||||
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
|
||||
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
|
||||
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
|
||||
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -246,6 +249,9 @@
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
<if test="standNumber != null" >
|
||||
stand_number = #{standNumber},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -301,6 +307,9 @@
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
<if test="standNumber != null" >
|
||||
stand_number = #{standNumber},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -373,7 +382,7 @@
|
||||
when tmp_tb.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
|
||||
ELSE 17
|
||||
END,
|
||||
tmp_tb.stand_sort ASC
|
||||
tmp_tb.stand_sort ASC,CAST(tmp_tb.STAND_NUMBER AS decimal(9,2)) ASC,tmp_tb.STAND_YEAR DESC,tmp_tb.id
|
||||
</sql>
|
||||
<sql id="standSort_out">
|
||||
ORDER BY
|
||||
|
||||
+5
@@ -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.sarEnterpriseStandardEvaluation.dao.EvaluationIndexDao">
|
||||
|
||||
</mapper>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?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.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao">
|
||||
|
||||
<select id="getHistory"
|
||||
resultType="com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation">
|
||||
|
||||
SELECT
|
||||
`user`.UNAME AS userName,
|
||||
eva.user_id,
|
||||
avg(eva.score * iex.weight) AS score,
|
||||
iex.index_type as valueType
|
||||
FROM
|
||||
quality_evaluation AS eva
|
||||
LEFT JOIN ts_user `user` ON eva.user_id = `user`.USID
|
||||
LEFT JOIN evaluation_index AS iex ON eva.evaluation_index = iex.id
|
||||
GROUP BY
|
||||
userName,
|
||||
eva.user_id,
|
||||
index_type
|
||||
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
+4
-2
@@ -40,9 +40,11 @@
|
||||
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
|
||||
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname,
|
||||
ts_institution.name as unit,ts_institution.id as unitId
|
||||
from ts_user
|
||||
WHERE institution_id=#{institutionId}
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
WHERE institution_id=#{institutionId}
|
||||
<if test="userName != null and userName != '' ">
|
||||
and ( ts_user.ACCOUNT like concat(concat('%',#{userName}),'%') or ts_user.UNAME like concat(concat('%',#{userName}),'%') )
|
||||
</if>
|
||||
|
||||
+167
-78
@@ -44,6 +44,86 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
a.ID,
|
||||
a.STAND_CODE AS standNumber,
|
||||
a.STAND_NAME AS standName,
|
||||
a.STAND_EN_NAME,
|
||||
b.NYLXCLASS,
|
||||
null AS SSRQ,
|
||||
null AS XCXSSRQGJ,
|
||||
null AS ZCCSSRQGJ,
|
||||
null as ZRBM,
|
||||
null as SYCPX,
|
||||
null as CYCVPPSBM,
|
||||
null as CYCVPPSCN,
|
||||
null as KCCVPPSBM,
|
||||
null as KCCVPPSCN,
|
||||
null as typeApplicable,
|
||||
dicstandSort.DIC_TYPE_NAME AS standSortShow,
|
||||
null as standYear,
|
||||
null as issueTime,
|
||||
null asstandType,
|
||||
null AS textStatus
|
||||
FROM
|
||||
sar_bussioness_stand a
|
||||
LEFT JOIN sar_buss_stand_attr_info b ON a.ID = b.STAND_ID
|
||||
LEFT JOIN TS_DICTYPE dicstandSort ON (
|
||||
dicstandSort.dic_type_code = a.stand_sort
|
||||
AND dicstandSort.dic_id IS NOT NULL
|
||||
AND dicstandSort.valid_flag = 0
|
||||
AND dicstandSort.PARENT_ID IS NULL
|
||||
)
|
||||
<where>
|
||||
a.ID IN
|
||||
<foreach collection="param1" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
a.ID,
|
||||
a.LAWS_NUMBER AS standNumber,
|
||||
a.LAWS_NAME AS standName,
|
||||
a.LAWS_EN_NAME as STAND_EN_NAME,
|
||||
b.NYLXLAWS,
|
||||
b.SSRQLAWS AS SSRQ,
|
||||
b.XCXSSRQLAWS AS XCXSSRQGJ,
|
||||
b.ZCXSSRQLAWS AS ZCCSSRQGJ,
|
||||
b.ZRBMLAWS as ZRBM,
|
||||
null as SYCPX,
|
||||
null as CYCVPPSBM,
|
||||
null as CYCVPPSCN,
|
||||
null as KCCVPPSBM,
|
||||
null as KCCVPPSCN,
|
||||
null as typeApplicable,
|
||||
dicstandSort.DIC_TYPE_NAME AS standSortShow,
|
||||
a.LAWS_YEAR as standYear,
|
||||
a.ISSUE_TIME as issueTime,
|
||||
null asstandType,
|
||||
null AS textStatus
|
||||
FROM
|
||||
sar_laws_stand_info a
|
||||
LEFT JOIN sar_laws_attr_info b ON a.ID = b.LAWS_ID
|
||||
LEFT JOIN TS_DICTYPE dicstandSort ON (
|
||||
dicstandSort.dic_type_code = a.LAWS_TYPE
|
||||
AND dicstandSort.dic_id IS NOT NULL
|
||||
AND dicstandSort.valid_flag = 0
|
||||
AND dicstandSort.PARENT_ID IS NULL
|
||||
)
|
||||
<where>
|
||||
a.ID IN
|
||||
<foreach collection="param1" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectLawsByIdE" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
@@ -99,95 +179,43 @@
|
||||
order by number
|
||||
</select>
|
||||
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
select distinct c.ID,c.* from (
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||
standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
and
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
ssi.FILE_TYPE = #{fileType} and
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
|
||||
UNION
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
<where>
|
||||
<if test="standName != null">
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
and
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
ssi.FILE_TYPE = #{fileType} and
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
a.STAND_TYPE = #{standType} and
|
||||
</if>
|
||||
a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
limit #{start},#{end}
|
||||
</select>
|
||||
|
||||
<select id="selectLawsByIdCount" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
<where>
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and
|
||||
ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and
|
||||
a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
|
||||
<if test="param1 !=null and param1.size()>0 " >
|
||||
and
|
||||
a.ID IN
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
UNION
|
||||
|
||||
UNION all
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
|
||||
a.ID = b.STAND_ID
|
||||
left join sar_stand_items ssi on ssi.stand_id = a.id
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1
|
||||
<if test="standName != null">
|
||||
@@ -196,21 +224,82 @@
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and
|
||||
ssi.FILE_TYPE = #{fileType}
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and
|
||||
a.STAND_TYPE = #{standType}
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 !=null and param1.size()>0 " >
|
||||
and
|
||||
a.ID IN
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
)c
|
||||
limit #{start},#{end}
|
||||
</select>
|
||||
|
||||
<select id="selectLawsByIdCount" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
|
||||
select distinct c.ID,c.* from (
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||
standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
UNION all
|
||||
SELECT a.ID,a.STAND_NUMBER as standNumber,a.STAND_NAME as standName,a.STAND_EN_NAME,b.NYLX,b.SSRQ as
|
||||
SSRQ,b.XCXSSRQ as XCXSSRQGJ,b.ZCCSSRQ as ZCCSSRQGJ,
|
||||
b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable,a.STAND_SORT as
|
||||
standSortShow,
|
||||
a.STAND_YEAR as standYear,ISSUE_TIME as issueTime,a.STAND_TYPE as standType,a.TEXT_STATUS as textStatus
|
||||
FROM sar_stand_items ssi
|
||||
left join sar_standards_info a on ssi.stand_id = a.id
|
||||
LEFT JOIN sar_stand_attr_info b on a.ID = b.STAND_ID
|
||||
<where>
|
||||
1=1
|
||||
<if test="standName != null">
|
||||
and
|
||||
(a.STAND_NUMBER LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%')
|
||||
or a.STAND_NAME LIKE concat ('%',#{standName,jdbcType=VARCHAR},'%'))
|
||||
</if>
|
||||
<if test="fileType !=null">
|
||||
and ssi.FILE_TYPE = #{fileType}
|
||||
</if>
|
||||
<if test="standType !=null">
|
||||
and a.STAND_TYPE = #{standType}
|
||||
</if>
|
||||
<if test="param1 != null and param1.size()>0">
|
||||
and a.ID IN
|
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
)c
|
||||
</select>
|
||||
|
||||
<select id="selectTimes" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto">
|
||||
|
||||
@@ -7,4 +7,21 @@
|
||||
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
|
||||
WHERE sar_public_idea_all.idea_id IS NOT NULL and sar_public_idea.uniques = #{unique}
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_user.INSTITUTION_NAME as dept_name,sar_public_idea_all.old_text,
|
||||
sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
|
||||
WHERE
|
||||
sar_public_idea_all.idea_id = #{ideaId}
|
||||
LIMIT ${(page-1)*size},${page*size}
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdeaCount" resultType="java.lang.Integer">
|
||||
SELECT count(id)
|
||||
FROM sar_public_idea_all WHERE
|
||||
idea_id = #{ideaId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+25
-6
@@ -39,6 +39,17 @@
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updateByProjectIdBath">
|
||||
update sar_stand_project_library
|
||||
<if test="id != null">
|
||||
set detailed_list_version = #{version} where id in
|
||||
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="selectCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(
|
||||
@@ -50,10 +61,10 @@
|
||||
WHERE
|
||||
|
||||
<if test="flag == 1">
|
||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
1=1
|
||||
@@ -109,10 +120,10 @@
|
||||
ON team.project_code = library.project_number
|
||||
WHERE
|
||||
<if test="flag == 1">
|
||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
1=1
|
||||
@@ -174,10 +185,10 @@
|
||||
ON team.project_code = library.project_number
|
||||
WHERE
|
||||
<if test="flag == 1">
|
||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 2">
|
||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||
</if>
|
||||
<if test="flag == 4">
|
||||
1=1
|
||||
@@ -349,4 +360,12 @@
|
||||
<select id="getAllStand" resultType="java.lang.String">
|
||||
SELECT DISTINCT ID FROM sar_standards_info where VALID_FLAG=0
|
||||
</select>
|
||||
<select id="selectListByids" resultType="java.lang.String">
|
||||
select distinct sar_stand_project_relation.project_id as projectId
|
||||
from sar_stand_project_relation
|
||||
where sar_stand_project_relation.stand_id in
|
||||
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+68
-6
@@ -31,7 +31,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSarStandUnqualifiedPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
<select id="getSarStandUnqualifiedPageNew" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
SELECT
|
||||
sar_stand_unqualified.*, sar_standards_info.STAND_TYPE as standType
|
||||
from
|
||||
@@ -49,13 +49,45 @@
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
limit #{start},#{end}
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
|
||||
<select id="getSarStandUnqualifiedPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
SELECT
|
||||
c.*
|
||||
FROM
|
||||
(
|
||||
SELECT b.*,sar_standards_info.STAND_TYPE as standType FROM (
|
||||
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* FROM
|
||||
sar_stand_unqualified,(SELECT @i:=0)j
|
||||
WHERE
|
||||
close_state = 1
|
||||
<if test="sar.standId != null and sar.standId != '' ">
|
||||
and STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
limit #{start},#{end}
|
||||
)b
|
||||
left join sar_standards_info on b.STAND_ID = sar_standards_info.id
|
||||
)c
|
||||
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCountNew" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(sar_stand_unqualified.ID)
|
||||
from
|
||||
@@ -73,8 +105,38 @@
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(c.ID)
|
||||
FROM
|
||||
(
|
||||
SELECT b.*,sar_standards_info.STAND_TYPE as standType FROM (
|
||||
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* FROM
|
||||
sar_stand_unqualified,(SELECT @i:=0)j
|
||||
WHERE
|
||||
close_state = 1
|
||||
<if test="sar.standId != null and sar.standId != '' ">
|
||||
and STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and (REPLACE(STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
)b
|
||||
left join sar_standards_info on b.STAND_ID = sar_standards_info.id
|
||||
)c
|
||||
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+83
-79
@@ -37,98 +37,95 @@
|
||||
|
||||
|
||||
<sql id="stand_where">
|
||||
<if test="waringEO.standCode != null and waringEO.standCode != ''">
|
||||
AND trim(replace(CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
'-',
|
||||
sarInfo.STAND_YEAR
|
||||
),' ','')) LIKE trim(replace(CONCAT('%',#{waringEO.standCode},'%'),' ',''))
|
||||
</if>
|
||||
<if test="waringEO.standName != null and waringEO.standName != ''">
|
||||
AND sarInfo.STAND_NAME = #{waringEO.standName}
|
||||
</if>
|
||||
<if test="waringEO.startPutTime != null and waringEO.startPutTime != '' and waringEO.endPutTime != null and waringEO.endPutTime != '' ">
|
||||
AND (
|
||||
DATE_FORMAT( sarInfo.PUT_TIME, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( sarInfo.PUT_TIME, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.startSSRQ != null and waringEO.startSSRQ != '' and waringEO.endSSRQ != null and waringEO.endSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( attr.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.startSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
|
||||
AND
|
||||
DATE_FORMAT( attr.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</if>
|
||||
warning.ID
|
||||
IN
|
||||
<foreach collection="idList" item="id" open="and (" close=")" separator=",">
|
||||
<!-- 每个遍历需要生成的串 -->
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
|
||||
<if test="waringEO.standCode != null and waringEO.standCode != ''">
|
||||
AND trim(replace(CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
'-',
|
||||
sarInfo.STAND_YEAR
|
||||
),' ','')) LIKE trim(replace(CONCAT('%',#{waringEO.standCode},'%'),' ',''))
|
||||
</if>
|
||||
<if test="waringEO.standName != null and waringEO.standName != ''">
|
||||
AND sarInfo.STAND_NAME like concat('%', #{waringEO.standName},'%')
|
||||
</if>
|
||||
<if test="waringEO.startPutTime != null and waringEO.startPutTime != '' and waringEO.endPutTime != null and waringEO.endPutTime != '' ">
|
||||
AND (
|
||||
DATE_FORMAT(sarInfo.PUT_TIME, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
AND
|
||||
DATE_FORMAT( sarInfo.PUT_TIME, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endPutTime},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.startSSRQ != null and waringEO.startSSRQ != '' and waringEO.endSSRQ != null and waringEO.endSSRQ != ''">
|
||||
AND (
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startSSRQ}, '%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endSSRQ}, '%Y-%m-%d') AND t.time_name = 'SSRQ' )
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectWarningPage" resultMap="resultMap">
|
||||
SELECT WARNING_RESULT.* FROM
|
||||
(
|
||||
|
||||
|
||||
SELECT
|
||||
<include refid="stand_column"/> ,
|
||||
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 ,
|
||||
NULL AS POLICY_NAME ,
|
||||
MARK ,
|
||||
POWER,
|
||||
attr.XCXSSRQ AS XCXSSRQ ,
|
||||
attr.ZCCSSRQ AS ZCCSSRQ
|
||||
<include refid="stand_column"/>
|
||||
,
|
||||
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 ,
|
||||
NULL AS POLICY_NAME ,
|
||||
MARK ,
|
||||
POWER,
|
||||
attr.XCXSSRQ AS XCXSSRQ ,
|
||||
attr.ZCCSSRQ AS ZCCSSRQ
|
||||
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
|
||||
<where>
|
||||
POWER = '1'
|
||||
|
||||
AND (MARK = 'stand')
|
||||
<include refid="stand_where"/>
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
AND attr.CLLX LIKE CONCAT('%', #{waringEO.applyType},'%')
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">AND attr.CLLX LIKE CONCAT('%',
|
||||
#{waringEO.applyType},'%')
|
||||
</if>
|
||||
<if test="waringEO.startXCXSSRQ != null and waringEO.startXCXSSRQ != '' and waringEO.endXCXSSRQ != null and waringEO.endXCXSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( attr.XCXSSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.startXCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( attr.XCXSSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endXCXSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') between DATE_FORMAT(#{waringEO.startXCXSSRQ}, '%Y-%m-%d') AND DATE_FORMAT(#{waringEO.endXCXSSRQ}, '%Y-%m-%d')
|
||||
AND t.time_name = 'XCXSSRQ' )
|
||||
)
|
||||
</if>
|
||||
<if test="waringEO.startZCCSSRQ != null and waringEO.startZCCSSRQ != '' and waringEO.endZCCSSRQ != null and waringEO.endZCCSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( attr.ZCCSSRQ, '%Y-%m-%d') >= DATE_FORMAT(
|
||||
#{waringEO.startZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
|
||||
AND
|
||||
DATE_FORMAT( attr.ZCCSSRQ, '%Y-%m-%d') <= DATE_FORMAT(
|
||||
#{waringEO.endZCCSSRQ},
|
||||
'%Y-%m-%d'
|
||||
)
|
||||
sarInfo.ID IN (SELECT DISTINCT law_id FROM warning_date as t WHERE
|
||||
DATE_FORMAT(t.SSRQ, '%Y-%m-%d') between DATE_FORMAT(#{waringEO.startZCCSSRQ}, '%Y-%m-%d') AND DATE_FORMAT(#{waringEO.startZCCSSRQ}, '%Y-%m-%d')
|
||||
AND t.time_name = 'ZCCSSRQ' )
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
@@ -156,7 +153,7 @@
|
||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||
<where>
|
||||
POWER = '1'
|
||||
|
||||
AND (MARK = 'item')
|
||||
<include refid="stand_where"/>
|
||||
<if test="waringEO.applyType != null and waringEO.applyType != ''">
|
||||
AND items.APPLY_ARCTIC LIKE CONCAT('%', #{waringEO.applyType},'%')
|
||||
@@ -164,21 +161,28 @@
|
||||
|
||||
<if test="waringEO.startXCXSSRQ != null and waringEO.startXCXSSRQ != '' and waringEO.endXCXSSRQ != null and waringEO.endXCXSSRQ != ''">
|
||||
AND (
|
||||
DATE_FORMAT( items.XCXSSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startXCXSSRQ},'%Y-%m-%d')
|
||||
DATE_FORMAT( items.XCXSSRQ, '%Y-%m-%d') between DATE_FORMAT(#{waringEO.startXCXSSRQ},'%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( items.XCXSSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endXCXSSRQ},'%Y-%m-%d')
|
||||
DATE_FORMAT(#{waringEO.endXCXSSRQ},'%Y-%m-%d')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="waringEO.startZCCSSRQ != null and waringEO.startZCCSSRQ != '' and waringEO.endZCCSSRQ != null and waringEO.endZCCSSRQ != ''">
|
||||
AND(
|
||||
DATE_FORMAT( items.ZCCSSRQ, '%Y-%m-%d') >= DATE_FORMAT(#{waringEO.startZCCSSRQ},'%Y-%m-%d')
|
||||
AND
|
||||
DATE_FORMAT( items.ZCCSSRQ, '%Y-%m-%d') <= DATE_FORMAT(#{waringEO.endZCCSSRQ},'%Y-%m-%d' )
|
||||
DATE_FORMAT( items.ZCCSSRQ, '%Y-%m-%d') between DATE_FORMAT(#{waringEO.startZCCSSRQ},'%Y-%m-%d') AND DATE_FORMAT(#{waringEO.endZCCSSRQ},'%Y-%m-%d' )
|
||||
)
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
WARNING_RESULT
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT law_id,MIN(SSRQ) SSRQ_MIN FROM warning_date
|
||||
GROUP BY warning_date.law_id
|
||||
) warning_date
|
||||
ON warning_date.law_id = WARNING_RESULT.STAND_ID
|
||||
ORDER BY warning_date.SSRQ_MIN
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
@@ -3,33 +3,24 @@
|
||||
<mapper namespace="com.adc.da.scheduled.dao.SarStandardInfoDao">
|
||||
|
||||
<!-- Result Map-->
|
||||
<resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >
|
||||
<id column="ID" property="standId" />
|
||||
<result column="STAND_NUMBER" property="standNum" />
|
||||
<result column="STAND_NAME" property="standName" />
|
||||
<result column="STAND_SORT" property="standSort"/>
|
||||
<result column="STAND_YEAR" property="standYear"/>
|
||||
<result column="XCXSSRQ" property="XCXSSRQ"/>
|
||||
<result column="ZCCSSRQ" property="ZCCSSRQ"/>
|
||||
<result column="SSRQ" property="SSRQ"/>
|
||||
<result column="CLLX" property="applyType" />
|
||||
<result column="STAND_TYPE" property="standType" />
|
||||
<result column="ZRGCS" property="dutyEngineer" />
|
||||
</resultMap>
|
||||
<!-- <resultMap id="resultMap" type="com.adc.da.scheduled.entity.WarningEO" >-->
|
||||
<!-- <id column="ID" property="standId" />-->
|
||||
<!-- <result column="STAND_NUMBER" property="standNum" />-->
|
||||
<!-- <result column="STAND_NAME" property="standName" />-->
|
||||
<!-- <result column="STAND_SORT" property="standSort"/>-->
|
||||
<!-- <result column="STAND_YEAR" property="standYear"/>-->
|
||||
<!-- <result column="XCXSSRQ" property="XCXSSRQ"/>-->
|
||||
<!-- <result column="ZCCSSRQ" property="ZCCSSRQ"/>-->
|
||||
<!-- <result column="SSRQ" property="SSRQ"/>-->
|
||||
<!-- <result column="CLLX" property="applyType" />-->
|
||||
<!-- <result column="STAND_TYPE" property="standType" />-->
|
||||
<!-- <result column="ZRGCS" property="dutyEngineer" />-->
|
||||
<!-- </resultMap>-->
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||
<select id="selectWithinTerm" resultType="java.lang.String" parameterType="com.adc.da.scheduled.entity.TermDTO">
|
||||
SELECT
|
||||
info.ID,
|
||||
info.STAND_SORT,
|
||||
info.STAND_YEAR,
|
||||
info.STAND_NUMBER,
|
||||
info.STAND_NAME,
|
||||
info.STAND_TYPE,
|
||||
attrInfo.CLLX,
|
||||
attrInfo.ZRGCS,
|
||||
attrInfo.SSRQ,
|
||||
attrInfo.${str}
|
||||
info.ID
|
||||
FROM
|
||||
sar_standards_info AS info
|
||||
JOIN sar_stand_attr_info AS attrInfo ON info.id = attrinfo.stand_id
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<result column="STAND_YEAR" property="standYear"/>
|
||||
</resultMap>
|
||||
<!-- 查询条件 -->
|
||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.DataDTO">
|
||||
<select id="selectWithinTerm" resultMap="resultMap" parameterType="com.adc.da.scheduled.entity.TermDTO">
|
||||
SELECT
|
||||
items.ID,
|
||||
items.ITEMS_NUM,
|
||||
|
||||
+85
-10
@@ -4,30 +4,105 @@
|
||||
|
||||
<insert id="ignoreInsert" parameterType="java.util.LinkedList">
|
||||
|
||||
REPLACE INTO sar_stand_warning (ID,STAND_ID, STAND_TYPE, STAND_CODE,STAND_NAME,PUT_TIME,APPLY_TYPE,DUTY_ENGINEER,ITEMS_ID,ITEMS_NUM,ITEMS_NAME,POLICY_ID,POLICY_NAME,MARK,POWER)
|
||||
REPLACE INTO sar_stand_warning (ID,STAND_ID,ITEMS_ID,POLICY_ID,MARK,POWER)
|
||||
VALUES
|
||||
<if test="warningEOS !=null and warningEOS.size()!=0">
|
||||
<foreach collection="warningEOS" item="item" index="index" separator=",">
|
||||
(
|
||||
#{item.id}
|
||||
,#{item.standId}
|
||||
,#{item.standType}
|
||||
,#{item.standCode}
|
||||
,#{item.standName}
|
||||
,#{item.putTime}
|
||||
,#{item.applyType}
|
||||
,#{item.dutyEngineer}
|
||||
,#{item.itemsId}
|
||||
,#{item.itemsNum}
|
||||
,#{item.itemsName}
|
||||
,#{item.policyId}
|
||||
,#{item.policyName}
|
||||
,#{item.mark}
|
||||
,#{item.power}
|
||||
)
|
||||
</foreach>
|
||||
</if>
|
||||
</insert>
|
||||
<delete id="autoCancelWarning">
|
||||
UPDATE sar_stand_warning
|
||||
SET POWER ='0'
|
||||
WHERE
|
||||
STAND_ID IN (
|
||||
SELECT
|
||||
law_id
|
||||
FROM
|
||||
warning_date
|
||||
WHERE
|
||||
DATE_FORMAT(SSRQ, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
UNION
|
||||
SELECT
|
||||
ID
|
||||
FROM
|
||||
sar_standards_info
|
||||
WHERE
|
||||
DATE_FORMAT(PUT_TIME, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
UNION
|
||||
SELECT
|
||||
STAND_ID
|
||||
FROM
|
||||
sar_stand_items
|
||||
WHERE
|
||||
DATE_FORMAT(XCXSSRQ, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
OR DATE_FORMAT(ZCCSSRQ, '%Y-%m-%d') < DATE_FORMAT(now(), '%Y-%m-%d')
|
||||
)
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getWarningId" resultType="com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO">
|
||||
SELECT
|
||||
law_id as STAND_ID,
|
||||
'-1' AS itemsId,
|
||||
'stand' AS mark,
|
||||
'1' as power
|
||||
FROM
|
||||
warning_date AS warning
|
||||
WHERE
|
||||
DATE_FORMAT(warning.SSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
UNION
|
||||
SELECT
|
||||
STAND_ID,
|
||||
ID AS itemsId,
|
||||
'item' AS mark,
|
||||
'1' as power
|
||||
FROM
|
||||
sar_stand_items AS item
|
||||
WHERE
|
||||
DATE_FORMAT(item.XCXSSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
OR
|
||||
DATE_FORMAT(item.ZCCSSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getWarningDate" resultType="com.adc.da.slrs.sarStandWarning.entity.WarningDate">
|
||||
|
||||
|
||||
SELECT lawId,timeName,DATE_FORMAT(SSRQ,'%Y-%m-%d') as SSRQ FROM
|
||||
(
|
||||
select attr.STAND_ID as lawId,'SSRQ' as timeName,
|
||||
substring_index(substring_index(attr.SSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_attr_info attr
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id < (length(attr.SSRQ) - length(replace(attr.SSRQ,',',''))+1)
|
||||
|
||||
UNION ALL
|
||||
|
||||
select attr.STAND_ID as lawId,'XCXSSRQ' as timeName,
|
||||
substring_index(substring_index(attr.SSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_attr_info attr
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id < (length(attr.XCXSSRQ) - length(replace(attr.SSRQ,',',''))+1)
|
||||
UNION ALL
|
||||
select attr.STAND_ID as lawId,'ZCCSSRQ' as timeName,
|
||||
substring_index(substring_index(attr.ZCCSSRQ,',',b.help_topic_id+1),',',-1) SSRQ
|
||||
from sar_stand_attr_info attr
|
||||
join mysql.help_topic b
|
||||
on b.help_topic_id < (length(attr.SSRQ) - length(replace(attr.SSRQ,',',''))+1)
|
||||
|
||||
) as T
|
||||
WHERE
|
||||
DATE_FORMAT(T.SSRQ,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDate}, '%Y-%m-%d') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
+71
@@ -14,4 +14,75 @@
|
||||
and sar_interpretation_national_standard.STAND_NAME=#{find.standName}
|
||||
and sar_interpretation_national_standard.INTERPRETATION_TIME = #{find.interpretationTime}
|
||||
</update>
|
||||
|
||||
<select id="getAllDatas"
|
||||
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard">
|
||||
|
||||
SELECT c.* FROM (
|
||||
SELECT
|
||||
(@i:=@i+1) as rows,
|
||||
id,
|
||||
INTERPRETATION_TIME,
|
||||
STAND_NUMBER,
|
||||
specific_item,
|
||||
compared_with_previous,
|
||||
CREATION_USER,
|
||||
CREATION_TIME,
|
||||
VALID_FLAG,
|
||||
LAST_VERSION_NUMBER,
|
||||
risk_degree,
|
||||
compliance_state,
|
||||
INTERPRETATION_STATE,
|
||||
STAND_TYPE,
|
||||
MODIFY_TIME,
|
||||
STAND_SORT,
|
||||
STAND_ID,
|
||||
STAND_NAME,
|
||||
core_technical_requirement
|
||||
FROM
|
||||
sar_interpretation_national_standard ,(SELECT @i:=0)j
|
||||
WHERE
|
||||
1=1
|
||||
<if test="interpretationTime!=null ">
|
||||
and INTERPRETATION_TIME = #{interpretationTime}
|
||||
</if>
|
||||
<if test="standId!=null and standId!=''">
|
||||
AND STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="standNumber!=null and standNumber!=''">
|
||||
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName!=null and standName!=''">
|
||||
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="specificItem!=null and specificItem!=''">
|
||||
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
||||
</if>
|
||||
ORDER BY STAND_ID, specific_item
|
||||
LIMIT ${(current-1)*size},${current*size}
|
||||
) c ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.specific_item,1,(SELECT LOCATE('.',CONCAT(c.specific_item,'.')))),SIGNED) ,rows
|
||||
</select>
|
||||
<select id="getAllDatasCout" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(id)
|
||||
FROM
|
||||
sar_interpretation_national_standard
|
||||
WHERE
|
||||
1=1
|
||||
<if test="interpretationTime!=null ">
|
||||
and INTERPRETATION_TIME = #{interpretationTime}
|
||||
</if>
|
||||
<if test="standId!=null and standId!=''">
|
||||
AND STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="standNumber!=null and standNumber!=''">
|
||||
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName!=null and standName!=''">
|
||||
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="specificItem!=null and specificItem!=''">
|
||||
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+59
@@ -3,5 +3,64 @@
|
||||
<mapper namespace="com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao">
|
||||
|
||||
|
||||
<select id="selectPages"
|
||||
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO">
|
||||
select PRODUCT_NAME as productName,sar_stand_project_library.project_group as projectGroup,
|
||||
sar_stand_project_library.id as sarId,
|
||||
sar_stand_project_library.product_line as productLine,sar_stand_project_library.project_number as productId,
|
||||
sar_stand_project_library.project_manager as projectManager,ts_user.UNAME as uName,
|
||||
(SELECT count(*) FROM sar_stand_unqualified WHERE sar_stand_unqualified.STAND_ID = #{product.standId}) unCount
|
||||
FROM
|
||||
sar_stand_project_library
|
||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
||||
WHERE
|
||||
sar_stand_project_library.project_number in ( SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||
AND CLOSE_STATE = '1'
|
||||
group by
|
||||
PRODUCT_NAME,
|
||||
sar_stand_project_library.project_group,
|
||||
sar_stand_project_library.product_line,
|
||||
sar_stand_project_library.project_manager,
|
||||
sar_stand_project_library.project_number,
|
||||
sar_stand_project_library.id,
|
||||
ts_user.UNAME
|
||||
<if test="null != product.productName and ''!= product.productName">
|
||||
and product_name like concat(concat('%',#{product.productName}),'%')
|
||||
</if>
|
||||
<if test="null != product.productId and ''!= product.productId">
|
||||
and project_number like concat(concat('%',#{product.productId}),'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
PRODUCT_NAME ASC
|
||||
limit ${(page-1)*pageSize},${page*pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectPagesCount"
|
||||
resultType="java.lang.Integer">
|
||||
select count(sar_stand_unqualified.product_id)
|
||||
FROM
|
||||
sar_stand_project_library
|
||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
||||
WHERE
|
||||
sar_stand_project_library.project_number in (SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||
AND CLOSE_STATE = '1'
|
||||
group by
|
||||
PRODUCT_NAME,
|
||||
sar_stand_project_library.project_group,
|
||||
sar_stand_project_library.product_line,
|
||||
sar_stand_project_library.project_manager,
|
||||
sar_stand_project_library.project_number,
|
||||
sar_stand_project_library.id,
|
||||
ts_user.UNAME
|
||||
<if test="null != product.productName and ''!= product.productName">
|
||||
and product_name like concat(concat('%',#{product.productName}),'%')
|
||||
</if>
|
||||
<if test="null != product.productId and ''!= product.productId">
|
||||
and project_number like concat(concat('%',#{product.productId}),'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
PRODUCT_NAME ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+44
-18
@@ -79,19 +79,19 @@
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standTextStatusShow,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STAND_ATTR_INFO.SSRQ ='' THEN '9999-01-01'
|
||||
WHEN SAR_STAND_ATTR_INFO.SSRQ ='' THEN ''
|
||||
ELSE SAR_STAND_ATTR_INFO.SSRQ
|
||||
END
|
||||
) AS SSRQ,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STAND_ATTR_INFO.ZCCSSRQ ='' THEN '9999-01-01'
|
||||
WHEN SAR_STAND_ATTR_INFO.ZCCSSRQ ='' THEN ''
|
||||
ELSE SAR_STAND_ATTR_INFO.ZCCSSRQ
|
||||
END
|
||||
) AS ZCCSSRQ,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STAND_ATTR_INFO.XCXSSRQ ='' THEN '9999-01-01'
|
||||
WHEN SAR_STAND_ATTR_INFO.XCXSSRQ ='' THEN ''
|
||||
ELSE SAR_STAND_ATTR_INFO.XCXSSRQ
|
||||
END
|
||||
) AS XCXSSRQ
|
||||
@@ -441,10 +441,11 @@
|
||||
<!-- 标准编号111 -->
|
||||
<if test="standNumber != null and standNumber != ''">
|
||||
and (
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = '' -->
|
||||
or (stand_name like concat(concat('%',#{standNumber}),'%'))
|
||||
)
|
||||
</if>
|
||||
@@ -757,16 +758,17 @@
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ',''))
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
or (stand_name like concat(concat('%',#{page.standNumber}),'%'))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = ''-->
|
||||
<!-- or (stand_name like concat(concat('%',#{page.standNumber}),'%')) -->
|
||||
)
|
||||
</if>
|
||||
<!-- 标准名称 -->
|
||||
<if test="page.standName != null and page.standName != ''">
|
||||
and stand_name like concat(concat('%',#{page.standName}),'%')
|
||||
or STAND_NUMBER like concat(concat('%',#{page.standName}),'%')
|
||||
or STAND_YEAR like concat(concat('%',#{page.standName}),'%')
|
||||
or STAND_SORT like concat(concat('%',#{page.standName}),'%')
|
||||
<!-- or STAND_NUMBER like concat(concat('%',#{page.standName}),'%') -->
|
||||
<!-- or STAND_YEAR like concat(concat('%',#{page.standName}),'%') -->
|
||||
<!-- or STAND_SORT like concat(concat('%',#{page.standName}),'%') -->
|
||||
</if>
|
||||
<if test="page.standEnName != null and page.standEnName != ''">
|
||||
and stand_en_name like concat(concat('%',#{page.standEnName}),'%')
|
||||
@@ -884,9 +886,14 @@
|
||||
</if>
|
||||
<!-- 标准编号111 -->
|
||||
<if test="standNumber != null and standNumber != ''">
|
||||
and
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),
|
||||
' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like
|
||||
trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
)
|
||||
</if>
|
||||
<!-- 标准名称 -->
|
||||
<if test="standName != null and standName != ''">
|
||||
@@ -1038,16 +1045,28 @@
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{standNumber}),'%'),' ',''))
|
||||
)
|
||||
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = '' -->
|
||||
or (stand_name like concat(concat('%',#{standNumber}),'%'))
|
||||
)
|
||||
|
||||
|
||||
|
||||
<!-- and (
|
||||
( ( #{standNumber}) like CONCAT('%',dicstandSort.DIC_TYPE_NAME,'%')
|
||||
and
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_NUMBER,'%')
|
||||
and
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_YEAR,'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_YEAR,'%') and SAR_STANDARDS_INFO.STAND_YEAR != '' )
|
||||
or (( #{standNumber}) like CONCAT('%',dicstandSort.DIC_TYPE_NAME,'%')
|
||||
and
|
||||
( #{standNumber}) like CONCAT('%',SAR_STANDARDS_INFO.STAND_NUMBER,'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
)
|
||||
)
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = ''
|
||||
) -->
|
||||
</if>
|
||||
<if test="sychronId != null">
|
||||
and id != #{sychronId}
|
||||
@@ -1254,6 +1273,13 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateISRELATEACCESSById">
|
||||
|
||||
UPDATE sar_standards_info set IS_RELATE_ACCESS = #{IS_RELATE_ACCESS} WHERE ID IN
|
||||
<foreach collection="list" item="id" index="index" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectStandardsInfoByIdAndRoleAll" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select SAR_STANDARDS_INFO.id
|
||||
|
||||
+2
-2
@@ -205,7 +205,7 @@
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
|
||||
<if test="editFlag != null" >edit_flag,</if>
|
||||
<if test="fo != null" >fo,</if>
|
||||
<if test="dutyEngineer != null" >duty_engineer,</if>
|
||||
<if test="claimType != null" >claim_type,</if>
|
||||
@@ -233,7 +233,7 @@
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
|
||||
<if test="editFlag != null" >#{editFlag,jdbcType=VARCHAR}</if>
|
||||
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
|
||||
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
|
||||
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
|
||||
|
||||
@@ -3,19 +3,21 @@
|
||||
<mapper namespace="com.adc.da.slrs.wgDept.dao.WgDeptDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
select wg_dept.* ,ts_user.UNAME as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName ,ts_institution.name as unitName , ts_institution.id as unit
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
where wg_dept.wg_id =#{data}
|
||||
</select>
|
||||
|
||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
select wg_dept.* ,ts_user.UNAME as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName ,ts_institution.name as unitName , ts_institution.id as unit
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
left join wg_work_group on wg_work_group.id = wg_dept.wg_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
where wg_work_group.type = #{type}
|
||||
</select>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user