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

This commit is contained in:
zhaokaiyao@91isoft.com
2022-01-11 13:56:45 +08:00
82 changed files with 1648 additions and 277 deletions
@@ -186,7 +186,8 @@ public class ProcessTimer {
}
}
@Scheduled(cron = "0 0 10 * * ? ")//每天十点执行
// @Scheduled(cron = "0 0 10 * * ? ")//每天十点执行
@Scheduled(cron = "0 0 * * * ")//每天十点执行
// @Scheduled(cron = "*/40 * * * * ? ")//20s
public void everyDayTenOlockScanSAM() {
List<BusProcessNew> busProcessNews=new ArrayList<>();
@@ -34,6 +34,8 @@ public class ActDefineStartMap {
// 企标制修订流程及企业标准库流程
map.put("buss1","bussLibraryWkflow");
// 企标制修订-产品标准
map.put("buss2","bussLibraryProductWkflow");
//张超然
map.put("20","StandardApplyMeetProcess");
@@ -39,6 +39,7 @@ public class TableToExcel {
sheet.addMergedRegion(new CellRangeAddress(0,1,5,5));
sheet.addMergedRegion(new CellRangeAddress(0,1,6,6));
sheet.addMergedRegion(new CellRangeAddress(0,1,7,7));
sheet.addMergedRegion(new CellRangeAddress(0,1,8,8));
//生成表头行
int j=0;
@@ -75,6 +76,10 @@ public class TableToExcel {
Cell nCell1 = neckRow.createCell(4);
nCell1.setCellValue("修改理由");
}
if (null!=columnMap.get("cause")) {
Cell nCell1 = headRow.createCell(8);
nCell1.setCellValue("原因");
}
//从第三行开始填充数据
@@ -408,6 +408,8 @@ public class ActSarItemsBussEOService {
case "standName": sarBussionessStand.setStandName(valueStr); break;
case "standEnName": sarBussionessStand.setStandEnName(valueStr); break;
case "textStatusBuss": sarBussionessStand.setTextStatusBuss(valueStr); break;
case "reviseStatus": sarBussionessStand.setReviseStatus(valueStr); break;
case "standSn": sarBussionessStand.setStandSn(valueStr); break;
case "issueTime":
if (StringUtils.isNotBlank(valueStr)) {
sarBussionessStand.setIssueTime(tTo(valueStr));
@@ -31,6 +31,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
*/
addInterceptor.excludePathPatterns("/api/login");
addInterceptor.excludePathPatterns("/v2/api-docs");
addInterceptor.excludePathPatterns("/favicon.ico");
addInterceptor.excludePathPatterns("/webjars/**");
addInterceptor.excludePathPatterns("/swagger-resources/**");
addInterceptor.excludePathPatterns("/swagger-ui.html");
@@ -2,6 +2,7 @@ package com.adc.da.search.service.impl;
import com.adc.da.search.entity.*;
import com.adc.da.search.service.SearchCenterService;
import com.adc.da.search.util.DateUtil;
import com.adc.da.search.util.InitStandAttrSearchUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
@@ -421,7 +422,12 @@ public class SearchCenterServiceImpl implements SearchCenterService {
}
}
if(!fields.isEmpty()){
if(fields.size() > 1){
if(field.equals("SSRQ") || field.equals("XCXSSRQ") || field.equals("ZCCSSRQ")){
List<String> fieldRQList = DateUtil.getAllDate(fields.get(0),fields.get(1));
fields.addAll(fieldRQList);
}
BoolQueryBuilder boolQueryBuilderShould = new BoolQueryBuilder();
fields.forEach(s -> {
boolQueryBuilderShould.should(QueryBuilders.wildcardQuery(keyWordField, "*"+s+"*"));
@@ -805,13 +811,13 @@ public class SearchCenterServiceImpl implements SearchCenterService {
// 循环统计各种类型数据
String[] seniortype;
if("stand".equals(searchInfoEO.getSelectIndex())) {
String[] seniortypeStand = {"standSort", "numbershow","statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName","NYLXCLASS"};
String[] seniortypeStand = {"standSort", "numbershow","statecode","CYSD","ZRLX","CLLX","CBCD","textStatus","textStatusName","NYLXCLASS","NYLX"};
seniortype = seniortypeStand.clone();
} else if("laws".equals(searchInfoEO.getSelectIndex())){
String[] seniortypeLaws = {"lawsSyqy","lawsSycx","CYSDLAWS"};
seniortype = seniortypeLaws.clone();
} else if ("bussstand".equals(searchInfoEO.getSelectIndex())) {
String[] seniortypeBuss = {"standSort", "numbershow", "statecode","CLLX","textStatus","textStatusName","NYLXCLASS"};
String[] seniortypeBuss = {"standSort", "numbershow", "statecode","CLLX","textStatus","textStatusName","NYLXCLASS","SYCXCLASS"};
seniortype = seniortypeBuss.clone();
} else {
String[] seniortypeMsg = {"module"};
@@ -1158,18 +1164,21 @@ public class SearchCenterServiceImpl implements SearchCenterService {
List<Map<String, Object>> result = new ArrayList<>();
SearchRequestBuilder searchRequestBuilder;
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
BoolQueryBuilder boolSelectValue = new BoolQueryBuilder();
// 记录搜索记录到数据库中
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
boolSelectValue.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
"title"
).minimumShouldMatch("100%").field("title",10f));
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
boolSelectValue.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
boolSelectValue.should(QueryBuilders.multiMatchQuery(searchInfoEO.getSelectValue(),
"textItems"
).minimumShouldMatch("100%").field("title",10f));
boolQueryBuilder.should(QueryBuilders.wildcardQuery("title.keyword","*"+searchInfoEO.getSelectValue()+"*"));
boolSelectValue.should(QueryBuilders.wildcardQuery("title.keyword","*"+searchInfoEO.getSelectValue()+"*"));
boolQueryBuilder.must(boolSelectValue);
}
//在结果中检索
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword())) {
@@ -1177,14 +1186,21 @@ public class SearchCenterServiceImpl implements SearchCenterService {
boolQueryBuilder.must(multiQuery);
}
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
}else if(StringUtils.isNotBlank(searchInfoEO.getCLLX())){
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
BoolQueryBuilder queryBuilder = new BoolQueryBuilder();
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS()) || StringUtils.isNotBlank(searchInfoEO.getCLLX())){
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
}
if(StringUtils.isNotBlank(searchInfoEO.getCLLX())){
queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
}
boolQueryBuilder.must(queryBuilder);
}
HighlightBuilder hiBuilder=new HighlightBuilder();
@@ -0,0 +1,124 @@
package com.adc.da.search.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @Description: 判断是否为日期格式
* @Author: super_liu
* date: 2020/12/31 11:25
*/
public class DateUtil {
/**
* 取起始时间到结束时间 所有的时间
* @param startTime
* @param endTime
* @return
*/
public static List<String> getAllDate(String startTime, String endTime) {
List<String> list = new ArrayList<String>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
try {
cal.setTime(sdf.parse(startTime));
for (long d = cal.getTimeInMillis(); d <= sdf.parse(endTime).getTime(); d = get_D_Plaus_1(cal)) {
list.add(sdf.format(d));
}
} catch (ParseException e) {
System.out.println("date change err");
}
return list;
}
public static long get_D_Plaus_1(Calendar c) {
c.set(Calendar.DAY_OF_MONTH, c.get(Calendar.DAY_OF_MONTH) + 1);
return c.getTimeInMillis();
}
/***
* @Description: 判断多个日期是否都符合日期格式
* @Author: super_liu
* @Date: 2020/12/31 11:31
* @Param: [str]
* @Return: boolean
*/
public static boolean isValidDate(String str) throws Exception{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String[] strArr = str.split(",");
for (String dateStr : strArr) {
try {
simpleDateFormat.setLenient(false);
simpleDateFormat.parse(dateStr);
} catch (Exception e){
return false;
}
}
return true;
}
/**
* utc 时间格式转换正常格式 2018-08-07T03:41:59Z
* @param utcTime 时间
* @return
*/
public static String formatStrUTCToDateStr(String utcTime) {
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.SIMPLIFIED_CHINESE);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
TimeZone utcZone = TimeZone.getTimeZone("UTC");
sf.setTimeZone(utcZone);
Date date = null;
String dateTime = "";
try {
date = sf.parse(utcTime);
dateTime = sdf.format(date);
} catch (ParseException e) {
e.printStackTrace();
}
return dateTime;
}
/**
* 将日期对象转换为指定的日期字符串
*
* @param date 传入的日期对象
* @param format 格式
* @return 日期字符串
* @author 赵肖云
*/
public static String dateToString(Date date, String format) {
String string = "";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
if (date != null) {
string = simpleDateFormat.format(date);
}
return string;
}
/**
* 将日期字符串转换为一个日期对象
*
* @param datestr 日期字符串
* @param format 格式
* @return Date
* @author 赵肖云
*/
public static Date stingToDate(String datestr, String format) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
return simpleDateFormat.parse(datestr);
}
public static void main(String[] args) {
String utcTime = "2021-04-15T01:43:54.296Z";
String time = formatStrUTCToDateStr("2021-04-15T01:43:54.296Z");
System.out.println("utcTime 转换前:" + utcTime);
System.out.println("utcTime 转换后 time " + time);
}
}
@@ -133,7 +133,7 @@ public class SendBussMQService {
saveMap.put("stand_year",infoEO.getStandYear());
saveMap.put("standNumber",infoEO.getStandCode());
saveMap.put("stand_code",infoEO.getStandCode());
saveMap = dealNumberMsg(saveMap,infoEO,getCodeName);
saveMap = dealNumberMsg(saveMap,infoEO,infoEO.getStandSort());
saveMap.put("nameshow",infoEO.getStandName());
saveMap.put("stand_name",infoEO.getStandName());
saveMap.put("standEnName",infoEO.getStandEnName());
@@ -107,7 +107,7 @@ public class SendStandMQService {
}
saveMap.put("standNumber",infoEO.getStandNumber());
saveMap.put("stand_number",infoEO.getStandNumber());
saveMap = dealNumberMsg(saveMap,infoEO,getCodeName);
saveMap = dealNumberMsg(saveMap,infoEO,infoEO.getStandSort());
saveMap.put("standYear",infoEO.getStandYear());
saveMap.put("stand_year",infoEO.getStandYear());
saveMap.put("nameshow",infoEO.getStandName());
@@ -0,0 +1,23 @@
package com.adc.da.slrs.esMatingRelation.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.adc.da.base.web.BaseController;
/**
* <p>
* 前端控制器
* </p>
*
* @author yzh
* @since 2021-12-24
*/
@RestController
@Api(description = "|EsMatingRelation|")
@RequestMapping("/esMatingRelation/es-mating-relation")
public class EsMatingRelationController extends BaseController<EsMatingRelation> {
}
@@ -0,0 +1,23 @@
package com.adc.da.slrs.esMatingRelation.dao;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author yzh
* @since 2021-12-24
*/
public interface EsMatingRelationDao extends BaseMapper<EsMatingRelation> {
List<EsMatingRelation> getDatasOld(@Param("id") String id);
List<EsMatingRelation> getDatas(@Param("id") String id);
}
@@ -0,0 +1,40 @@
package com.adc.da.slrs.esMatingRelation.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 yzh
* @since 2021-12-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="EsMatingRelation对象", description="")
public class EsMatingRelation extends BaseEntity {
private static final long serialVersionUID = 1L;
@TableField("id")
private String id;
@ApiModelProperty(value = "计划id")
@TableField("es_id")
private String esId;
@ApiModelProperty(value = "标准id")
@TableField("stand_id")
private String standId;
}
@@ -0,0 +1,16 @@
package com.adc.da.slrs.esMatingRelation.service;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author yzh
* @since 2021-12-24
*/
public interface IEsMatingRelationService extends IService<EsMatingRelation> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.esMatingRelation.service.impl;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import com.adc.da.slrs.esMatingRelation.dao.EsMatingRelationDao;
import com.adc.da.slrs.esMatingRelation.service.IEsMatingRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author yzh
* @since 2021-12-24
*/
@Service
public class EsMatingRelationServiceImpl extends ServiceImpl<EsMatingRelationDao, EsMatingRelation> implements IEsMatingRelationService {
}
@@ -53,7 +53,7 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
return Result.success(iEsRevisePlanService.getOnePlan(id));
}
//----------------回来改----------------------上面的------
@ApiOperation(value = "获取是否存在重复名企标名称接口")
@GetMapping("/getDataByName")
public ResponseMessage<Object> getDataByName(EsRevisePlan esRevisePlan){
@@ -1,8 +1,12 @@
package com.adc.da.slrs.esRevisePlan.entity;
import java.util.Date;
import java.util.List;
import com.adc.da.base.page.BasePage;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -73,6 +77,50 @@ public class EsRevisePlan extends BasePage {
@ApiModelProperty(value = "起草责任单位ID")
private String unitName;
@ApiModelProperty(value = "引入企业标准json(标准id)")
private String rqbJson;
@ApiModelProperty(value = "引入企业标准json(标准名称)")
private String rqbName;
@ApiModelProperty(value = "引入企业标准json(标准编号)")
private String rqbCode;
@ApiModelProperty(value = "体系结构树(id存储方式是逗号拼接)")
private String tsJson;
@ApiModelProperty(value = "体系结构树(名称逗号拼接展示)")
private String tsJsonName;
@ApiModelProperty(value = "标准范围")
private String area;
@ApiModelProperty(value = "标准范围")
private String areaName;
//企标类别
private String standType;
// 标准编号
private String standNum;
@ApiModelProperty(value = "企标类别")
private String esMatingRelations;
private String esStandRelations;
@ApiModelProperty(value = "是否引用标准")
@TableField("is_relate")
private String isRelate;
@ApiModelProperty(value = "采用程度")
@TableField("use_level")
private String useLevel;
private String useLevelName;
@ApiModelProperty(value = "简述技术指标依据")
@TableField("technologic")
private String technologic;
@ApiModelProperty(value = "企标类别")
@TableField("buss_sort")
private String bussSort;
@TableField(exist = false)
private List<String> planStatusList;
}
@@ -1,14 +1,23 @@
package com.adc.da.slrs.esRevisePlan.service.impl;
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
import com.adc.da.slrs.esMatingRelation.service.IEsMatingRelationService;
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
import com.adc.da.util.UUIDUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
@@ -25,6 +34,10 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
EsRevisePlanDao esRevisePlanDao;
@Autowired
IEsRevisePlanService esRevisePlanService;
@Autowired
IEsMatingRelationService esMatingRelationService;
@Autowired
IEsStandRelationService esStandRelationService;
@Override
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
@@ -38,6 +51,10 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
public List<EsRevisePlan> queryAllPlans(EsRevisePlan esRevisePlan) {
Integer count = esRevisePlanDao.getQueryTotal(esRevisePlan);
esRevisePlan.getPager().setRowCount(count);
if(StringUtils.isNotBlank(esRevisePlan.getPlanStatus())){
List<String> list= Arrays.stream(esRevisePlan.getPlanStatus().split(",")).map(String::trim).collect(Collectors.toList());
esRevisePlan.setPlanStatusList(list);
}
List<EsRevisePlan> esRevisePlans = esRevisePlanDao.queryAll(esRevisePlan);
return esRevisePlans;
}
@@ -72,12 +89,26 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
@Override
public int delPlan(String id) {
QueryWrapper<EsMatingRelation> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("es_id",id);
esMatingRelationService.remove(queryWrapper);
QueryWrapper<EsStandRelation> queryWrapper1=new QueryWrapper<>();
queryWrapper1.eq("es_id",id);
esStandRelationService.remove(queryWrapper1);
return esRevisePlanDao.deleteOne(id);
}
@Override
public int delPlans(String ids) {
String[] str = ids.split(",");
QueryWrapper<EsMatingRelation> queryWrapper=new QueryWrapper<>();
queryWrapper.in("es_id",str);
esMatingRelationService.remove(queryWrapper);
QueryWrapper<EsStandRelation> queryWrapper1=new QueryWrapper<>();
queryWrapper1.in("es_id",str);
esStandRelationService.remove(queryWrapper1);
return esRevisePlanDao.deleteBatch(str);
}
@@ -0,0 +1,23 @@
package com.adc.da.slrs.esStandRelation.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.adc.da.base.web.BaseController;
/**
* <p>
* 前端控制器
* </p>
*
* @author yzh
* @since 2021-12-24
*/
@RestController
@Api(description = "|EsStandRelation|")
@RequestMapping("/esStandRelation/es-stand-relation")
public class EsStandRelationController extends BaseController<EsStandRelation> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.esStandRelation.dao;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author yzh
* @since 2021-12-24
*/
public interface EsStandRelationDao extends BaseMapper<EsStandRelation> {
List<EsStandRelation> getDatasOld(@Param("id")String id);
List<EsStandRelation> getDatas(@Param("id")String id);
}
@@ -0,0 +1,57 @@
package com.adc.da.slrs.esStandRelation.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;
import org.springframework.beans.factory.annotation.Autowired;
/**
* <p>
*
* </p>
*
* @author yzh
* @since 2021-12-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="EsStandRelation对象", description="")
public class EsStandRelation extends BaseEntity {
private static final long serialVersionUID = 1L;
@TableField("id")
private String id;
@ApiModelProperty(value = "企标制修订计划")
@TableField("es_id")
private String esId;
@ApiModelProperty(value = "是否引用标准")
@TableField("is_relate")
private String isRelate;
@ApiModelProperty(value = "采用程度")
@TableField("use_level")
private String useLevel;
@ApiModelProperty(value = "采用程度名称")
@TableField(exist = false)
private String useLevelName;
@ApiModelProperty(value = "简述技术指标依据")
@TableField("technologic")
private String technologic;
@ApiModelProperty(value = "采标id")
@TableField("stand_id")
private String standId;
}
@@ -0,0 +1,16 @@
package com.adc.da.slrs.esStandRelation.service;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author yzh
* @since 2021-12-24
*/
public interface IEsStandRelationService extends IService<EsStandRelation> {
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.esStandRelation.service.impl;
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
import com.adc.da.slrs.esStandRelation.dao.EsStandRelationDao;
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author yzh
* @since 2021-12-24
*/
@Service
public class EsStandRelationServiceImpl extends ServiceImpl<EsStandRelationDao, EsStandRelation> implements IEsStandRelationService {
}
@@ -70,6 +70,20 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
@Autowired
private IDicTypeEOService dicTypeEOService;
/**
* 根据计划库制定状态查询企标编号
*
* @param
* @return
*/
@ApiOperation(value = "|SarBussionessStandEO|根据计划库制定状态查询企标编号")
@GetMapping("/getStandInfoByReviseStatus")
//@RequiresPermissions("lawss:sarStandardsInfo:get")
public ResponseMessage<SarBussionessStand> getStandInfoByReviseStatus(String reviseStatus) {
SarBussionessStand result = sarBussionessStandEOService.getStandInfoByReviseStatus(reviseStatus);
return Result.success(result);
}
@ApiOperation(value = "|SarBussionessStandEO|删除")
@PostMapping("deleteSarBussionessStand")
//401问题2021-03-31暂时注释掉 liuhuiwen
@@ -22,6 +22,8 @@ import java.util.List;
@Repository
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
SarBussionessStand getStandInfoByReviseStatus(String reviseStatus);
SarBussionessStand selectByPrimaryKey(String standId);
List<SarBussionessStand> selectStandardsByStandNumber(SarBussionessStand sarBussionessStand);
@@ -111,8 +111,20 @@ public class SarBussionessStand extends BaseEntity {
@TableField("TEXT_STATUS_BUSS")
private String textStatusBuss;
@ApiModelProperty(value = "计划库制定状态 0 默认 1 制定 2修订")
@TableField("REVISE_STATUS")
private String reviseStatus;
@ApiModelProperty(value = "标准顺序号")
@TableField("STAND_SN")
private String standSn;
// 非表字段
@TableField(exist = false)
private String newStandSn;
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private String firstPutTime;
@@ -18,6 +18,8 @@ import java.util.List;
*/
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
SarBussionessStand getStandInfoByReviseStatus(String reviseStatus);
void attrInfoDetails (SarBussionessStand row) throws Exception;
ResponseMessage<SarBussionessStand> deleteSarBussionessStand(SarBussionessStandEOPage page) throws Exception;
@@ -145,6 +145,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
@Autowired
private StandLawsSearchService standLawsSearchService;
@Override
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus){
return sarBussionessStandEODao.getStandInfoByReviseStatus(reviseStatus);
}
public ResponseMessage<SarBussionessStand> deleteSarBussionessStand(SarBussionessStandEOPage page) throws Exception {
SarBussionessStand sarStandardsInfoEO = new SarBussionessStand();
sarStandardsInfoEO.setValidFlag(1);
@@ -80,6 +80,12 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
return Result.success();
}
@ApiOperation("根据部门ID获取部门下所有用户")
@GetMapping("/getInstitutionIdToDept")
public List<TsInstitution> getInstitutionIdToDept(String institutionIds,String userName){
return tsInstitutionService.getInstitutionIdToDept(institutionIds,userName);
}
@ApiOperation("获得下一级的部门和人员")
@GetMapping("/getNext")
public List<TsInstitution> getNext(String institutionId,String userName){
@@ -29,6 +29,8 @@ public interface TsInstitutionDao extends BaseMapper<TsInstitution> {
*/
List<TsInstitution> selectNextUser(@Param("institutionId") String institutionId,@Param("userName") String userName);
List<TsInstitution> selectNextUsers(@Param("institutionIds") List<String> institutionIds,@Param("userName") String userName);
List<TsInstitution> selectNextUserByIds(@Param("ids") List<String> ids);
@@ -37,6 +37,8 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
*/
public List<TsInstitution> getNext(String institutionId,String userName);
public List<TsInstitution> getInstitutionIdToDept(String institutionIds,String userName);
public List<TsInstitution> getNextById(String ids);
/**
@@ -200,6 +200,13 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
batchInsert(tsInstitutions);
}
@Override
public List<TsInstitution> getInstitutionIdToDept(String institutionIds,String userName){
List<String> strings=new ArrayList<>(Arrays.asList(institutionIds.split(",")));
List<TsInstitution> tsUsers=tsInstitutionDao.selectNextUsers(strings,userName);
return tsUsers;
}
/**
* 通过部门id获得这个部门下的下一级部门
* @return
@@ -11,6 +11,7 @@ import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListS
import com.adc.da.sys.service.IDicTypeEOService;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@@ -118,7 +119,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
**/
@ApiOperation(value = "导出标准信息")
@GetMapping("/ExportLawsById")
public void ExportLawsById(HttpServletResponse response, StandExcelVo standExcelVo){
public void ExportLawsById(HttpServletResponse response, StandExcelVo standExcelVo,@RequestParam(required = false,defaultValue = "0")String type){
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
@@ -140,6 +141,34 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
}else {
data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds());
}
if ("1".equals(type)){
List<String> lawsIds=new ArrayList<>();
SarFindDto sarFindDto=new SarFindDto();
sarFindDto.setId(standExcelVo.getId());
data.forEach(lawsDto -> {lawsIds.add(lawsDto.getId());});
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,sarFindDto);
for (LawsDto lawsDto:data){
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())){
lawsDto.setApplyArctic(lawsDto.getApplyArctic());
}
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stand_id",lawsDto.getId())
.eq("detailed_list_id",sarFindDto.getId());
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSsrq()) && "null" != sarLawsAttrDetailedLists.get(0).getSsrq()) {
lawsDto.setSSRQ(sarLawsAttrDetailedLists.get(0).getSsrq());
}
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getXcxssrq()) && "null" != sarLawsAttrDetailedLists.get(0).getXcxssrq()) {
lawsDto.setXCXSSRQGJ(sarLawsAttrDetailedLists.get(0).getXcxssrq());
}
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq()) && "null" != sarLawsAttrDetailedLists.get(0).getZccssrq()) {
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
}
if ("INLAND".equals(lawsDto.getStandType())) lawsDto.setStandType("INLAND_STAND");
if ("FOREIGN".equals(lawsDto.getStandType())) lawsDto.setStandType("FOREIGN_STAND");
}
}
//适用车型
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
List<Map<String, String>> typeApplicable = (List<Map<String, String>>)map.get("ENERGYTYPES");
@@ -227,13 +256,13 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
List<Map<String, String>> sycpx = (List<Map<String, String>>)map.get("SYCPXCLASS");
for (LawsDto list1:data){
if (list1.getSSRQ()!=null){
list1.setSSRQ(list1.getSSRQ().substring(0,10));
list1.setSSRQ(list1.getSSRQ());
}
if (list1.getZCCSSRQGJ()!=null){
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ().substring(0,10));
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ());
}
if (list1.getXCXSSRQGJ()!=null){
list1.setXCXSSRQGJ(list1.getXCXSSRQGJ().substring(0,10));
list1.setXCXSSRQGJ(list1.getXCXSSRQGJ());
}
if (StringUtils.isNotBlank(list1.getSYCPX()) && list1.getSYCPX().contains(",")){
@@ -318,53 +318,55 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
wrapper.eq("sort_key", sortKey);
Page<SarLawsDetailedList> pageRes = new Page<>(page, pageSize);
IPage<SarLawsDetailedList> userIPage = sarLawsDetailedListDao.selectPage(pageRes, wrapper);
if ("1".equals(sortKey)) {
Map<String, Object> map = iDicTypeEOService.getDicTypeListCode();
List<SarLawsDetailedList> list = userIPage.getRecords();
List<Map<String, String>> arr = (List<Map<String, String>>) map.get("COUNTRY");
for (SarLawsDetailedList list1 : list) {
if (StringUtils.isNotBlank(list1.getCountryArea()) && list1.getCountryArea().contains(",")) {
String[] split = list1.getCountryArea().split(",");
StringBuilder builder = new StringBuilder();
for (String s : split) {
if ( userIPage.getRecords().size()>0){
if ("1".equals(sortKey)) {
Map<String, Object> map = iDicTypeEOService.getDicTypeListCode();
List<SarLawsDetailedList> list = userIPage.getRecords();
List<Map<String, String>> arr = (List<Map<String, String>>) map.get("COUNTRY");
for (SarLawsDetailedList list1 : list) {
if (StringUtils.isNotBlank(list1.getCountryArea()) && list1.getCountryArea().contains(",")) {
String[] split = list1.getCountryArea().split(",");
StringBuilder builder = new StringBuilder();
for (String s : split) {
for (Map<String, String> map1 : arr) {
if (map1.get("value").equals(s)) {
s = map1.get("value");
builder.append(s + ",");
break;
}
}
}
String completedString = "";
if (builder.length() > 0) {
completedString = builder.delete(builder.length() - 1, builder.length()).toString();
}
list1.setCountryArea(completedString);
} else {
for (Map<String, String> map1 : arr) {
if (map1.get("value").equals(s)) {
s = map1.get("value");
builder.append(s + ",");
if (map1.get("value").equals(list1.getCountryArea())) {
list1.setCountryArea(map1.get("value"));
break;
}
}
}
String completedString = "";
if (builder.length() > 0) {
completedString = builder.delete(builder.length() - 1, builder.length()).toString();
}
list1.setCountryArea(completedString);
} else {
for (Map<String, String> map1 : arr) {
if (map1.get("value").equals(list1.getCountryArea())) {
list1.setCountryArea(map1.get("value"));
break;
}
}
}
userIPage.setRecords(list);
}
userIPage.setRecords(list);
List<String> names = new ArrayList<>();
userIPage.getRecords().forEach(sarLawsDetailedList -> {
names.add(sarLawsDetailedList.getUpdatePeople());
});
List<UpDTO> upDTOS = iTsUserService.selectNameById(names, "0");
Map<String, String> stringMap = new HashMap<>();
upDTOS.forEach(upDTO -> {
stringMap.put(upDTO.getId(), upDTO.getValue());
});
userIPage.getRecords().forEach(sarLawsDetailedList -> {
if (null != stringMap.get(sarLawsDetailedList.getUpdatePeople())) {
sarLawsDetailedList.setUpdatePeople(stringMap.get(sarLawsDetailedList.getUpdatePeople()));
}
});
}
List<String> names = new ArrayList<>();
userIPage.getRecords().forEach(sarLawsDetailedList -> {
names.add(sarLawsDetailedList.getUpdatePeople());
});
List<UpDTO> upDTOS = iTsUserService.selectNameById(names, "0");
Map<String, String> stringMap = new HashMap<>();
upDTOS.forEach(upDTO -> {
stringMap.put(upDTO.getId(), upDTO.getValue());
});
userIPage.getRecords().forEach(sarLawsDetailedList -> {
if (null != stringMap.get(sarLawsDetailedList.getUpdatePeople())) {
sarLawsDetailedList.setUpdatePeople(stringMap.get(sarLawsDetailedList.getUpdatePeople()));
}
});
System.out.println("总条数" + userIPage.getTotal());
System.out.println("总页数" + userIPage.getPages());
return userIPage;
@@ -8,6 +8,7 @@ import com.adc.da.login.util.UserUtils;
import com.adc.da.slrs.sarMenu.entity.SarMenu;
import com.adc.da.slrs.sarResource.entity.TsResource;
import com.adc.da.slrs.sarResource.service.ITsResourceService;
import com.adc.da.slrs.sarRole.dao.TsRoleDao;
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
import com.adc.da.slrs.sarRole.service.ITsRoleService;
@@ -39,6 +40,8 @@ import java.util.List;
public class TsRoleController extends BaseController<TsRole> {
@Autowired
private ITsRoleService tsRoleService;
@Autowired
private TsRoleDao tsRoleDao;
@ApiOperation("查询所有角色")
@GetMapping
@@ -95,9 +98,14 @@ public class TsRoleController extends BaseController<TsRole> {
@ApiOperation("查询角色详情")
@GetMapping("/id")
public ResponseMessage<TsRole> getRoleById(@RequestParam String roleId){
TsRole tsRole=tsRoleService.getById(roleId);
// TsRole tsRole=tsRoleService.getById(roleId);
// if(tsRole.getParentId()!=null){
// TsRole parent=tsRoleService.getById(tsRole.getParentId());
// tsRole.setParent(parent.getName());
// }
TsRole tsRole=tsRoleDao.getAllDatas(roleId);
if(tsRole.getParentId()!=null){
TsRole parent=tsRoleService.getById(tsRole.getParentId());
TsRole parent=tsRoleDao.getAllDatas(tsRole.getParentId());
tsRole.setParent(parent.getName());
}
return Result.success(tsRole);
@@ -99,4 +99,7 @@ public interface TsRoleDao extends BaseMapper<TsRole> {
* @return List<String>
*/
List<String> getRootMenuIdsByRoleIds(List<String> roleIds);
@Select("select *,DATE_ADD(ts_role.operate_time,INTERVAL 8 HOUR) as operateTime from ts_role where ts_role.ID = #{roleId}")
TsRole getAllDatas(@Param("roleId") String roleId);
}
@@ -69,7 +69,7 @@ public class TsRole extends BaseEntity {
private String remarks;
@ApiModelProperty(value = "操作时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp operateTime;
@@ -89,13 +89,13 @@ public class TsRole extends BaseEntity {
@ApiModelProperty(value = "创建时间")
@TableField("CREATION_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp creationTime;
@ApiModelProperty(value = "修改时间")
@TableField("MODIFY_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp modifyTime;
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarRole.entity.TsRole;
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -84,6 +84,15 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
}
@ApiOperation(value = "增加意见")
@PostMapping("/saveBatchByWk")
public ResponseMessage saveBatchByWk(@RequestBody List<SarPublicIdeaAll> sar){
boolean flag=sarPublicIdeaAllImpl.saveOrUpdateBatch(sar);
return Result.success("200",flag);
}
@ApiOperation(value = "删除意见")
@GetMapping("/deleteStand")
public ResponseMessage deleteStand(DelStandDto delStandDto){
@@ -118,7 +127,11 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
List<SarPublicIdeaAll> data=new ArrayList<>();
if (!StringUtils.isEmpty(cid)){
data=sarPublicIdeaAllDao.getPublicAllIdea(cid,type);
// if (null!=type) {
data = sarPublicIdeaAllDao.getPublicAllIdea(cid, type);
// }else {
// data = sarPublicIdeaAllDao.getPublicAllIdeaExport(cid,type);
// }
}
List<GetExcelDto> standExcel=new ArrayList<>();
List<GetExcelDto2> standExcel2=new ArrayList<>();
@@ -132,6 +145,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
.userName(sarPublicIdeaAll.getUserName())
.deptName(sarPublicIdeaAll.getDeptName())
.state(map.get(sarPublicIdeaAll.getState()))
.cause(sarPublicIdeaAll.getCause())
.build();
standExcel2.add(getExcelDto);
}else {
@@ -142,6 +156,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
.reason(sarPublicIdeaAll.getReason())
.userName(sarPublicIdeaAll.getUserName())
.deptName(sarPublicIdeaAll.getDeptName())
.cause(sarPublicIdeaAll.getCause())
.build();
standExcel.add(getExcelDto);
}
@@ -157,6 +172,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
if ("1".equals(type)){
headList.add(Lists.newArrayList("处理意见"));
}
headList.add(Lists.newArrayList("原因"));
if ("1".equals(type)) {
EasyExcel.write(response.getOutputStream(), GetExcelDto2.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
.doWrite(standExcel2);
@@ -28,4 +28,6 @@ public interface SarPublicIdeaAllDao extends BaseMapper<SarPublicIdeaAll> {
Integer getAllDataByIdeaCount( @Param("ideaId")String ideaId);
List<SarPublicIdeaAll> getPublicAllIdea(@Param("cid") String cid,@Param("type")String type);
List<SarPublicIdeaAll> getPublicAllIdeaExport(@Param("cid") String cid,@Param("type")String type);
}
@@ -38,6 +38,8 @@ public class GetExcelDto {
// @ExcelProperty("提出人")
private String userName;
private String cause;
}
@@ -37,6 +37,8 @@ public class GetExcelDto2 {
private String state;
private String cause;
}
@@ -75,4 +75,7 @@ public class SarPublicIdeaAll extends BaseEntity {
@TableField("state")
private String state;
@TableField("cause")
private String cause;
}
@@ -47,11 +47,29 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
public IPage<SarPublicIdea> selectAllP(Integer p, Integer size, String category, String cname, Date start, Date end, String type) {
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
if ("1".equals(type)) {
list.like(StringUtils.isNotEmpty(category), "category", category)
.like(StringUtils.isNotEmpty(cname), "cname", cname)
.ge(start != null, "start_time", start)
.le(end != null, "end_time", end)
.orderByDesc("start_time");
if (start!=null && end !=null){
list.like(StringUtils.isNotEmpty(category), "category", category)
.like(StringUtils.isNotEmpty(cname), "cid", cname)
.ge(start != null, "start_time", start)
.le(end != null, "end_time", end)
.orderByDesc("start_time");
}else if (start!=null){
list.like(StringUtils.isNotEmpty(category), "category", category)
.like(StringUtils.isNotEmpty(cname), "cid", cname)
.le(start != null, "start_time", start)
.ge(start != null, "end_time", start)
.orderByDesc("start_time");
}else if (end!=null){
list.like(StringUtils.isNotEmpty(category), "category", category)
.like(StringUtils.isNotEmpty(cname), "cid", cname)
.le(end != null, "start_time", end)
.ge(end != null, "end_time", end)
.orderByDesc("start_time");
}else {
list.like(StringUtils.isNotEmpty(category), "category", category)
.like(StringUtils.isNotEmpty(cname), "cid", cname)
.orderByDesc("start_time");
}
} else {
list.like(StringUtils.isNotEmpty(category), "category", category)
.like(StringUtils.isNotEmpty(cname), "cname", cname)
@@ -49,6 +49,8 @@ public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
int deleteByStandIdAndFileType(@Param("standId") String standId, @Param("fileType") String fileType);
int deleteByStandIdAndFileTypes(@Param("standId") String standId, @Param("fileType") String fileType,@Param("items")List<String> strings);
Set<String> selectClaimTypesByStandId(@Param("standId") String standId, @Param("fileType") String fileType, @Param("idList") String[] idList);
Set<String> selectSvppsByStandId(@Param("standId") String standId, @Param("fileType") String fileType, @Param("idList") String[] idList);
@@ -169,7 +169,11 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
@Override
public String sarStandItemsaveBatch(List<SarStandItems> sarStandItems) {
if (null!=sarStandItems && sarStandItems.size()>0) {
sarStandItemsDao.deleteByStandIdAndFileType(sarStandItems.get(0).getStandId(), sarStandItems.get(0).getFileType());
List<String> strings=new ArrayList<>();
sarStandItems.forEach(sarStandItems1 -> {
strings.add(sarStandItems1.getItemsNum());
});
sarStandItemsDao.deleteByStandIdAndFileTypes(sarStandItems.get(0).getStandId(), sarStandItems.get(0).getFileType(),strings);
}
boolean flag=this.saveBatch(sarStandItems);
if (flag){
@@ -6,6 +6,7 @@ import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.ResponseDto;
import com.adc.da.slrs.sarStandProjectLibrary.service.impl.SarStandProjectLibraryServiceImpl;
import com.adc.da.util.utils.StringUtils;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -305,4 +306,41 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
return responseDto;
}
@PostMapping("/querySelect")
@ApiOperation("查询筛选条件项")
public ResponseMessage querySelect(SarStandProjectLibrary sarStandProjectLibrary){
QueryWrapper qw = new QueryWrapper();
if(StringUtils.isNotBlank(sarStandProjectLibrary.getManagementHostName())){
qw.eq("management_host_name",sarStandProjectLibrary.getManagementHostName());
}
if(StringUtils.isNotBlank(sarStandProjectLibrary.getDevelopmentHostName())){
qw.eq("development_host_name",sarStandProjectLibrary.getDevelopmentHostName());
}
if(StringUtils.isNotBlank(sarStandProjectLibrary.getCategoryName())){
qw.eq("category_name",sarStandProjectLibrary.getCategoryName());
}
List<SarStandProjectLibrary> list = sarStandProjectLibraryService.list(qw);
List<String> managementHostList = new ArrayList<>();
List<String> developmentHostList = new ArrayList<>();
List<String> categoryList = new ArrayList<>();
for(SarStandProjectLibrary sarStandProjectLibrary1 : list){
if(!managementHostList.contains(sarStandProjectLibrary1.getManagementHostName())){
managementHostList.add(sarStandProjectLibrary1.getManagementHostName());
}
if(!developmentHostList.contains(sarStandProjectLibrary1.getDevelopmentHostName())){
developmentHostList.add(sarStandProjectLibrary1.getDevelopmentHostName());
}
if(!categoryList.contains(sarStandProjectLibrary1.getCategoryName())){
categoryList.add(sarStandProjectLibrary1.getCategoryName());
}
}
QuerySelectRspDTO querySelectRspDTO = QuerySelectRspDTO.builder()
.managementHostList(managementHostList)
.developmentHostList(developmentHostList)
.categoryList(categoryList)
.build();
return Result.success(querySelectRspDTO);
}
}
@@ -0,0 +1,17 @@
package com.adc.da.slrs.sarStandProjectLibrary.entity;
import lombok.Builder;
import lombok.Data;
import java.util.List;
@Data
@Builder
public class QuerySelectRspDTO {
private List<String> managementHostList;
private List<String> developmentHostList;
private List<String> categoryList;
}
@@ -80,6 +80,15 @@ public class SarStandProjectLibrary extends BaseEntity {
@TableField("detailed_list_version")
private String detailedListVersion;
@ApiModelProperty(value = "管理主体名称")
private String managementHostName;
@ApiModelProperty(value = "开发主体名称")
private String developmentHostName;
@ApiModelProperty(value = "项目细分类名称")
private String categoryName;
//标准编号
@TableField(exist = false)
@@ -82,11 +82,14 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
.setProjectNumber(projectObject.get("code").getAsString())
.setProjectName(projectObject.get("name").getAsString())
.setProjectClassification(projectObject.get("catalog_name").getAsString())
.setProjectStatus(projectObject.get("project_status").getAsString())
.setProjectStatus(projectObject.get("project_status_name").getAsString())
.setProjectGroup(projectObject.get("project_group_name").getAsString())
.setCurrentNode(projectObject.get("project_current_milestone").getAsString())
.setProjectLevel(projectObject.get("project_level").getAsString())
.setProductLine(projectObject.get("eng_product_line").getAsString());
.setProductLine(projectObject.get("eng_product_line").getAsString())
.setManagementHostName(projectObject.get("management_host_name").getAsString())
.setDevelopmentHostName(projectObject.get("development_host_name").getAsString())
.setCategoryName(projectObject.get("category_name").getAsString());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
@@ -24,6 +24,8 @@ public interface SarStandUnqualifiedDao extends BaseMapper<SarStandUnqualified>
List<SarStandUnqualified> getSarStandUnqualifiedPage(@Param("start")Integer start, @Param("end")Integer end, @Param("sar") SarStandUnqualifiedPage sarStandUnqualified);
List<SarStandUnqualified> getSarStandUnqualifiedExcel(@Param("ids")List<String> strings);
Integer getSarStandUnqualifiedCount(@Param("sar") SarStandUnqualifiedPage sarStandUnqualified);
}
@@ -78,10 +78,10 @@ public class SarStandUnqualified extends BaseEntity {
@TableField("ITEMS_NAME")
private String itemsName;
@ExcelProperty(value = "产品类型",converter = ProductTypeConverter.class)
@ApiModelProperty(value = "产品类型(research为在研产品,product为在产产品)")
@TableField("PRODUCT_TYPE")
private String productType;
// @ExcelProperty(value = "产品类型",converter = ProductTypeConverter.class)
// @ApiModelProperty(value = "产品类型(research为在研产品,product为在产产品)")
// @TableField("PRODUCT_TYPE")
// private String productType;
@ExcelProperty("产品线")
@ApiModelProperty(value = "产品线")
@@ -142,11 +142,16 @@ public class SarStandUnqualified extends BaseEntity {
@TableField("AUTH_ENGINEER")
private String authEngineer;
@ExcelProperty("责任工程师")
@ExcelIgnore
@ApiModelProperty(value = "责任工程师")
@TableField("DUTY_ENGINEER")
private String dutyEngineer;
@ExcelProperty("责任工程师")
@ApiModelProperty(value = "责任工程师")
@TableField(exist=false)
private String dutyEngineerName;
@ExcelIgnore
@ApiModelProperty(value = "计划关闭时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@@ -177,10 +182,6 @@ public class SarStandUnqualified extends BaseEntity {
@TableField(exist=false)
private String authEngineerName;
@ExcelIgnore
@ApiModelProperty(value = "责任工程师")
@TableField(exist=false)
private String dutyEngineerName;
@ExcelIgnore
@ApiModelProperty(value = "国内OR海外")
@@ -11,6 +11,8 @@ import java.util.List;
public class StandUnqualifiedExcelVO {
@ApiModelProperty("文件名")
String exportName;
@ApiModelProperty("导出类型")
String exportType;
@ApiModelProperty("导出的未符合项ID列表")
List<String> ids;
}
@@ -148,12 +148,12 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
*/
@Override
public List<SarStandUnqualified> getStandUnqualifiedExcelData(StandUnqualifiedExcelVO standUnqualifiedExcelVO) {
QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
sarStandUnqualifiedQueryWrapper.eq("close_state",1);
if(standUnqualifiedExcelVO.getIds()!=null && standUnqualifiedExcelVO.getIds().size()>0){
sarStandUnqualifiedQueryWrapper.in("id",standUnqualifiedExcelVO.getIds());
}
List<SarStandUnqualified> stand = sarStandUnqualifiedDao.selectList(sarStandUnqualifiedQueryWrapper);
// QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
// sarStandUnqualifiedQueryWrapper.eq("close_state",1);
// if(standUnqualifiedExcelVO.getIds()!=null && standUnqualifiedExcelVO.getIds().size()>0){
// sarStandUnqualifiedQueryWrapper.in("id",standUnqualifiedExcelVO.getIds());
// }
List<SarStandUnqualified> stand = sarStandUnqualifiedDao.getSarStandUnqualifiedExcel(standUnqualifiedExcelVO.getIds());
// 去掉日期时分秒
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
@@ -27,6 +27,9 @@ public class ProductTypeConverter implements Converter<String> {
if(stringValue.equals("在产产品")){
return "product";
}
if (!stringValue.equals("在研产品") && !stringValue.equals("在产产品")){
return "";
}
}
return null;
}
@@ -40,6 +43,9 @@ public class ProductTypeConverter implements Converter<String> {
if(s.equals("product")){
return new CellData<>("在产产品");
}
if (!s.equals("research") && !s.equals("product")){
return new CellData<>("");
}
}
return null;
}
@@ -10,6 +10,7 @@ import com.adc.da.slrs.sarResource.entity.TsResource;
import com.adc.da.slrs.sarUrl.dao.TsUrlDao;
import com.adc.da.slrs.sarUser.dao.TsUserDao;
import com.adc.da.slrs.sarUser.entity.UpDTO;
import com.adc.da.slrs.sarUser.entity.UserPositionBatchVO;
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
import com.adc.da.slrs.sarUser.service.ITsUserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -60,6 +61,13 @@ public class TsUserController extends BaseController<TsUser> {
return tsUserService.setPosition(userPositionVO);
}
@ApiOperation("配置岗位")
@PostMapping("/positionBatch")
public ResponseMessage<Object> setPositionBatch(@Valid @RequestBody UserPositionBatchVO userPositionVO){
return tsUserService.setPositionBatch(userPositionVO);
}
@ApiOperation("查询当前登录用户权限")
@GetMapping("/menu")
public ResponseMessage<List<SarMenu>> getMenu(){
@@ -32,7 +32,7 @@ public interface TsUserDao extends BaseMapper<TsUser> {
* @param positionId:岗位ID
*/
@Insert("insert into ts_user_position (user_id,position_id) values (#{userId},#{positionId})")
void addPosition(String userId, String positionId);
void addPosition(@Param("userId") String userId,@Param("positionId")String positionId);
/**
* 解绑岗位
@@ -40,7 +40,7 @@ public interface TsUserDao extends BaseMapper<TsUser> {
* @param positionId:岗位ID
*/
@Delete("delete from ts_user_position where user_id=#{userId} and position_id=#{positionId}")
void delPosition(String userId, String positionId);
void delPosition(@Param("userId")String userId, @Param("positionId")String positionId);
/**
* 通过岗位ID查询用户及其岗位
@@ -0,0 +1,14 @@
package com.adc.da.slrs.sarUser.entity;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class UserPositionBatchVO {
@NotNull(message = "userId不能为空")
private List<String> userId;
@NotNull(message = "positionIds不能为空")
private List<String> positionIds;
}
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarMenu.entity.SarMenu;
import com.adc.da.slrs.sarResource.entity.TsResource;
import com.adc.da.slrs.sarUser.entity.TsUser;
import com.adc.da.slrs.sarUser.entity.UpDTO;
import com.adc.da.slrs.sarUser.entity.UserPositionBatchVO;
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -44,6 +45,8 @@ public interface ITsUserService extends IService<TsUser> {
*/
ResponseMessage<Object> setPosition(UserPositionVO userPositionVO);
ResponseMessage<Object> setPositionBatch(UserPositionBatchVO userPositionVO);
/**
* 查询当前登录的用户权限
* @return List<SarMenu>
@@ -11,11 +11,8 @@ import com.adc.da.slrs.sarPosition.service.ITsPositionService;
import com.adc.da.slrs.sarResource.entity.TsResource;
import com.adc.da.slrs.sarResource.service.ITsResourceService;
import com.adc.da.slrs.sarRole.service.ITsRoleService;
import com.adc.da.slrs.sarUser.entity.SyncUser;
import com.adc.da.slrs.sarUser.entity.TsUser;
import com.adc.da.slrs.sarUser.entity.*;
import com.adc.da.slrs.sarUser.dao.TsUserDao;
import com.adc.da.slrs.sarUser.entity.UpDTO;
import com.adc.da.slrs.sarUser.entity.UserPositionVO;
import com.adc.da.slrs.sarUser.service.ITsUserService;
import com.adc.da.sync.service.SyncUserService;
import com.adc.da.sys.entity.UserEO;
@@ -144,6 +141,48 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
return Result.success();
}
/**
* 配置岗位
* @param userPositionVO2:用户、岗位ID
* @return ResponseMessage<Object>
*/
@Override
@Transactional
public ResponseMessage<Object> setPositionBatch(UserPositionBatchVO userPositionVO2) {
boolean flag=true;
for (String s:userPositionVO2.getUserId()) {
UserPositionVO userPositionVO=new UserPositionVO();
userPositionVO.setUserId(s);
userPositionVO.setPositionIds(userPositionVO2.getPositionIds());
TsUser tsUser=tsUserDao.selectById(userPositionVO.getUserId());
if(tsUser==null){
flag=false;
}
List<String> oldPositionIds=tsUserDao.selectPositionIds(userPositionVO.getUserId());
Map<String,List<String>> ids= ListUtil.difList(userPositionVO.getPositionIds(),oldPositionIds);
List<String> insertIds=ids.get("insert");
List<String> deleteIds=ids.get("delete");
if(insertIds!=null&&insertIds.size()>0){
for(String positionId:insertIds){
tsUserDao.addPosition(userPositionVO.getUserId(),positionId);
}
}
if(deleteIds!=null&&deleteIds.size()>0){
for(String positionId:deleteIds){
tsUserDao.delPosition(userPositionVO.getUserId(),positionId);
}
}
}
if (flag) {
return Result.success();
}else {
return Result.error("用户不存在");
}
}
/**
* 查询当前登录的用户权限
* @return List<SarMenu>
@@ -275,7 +275,8 @@ public class SarFileSplitInfoEOController extends BaseController<SarFileSplitInf
if(null!=sarFileSplitInfoEO){
sarFileSplitInfoEO.setModifyTime(new Date());
if (null==sarFileSplitInfoEO.getSplitStatus())
sarFileSplitInfoEO.setSplitStatus("1");
sarFileSplitInfoEO.setStandId(null);
// sarFileSplitInfoEO.setSplitStatus("1");
sarFileSplitInfoEOService.updateByPrimaryKeySelective(sarFileSplitInfoEO);
return Result.success("0","编辑成功",null);
}else{
@@ -0,0 +1,40 @@
package com.adc.da.slrs.standardSplit.controller;
import com.adc.da.base.web.BaseController;
import com.adc.da.http.PageInfo;
import com.adc.da.slrs.standardSplit.dao.SarItemsCompareHisEODao;
import com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO;
import com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEO;
import com.adc.da.slrs.standardSplit.entity.SarStandItemsCompareHisEOPage;
import com.adc.da.slrs.standardSplit.service.SarItemsCompareHisEOService;
import com.adc.da.util.http.ResponseMessage;
import com.adc.da.util.http.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
@RequestMapping("/${restPath}/lawss/sarItemsCompareHis")
@Api(description = "|SarStandItemsCompareHisEO|")
public class SarItemsStandCompareHisEOController extends BaseController<SarItemsCompareHisEO> {
private static final Logger logger = LoggerFactory.getLogger(SarItemsStandCompareHisEOController.class);
@Autowired
private SarItemsCompareHisEODao sarItemsCompareHisEOService;
@ApiOperation(value = "|SarStandItemsCompareHisEO|分页查询")
@GetMapping("/page")
public ResponseMessage<PageInfo<SarItemsCompareHisEO>> page(SarStandItemsCompareHisEOPage page) throws Exception {
QueryWrapper<SarItemsCompareHisEO> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("STAND_HIS_ID",page.getStandHisId());
List<SarItemsCompareHisEO> rows = sarItemsCompareHisEOService.selectList(queryWrapper);
return Result.success(getPageInfo(page.getPager(), rows));
}
}
@@ -243,6 +243,10 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
sarItemsCompareHisEO.setCreateTime(new Date());
sarItemsCompareHisEOService.insertSelective(sarItemsCompareHisEO);
}
SarStandCompareHisEO sarStandCompareHisEO =new SarStandCompareHisEO();
sarStandCompareHisEO.setId(standHisId);
sarStandCompareHisEO.setCompareStatus("比对完成");
sarStandCompareHisEODao.updateByPrimaryKeySelective(sarStandCompareHisEO);
return resultMap;
}
@@ -377,6 +381,7 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
sarItemsCompareHisEO.setCreateTime(new Date());
sarItemsCompareHisEOService.insertSelective(sarItemsCompareHisEO);
}
return resultMap;
}
@Async
@@ -52,6 +52,14 @@ public class WgNetInfo extends BaseEntity {
@TableField("email")
private String email;
@ApiModelProperty(value = "联络人")
@TableField("name")
private String name;
@ApiModelProperty(value = "单位")
@TableField("unit")
private String unit;
}
@@ -63,6 +63,12 @@ public class WgWorkGroupController extends BaseController<WgWorkGroup> {
return wgWorkGroupService.updateData(wgWorkGroupShowDTO);
}
@ApiOperation("修改工作组节点数据")
@PostMapping("/updateDataByWk")
public ResponseMessage<Object> updateDataByWk(@RequestBody WgWorkGroupShowDTO wgWorkGroupShowDTO){
return wgWorkGroupService.updateDataByWk(wgWorkGroupShowDTO);
}
@@ -26,4 +26,6 @@ public interface WgWorkGroupDao extends BaseMapper<WgWorkGroup> {
List<WgWorkGroup> researchDownCheck(@Param(value = "data") String data,@Param(value = "status")String status);
List<WgWorkGroup> researchDatasCheck(@Param(value = "data") String data,@Param(value = "status")String status);
}
@@ -31,6 +31,8 @@ public interface IWgWorkGroupService extends IService<WgWorkGroup> {
ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO);
ResponseMessage<Object> updateDataByWk(WgWorkGroupShowDTO wgWorkGroupShowDTO);
}
@@ -126,33 +126,33 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
@Override
public String saveStandDatas(WgWorkGroupDTO wgWorkGroupDTO) {
List<WgStandorpolicyInfo> wgStandorpolicyInfos= wgStandorpolicyInfoDao.researchDatas();
Map<String,WgStandorpolicyInfo> map=new HashMap<>();
List<WgStandorpolicyInfo> wgStandorpolicyInfos = wgStandorpolicyInfoDao.researchDatas();
Map<String, WgStandorpolicyInfo> map = new HashMap<>();
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
map.put(wgStandorpolicyInfo.getStandId()+"-"+wgStandorpolicyInfo.getWgId(),wgStandorpolicyInfo);
map.put(wgStandorpolicyInfo.getStandId() + "-" + wgStandorpolicyInfo.getWgId(), wgStandorpolicyInfo);
});
if (null!=wgWorkGroupDTO.getWgStandorpolicyInfos() && wgWorkGroupDTO.getWgStandorpolicyInfos().size()>0){
List<WgWorkGroup> wgWorkGroups=new ArrayList<>();
if (null != wgWorkGroupDTO.getWgStandorpolicyInfos() && wgWorkGroupDTO.getWgStandorpolicyInfos().size() > 0) {
List<WgWorkGroup> wgWorkGroups = new ArrayList<>();
wgWorkGroupDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
WgWorkGroup wgWorkGroup=new WgWorkGroup();
BeanUtils.copyProperties(wgWorkGroupDTO,wgWorkGroup);
WgWorkGroup wgWorkGroup = new WgWorkGroup();
BeanUtils.copyProperties(wgWorkGroupDTO, wgWorkGroup);
wgWorkGroup.setId(String.valueOf(UUID.randomUUID()));
wgStandorpolicyInfo.setWgId(wgWorkGroup.getId());
if (null==map.get(wgStandorpolicyInfo.getStandId()+"-"+wgWorkGroup.getPid())) {
if (null == map.get(wgStandorpolicyInfo.getStandId() + "-" + wgWorkGroup.getPid())) {
wgWorkGroups.add(wgWorkGroup);
}
});
if (wgWorkGroups.size()==0){
if (wgWorkGroups.size() == 0) {
return "政策已存在,请勿重复添加";
}
boolean flag=wgWorkGroupService.saveOrUpdateBatch(wgWorkGroups);
boolean flag1=wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
if (flag && flag1){
boolean flag = wgWorkGroupService.saveOrUpdateBatch(wgWorkGroups);
boolean flag1 = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupDTO.getWgStandorpolicyInfos());
if (flag && flag1) {
return "添加成功";
}else {
} else {
return "添加失败";
}
}else {
} else {
return "数据有误,请检查数据";
}
}
@@ -179,82 +179,82 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
List<WgMeetingUserRelationShow> wgMeetingUserRelations = wgMeetingUserRelationService.getMeetingAllPeoples(type);
//处理数据
//part1 会议数据组装 提速第一步建造数据的map集合
Map<String,WgWorkGroupShowDTO> wgWorkGroupMap=new HashMap<>();
Map<String, WgWorkGroupShowDTO> wgWorkGroupMap = new HashMap<>();
wgWorkGroupShowDTOS.forEach(wgWorkGroupShowDTO -> {
wgWorkGroupMap.put(wgWorkGroupShowDTO.getId(),wgWorkGroupShowDTO);
wgWorkGroupMap.put(wgWorkGroupShowDTO.getId(), wgWorkGroupShowDTO);
});
Map<String, WgMeetingInfo> meetMap = new HashMap<>();
if (null!=wgMeetingInfos && wgMeetingInfos.size()>0) {
if (null != wgMeetingInfos && wgMeetingInfos.size() > 0) {
wgMeetingInfos.forEach(wgMeetingInfo -> {
meetMap.put(wgMeetingInfo.getId(), wgMeetingInfo);
});
}
//组装会议数据
if (null!=wgMeetingUserRelations && wgMeetingUserRelations.size()>0) {
if (null != wgMeetingUserRelations && wgMeetingUserRelations.size() > 0) {
wgMeetingUserRelations.forEach(wgMeetingUserRelationShow -> {
if (null!=meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo()) {
if (null != meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo()) {
meetMap.get(wgMeetingUserRelationShow.getMeetingId()).getJoinMeetingPeopleInfo().add(wgMeetingUserRelationShow);
}else {
List<WgMeetingUserRelationShow> wgMeetingUserRelationShows=new ArrayList<>();
} else {
List<WgMeetingUserRelationShow> wgMeetingUserRelationShows = new ArrayList<>();
wgMeetingUserRelationShows.add(wgMeetingUserRelationShow);
meetMap.get(wgMeetingUserRelationShow.getMeetingId()).setJoinMeetingPeopleInfo(wgMeetingUserRelationShows);
}
});
}
//组装总数据
if (null!=wgDeptShows && wgDeptShows.size()>0) {
if (null != wgDeptShows && wgDeptShows.size() > 0) {
wgDeptShows.forEach(wgDeptShow -> {
if (null!=wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts()) {
if (null != wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts()) {
wgWorkGroupMap.get(wgDeptShow.getWgId()).getWgDepts().add(wgDeptShow);
}else {
} else {
List<WgDeptShow> wgDepts = new ArrayList<>();
wgDepts.add(wgDeptShow);
wgWorkGroupMap.get(wgDeptShow.getWgId()).setWgDepts(wgDepts);
}
});
}
if (null!=wgMeetingInfos && wgMeetingInfos.size()>0) {
if (null != wgMeetingInfos && wgMeetingInfos.size() > 0) {
wgMeetingInfos.forEach(wgMeetingInfo -> {
if (null!=wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos()) {
if (null != wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos()) {
wgWorkGroupMap.get(wgMeetingInfo.getWgId()).getWgMeetingInfos().add(meetMap.get(wgMeetingInfo.getId()));
}else {
} else {
List<WgMeetingInfo> wgMeetingInfos1 = new ArrayList<>();
wgMeetingInfos1.add(wgMeetingInfo);
wgWorkGroupMap.get(wgMeetingInfo.getWgId()).setWgMeetingInfos(wgMeetingInfos1);
}
});
}
if (null!=wgNetInfoDTOS && wgNetInfoDTOS.size()>0) {
if (null != wgNetInfoDTOS && wgNetInfoDTOS.size() > 0) {
wgNetInfoDTOS.forEach(wgNetInfoDTO -> {
if (null!=wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos()) {
if (null != wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos()) {
wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).getWgNetInfos().add(wgNetInfoDTO);
}else {
List<WgNetInfoDTO> wgNetInfos=new ArrayList<>();
} else {
List<WgNetInfoDTO> wgNetInfos = new ArrayList<>();
wgNetInfos.add(wgNetInfoDTO);
wgWorkGroupMap.get(wgNetInfoDTO.getWgId()).setWgNetInfos(wgNetInfos);
}
});
}
if (null!=wgPayInfos && wgPayInfos.size()>0) {
if (null != wgPayInfos && wgPayInfos.size() > 0) {
wgPayInfos.forEach(wgPayInfo -> {
if (null!=wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos()) {
if (null != wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos()) {
wgWorkGroupMap.get(wgPayInfo.getWgId()).getWgPayInfos().add(wgPayInfo);
}else {
List<WgPayInfo> wgPayInfos1=new ArrayList<>();
} else {
List<WgPayInfo> wgPayInfos1 = new ArrayList<>();
wgPayInfos1.add(wgPayInfo);
wgWorkGroupMap.get(wgPayInfo.getWgId()).setWgPayInfos(wgPayInfos1);
}
});
}
//处理标准政策数据
if (null!=wgStandorpolicyInfos && wgStandorpolicyInfos.size()>0) {
if (null != wgStandorpolicyInfos && wgStandorpolicyInfos.size() > 0) {
wgStandorpolicyInfos.forEach(wgStandorpolicyInfo -> {
if (null!=wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos()) {
if (null != wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos()) {
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).getWgStandorpolicyInfos().add(wgStandorpolicyInfo);
}else {
List<WgStandorpolicyInfo> wgStandorpolicyInfos1=new ArrayList<>();
} else {
List<WgStandorpolicyInfo> wgStandorpolicyInfos1 = new ArrayList<>();
wgStandorpolicyInfos1.add(wgStandorpolicyInfo);
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setName(wgStandorpolicyInfo.getName());
wgWorkGroupMap.get(wgStandorpolicyInfo.getWgId()).setWgStandorpolicyInfos(wgStandorpolicyInfos1);
@@ -262,27 +262,27 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
});
}
//数据初步组装完成 开始进行树结构排序
List<Integer> nums=new ArrayList<>();
Map<Integer,List<WgWorkGroupShowDTO>> map=new HashMap<>();
List<Integer> nums = new ArrayList<>();
Map<Integer, List<WgWorkGroupShowDTO>> map = new HashMap<>();
wgWorkGroupShowDTOS.forEach(wgWorkGroupShowDTO -> {
if (null!=map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel()))){
if (null != map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel()))) {
map.get(Integer.valueOf(wgWorkGroupShowDTO.getLevel())).add(wgWorkGroupShowDTO);
}else {
} else {
List<WgWorkGroupShowDTO> middle = new ArrayList<>();
middle.add(wgWorkGroupShowDTO);
nums.add(Integer.valueOf(wgWorkGroupShowDTO.getLevel()));
map.put(Integer.valueOf(wgWorkGroupShowDTO.getLevel()),middle);
map.put(Integer.valueOf(wgWorkGroupShowDTO.getLevel()), middle);
}
});
//组装数据
for (int i=nums.size()-1;i>0;i--){
for (int i = nums.size() - 1; i > 0; i--) {
int finalI = i;
map.get(i-1).forEach(wgWorkGroupShowDTO -> {
map.get(i - 1).forEach(wgWorkGroupShowDTO -> {
map.get(finalI).forEach(wgWorkGroupShowDTO1 -> {
if (wgWorkGroupShowDTO.getId().equals(wgWorkGroupShowDTO1.getPid())){
if (null!=wgWorkGroupShowDTO.getChildren()) {
if (wgWorkGroupShowDTO.getId().equals(wgWorkGroupShowDTO1.getPid())) {
if (null != wgWorkGroupShowDTO.getChildren()) {
wgWorkGroupShowDTO.getChildren().add(wgWorkGroupShowDTO1);
}else {
} else {
List<WgWorkGroupShowDTO> children = new ArrayList<>();
children.add(wgWorkGroupShowDTO1);
wgWorkGroupShowDTO.setChildren(children);
@@ -322,104 +322,167 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
@Override
public ResponseMessage<Object> updateData(WgWorkGroupShowDTO wgWorkGroupShowDTO) {
List<WgWorkGroup> wgWorkGroupShowDTOS = wgWorkGroupDao.researchDownCheck(wgWorkGroupShowDTO.getId(), "1");
List<WgWorkGroup> wgWorkGroupShowDTOS = wgWorkGroupDao.researchDatasCheck(wgWorkGroupShowDTO.getId(), "0");
if (null != wgWorkGroupShowDTOS && wgWorkGroupShowDTOS.size() > 0) {
return Result.error("工作组处在流程中,无法修改");
} else {
WgWorkGroup wgWorkGroup = new WgWorkGroup();
BeanUtils.copyProperties(wgWorkGroupShowDTO, wgWorkGroup);
boolean flag = false;
flag = wgWorkGroupService.saveOrUpdate(wgWorkGroup);
if (null != wgWorkGroupShowDTO.getWgDepts() && wgWorkGroupShowDTO.getWgDepts().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgDeptsDel())){
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgDeptsDel().split(",")));
wgDeptService.removeByIds(strings);
}
List<WgDept> wgDepts=new ArrayList<>();
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
WgDept wgDept=new WgDept();
BeanUtils.copyProperties(wgDeptShow,wgDept);
if (null==wgDept.getWgId()){
wgDept.setWgId(wgWorkGroupShowDTO.getId());
}
wgDepts.add(wgDept);
});
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
}
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgMeetingInfosDel())){
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgMeetingInfosDel().split(",")));
wgDeptService.removeByIds(strings);
wgMeetingUserRelationService.removeByIds(strings);
}
List<String> removeMeet = new ArrayList<>();
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
if (null==wgMeetingInfo.getId()){
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
wgMeetingInfo.setWgId(wgWorkGroupShowDTO.getId());
}
wgMeetingInfo.getMeetingPeople().forEach(s -> {
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
wgMeetingUserRelation.setUserId(s);
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
wgMeetingUserRelations.add(wgMeetingUserRelation);
});
removeMeet.add(wgMeetingInfo.getId());
});
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
if (!removeMeet.isEmpty()) {
wgMeetingUserRelationService.removeByIds(removeMeet);
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
}
}
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgNetInfosDel())){
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgNetInfosDel().split(",")));
wgNetInfoService.removeByIds(strings);
}
List<WgNetInfo> wgNetInfos = new ArrayList<>();
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
WgNetInfo wgNetInfo = new WgNetInfo();
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
if (null==wgNetInfo.getWgId()){
wgNetInfo.setWgId(wgWorkGroupShowDTO.getId());
}
wgNetInfos.add(wgNetInfo);
});
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
}
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgPayInfosDel())){
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgPayInfosDel().split(",")));
wgPayInfoService.removeByIds(strings);
}
if (!wgWorkGroupShowDTO.getWgPayInfos().isEmpty()){
wgWorkGroupShowDTO.getWgPayInfos().forEach(wgPayInfo -> {
if (null==wgPayInfo.getWgId()){
wgPayInfo.setWgId(wgWorkGroupShowDTO.getId());
}
});
}
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
}
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
if (!wgWorkGroupShowDTO.getWgStandorpolicyInfos().isEmpty()){
wgWorkGroupShowDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
if (null==wgStandorpolicyInfo.getWgId()){
wgStandorpolicyInfo.setWgId(wgWorkGroupShowDTO.getId());
}
});
}
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
}
return dealAllDatas(wgWorkGroupShowDTO,"sys");
}
}
if (flag) {
return Result.success("更新成功");
} else {
return Result.error("无法更新");
@Override
public ResponseMessage<Object> updateDataByWk(WgWorkGroupShowDTO wgWorkGroupShowDTO) {
return dealAllDatas(wgWorkGroupShowDTO,"wk");
}
private ResponseMessage<Object> dealAllDatas(WgWorkGroupShowDTO wgWorkGroupShowDTO,String part) {
WgWorkGroup wgWorkGroup = new WgWorkGroup();
BeanUtils.copyProperties(wgWorkGroupShowDTO, wgWorkGroup);
boolean flag = false;
flag = wgWorkGroupService.saveOrUpdate(wgWorkGroup);
saveBathDept(wgWorkGroupShowDTO, flag,part);
saveBathMeetingUserRelations(wgWorkGroupShowDTO, flag,part);
saveBathNetInfo(wgWorkGroupShowDTO, flag,part);
saveBathPayInfo(wgWorkGroupShowDTO, flag,part);
saveBathStandardPolicyInfo(wgWorkGroupShowDTO, flag,part);
if (flag) {
return Result.success("更新成功");
} else {
return Result.error("无法更新");
}
}
private boolean saveBathPayInfo(WgWorkGroupShowDTO wgWorkGroupShowDTO, boolean flag,String part) {
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgPayInfosDel())) {
List<String> strings = new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgPayInfosDel().split(",")));
wgPayInfoService.removeByIds(strings);
}
if (!wgWorkGroupShowDTO.getWgPayInfos().isEmpty()) {
wgWorkGroupShowDTO.getWgPayInfos().forEach(wgPayInfo -> {
if (null == wgPayInfo.getWgId()) {
wgPayInfo.setWgId(wgWorkGroupShowDTO.getId());
}
});
}
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
}else if ("sys".equals(part)){
QueryWrapper<WgPayInfo> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("wg_id",wgWorkGroupShowDTO.getId());
wgPayInfoService.remove(queryWrapper);
}
return flag;
}
private boolean saveBathNetInfo(WgWorkGroupShowDTO wgWorkGroupShowDTO, boolean flag,String part) {
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgNetInfosDel())) {
List<String> strings = new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgNetInfosDel().split(",")));
wgNetInfoService.removeByIds(strings);
}
List<WgNetInfo> wgNetInfos = new ArrayList<>();
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
WgNetInfo wgNetInfo = new WgNetInfo();
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
if (null == wgNetInfo.getWgId()) {
wgNetInfo.setWgId(wgWorkGroupShowDTO.getId());
}
wgNetInfos.add(wgNetInfo);
});
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
}else if ("sys".equals(part)) {
QueryWrapper<WgNetInfo> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("wg_id",wgWorkGroupShowDTO.getId());
wgNetInfoService.remove(queryWrapper);
}
return flag;
}
private boolean saveBathMeetingUserRelations(WgWorkGroupShowDTO wgWorkGroupShowDTO, boolean flag,String part) {
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgMeetingInfosDel())) {
List<String> strings = new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgMeetingInfosDel().split(",")));
wgDeptService.removeByIds(strings);
wgMeetingUserRelationService.removeByIds(strings);
}
List<String> removeMeet = new ArrayList<>();
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
if (null == wgMeetingInfo.getId()) {
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
wgMeetingInfo.setWgId(wgWorkGroupShowDTO.getId());
}
wgMeetingInfo.getMeetingPeople().forEach(s -> {
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
wgMeetingUserRelation.setUserId(s);
wgMeetingUserRelation.setMeetingId(wgMeetingInfo.getId());
wgMeetingUserRelations.add(wgMeetingUserRelation);
});
removeMeet.add(wgMeetingInfo.getId());
});
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
if (!removeMeet.isEmpty()) {
wgMeetingUserRelationService.removeByIds(removeMeet);
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
}
}else if ("sys".equals(part)) {
QueryWrapper<WgMeetingInfo> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("wg_id",wgWorkGroupShowDTO.getId());
wgMeetingInfoService.remove(queryWrapper);
List<WgMeetingInfo> wgMeetingInfos=wgMeetingInfoService.list(queryWrapper);
List<String> removeIds=new ArrayList<>();
wgMeetingInfos.forEach(wgMeetingInfo -> {
removeIds.add(wgMeetingInfo.getId());
});
if (removeIds.size()>0) {
wgMeetingUserRelationService.removeByIds(removeIds);
}
}
return flag;
}
private boolean saveBathDept(WgWorkGroupShowDTO wgWorkGroupShowDTO, boolean flag,String part) {
if (null != wgWorkGroupShowDTO.getWgDepts() && wgWorkGroupShowDTO.getWgDepts().size() > 0) {
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgDeptsDel())) {
List<String> strings = new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgDeptsDel().split(",")));
wgDeptService.removeByIds(strings);
}
List<WgDept> wgDepts = new ArrayList<>();
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
WgDept wgDept = new WgDept();
BeanUtils.copyProperties(wgDeptShow, wgDept);
if (null == wgDept.getWgId()) {
wgDept.setWgId(wgWorkGroupShowDTO.getId());
}
wgDepts.add(wgDept);
});
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
}else if ("sys".equals(part)) {
QueryWrapper<WgDept> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("wg_id",wgWorkGroupShowDTO.getId());
wgDeptService.remove(queryWrapper);
}
return flag;
}
private boolean saveBathStandardPolicyInfo(WgWorkGroupShowDTO wgWorkGroupShowDTO, boolean flag,String part) {
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
if (!wgWorkGroupShowDTO.getWgStandorpolicyInfos().isEmpty()) {
wgWorkGroupShowDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
if (null == wgStandorpolicyInfo.getWgId()) {
wgStandorpolicyInfo.setWgId(wgWorkGroupShowDTO.getId());
}
});
}
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
}else if ("sys".equals(part)) {
QueryWrapper<WgStandorpolicyInfo> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("wg_id",wgWorkGroupShowDTO.getId());
wgStandorpolicyInfoService.remove(queryWrapper);
}
return flag;
}
@@ -2,9 +2,7 @@ package com.adc.da.utils.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import java.util.*;
/**
* @Description: 判断是否为日期格式
@@ -13,6 +11,36 @@ import java.util.TimeZone;
*/
public class DateUtil {
/**
* 取起始时间到结束时间 所有的时间
* @param startTime
* @param endTime
* @return
*/
public static List<String> getAllDate(String startTime, String endTime) {
List<String> list = new ArrayList<String>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
try {
cal.setTime(sdf.parse(startTime));
for (long d = cal.getTimeInMillis(); d <= sdf.parse(endTime).getTime(); d = get_D_Plaus_1(cal)) {
list.add(sdf.format(d));
}
} catch (ParseException e) {
System.out.println("date change err");
}
return list;
}
public static long get_D_Plaus_1(Calendar c) {
c.set(Calendar.DAY_OF_MONTH, c.get(Calendar.DAY_OF_MONTH) + 1);
return c.getTimeInMillis();
}
/***
* @Description: 判断多个日期是否都符合日期格式
* @Author: super_liu
@@ -655,6 +655,20 @@
</if>
</delete>
<delete id="deleteByStandIdAndFileTypes" parameterType="java.lang.String">
delete from SAR_STAND_ITEMS
where stand_id = #{standId}
<if test="fileType != null">
and file_type = #{fileType}
</if>
<if test="items != null ">
and items_num in
<foreach item="itemNum" collection="items" open="(" separator="," close=")" index="index">
#{itemNum}
</foreach>
</if>
</delete>
<delete id="deleteByIds" parameterType="java.lang.String">
delete from SAR_STAND_ITEMS
where id in
@@ -0,0 +1,23 @@
<?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.esMatingRelation.dao.EsMatingRelationDao">
<select id="getDatasOld" resultType="com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation">
select es_mating_relation.id , es_mating_relation.stand_id , es_mating_relation.stand_type,sar_standards_info.STAND_NAME as standName,
concat(sar_standards_info.STAND_SORT,concat(' ',concat(concat(sar_standards_info.STAND_NUMBER,concat('-',sar_standards_info.STAND_YEAR))))) as standNumber
from es_mating_relation
left join sar_standards_info on es_mating_relation.stand_id = sar_standards_info.ID
where es_mating_relation.es_id=#{id}
union all
select es_mating_relation.id , es_mating_relation.stand_id , es_mating_relation.stand_type,sar_bussioness_stand.STAND_NAME as standName,
sar_bussioness_stand.STAND_CODE as standNumber
from es_mating_relation
left join sar_bussioness_stand on es_mating_relation.stand_id = sar_bussioness_stand.ID
where es_mating_relation.es_id=#{id}
</select>
<select id="getDatas" resultType="com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation">
select es_mating_relation.id , es_mating_relation.stand_id
from es_mating_relation
where es_mating_relation.es_id=#{id}
</select>
</mapper>
@@ -18,11 +18,19 @@
draft_time,
release_time,
unit,
rqb_json as rqbJson,
ts_json as tsJson,
area,
qblb,
(select sar_bussioness_stand.STAND_NAME from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbName,
(select sar_bussioness_stand.STAND_CODE from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbCode,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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>
<result property="esName" column="es_name"></result>
@@ -34,6 +42,39 @@
<result property="draftTime" column="draft_time"></result>
<result property="releaseTime" column="release_time"></result>
<result property="unit" column="unit"></result>
<result property="area" column="area"></result>
<result property="rqbJson" column="rqb_json"></result>
<result property="tsJson" column="ts_json"></result>
<result property="esMatingRelations" column="es_mating_relations"/>
<result property="esStandRelations" column="es_stand_relations"/>
<result property="isRelate" column="is_relate"/>
<result property="isRelate" column="is_relate"/>
<result property="useLevel" column="use_level"/>
<result property="technologic" column="technologic"/>
<result property="bussSort" column="bussSort"/>
</resultMap>
<resultMap id="BaseInfoMapList" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
<id property="id" column="id"></id>
<result property="esName" column="es_name"></result>
<result property="planStatus" column="plan_status"></result>
<result property="reviseStatus" column="revise_status"></result>
<result property="drafter" column="drafter"></result>
<result property="resPerson" column="res_person"></result>
<result property="wgLeader" column="wg_leader"></result>
<result property="draftTime" column="draft_time"></result>
<result property="releaseTime" column="release_time"></result>
<result property="unit" column="unit"></result>
<result property="area" column="area"></result>
<result property="rqbJson" column="rqb_json"></result>
<result property="tsJson" column="ts_json"></result>
<result property="esMatingRelations" column="es_mating_relations"/>
<result property="esStandRelations" column="es_stand_relations"/>
<result property="isRelate" column="is_relate"/>
<result property="isRelate" column="is_relate"/>
<result property="useLevel" column="use_level"/>
<result property="technologic" column="technologic"/>
<result property="bussSort" column="buss_sort"/>
</resultMap>
<!-- 查询条件-->
<sql id="Conditions">
@@ -41,6 +82,9 @@
<if test="esName != null and esName != ''">
and es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
</if>
@@ -75,23 +119,179 @@
<include refid="Conditions"></include>
</select>
<!-- 查询所有-->
<select id="selectAll" resultMap="BaseInfoMap" >
select <include refid="BaseInfo"></include> from es_revise_plan
<select id="selectAll" resultMap="BaseInfoMapList" >
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
<where>
<if test="esName != null and esName != ''">
and es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and area = #{area}
</if>
<if test="planStatus != null and planStatus != ''">
and plan_status = #{planStatus}
</if>
<if test="reviseStatus != null and reviseStatus != ''">
and revise_status = #{reviseStatus}
</if>
<if test="drafter != null and drafter != ''">
and drafter = #{drafter}
</if>
<if test="resPerson != null and resPerson != ''">
and res_person = #{resPerson}
</if>
<if test="wgLeader != null and wgLeader != ''">
and wg_leader = #{wgLeader}
</if>
<if test="draftTime != null">
and DATE_FORMAT(draft_time,'%Y-%m-%d')=DATE_FORMAT(#{draftTime},'%Y-%m-%d')
</if>
<if test="releaseTime != null">
and DATE_FORMAT(release_time,'%Y-%m-%d')=DATE_FORMAT(#{releaseTime},'%Y-%m-%d')
</if>
<if test="unit != null and unit != ''">
and (select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) like concat('%',#{unit},'%')
</if>
</where>
<include refid="pages">
</include>
</select>
<!-- 多条件查询-->
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
<include refid="Conditions">
</include>
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMapList">
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
sar_bussioness_stand.stand_number as standNum,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
<where>
<if test="esName != null and esName != ''">
and es_revise_plan.es_name like concat('%',#{esName},'%')
</if>
<if test="area != null and area != ''">
and es_revise_plan.area = #{area}
</if>
<if test="planStatusList != null">
and es_revise_plan.plan_status in
<foreach collection="planStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="reviseStatus != null and reviseStatus != ''">
and es_revise_plan.revise_status = #{reviseStatus}
</if>
<if test="drafter != null and drafter != ''">
and es_revise_plan.drafter = #{drafter}
</if>
<if test="resPerson != null and resPerson != ''">
and es_revise_plan.res_person = #{resPerson}
</if>
<if test="wgLeader != null and wgLeader != ''">
and es_revise_plan.wg_leader = #{wgLeader}
</if>
<if test="draftTime != null">
and DATE_FORMAT(es_revise_plan.draft_time,'%Y-%m-%d')=DATE_FORMAT(#{draftTime},'%Y-%m-%d')
</if>
<if test="releaseTime != null">
and DATE_FORMAT(es_revise_plan.release_time,'%Y-%m-%d')=DATE_FORMAT(#{releaseTime},'%Y-%m-%d')
</if>
<if test="unit != null and unit != ''">
and (select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) like concat('%',#{unit},'%')
</if>
</where>
<include refid="pages">
</include>
</select>
<!-- 查询详情-->
<select id="selectOne" parameterType="java.lang.String" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
where id = #{id}
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
where es_revise_plan.id = #{id}
</select>
<!-- 修改-->
<update id="updateOne" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
@@ -127,6 +327,33 @@
<if test="unit != null and unit != ''">
unit = #{unit},
</if>
<if test="rqbJson != null and rqbJson != ''">
rqb_json=#{rqbJson},
</if>
<if test="tsJson != null and tsJson != ''">
ts_json=#{tsJson},
</if>
<if test="area != null and area != ''">
area=#{area},
</if>
<if test="esMatingRelations != null and esMatingRelations != ''">
es_mating_relations=#{esMatingRelations},
</if>
<if test="esStandRelations != null and esStandRelations != ''">
es_stand_relations=#{esStandRelations},
</if>
<if test="isRelate != null and isRelate != ''">
is_relate=#{isRelate},
</if>
<if test="useLevel != null and useLevel != ''">
use_level=#{useLevel},
</if>
<if test="technologic != null and technologic != ''">
technologic=#{technologic},
</if>
<if test="bussSort != null and bussSort != ''">
buss_sort=#{bussSort},
</if>
</set>
where id = #{id}
</update>
@@ -164,6 +391,33 @@
<if test="unit != null and unit != ''">
unit,
</if>
<if test="rqbJson != null and rqbJson != ''">
rqb_json,
</if>
<if test="tsJson != null and tsJson != ''">
ts_json,
</if>
<if test="area != null and area != ''">
area,
</if>
<if test="esMatingRelations != null and esMatingRelations != ''">
es_mating_relations,
</if>
<if test="esStandRelations != null and esStandRelations != ''">
es_stand_relations,
</if>
<if test="isRelate != null and isRelate != ''">
is_relate,
</if>
<if test="useLevel != null and useLevel != ''">
use_level,
</if>
<if test="technologic != null and technologic != ''">
technologic,
</if>
<if test="bussSort != null and bussSort != ''">
buss_sort,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -197,6 +451,33 @@
<if test="unit != null and unit != ''">
#{unit},
</if>
<if test="rqbJson != null and rqbJson != ''">
#{rqbJson},
</if>
<if test="tsJson != null and tsJson != ''">
#{tsJson},
</if>
<if test="area != null and area != ''">
#{area},
</if>
<if test="esMatingRelations != null and esMatingRelations != ''">
#{esMatingRelations},
</if>
<if test="esStandRelations != null and esStandRelations != ''">
#{esStandRelations},
</if>
<if test="isRelate != null and isRelate != ''">
#{isRelate},
</if>
<if test="useLevel != null and useLevel != ''">
#{useLevel},
</if>
<if test="technologic != null and technologic != ''">
#{technologic},
</if>
<if test="bussSort != null and bussSort != ''">
#{bussSort},
</if>
</trim>
</insert>
<!-- 删除-->
@@ -212,10 +493,40 @@
</delete>
<select id="selectPageByName" resultMap="BaseInfoMap">
select <include refid="BaseInfo"></include> from es_revise_plan
select
es_revise_plan.id,
es_revise_plan.es_name,
es_revise_plan.plan_status,
es_revise_plan.revise_status,
es_revise_plan.drafter,
es_revise_plan.res_person,
es_revise_plan.wg_leader,
es_revise_plan.draft_time,
es_revise_plan.release_time,
es_revise_plan.unit,
es_revise_plan.rqb_json ,
es_revise_plan.ts_json ,
es_revise_plan.area,
es_revise_plan.es_mating_relations,
es_revise_plan.es_stand_relations,
es_revise_plan.is_relate,
es_revise_plan.use_level,
es_revise_plan.technologic,
es_revise_plan.buss_sort,
sar_bussioness_stand.STAND_CODE as rqbName,
sar_bussioness_stand.STAND_SORT as standType,
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,use_level) ) as useLevelName,
(SELECT GROUP_CONCAT(sar_menu_standard.MENU_NAME) from sar_menu_standard WHERE find_in_set(sar_menu_standard.ID,es_revise_plan.ts_json) ) as tsJsonName,
(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
from es_revise_plan
left join sar_bussioness_stand on sar_bussioness_stand.ID = es_revise_plan.rqb_json
where es_name = #{esName}
<if test="id != null and id != '' ">
and id != #{id}
and es_revise_plan.id != #{id}
</if>
</select>
</mapper>
@@ -0,0 +1,26 @@
<?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.esStandRelation.dao.EsStandRelationDao">
<select id="getDatasOld" resultType="com.adc.da.slrs.esStandRelation.entity.EsStandRelation">
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,sar_standards_info.STAND_NAME as standName,
concat(sar_standards_info.STAND_SORT,concat(' ',concat(concat(sar_standards_info.STAND_NUMBER,concat('-',sar_standards_info.STAND_YEAR))))) as standNumber,
es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel,ts_dictype.DIC_TYPE_NAME as useLevelName
from es_stand_relation
left join sar_standards_info on es_stand_relation.stand_id = sar_standards_info.ID
left join ts_dictype on es_stand_relation.use_level = ts_dictype.DIC_TYPE_CODE
where es_stand_relation.es_id=#{id}
union all
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,sar_bussioness_stand.STAND_NAME as standName,
sar_bussioness_stand.STAND_CODE as standNumber,es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel
from es_stand_relation
left join sar_bussioness_stand on es_stand_relation.stand_id = sar_bussioness_stand.ID
where es_stand_relation.es_id=#{id}
</select>
<select id="getDatas" resultType="com.adc.da.slrs.esStandRelation.entity.EsStandRelation">
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel,ts_dictype.DIC_TYPE_NAME as useLevelName
from es_stand_relation
left join ts_dictype on es_stand_relation.use_level = ts_dictype.DIC_TYPE_CODE
where es_stand_relation.es_id=#{id}
</select>
</mapper>
@@ -55,7 +55,7 @@
<sql id="Group_Column_List_show" >
stand_status, replaced_stand_num, replace_stand_num,put_time,
issue_time, stand_en_name, stand_name, stand_code,standStatusShow,
issue_time, stand_en_name, stand_name, stand_code,stand_status,
SAR_BUSSIONESS_STAND.id
</sql>
@@ -170,6 +170,8 @@
<if test="standSort != null" >stand_sort,</if>
<if test="standYear != null" >stand_year,</if>
<if test="standNumber != null" >stand_number,</if>
<if test="reviseStatus != null" >REVISE_STATUS,</if>
<if test="standSn != null" >STAND_SN,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
@@ -190,6 +192,8 @@
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
<if test="reviseStatus != null" >#{reviseStatus, jdbcType=VARCHAR},</if>
<if test="standSn != null" >#{standSn, jdbcType=VARCHAR},</if>
</trim>
</insert>
@@ -322,6 +326,12 @@
</select>
<select id="getStandInfoByReviseStatus" resultMap="BaseResultMap" parameterType="java.lang.String">
select LPAD(MAX(DISTINCT CAST(STAND_SN AS decimal(9)))+1, 3, 0) AS newStandSn from sar_bussioness_stand
where revise_status = #{value} and valid_flag=0
</select>
<!-- 删除记录 -->
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from SAR_BUSSIONESS_STAND
@@ -35,6 +35,26 @@
WHERE parent_id=#{institutionId}
</select>
<select id="selectNextUsers" resultMap="TsUser">
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,t2.name as 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_institution.name as unit,ts_institution.id as unitId
from ts_user
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
WHERE 1=1
<if test="institutionIds != null and institutionIds.size()> 0 ">
and ts_user.INSTITUTION_ID in
<foreach collection="institutionIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by ts_institution.id
</select>
<!-- 只查询这个部门下的子一级人员-->
<select id="selectNextUser" resultMap="TsUser">
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
@@ -3,7 +3,7 @@
<mapper namespace="com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao">
<select id="selectLawsById" parameterType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto" 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,
SELECT distinct 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,dicstandSort.DIC_TYPE_NAME 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
@@ -47,7 +47,7 @@
UNION ALL
SELECT
a.ID,
distinct a.ID,
a.STAND_CODE AS standNumber,
a.STAND_NAME AS standName,
a.STAND_EN_NAME,
@@ -86,7 +86,7 @@
UNION ALL
SELECT
a.ID,
distinct a.ID,
a.LAWS_NUMBER AS standNumber,
a.LAWS_NAME AS standName,
a.LAWS_EN_NAME as STAND_EN_NAME,
@@ -6,7 +6,7 @@
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,ts_institution.name as department,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,
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag,sar_public_idea_all.cause
FROM sar_public_idea
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
left join ts_user on ts_user.USID = sar_public_idea_all.user_id
@@ -17,7 +17,8 @@
<select id="getAllDataByIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,sar_public_idea_all.old_text,sar_public_idea_all.wk_flag,
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,sar_public_idea_all.chapter_name as chapterName
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,sar_public_idea_all.chapter_name as chapterName,
sar_public_idea_all.cause
FROM sar_public_idea_all
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
@@ -33,11 +34,23 @@
</select>
<select id="getPublicAllIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
SELECT sar_public_idea_all.id,reason,ts_institution.name as deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state
SELECT sar_public_idea_all.id,reason,ts_institution.name as deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state,sar_public_idea_all.cause
FROM sar_public_idea_all
left join ts_user on ts_user.USID=sar_public_idea_all.user_id
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
WHERE sar_public_idea_all.idea_id = #{cid}
<if test="null!=type and type != ''">
and sar_public_idea_all.wk_flag ='1' and sar_public_idea_all.state in ('1','2')
</if>
ORDER BY part_code ASC
</select>
<select id="getPublicAllIdeaExport" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
SELECT sar_public_idea_all.id,reason,ts_institution.name as deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state,sar_public_idea_all.cause
FROM sar_public_idea_all
left join ts_user on ts_user.USID=sar_public_idea_all.user_id
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
WHERE cid = #{cid}
<if test="null==type or ''==type">
and sar_public_idea_all.wk_flag is null
</if>
@@ -146,7 +146,7 @@
AND library.project_group LIKE concat(concat('%',#{qu.projectGroup}),'%')
</if>
<if test="qu.projectStatus != null">
AND library.project_status LIKE concat(concat('%',#{qu.projectStatus}),'%')
AND library.project_status = #{qu.projectStatus}
</if>
<if test="qu.currentNode != null">
AND library.current_node LIKE concat(concat('%',#{qu.currentNode}),'%')
@@ -63,6 +63,29 @@
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
</select>
<select id="getSarStandUnqualifiedExcel" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
SELECT
c.*
FROM
(
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* ,sar_standards_info.STAND_TYPE as standType , concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as dutyEngineerName , ts_institution.name as responsibleUnit FROM
(sar_stand_unqualified,(SELECT @i:=0)j)
left join sar_standards_info on sar_stand_unqualified.STAND_ID = sar_standards_info.id
left join ts_user on ts_user.USID = sar_stand_unqualified.DUTY_ENGINEER
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
WHERE
sar_stand_unqualified.close_state = '1'
<if test="ids != null and ids.size()>0 ">
and sar_stand_unqualified.ID in
<foreach item="id" collection="ids" open="(" separator="," close=")" index="index">
#{id}
</foreach>
</if>
order by sar_stand_unqualified.ID,sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
)c
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
</select>
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
SELECT
@@ -17,6 +17,12 @@
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'
<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>
group by
PRODUCT_NAME,
sar_stand_project_library.project_group,
@@ -25,12 +31,6 @@
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},${pageSize}
@@ -46,6 +46,12 @@
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'
<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>
group by
PRODUCT_NAME,
sar_stand_project_library.project_group,
@@ -54,12 +60,6 @@
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>
@@ -258,7 +258,7 @@
</select>
<!-- 查询SAR_STAND_COMPARE_HIS列表 -->
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List" /> from
(select tmp_tb.* from
(select <include refid="Base_Column_List" /> from SAR_STAND_COMPARE_HIS
@@ -11,13 +11,11 @@
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
select wg_net_info.net_id,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id ,ts_institution.name as unit , ts_institution.id as unitId
select wg_net_info.net_id,wg_net_info.name as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id ,wg_net_info.unit as unit
from wg_net_info
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
left join wg_work_group on wg_work_group.id = wg_net_info.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}
where wg_work_group.type = #{type}
</select>
</mapper>
@@ -45,6 +45,10 @@
select * from wg_work_group where wg_work_group.pid = #{data} and wg_work_group.status = #{status}
</select>
<select id="researchDatasCheck" resultType="com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroup">
select * from wg_work_group where wg_work_group.id = #{data} and wg_work_group.status = #{status}
</select>
<select id="researchAllData" resultMap="WgWorkGroups">
select * from wg_work_group where wg_work_group.type =#{type}
</select>