Merge branch 'develop_master' into develop_sync_es
This commit is contained in:
+2
-2
@@ -123,11 +123,11 @@ public class ActSarItemsLawsEOService {
|
||||
String result = "";
|
||||
if(StringUtils.isNotBlank(standMap.get(entry.getKey()).toString())){
|
||||
Object value= new JSONTokener(standMap.get(entry.getKey()).toString()).nextValue();
|
||||
if(value instanceof org.json.JSONArray){
|
||||
if(value instanceof org.json.JSONArray && !",".contains(standMap.get(entry.getKey()).toString())){
|
||||
result = String.join(",",JSONObject.parseArray(value.toString(),String.class));
|
||||
}else {
|
||||
if(!value.equals("null")){
|
||||
result =value.toString();
|
||||
result =standMap.get(entry.getKey()).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,37 @@
|
||||
package com.adc.da.convert.mq;
|
||||
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.convert.common.AsposeOfficeConvertUtils;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Component
|
||||
public class CreateConvertMQService {
|
||||
|
||||
|
||||
@Value("${file.path}")
|
||||
private String localFilePath;
|
||||
|
||||
@Autowired
|
||||
private AmqpTemplate rabbitTemplate;
|
||||
|
||||
@Autowired
|
||||
private IAttFileEOService attFileEOService;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CreateConvertMQService.class);
|
||||
/**
|
||||
*
|
||||
* @param attFileEO 文件对象
|
||||
@@ -24,4 +42,40 @@ public class CreateConvertMQService {
|
||||
//发送消息队列
|
||||
// this.rabbitTemplate.convertAndSend("convert-exchange_SQ_GSAR", "convert-key_SQ_GSAR", attFileEO);
|
||||
}
|
||||
|
||||
|
||||
public AttFileVo convertWordFileToPdfFile(String attId){
|
||||
AttFileVo pdfFileVO = new AttFileVo();
|
||||
if(StringUtils.isNotBlank(attId)){
|
||||
try {
|
||||
AttFileEO sourceFileEO = attFileEOService.getFileInfo(attId);
|
||||
if(sourceFileEO!=null){
|
||||
String fileType = sourceFileEO.getFileSuffix();
|
||||
String path = localFilePath + sourceFileEO.getFilePath();
|
||||
String convertfilename = path +sourceFileEO.getFileName();
|
||||
String savePdfFileName = convertfilename.substring(0, convertfilename.lastIndexOf("."));
|
||||
String savePdfPath = savePdfFileName+".pdf";
|
||||
AsposeOfficeConvertUtils.convertOfficeFileToPDF(fileType,convertfilename,savePdfPath);
|
||||
File pdfFile = new File(savePdfPath);
|
||||
if(!savePdfPath.isEmpty() && pdfFile.length()>0){
|
||||
// 上传转换后文件
|
||||
pdfFileVO = attFileEOService.saveFileInfo(pdfFile);
|
||||
}else{
|
||||
pdfFileVO.setStandName("文件转换失败");
|
||||
logger.error("文件转换失败啦!!!");
|
||||
}
|
||||
}else{
|
||||
pdfFileVO.setStandName("当前文件ID未能找到对应的文件");
|
||||
logger.error("当前文件ID[{0}]未能找到对应文件 ",attId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
pdfFileVO.setStandName("文件转换过程中报错啦");
|
||||
logger.error("文件转换失败啦");
|
||||
}
|
||||
}else{
|
||||
pdfFileVO.setStandName("当前文件ID为空,不做处理");
|
||||
logger.error("当前文件ID为空,不做处理");
|
||||
}
|
||||
return pdfFileVO;
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -102,4 +102,23 @@ public class OtConvertController extends BaseController<OtConvert> {
|
||||
createConvertMQService.sendConvertMQ(attFileEO);
|
||||
return Result.success("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author zhangyanduan
|
||||
* @Description 根据ATTID将文件转换为PDF文件并归档返回ATTID
|
||||
* Date 2022年4月18日
|
||||
* @Param [fileId]
|
||||
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.att.entity.AttFileEO>
|
||||
**/
|
||||
@ApiOperation(value = "根据ATTID将文件转换为PDF文件并归档返回ATTID")
|
||||
@GetMapping("/convertFileToFileId")
|
||||
public ResponseMessage<AttFileVo> convertFileToFileId(String attId){
|
||||
AttFileVo attFileVo = createConvertMQService.convertWordFileToPdfFile(attId);
|
||||
return Result.success(attFileVo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,14 @@ package com.adc.da.login.rest;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.login.exception.TokenRuntimeException;
|
||||
import com.adc.da.login.util.IDMUtil;
|
||||
import com.adc.da.login.util.IpUtil;
|
||||
import com.adc.da.login.util.JwtUtils;
|
||||
import com.adc.da.sys.entity.LoginInfoEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.ILoginInfoEOService;
|
||||
import com.adc.da.sys.service.IUserEOService;
|
||||
import com.adc.da.util.Encodes;
|
||||
import com.adc.da.util.PasswordUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -17,10 +20,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
@@ -28,7 +28,9 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.net.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -45,6 +47,8 @@ public class LoginRestController {
|
||||
private IDMUtil idmUtil;
|
||||
@Autowired
|
||||
private JwtUtils jwtUtils;
|
||||
@Autowired
|
||||
private ILoginInfoEOService loginInfoEOService;
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
// @GetMapping(value = "/login")
|
||||
@@ -71,6 +75,11 @@ public class LoginRestController {
|
||||
String userStr = JSON.toJSONString(userEO);
|
||||
String userStr2 = URLEncoder.encode(userStr,"UTF-8");
|
||||
userStr = encoder.encode(userStr2.getBytes());
|
||||
|
||||
LoginInfoEO loginInfoEO=new LoginInfoEO();
|
||||
loginInfoEO.setUserId(userEO.getUsid());
|
||||
loginInfoEO.setLoginAddress(IpUtil.getIpAddr(request));
|
||||
loginInfoEOService.saveBean(loginInfoEO);
|
||||
return Result.success(userStr);
|
||||
} else {
|
||||
log.info("用户[{}]密码验证失败", username);
|
||||
@@ -78,11 +87,74 @@ public class LoginRestController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
// @GetMapping(value = "/login")
|
||||
@GetMapping(value = "/checkPage")
|
||||
@ResponseBody
|
||||
public ResponseMessage<String> checkPage(HttpServletRequest request,@RequestParam @NotNull(message = "请输入用户名") String username) throws UnsupportedEncodingException {
|
||||
username =new String(Encodes.decodeBase64(username), StandardCharsets.UTF_8);
|
||||
UserEO userEO = userService.getUserByLoginNameNotDeleted(username);
|
||||
if (null == userEO) {
|
||||
log.info("用户[{}]身份验证失败", username);
|
||||
return Result.error("r0011", "您输入的帐号不存在");
|
||||
}
|
||||
if(userEO.getDisableFlag()==1){
|
||||
log.info("用户[{}]身份验证失败", username);
|
||||
return Result.error("r0011", "您输入的帐号已禁用");
|
||||
}
|
||||
|
||||
String token = jwtUtils.generateToken(userEO.getUsid());
|
||||
// 加密重要信息
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
userEO.setToken(token);
|
||||
String userStr = JSON.toJSONString(userEO);
|
||||
String userStr2 = URLEncoder.encode(userStr,"UTF-8");
|
||||
userStr = encoder.encode(userStr2.getBytes());
|
||||
|
||||
LoginInfoEO loginInfoEO=new LoginInfoEO();
|
||||
loginInfoEO.setUserId(userEO.getUsid());
|
||||
loginInfoEO.setLoginAddress(IpUtil.getIpAddr(request));
|
||||
loginInfoEOService.saveBean(loginInfoEO);
|
||||
return Result.success(userStr);
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
// @GetMapping(value = "/login")
|
||||
@GetMapping(value = "/checkPageNoEncryption")
|
||||
@ResponseBody
|
||||
public ResponseMessage<String> checkPageNoEncryption(HttpServletRequest request,@RequestParam @NotNull(message = "请输入用户名") String username) throws UnsupportedEncodingException {
|
||||
UserEO userEO = userService.getUserByLoginNameNotDeleted(username);
|
||||
if (null == userEO) {
|
||||
log.info("用户[{}]身份验证失败", username);
|
||||
return Result.error("r0011", "您输入的帐号不存在");
|
||||
}
|
||||
if(userEO.getDisableFlag()==1){
|
||||
log.info("用户[{}]身份验证失败", username);
|
||||
return Result.error("r0011", "您输入的帐号已禁用");
|
||||
}
|
||||
|
||||
String token = jwtUtils.generateToken(userEO.getUsid());
|
||||
// 加密重要信息
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
userEO.setToken(token);
|
||||
String userStr = JSON.toJSONString(userEO);
|
||||
String userStr2 = URLEncoder.encode(userStr,"UTF-8");
|
||||
userStr = encoder.encode(userStr2.getBytes());
|
||||
|
||||
LoginInfoEO loginInfoEO=new LoginInfoEO();
|
||||
loginInfoEO.setUserId(userEO.getUsid());
|
||||
loginInfoEO.setLoginAddress(IpUtil.getIpAddr(request));
|
||||
loginInfoEOService.saveBean(loginInfoEO);
|
||||
return Result.success(userStr);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
@PostMapping(value = "/loginIdm")
|
||||
@ResponseBody
|
||||
public ResponseMessage<String> loginRest(String code) throws UnsupportedEncodingException {
|
||||
public ResponseMessage<String> loginRest(HttpServletRequest request,String code) throws UnsupportedEncodingException {
|
||||
String account = idmUtil.idmLogin(code);
|
||||
if(StringUtils.isBlank(account)){
|
||||
return Result.error("r0011", "用户不存在");
|
||||
@@ -108,6 +180,10 @@ public class LoginRestController {
|
||||
String userStr = JSON.toJSONString(userEO);
|
||||
String userStr2 = URLEncoder.encode(userStr,"UTF-8");
|
||||
userStr = encoder.encode(userStr2.getBytes());
|
||||
LoginInfoEO loginInfoEO=new LoginInfoEO();
|
||||
loginInfoEO.setUserId(userEO.getUsid());
|
||||
loginInfoEO.setLoginAddress(IpUtil.getIpAddr(request));
|
||||
loginInfoEOService.saveBean(loginInfoEO);
|
||||
return Result.success(userStr);
|
||||
}
|
||||
|
||||
@@ -128,5 +204,30 @@ public class LoginRestController {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getIpAddress() {
|
||||
try {
|
||||
Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkInterfaces();
|
||||
InetAddress ip = null;
|
||||
while (allNetInterfaces.hasMoreElements()) {
|
||||
NetworkInterface netInterface = (NetworkInterface) allNetInterfaces.nextElement();
|
||||
if (netInterface.isLoopback() || netInterface.isVirtual() || !netInterface.isUp()) {
|
||||
continue;
|
||||
} else {
|
||||
Enumeration<InetAddress> addresses = netInterface.getInetAddresses();
|
||||
while (addresses.hasMoreElements()) {
|
||||
ip = addresses.nextElement();
|
||||
if (ip != null && ip instanceof Inet4Address) {
|
||||
return ip.getHostAddress();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("IP地址获取失败" + e.toString());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,10 +25,20 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
InterceptorRegistration addInterceptor = registry.addInterceptor(getSecurityInterceptor());
|
||||
|
||||
/**
|
||||
* 登录三大金刚
|
||||
*/
|
||||
addInterceptor.excludePathPatterns("/api/loginIdm");
|
||||
/**
|
||||
* TODO 测试流程 开放 login 接口 正式环境 关闭
|
||||
*/
|
||||
addInterceptor.excludePathPatterns("/api/checkPage");
|
||||
addInterceptor.excludePathPatterns("/api/checkPageNoEncryption");
|
||||
|
||||
/**
|
||||
* AWG 接口
|
||||
*/
|
||||
addInterceptor.excludePathPatterns("/api/regulations/searchStandData");
|
||||
/**
|
||||
* TODO 测试流程 开放 login 接口 正式环境 关闭
|
||||
*/
|
||||
addInterceptor.excludePathPatterns("/api/login");
|
||||
addInterceptor.excludePathPatterns("/v2/api-docs");
|
||||
addInterceptor.excludePathPatterns("/favicon.ico");
|
||||
@@ -115,10 +125,13 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetBLawsSearchCenter");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/resetCBussStandSearchCenter");
|
||||
addInterceptor.excludePathPatterns("/api/search/resetSearchCenter/syncSearchCenterData");
|
||||
//线上转换文件并保存
|
||||
addInterceptor.excludePathPatterns("/api/OtConvert/convertFileToFileId");
|
||||
|
||||
addInterceptor.excludePathPatterns("/api/att/attFile/downloadFileForSarNew");
|
||||
addInterceptor.excludePathPatterns("/api/att/attFile/downloadFileForSarWaterMarkNew");
|
||||
addInterceptor.excludePathPatterns("/api/att/attFile/uploadNew");
|
||||
addInterceptor.excludePathPatterns("/api/sarLawsDetailedList/sar-laws-detailed-list/importData");
|
||||
|
||||
|
||||
//// //测试接口使用
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.adc.da.login.util;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* @program: LAWSSystem
|
||||
* @description: 获取ip的工具类
|
||||
* @author: duyunbao
|
||||
* @create: 2019-04-15 16:32
|
||||
*/
|
||||
public class IpUtil {
|
||||
public static String getIpAddr(HttpServletRequest request) {
|
||||
String ipAddress = null;
|
||||
try {
|
||||
ipAddress = request.getHeader("x-forwarded-for");
|
||||
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
ipAddress = request.getHeader("Proxy-Client-IP");
|
||||
}
|
||||
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
ipAddress = request.getHeader("WL-Proxy-Client-IP");
|
||||
}
|
||||
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
ipAddress = request.getRemoteAddr();
|
||||
if (ipAddress.equals("127.0.0.1")) {
|
||||
// 根据网卡取本机配置的IP
|
||||
InetAddress inet = null;
|
||||
try {
|
||||
inet = InetAddress.getLocalHost();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
ipAddress = inet.getHostAddress();
|
||||
}
|
||||
}
|
||||
// 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
|
||||
if (ipAddress != null && ipAddress.length() > 15) { // "***.***.***.***".length()
|
||||
// = 15
|
||||
if (ipAddress.indexOf(",") > 0) {
|
||||
ipAddress = ipAddress.substring(0, ipAddress.indexOf(","));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ipAddress="";
|
||||
}
|
||||
// ipAddress = this.getRequest().getRemoteAddr();
|
||||
|
||||
return ipAddress;
|
||||
}
|
||||
}
|
||||
+6
-2
@@ -84,9 +84,13 @@ public class SearchCenterController extends BaseController<Map<String, Object>>
|
||||
if (StringUtils.isAlphanumericSpace(searchInfoEO.getSelectIndex())) {
|
||||
if(elasticsearchService.isIndexExist(searchInfoEO.getSelectIndex())){
|
||||
if("fulltextserch".equals(searchInfoEO.getSelectIndex()) || "fulltextserch"== searchInfoEO.getSelectIndex()){
|
||||
Pattern pattern = Pattern.compile("^[0-9a-zA-Z\\.\\(\\(\\)\\)\\s\\/\\-]+$");
|
||||
Pattern pattern = Pattern.compile("^[0-9a-zA-Z\\.\\(\\(\\)\\)\\s\\/\\-\\:]+$");
|
||||
if (null != searchInfoEO.getSelectValue() && StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
||||
if (pattern.matcher(searchInfoEO.getSelectValue()).matches()) {
|
||||
result = searchCenterService.searchSarBykeyAndHighLightNumber(searchInfoEO);
|
||||
}else {
|
||||
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
||||
}
|
||||
} else {
|
||||
result = searchCenterService.searchSarBykeyAndHighLight(searchInfoEO);
|
||||
}
|
||||
|
||||
+195
-20
@@ -14,8 +14,10 @@ import org.apache.poi.ss.formula.functions.T;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
import org.elasticsearch.common.collect.HppcMaps;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.text.Text;
|
||||
import org.elasticsearch.index.query.BoolQueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
@@ -28,6 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.StringTerms;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
|
||||
import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder;
|
||||
import org.elasticsearch.search.fetch.subphase.highlight.HighlightField;
|
||||
import org.elasticsearch.search.sort.SortBuilders;
|
||||
import org.elasticsearch.search.sort.SortOrder;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -760,7 +763,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String[] standStr = {"content","standSort","standNumber","standYear","stand_name","standEnName","standNatureName",
|
||||
"textStatusName","isRelateAccessName","numbershow","standSystem","NYLXCLASS","CLLX"};
|
||||
String[] lawsStr = {"content","lawsType","lawsNumber","lawsName","lawsEnName","lawsNo","issueCompany","lawsTextState","lawsSyqy","lawsSycx","isRelateAccess","lawsYear","lawsNotisyncNum","lawsBulletin","lawsLabel","lawsRemark"};
|
||||
String[] bussstandStr = {"content","standSort","stand_code","standYear","stand_name","standEnName","nameshow","standstateshow","numbershow","textStatusBuss","NYLXCLASS","CLLX"};
|
||||
String[] bussstandStr = {"content","standSort","stand_code","standYear","stand_name","standEnName","nameshow","standstateshow","numbershow","textStatusBuss","textStatusBussName","NYLXCLASS","CLLX"};
|
||||
for (String field : fieldList) {
|
||||
// 关键字查询属性字段
|
||||
String keyWordField2 = field + "Name";
|
||||
@@ -1214,6 +1217,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
hiBuilder.field(highlightDate);
|
||||
hiBuilder.preTags("<span class='highlight-class'>");
|
||||
hiBuilder.postTags("</span>");
|
||||
updateIndex("fulltextserch",99999999,2);
|
||||
searchRequestBuilder = client.prepareSearch("fulltextserch")
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
.highlighter(hiBuilder)
|
||||
@@ -1287,17 +1291,70 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
@Override
|
||||
public List<Map<String, Object>> searchSarBykeyAndHighLightNumber(SeniorSearchInfoEO searchInfoEO) throws Exception {
|
||||
String real = searchInfoEO.getSelectValue();
|
||||
String[] values = searchInfoEO.getSelectValue().split(" ");
|
||||
boolean isReal = false;
|
||||
int num = searchInfoEO.getSelectValue().indexOf(" ");
|
||||
String value = "";
|
||||
String select = "";
|
||||
int i = 0;
|
||||
for (String v: values){
|
||||
if(i==0) {
|
||||
value = v;
|
||||
}else{
|
||||
select = select + " " + v;
|
||||
if (-1 != num) {
|
||||
value = searchInfoEO.getSelectValue().substring(0, num).trim().toUpperCase();
|
||||
select = searchInfoEO.getSelectValue().substring(num + 1).trim();
|
||||
real = value + " " + select;
|
||||
}else{
|
||||
String reg = ".*[0-9].*";
|
||||
if("-".contains(real)){
|
||||
String content = real.split("-")[0];
|
||||
value = content.replaceAll("[^(A-Za-z\\/)]", "");
|
||||
String[] valArr = value.split("\\/");
|
||||
if (valArr.length > 2) {
|
||||
value = valArr[0] + "/" + valArr[1];
|
||||
select = content.replaceAll("[^(0-9a-zA-Z\\.\\(\\(\\)\\)\\s\\/\\-\\:)]", "").replace(value,"");
|
||||
// 如果类别小写 转 大写
|
||||
Pattern pattern = Pattern.compile("^[a-zA-Z\\/]+$");
|
||||
if (pattern.matcher(value).matches()) {
|
||||
value = value.toUpperCase();
|
||||
}
|
||||
}else{
|
||||
value = valArr[0];
|
||||
select = real.replaceAll("[^(0-9a-zA-Z\\.\\(\\(\\)\\)\\s\\/\\-\\:)]", "").replace(value,"");
|
||||
// 如果类别小写 转 大写
|
||||
Pattern pattern = Pattern.compile("^[a-zA-Z\\/]+$");
|
||||
if (pattern.matcher(value).matches()) {
|
||||
value = value.toUpperCase();
|
||||
}
|
||||
}
|
||||
real = value + " " + select;
|
||||
}else if(real.matches(reg)){
|
||||
value = real.replaceAll("[^(A-Za-z\\/)]", "");
|
||||
String[] valArr = value.split("\\/");
|
||||
if (valArr.length > 2) {
|
||||
value = valArr[0] + "/" + valArr[1];
|
||||
String[] str = real.split(value);
|
||||
String sel = str[1].replaceAll("[^(0-9\\.\\(\\(\\)\\)\\s\\/\\-\\:)]", "");
|
||||
String[] valArr2 = sel.split("\\/");
|
||||
if(valArr2.length > 2){
|
||||
select = valArr2[0] + '/' + valArr[3] + valArr2[1];
|
||||
}else {
|
||||
select = sel;
|
||||
}
|
||||
}else{
|
||||
select = real.replaceAll("[^(0-9a-zA-Z\\.\\(\\(\\)\\)\\s\\/\\-\\:)]", "").replace(value,"");
|
||||
|
||||
// 如果类别小写 转 大写
|
||||
Pattern pattern = Pattern.compile("^[a-zA-Z\\/]+$");
|
||||
if (pattern.matcher(value).matches()) {
|
||||
value = value.toUpperCase();
|
||||
}
|
||||
}
|
||||
real = value + " " + select;
|
||||
}else {
|
||||
value = real;
|
||||
select = "";
|
||||
// 如果类别小写 转 大写
|
||||
Pattern pattern = Pattern.compile("^[a-zA-Z\\/]+$");
|
||||
if (pattern.matcher(value).matches()) {
|
||||
value = value.toUpperCase();
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
searchInfoEO.setSelectValue(select);
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
@@ -1306,14 +1363,97 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// 记录搜索记录到数据库中
|
||||
BoolQueryBuilder boolQueryShould = QueryBuilders.boolQuery();
|
||||
BoolQueryBuilder boolQueryMust = QueryBuilders.boolQuery();
|
||||
BoolQueryBuilder boolSelectValue = new BoolQueryBuilder();
|
||||
QueryBuilder multiQueryBuilder;
|
||||
multiQueryBuilder = QueryBuilders.multiMatchQuery(value,
|
||||
"title.keyword","textContent.keyword").minimumShouldMatch("100%").field("title.keyword",1f);
|
||||
boolQueryMust.must(multiQueryBuilder);
|
||||
boolQueryShould.should(QueryBuilders.wildcardQuery("title.keyword", "*"+searchInfoEO.getSelectValue()+"*").boost(10f))
|
||||
.should(QueryBuilders.wildcardQuery("textContent.keyword", "*"+searchInfoEO.getSelectValue()+"*"))
|
||||
.should(multiQueryBuilder);
|
||||
boolQueryBuilder.should(boolQueryShould);
|
||||
String[] selects = null;
|
||||
if (StringUtils.isNotBlank(select)) {
|
||||
//判断标准号是否企标SMTC ,标准列别 (),/,字母
|
||||
Pattern pattern = Pattern.compile("^[a-zA-Z\\/\\(\\)\\(\\)]+$");
|
||||
if (pattern.matcher(value).matches()) {
|
||||
Pattern patternbianhao = Pattern.compile("^[0-9a-zA-Z\\.\\(\\(\\)\\)\\-\\s]+$");
|
||||
if (patternbianhao.matcher(select).matches()) {
|
||||
//符合标准编号
|
||||
selects = select.replace(" ","-").split("-");
|
||||
} else {
|
||||
//不符合标准编号 使用wildcard查询 编号
|
||||
selects = select.replace(" ","-").split("-");
|
||||
}
|
||||
} else {
|
||||
//不符合标准类别,wildcard 查询整体 real 6/23 解决搜索DRE的问题
|
||||
selects = null;
|
||||
value = real;
|
||||
// isReal = true;
|
||||
}
|
||||
}else{
|
||||
//没有空格,存在问题,使用wildcard查询 real
|
||||
selects = null;
|
||||
value = real;
|
||||
// isReal = true;
|
||||
}
|
||||
|
||||
if (isReal){
|
||||
//查询real
|
||||
value = null;
|
||||
selects = null;
|
||||
}
|
||||
|
||||
if(null != value || null != selects){
|
||||
if (null != value && selects == null) {
|
||||
boolSelectValue.should(QueryBuilders.multiMatchQuery(value,
|
||||
"title"
|
||||
).minimumShouldMatch("100%"));
|
||||
boolSelectValue.should(QueryBuilders.multiMatchQuery(value,
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%"));
|
||||
boolSelectValue.should(QueryBuilders.multiMatchQuery(value,
|
||||
"textItems"
|
||||
).minimumShouldMatch("100%"));
|
||||
boolSelectValue.should(QueryBuilders.wildcardQuery("title.keyword","*"+value+"*"));
|
||||
// multiQueryBuilder = QueryBuilders.multiMatchQuery("*"+value+"*",
|
||||
// "title.keyword", "textContent", "issue_time").minimumShouldMatch("100%").field("title.keyword", 1000f).field("textContent.keyword", 0.0000000000000000000000000000000001f);
|
||||
//// boolQueryMust.must(multiQueryBuilder);
|
||||
// boolQueryShould.should(multiQueryBuilder);
|
||||
}
|
||||
// searchInfoEO.setSelectValue(searchInfoEO.getSelectValue().replace("-","\\-"));
|
||||
if (null != selects) {
|
||||
boolSelectValue
|
||||
.should(QueryBuilders.wildcardQuery("title.keyword", "*" + real + "*"))
|
||||
.should(QueryBuilders.wildcardQuery("textContent.keyword", "*" + real + "*"))
|
||||
.should(QueryBuilders.wildcardQuery("issue_time", "*" + real + "*"));
|
||||
// for (String se : selects) {
|
||||
// if (StringUtils.isNotBlank(se)) {
|
||||
// boolSelectValue
|
||||
// .should(QueryBuilders.wildcardQuery("title.keyword", "*" + real + "*").boost(10f))
|
||||
// .should(QueryBuilders.wildcardQuery("textContent.keyword", "*" + se + "*").boost(0.0000000000000000000000000000000001f))
|
||||
// .should(QueryBuilders.wildcardQuery("issue_time", "*" + se + "*"));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// if (isReal){
|
||||
// boolSelectValue.should(QueryBuilders.wildcardQuery("title.keyword", "*" + real + "*").boost(1000f))
|
||||
// .should(QueryBuilders.wildcardQuery("textContent.keyword", "*" + real + "*").boost(0.0000000000000000000000000000000001f))
|
||||
// .should(QueryBuilders.wildcardQuery("issue_time", "*" + real + "*"));
|
||||
// boolQueryShould.must(boolSelectValue);
|
||||
// }
|
||||
boolQueryShould.must(boolSelectValue);
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
boolQueryShould.must(queryBuilder);
|
||||
}
|
||||
//在结果中检索
|
||||
// boolQueryBuilder.must(multiQueryBuilder);
|
||||
HighlightBuilder hiBuilder=new HighlightBuilder();
|
||||
@@ -1325,13 +1465,17 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
hiBuilder.field(highlightDate);
|
||||
hiBuilder.preTags("<span class='highlight-class'>");
|
||||
hiBuilder.postTags("</span>");
|
||||
|
||||
updateIndex("fulltextserch",99999999,2);
|
||||
searchRequestBuilder = client.prepareSearch("fulltextserch")
|
||||
.addSort(SortBuilders.fieldSort("issue_time").unmappedType("String").order(SortOrder.DESC))
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
.highlighter(hiBuilder)
|
||||
.setFrom((searchInfoEO.getPage()-1)*searchInfoEO.getPageSize())
|
||||
.setSize(searchInfoEO.getPageSize());
|
||||
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
searchRequestBuilder.setQuery(boolQueryShould).setTrackTotalHits(true);
|
||||
searchRequestBuilder.addSort(SortBuilders.fieldSort("issue_time").unmappedType("String").order(SortOrder.DESC));
|
||||
// 获取查询到的结果
|
||||
SearchResponse response = searchRequestBuilder.get();
|
||||
for (SearchHit searchHit : response.getHits().getHits()) {
|
||||
@@ -1347,11 +1491,11 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
n_field += fragment;
|
||||
}
|
||||
//高亮标题覆盖原标题
|
||||
sourceAsMap.put("title.keyword",n_field);
|
||||
sourceAsMap.put("title",n_field);
|
||||
}
|
||||
|
||||
Map<String, HighlightField> highlightFieldsnameshowStr = searchHit.getHighlightFields();
|
||||
HighlightField fieldnameshowStr= highlightFieldsnameshowStr.get("textContent.keyword");
|
||||
HighlightField fieldnameshowStr= highlightFieldsnameshowStr.get("textContent");
|
||||
if(fieldnameshowStr!= null){
|
||||
Text[] fragments = fieldnameshowStr.fragments();
|
||||
String n_field = "";
|
||||
@@ -1359,14 +1503,45 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
n_field += fragment;
|
||||
}
|
||||
//高亮标题覆盖原标题
|
||||
sourceAsMap.put("textContent.keyword",n_field);
|
||||
sourceAsMap.put("textContent",n_field);
|
||||
}
|
||||
result.add(sourceAsMap);
|
||||
}
|
||||
searchInfoEO.getPager().setRowCount((int) response.getHits().getTotalHits().value);
|
||||
// result.sort((o1, o2) -> {
|
||||
// if (o1.get("issue_time") != null && o2.get("issue_time") != null) {
|
||||
// return o2.get("issue_time").toString().compareTo(o1.get("issue_time").toString());
|
||||
// } else {
|
||||
// return o1.get("issue_time") == null ? 1 : -1;
|
||||
// }
|
||||
// });
|
||||
return result;
|
||||
}
|
||||
|
||||
private String getValue(String real) {
|
||||
String value = real.replaceAll("[^(A-Za-z\\/)]", "");
|
||||
String[] valArr = value.split("\\/");
|
||||
if (valArr.length > 2) {
|
||||
value = valArr[0] + "/" + valArr[1];
|
||||
}else{
|
||||
value = valArr[0];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
//更新索引的max_result_window参数
|
||||
private boolean updateIndex(String indices, int from,int size) {
|
||||
int records = from * size + size;
|
||||
if (records <= 10000) return true;
|
||||
AcknowledgedResponse indexResponse = client.admin().indices()
|
||||
.prepareUpdateSettings(indices)
|
||||
.setSettings(Settings.builder()
|
||||
.put("highlight.max_analyzed_offset", records)
|
||||
.build()
|
||||
).get();
|
||||
return indexResponse.isAcknowledged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchByKey(CommonSearchInfoEO commonSearchInfoEO) {
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.adc.da.mq;
|
||||
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Component
|
||||
public class CreateUpdateMQService {
|
||||
@Autowired
|
||||
private AmqpTemplate rabbitTemplate;
|
||||
|
||||
/**
|
||||
* @Author yuezhihang
|
||||
* @Description 创建消息队列
|
||||
* Date 2018/8/24 13:59
|
||||
* @Param [convert, convertType]
|
||||
* @return int
|
||||
**/
|
||||
public void sendMQ(Hashtable<String,String> hashtable , List<String> remove , List<String> add){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("tableData",hashtable);
|
||||
map.put("remove",remove);
|
||||
map.put("add",add);
|
||||
//发送消息队列
|
||||
this.rabbitTemplate.convertAndSend("qd-update-exchange_SQ_GSAR_RELEASE", "qd-update-key_SQ_GSAR_RELEASE", map);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.adc.da.mq;
|
||||
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.service.ISarLawsAttrInfoService;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SendQdUpdateMQService {
|
||||
|
||||
@Autowired
|
||||
private ISarStandAttrInfoService iSarStandAttrInfoService;
|
||||
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoService;
|
||||
|
||||
@Autowired
|
||||
private ISarLawsStandInfoService lawsStandInfoService;
|
||||
|
||||
@Autowired
|
||||
private ISarLawsAttrInfoService lawsAttrInfoService;
|
||||
|
||||
|
||||
//查询数据字典
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEOService;
|
||||
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SendQdUpdateMQService.class);
|
||||
|
||||
|
||||
@RabbitListener(bindings = @QueueBinding(
|
||||
value = @Queue(value = "createQdUpdateMQ_SQ_GSAR_RELEASE", durable = "true"),
|
||||
exchange = @Exchange(value = "qd-update-exchange_SQ_GSAR_RELEASE", ignoreDeclarationExceptions = "true"),
|
||||
key = "qd-update-key_SQ_GSAR_RELEASE"))
|
||||
public void createMQ(Map<String, Object> bussMap, Message message, Channel channel) throws Exception {
|
||||
|
||||
//数据字典数据组装
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
Map<String, String> dict = new HashMap<>();
|
||||
List<Map<String, String>> arr = (List<Map<String, String>>) dicTypeEO.get("SYRZCLASS");
|
||||
arr.forEach(stringStringMap -> {
|
||||
dict.put(stringStringMap.get("label"), stringStringMap.get("value"));
|
||||
});
|
||||
|
||||
|
||||
//写修改逻辑
|
||||
Thread.sleep(5000);
|
||||
Hashtable<String, String> tool = (Hashtable<String, String>) bussMap.get("tableData");
|
||||
List<String> remove = (List<String>) bussMap.get("remove");
|
||||
List<String> add = (List<String>) bussMap.get("add");
|
||||
remove.forEach(s -> {
|
||||
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("ID", s);
|
||||
List<SarStandardsInfo> infos = sarStandardsInfoService.list(wrapper);
|
||||
if (null != infos && infos.size() > 0) {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(s);
|
||||
sarStandardsInfo.setIsRelateAccess("2");
|
||||
sarStandardsInfo.setModifyTime(new Date());
|
||||
Map<String, Object> bussAttrInfoMap = iSarStandAttrInfoService.getBussAttrInfo(s);
|
||||
|
||||
if (bussAttrInfoMap != null) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (null != tool.get(s)) {
|
||||
if (tool.get(s).contains(",")) {
|
||||
for (String e : tool.get(s).split(",")) {
|
||||
stringBuilder.append(dict.get(e)+",");
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append(dict.get(tool.get(s))+",");
|
||||
}
|
||||
bussAttrInfoMap.put("SYRZ", stringBuilder.toString().substring(0,stringBuilder.length()-1));
|
||||
} else {
|
||||
bussAttrInfoMap.put("SYRZ", "");
|
||||
}
|
||||
}
|
||||
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||
try {
|
||||
sarStandardsInfoService.updateSarStandardsInfo(sarStandardsInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
QueryWrapper<SarLawsStandInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.eq("ID", s);
|
||||
List<SarLawsStandInfo> infos1 = lawsStandInfoService.list(wrapper1);
|
||||
if (null != infos1 && infos1.size() > 0) {
|
||||
SarLawsStandInfo sarLawsStandInfo = new SarLawsStandInfo();
|
||||
sarLawsStandInfo.setId(s);
|
||||
sarLawsStandInfo.setIsRelateAccess("2");
|
||||
sarLawsStandInfo.setModifyTime(new Date());
|
||||
Map<String, Object> bussAttrInfoMap = lawsAttrInfoService.getBussAttrInfo(s);
|
||||
if (bussAttrInfoMap != null) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (null != tool.get(s)) {
|
||||
if (tool.get(s).contains(",")) {
|
||||
for (String e : tool.get(s).split(",")) {
|
||||
stringBuilder.append(dict.get(e)+",");
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append(dict.get(tool.get(s))+",");
|
||||
}
|
||||
} else {
|
||||
bussAttrInfoMap.put("SYRZ", "");
|
||||
}
|
||||
bussAttrInfoMap.put("SYRZ", stringBuilder.toString().substring(0,stringBuilder.length()-1));
|
||||
sarLawsStandInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||
try {
|
||||
lawsStandInfoService.updateSarLawsStandInfo(sarLawsStandInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
add.forEach(s -> {
|
||||
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("ID", s);
|
||||
List<SarStandardsInfo> infos = sarStandardsInfoService.list(wrapper);
|
||||
if (null != infos && infos.size() > 0) {
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(s);
|
||||
sarStandardsInfo.setIsRelateAccess("1");
|
||||
sarStandardsInfo.setModifyTime(new Date());
|
||||
Map<String, Object> bussAttrInfoMap = iSarStandAttrInfoService.getBussAttrInfo(s);
|
||||
if (bussAttrInfoMap != null) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (null != tool.get(s)) {
|
||||
if (tool.get(s).contains(",")) {
|
||||
for (String e : tool.get(s).split(",")) {
|
||||
stringBuilder.append(dict.get(e)+",");
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append(dict.get(tool.get(s))+",");
|
||||
}
|
||||
bussAttrInfoMap.put("SYRZ",stringBuilder.toString().substring(0,stringBuilder.length()-1) );
|
||||
} else {
|
||||
bussAttrInfoMap.put("SYRZ", "");
|
||||
}
|
||||
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||
try {
|
||||
sarStandardsInfoService.updateSarStandardsInfo(sarStandardsInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QueryWrapper<SarLawsStandInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper.eq("ID", s);
|
||||
List<SarLawsStandInfo> infos1 = lawsStandInfoService.list(wrapper1);
|
||||
if (null != infos1 && infos1.size() > 0) {
|
||||
SarLawsStandInfo sarLawsStandInfo = new SarLawsStandInfo();
|
||||
sarLawsStandInfo.setId(s);
|
||||
sarLawsStandInfo.setIsRelateAccess("1");
|
||||
sarLawsStandInfo.setModifyTime(new Date());
|
||||
Map<String, Object> bussAttrInfoMap = lawsAttrInfoService.getBussAttrInfo(s);
|
||||
if (bussAttrInfoMap != null) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (null != tool.get(s)) {
|
||||
if (tool.get(s).contains(",")) {
|
||||
for (String e : tool.get(s).split(",")) {
|
||||
stringBuilder.append(dict.get(e)+",");
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append(dict.get(tool.get(s))+",");
|
||||
}
|
||||
bussAttrInfoMap.put("SYRZ", stringBuilder.toString().substring(0,stringBuilder.length()-1));
|
||||
} else {
|
||||
bussAttrInfoMap.put("SYRZ", "");
|
||||
}
|
||||
sarLawsStandInfo.setSarStandAttrEOStr(JSONObject.toJSONString(bussAttrInfoMap));
|
||||
try {
|
||||
lawsStandInfoService.updateSarLawsStandInfo(sarLawsStandInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class IExportServiceImpl implements IExportService {
|
||||
tsUsers.forEach(tsUser -> {
|
||||
tsUserMap.put(tsUser.getAccount(),tsUser.getUname());
|
||||
});
|
||||
List<importExcelDTO> res= ExcelImportUtilByWk.readExcelpublic(importExcelDTO.class,file);
|
||||
List<importExcelDTO> res= ExcelImportUtilByWk.readExcelpublic(importExcelDTO.class,file,stringBuilder);
|
||||
if (null!=res) {
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i = 1;
|
||||
|
||||
+6
-3
@@ -34,7 +34,7 @@ public class ExcelImportUtilByWk {
|
||||
* @param file 上传的Excel文件
|
||||
* @return 读取结果列表,读取失败时返回null
|
||||
*/
|
||||
public static <T> List<T> readExcelpublic(Class<T> tClass,MultipartFile file) {
|
||||
public static <T> List<T> readExcelpublic(Class<T> tClass,MultipartFile file,StringBuilder stringBuilder) {
|
||||
|
||||
Workbook workbook = null;
|
||||
|
||||
@@ -105,14 +105,17 @@ public class ExcelImportUtilByWk {
|
||||
String value = convertCellValueToString(cell);
|
||||
Date date= DateUtils.stringToDate(TrainFormDate.dealWithTimeZoneyyyy(value,mapExcel.get(a).exportFormat()),mapExcel.get(a).exportFormat());
|
||||
// Date date= DateUtils.stringToDate(value,mapExcel.get(a).exportFormat());
|
||||
if (null==date){
|
||||
if (null!=value && !"".equals(value) && null==date){
|
||||
stringBuilder.append("第"+rowNum+"行第"+a+"列,日期格式存在问题请检查;");
|
||||
}
|
||||
if (null==date && null!=value){
|
||||
nums++;
|
||||
}
|
||||
map.get(a).set(o, date);
|
||||
}else {
|
||||
String value = convertCellValueToString(cell);
|
||||
if (StringUtils.isBlank(value)){
|
||||
nums++;
|
||||
value="";
|
||||
}
|
||||
map.get(a).set(o, value);
|
||||
}
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.adc.da.slrs.regulations.controller;
|
||||
|
||||
|
||||
import com.adc.da.Log.BusinessType;
|
||||
import com.adc.da.Log.EpcLog;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandByVppsReqDTO;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandResult;
|
||||
import com.adc.da.slrs.regulations.entity.StandMessageCodeEnum;
|
||||
import com.adc.da.slrs.regulations.entity.StandResult;
|
||||
import com.adc.da.slrs.regulations.service.IStandDataService;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.IOUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.utils.util.BussStandExportUtil;
|
||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--AWC查询标准")
|
||||
@RequestMapping("/api/regulations")
|
||||
public class StandDataController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandDataController.class);
|
||||
|
||||
@Autowired
|
||||
private IStandDataService iStandDataService;
|
||||
/**
|
||||
* 标准查询列表接口
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "|regulations|标准查询列表接口")
|
||||
@PostMapping("/searchStandData")
|
||||
public String searchStandData(@RequestBody SearchStandByVppsReqDTO searchStandContext){
|
||||
String resultJson = "";
|
||||
if(StringUtils.isEmpty(searchStandContext.getData().getUid())
|
||||
|| StringUtils.isEmpty(searchStandContext.getData().getUserName())
|
||||
|| StringUtils.isEmpty(searchStandContext.getData().getVppsCode())){
|
||||
return StandResult.toJson(StandResult.error(verifyObj(searchStandContext.getData().getUid()),
|
||||
StandMessageCodeEnum.SOURCE.getCode(), StandMessageCodeEnum.ERROR_PARAM.getCode(),
|
||||
"uid/username/vppsCode 为必填项"));
|
||||
}
|
||||
return iStandDataService.searchStandData(searchStandContext.getData());
|
||||
}
|
||||
|
||||
private String verifyObj(String str){
|
||||
return (str == null || str.equals("")) ? "" : str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.adc.da.slrs.regulations.dao;
|
||||
|
||||
import com.adc.da.slrs.regulations.entity.FileResult;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulations.entity.StandData;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.RecommendVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
*/
|
||||
@Repository
|
||||
public interface StandDataDao extends BaseMapper<StandData> {
|
||||
|
||||
List<StandData> searchStandData(SearchStandContext searchStandContext);
|
||||
|
||||
List<StandData> searchStandDataThree(SearchStandContext searchStandContext);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class FileResult {
|
||||
|
||||
@ApiModelProperty(value = "当前标准跳转到本系统内的链接地址")
|
||||
@JSONField(ordinal=1)
|
||||
private String documentName;
|
||||
|
||||
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
||||
@JSONField(ordinal=2)
|
||||
private String documentUrl;
|
||||
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class SearchStandByVppsReqDTO implements Serializable {
|
||||
|
||||
public SearchStandContext Data;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class SearchStandContext implements Serializable {
|
||||
|
||||
// 标准查询条件
|
||||
@ApiModelProperty(value = "唯一标识")
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "VPPS码")
|
||||
private String vppsCode;
|
||||
|
||||
@ApiModelProperty(value = "VPPS名称")
|
||||
private String vppsName;
|
||||
|
||||
//其他
|
||||
@ApiModelProperty(value = "物料号")
|
||||
private String itemId;
|
||||
|
||||
@ApiModelProperty(value = "零部件名称")
|
||||
private String objectName;
|
||||
|
||||
@ApiModelProperty(value = "版本")
|
||||
private String itemRevisionId;
|
||||
|
||||
@ApiModelProperty(value = "所有者")
|
||||
private String owningUser;
|
||||
|
||||
@ApiModelProperty(value = "发布状态")
|
||||
private String releaseStatus;
|
||||
|
||||
@ApiModelProperty(value = "功能分组码")
|
||||
private String vsgCode;
|
||||
|
||||
@ApiModelProperty(value = "功能分组名称")
|
||||
private String vsgName;
|
||||
|
||||
@ApiModelProperty(value = "功能位置码")
|
||||
private String fpcCode;
|
||||
|
||||
@ApiModelProperty(value = "功能位置名称")
|
||||
private String fpcName;
|
||||
|
||||
@ApiModelProperty(value = "项目编号")
|
||||
private String ItemNumber;
|
||||
|
||||
private String standCode;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class SearchStandResult {
|
||||
|
||||
@ApiModelProperty(value = "请求参数中的uid直接带入即可")
|
||||
@JSONField(ordinal=1)
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "SRMS 固定字符串 系统唯一标识")
|
||||
@JSONField(ordinal=2)
|
||||
private String source;
|
||||
|
||||
@ApiModelProperty(value = "返回状态 200 正常,-1 系统错误, -10 参数错误")
|
||||
@JSONField(ordinal=3)
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "正常返回空字符串,系统错误时返回系统异常信息及对应描述")
|
||||
@JSONField(ordinal=4)
|
||||
private String errorMessage;
|
||||
|
||||
@ApiModelProperty(value = "返回结果集合")
|
||||
@JSONField(ordinal=5)
|
||||
@JsonProperty(value = "List")
|
||||
private List<FileResult> List;
|
||||
|
||||
public SearchStandResult(String uid, String source, String status,String errorMessage) {
|
||||
this.uid = uid;
|
||||
this.source = source;
|
||||
this.status = status;
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public SearchStandResult(String uid, String source, String status,String errorMessage, List<FileResult> List) {
|
||||
this.uid = uid;
|
||||
this.source = source;
|
||||
this.status = status;
|
||||
this.errorMessage = errorMessage;
|
||||
this.List = List;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 12:05
|
||||
*/
|
||||
@Data
|
||||
public class StandData {
|
||||
|
||||
@ApiModelProperty(value = "标准ID")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
private String standType;
|
||||
|
||||
@ApiModelProperty(value = "标准分类")
|
||||
private String standSort;
|
||||
|
||||
@ApiModelProperty(value = "标准号")
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准分类+空格+标准号+空格+标准名称")
|
||||
private String documentName;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 14:58
|
||||
*/
|
||||
public enum StandMessageCodeEnum {
|
||||
SUCCESS("200"),
|
||||
ERROR_SYS("-1"),
|
||||
ERROR_PARAM("-10"),
|
||||
SOURCE("SRMS");
|
||||
|
||||
private String code;
|
||||
|
||||
private StandMessageCodeEnum(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.adc.da.slrs.regulations.entity;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: TODO
|
||||
* @author: super_liu
|
||||
* @date: 2022年04月25日 14:56
|
||||
*/
|
||||
public class StandResult {
|
||||
|
||||
public static SearchStandResult success(String uid, String source, String status,String errorMessage, List<FileResult> List) {
|
||||
return new SearchStandResult(uid,source,status,errorMessage,List);
|
||||
}
|
||||
|
||||
public static SearchStandResult error(String uid, String source, String status,String errorMessage) {
|
||||
return new SearchStandResult(uid,source,status,errorMessage);
|
||||
}
|
||||
|
||||
public static String toJson(SearchStandResult searchStandResult){
|
||||
GsonBuilder gsonBuilder = getGsonBuilder();
|
||||
Gson json = gsonBuilder.create();
|
||||
return json.toJson(searchStandResult);
|
||||
}
|
||||
|
||||
private static GsonBuilder getGsonBuilder() {
|
||||
return new GsonBuilder().disableHtmlEscaping().serializeNulls().enableComplexMapKeySerialization().serializeSpecialFloatingPointValues().setLenient();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adc.da.slrs.regulations.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.regulations.entity.FileResult;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandResult;
|
||||
import com.adc.da.slrs.regulations.entity.StandData;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
*/
|
||||
public interface IStandDataService extends IService<StandData> {
|
||||
|
||||
String searchStandData(SearchStandContext searchStandContext);
|
||||
}
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.adc.da.slrs.regulations.service.impl;
|
||||
|
||||
import com.adc.da.slrs.regulations.dao.StandDataDao;
|
||||
import com.adc.da.slrs.regulations.entity.*;
|
||||
import com.adc.da.slrs.regulations.service.IStandDataService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准信息表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @date: 2022年04月25日 14:56
|
||||
*/
|
||||
@Service
|
||||
public class StandDataServiceImpl extends ServiceImpl<StandDataDao, StandData> implements IStandDataService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(StandDataServiceImpl.class);
|
||||
|
||||
private String webUrl = "https://srms.foton.com.cn/#/loginStandDetails";
|
||||
|
||||
@Override
|
||||
public String searchStandData(SearchStandContext searchStandContext){
|
||||
List<FileResult> fileResultList = new ArrayList<>();
|
||||
try {
|
||||
List<StandData> standDataQuery = this.baseMapper.searchStandData(searchStandContext);
|
||||
if(!standDataQuery.isEmpty()){
|
||||
// 重组数据集合 只需documentName 及 documentUrl
|
||||
standDataQuery.stream().peek(standData -> {
|
||||
FileResult fileResult = new FileResult();
|
||||
fileResult.setDocumentName(verifyObj(standData.getStandSort(),standData.getStandNumber(),standData.getStandName()));
|
||||
fileResult.setDocumentUrl(webUrl+"?userName="+encode(searchStandContext.getUserName())+"&dataId="+standData.getStandId()+"&datatype="+standData.getStandType());
|
||||
fileResultList.add(fileResult);
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
}catch (Exception e){
|
||||
return StandResult.toJson(StandResult.error(searchStandContext.getUid(),
|
||||
StandMessageCodeEnum.SOURCE.getCode(),
|
||||
StandMessageCodeEnum.ERROR_SYS.getCode(),
|
||||
errFilter(e.getMessage())));
|
||||
}
|
||||
return StandResult.toJson(StandResult.success(searchStandContext.getUid(), StandMessageCodeEnum.SOURCE.getCode(), StandMessageCodeEnum.SUCCESS.getCode(),"",fileResultList));
|
||||
}
|
||||
|
||||
private String verifyObj(String str1,String str2,String str3){
|
||||
String res1 = (str1 == null || str1.equals("")) ? "" : (str1+" ");
|
||||
String res2 = (str2 == null || str2.equals("")) ? "" : (str2+" ");
|
||||
String res3 = (str3 == null || str3.equals("")) ? "" : str3;
|
||||
return res1 + res2 + res3;
|
||||
}
|
||||
private String encode(String str){
|
||||
String encodeStr = new BASE64Encoder().encodeBuffer(str.getBytes()).replaceAll("[\r\n]", "");;
|
||||
return encodeStr;
|
||||
}
|
||||
|
||||
private String errFilter(String str){
|
||||
if (str.contains("Cause")){
|
||||
str = str.split("Cause")[0].replaceAll("\\r\\n###","");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
+2
@@ -39,6 +39,8 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> getBussionessStandInfoPage(SarBussionessStandEOPage page);
|
||||
|
||||
List<SarBussionessStand> getBussionessStandInfoByNum(SarBussionessStandEOPage page);
|
||||
|
||||
List<SarBussionessStand> getBussionessStandInfoPageByRole(SarBussionessStandEOPage page);
|
||||
|
||||
//企标复审使用
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@ package com.adc.da.slrs.sarInstitution.controller;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsInstitution;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsUserVO;
|
||||
import com.adc.da.slrs.sarInstitution.service.ITsInstitutionService;
|
||||
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||
import com.adc.da.slrs.sarUser.entity.TsUser;
|
||||
@@ -105,7 +106,7 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
||||
|
||||
@ApiOperation("获得下一级的部门和人员")
|
||||
@GetMapping("/getNextById")
|
||||
public List<TsInstitution> getNextById(String ids){
|
||||
public List<TsUserVO> getNextById(String ids){
|
||||
return tsInstitutionService.getNextById(ids);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarInstitution.service;
|
||||
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsInstitution;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsUserVO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@@ -39,7 +40,7 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
|
||||
|
||||
public List<TsInstitution> getInstitutionIdToDept(String institutionIds,String userName);
|
||||
|
||||
public List<TsInstitution> getNextById(String ids);
|
||||
public List<TsUserVO> getNextById(String ids);
|
||||
|
||||
/**
|
||||
* 获得第一级的部门
|
||||
|
||||
+5
-5
@@ -226,19 +226,19 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
return tsInstitutions;
|
||||
}
|
||||
|
||||
public List<TsInstitution> getNextById(String ids){
|
||||
public List<TsUserVO> getNextById(String ids){
|
||||
List<String> strings=new ArrayList<>(Arrays.asList(ids.split(",")));
|
||||
List<TsUserVO> tsUsers=tsInstitutionDao.selectNextUserByIds(strings);
|
||||
List<TsInstitution> res=new ArrayList<>();
|
||||
List<TsUserVO> res=new ArrayList<>();
|
||||
if (null!=tsUsers && tsUsers.size()>0){
|
||||
Map<String,TsUserVO> middle=new HashMap<>();
|
||||
for (TsUserVO u:tsUsers) {
|
||||
middle.put(u.getId(),u);
|
||||
}
|
||||
strings.forEach(s -> {
|
||||
TsInstitution ins=new TsInstitution();
|
||||
BeanUtils.copyProperties(middle.get(s),ins);
|
||||
res.add(ins);
|
||||
// TsInstitution ins=new TsInstitution();
|
||||
// BeanUtils.copyProperties(middle.get(s),ins);
|
||||
res.add(middle.get(s));
|
||||
});
|
||||
}
|
||||
return res;
|
||||
|
||||
@@ -118,4 +118,7 @@ public class LawsDto {
|
||||
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
private String applyArctic;
|
||||
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
private String syrz;
|
||||
}
|
||||
|
||||
+4
@@ -55,4 +55,8 @@ public class SarLawsAttrDetailedList extends BaseEntity {
|
||||
@TableField(value = "zccssrq")
|
||||
private String zccssrq;
|
||||
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
@TableField(value = "syrz")
|
||||
private String syrz;
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -81,6 +82,9 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
}
|
||||
if ("INLAND".equals(lawsDto.getStandType())) lawsDto.setStandType("INLAND_STAND");
|
||||
if ("FOREIGN".equals(lawsDto.getStandType())) lawsDto.setStandType("FOREIGN_STAND");
|
||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSyrz())){
|
||||
lawsDto.setSyrz(sarLawsAttrDetailedLists.get(0).getSyrz());
|
||||
}
|
||||
}
|
||||
}
|
||||
//适用车型
|
||||
@@ -224,6 +228,7 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
.ssrq(timeDto1.getSsrq())
|
||||
.xcxssrq(timeDto1.getXcxssrqgj())
|
||||
.zccssrq(timeDto1.getZccssrqgj())
|
||||
.syrz(timeDto1.getSyrz())
|
||||
.build();
|
||||
attrDetailedLists.add(sarLawsAttrDetailedList);
|
||||
a++;
|
||||
|
||||
+4
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarLawsAttrInfo.service;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -16,4 +18,6 @@ public interface ISarLawsAttrInfoService extends IService<SarLawsAttrInfo> {
|
||||
String selectFieldValByLawsId(String field,String standId);
|
||||
|
||||
int updateLawsInfo(String standId,String field,String value);
|
||||
|
||||
Map<String, Object> getBussAttrInfo(String standId);
|
||||
}
|
||||
|
||||
+9
@@ -3,9 +3,12 @@ package com.adc.da.slrs.sarLawsAttrInfo.service.impl;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.entity.SarLawsAttrInfo;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.dao.SarLawsAttrInfoDao;
|
||||
import com.adc.da.slrs.sarLawsAttrInfo.service.ISarLawsAttrInfoService;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -26,4 +29,10 @@ public class SarLawsAttrInfoServiceImpl extends ServiceImpl<SarLawsAttrInfoDao,
|
||||
public int updateLawsInfo(String standId,String field,String value){
|
||||
return this.baseMapper.updateLawsInfo(standId,field,value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getBussAttrInfo(String standId) {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
|
||||
return this.baseMapper.selectLawsFieldAndData(fieldInfo,standId);
|
||||
}
|
||||
}
|
||||
|
||||
+54
@@ -4,12 +4,18 @@ package com.adc.da.slrs.sarLawsDetailedList.controller;
|
||||
import com.adc.da.att.controller.AttFileEOController;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.msgDynamicInfo.common.ReadExcel;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelExportUtilByWk;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.*;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.service.impl.SarLawsDetailedListServiceImpl;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -19,10 +25,17 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -170,4 +183,45 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
|
||||
return Result.success("200",null);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出模板")
|
||||
@GetMapping("/exportEmpty")
|
||||
public ResponseMessage exportEmpty( String exportName, HttpServletResponse response, HttpServletRequest request){
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
try {
|
||||
if(com.adc.da.util.utils.StringUtils.isEmpty(exportName) ||exportName.equals("null")){
|
||||
exportName="清单模板";
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx", request));
|
||||
response.setContentType("application/force-download");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
List<ExportEmptyModel> datas=new ArrayList<>();
|
||||
workbook = ExcelExportUtilByWk.exportWithData(exportParams,ExportEmptyModel.class,datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
} catch (IOException e) {
|
||||
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
return Result.success("200",null);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导入标准数据")
|
||||
@PostMapping("/importData")
|
||||
public ResponseMessage importData( @RequestParam(value = "file", required = false) MultipartFile file){
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
List<ExportEmptyModel> res=sarLawsDetailedListService.importData(file,stringBuilder);
|
||||
if (stringBuilder.toString().length()>0){
|
||||
return Result.error("-1","",stringBuilder.toString());
|
||||
}else {
|
||||
return Result.success(res);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -68,4 +68,8 @@ public class DetailedUpDto {
|
||||
@ApiModelProperty(value = "新车型实施时间")
|
||||
private String inforlist3;
|
||||
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
private String inforlist4;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ExportEmptyModel {
|
||||
|
||||
@Excel(name = "标准编号(必填)",orderNum = "0" ,width = 20.0)
|
||||
private String standNumber;
|
||||
|
||||
@Excel(name = "适用认证(必填,可多选)",orderNum = "1" ,width = 40.0)
|
||||
private String syrz;
|
||||
|
||||
@Excel(name = "标准实施日期",orderNum = "2" ,width = 20.0,exportFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date ssrq;
|
||||
|
||||
@Excel(name = "新车型实施日期",orderNum = "3" ,width = 20.0,exportFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date xcxssrqgj;
|
||||
|
||||
@Excel(name = "在产车实施日期",orderNum = "4" ,width = 20.0,exportFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date zccssrqgj;
|
||||
|
||||
private String id;
|
||||
|
||||
private String compareFlag;
|
||||
|
||||
private String syrzCode;
|
||||
//国内海外为1 企标为2 政策为3
|
||||
private String standName;
|
||||
private String standEnName;
|
||||
private String sycx;
|
||||
private String nylx;
|
||||
private String zrbm;
|
||||
private String sycpx;
|
||||
|
||||
|
||||
}
|
||||
@@ -23,4 +23,7 @@ public class TimeDto {
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private String xcxssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
private String syrz;
|
||||
|
||||
}
|
||||
|
||||
+7
-5
@@ -1,12 +1,10 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.service;
|
||||
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -31,6 +29,10 @@ public interface ISarLawsDetailedListService extends IService<SarLawsDetailedLis
|
||||
|
||||
SarLawsDetailedList selSarLawDetailById(@Param("id")String id);
|
||||
|
||||
public void standardToLaws(String countryArea,TimeDto timeDto);
|
||||
void standardToLaws(String countryArea,TimeDto timeDto);
|
||||
|
||||
|
||||
List<ExportEmptyModel> importData(MultipartFile file , StringBuilder stringBuilder);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+316
-32
@@ -1,25 +1,41 @@
|
||||
package com.adc.da.slrs.sarLawsDetailedList.service.impl;
|
||||
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.mq.CreateUpdateMQService;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.regulations.dao.StandDataDao;
|
||||
import com.adc.da.slrs.regulations.entity.SearchStandContext;
|
||||
import com.adc.da.slrs.regulations.entity.StandData;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.service.impl.SarLawsAttrDetailedListServiceImpl;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.dao.SarLawsDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.*;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.service.ISarLawsDetailedListService;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.dao.SarLawsStandInfoDao;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.impl.SarStandardsInfoServiceImpl;
|
||||
import com.adc.da.slrs.sarUser.entity.UpDTO;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarStandardsInfoEOService;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -27,11 +43,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.adc.da.login.util.UserUtils.getUserName;
|
||||
|
||||
@@ -64,6 +83,27 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
private IDicTypeEOService iDicTypeEOService;
|
||||
@Autowired
|
||||
private ITsUserService iTsUserService;
|
||||
@Autowired
|
||||
private SarStandardsInfoDao standardsInfoDao;
|
||||
@Autowired
|
||||
private SarBussionessStandDao sarBussionessStandDao;
|
||||
@Autowired
|
||||
private SarLawsStandInfoDao sarLawsStandInfoDao;
|
||||
@Autowired
|
||||
private ISarLawsStandInfoService sarLawsStandInfoService;
|
||||
@Autowired
|
||||
private ISarBussionessStandService sarBussionessStandService;
|
||||
//查询数据字典
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEOService;
|
||||
|
||||
//查询数据字典
|
||||
@Autowired
|
||||
private CreateUpdateMQService createUpdateMQService;
|
||||
//查询数据字典 searchStandDataThree
|
||||
@Autowired
|
||||
private StandDataDao standDateDao;
|
||||
|
||||
|
||||
@Override
|
||||
public String del(List<String> idList) {
|
||||
@@ -71,23 +111,25 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
for (String id : idList) {
|
||||
//把老的弄出来
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.eq("detailed_list_id",id);
|
||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists=sarLawsAttrDetailedListDao.selectList(wrapper2);
|
||||
List<String> list1=new ArrayList<>();
|
||||
if (sarLawsAttrDetailedLists.size()>0){
|
||||
sarLawsAttrDetailedLists.forEach(sarLawsAttrDetailedList -> {list1.add(sarLawsAttrDetailedList.getStandId());});
|
||||
wrapper2.eq("detailed_list_id", id);
|
||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(wrapper2);
|
||||
List<String> list1 = new ArrayList<>();
|
||||
if (sarLawsAttrDetailedLists.size() > 0) {
|
||||
sarLawsAttrDetailedLists.forEach(sarLawsAttrDetailedList -> {
|
||||
list1.add(sarLawsAttrDetailedList.getStandId());
|
||||
});
|
||||
}
|
||||
wrapper.eq("detailed_list_id", id);
|
||||
sarLawsAttrDetailedListDao.delete(wrapper);
|
||||
// -- eeee
|
||||
//移除之后 需要判定一下 还有没有其他地方引用
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.in("stand_id",list1);
|
||||
List<SarLawsAttrDetailedList> res=sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
wrapper1.in("stand_id", list1);
|
||||
List<SarLawsAttrDetailedList> res = sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
res.forEach(sarLawsAttrDetailedList -> {
|
||||
list1.remove(sarLawsAttrDetailedList.getStandId());
|
||||
});
|
||||
if (null!=list1 && list1.size()>0){
|
||||
if (null != list1 && list1.size() > 0) {
|
||||
sarStandardsInfoDao.updateISRELATEACCESSById("2", list1);
|
||||
}
|
||||
|
||||
@@ -318,10 +360,10 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
timeDto = null;
|
||||
}
|
||||
service.insertDetailedList(sarLawsDetailedList.getId(), timeDto);
|
||||
if (null!=timeDto) {
|
||||
List<SarStandardsInfo> sarStandardsInfos=new ArrayList<>();
|
||||
if (null != timeDto) {
|
||||
List<SarStandardsInfo> sarStandardsInfos = new ArrayList<>();
|
||||
timeDto.forEach(timeDto1 -> {
|
||||
SarStandardsInfo sarStandardsInfo=new SarStandardsInfo();
|
||||
SarStandardsInfo sarStandardsInfo = new SarStandardsInfo();
|
||||
sarStandardsInfo.setId(timeDto1.getStandId());
|
||||
sarStandardsInfo.setIsRelateAccess("1");
|
||||
sarStandardsInfos.add(sarStandardsInfo);
|
||||
@@ -354,7 +396,7 @@ 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 ( userIPage.getRecords().size()>0){
|
||||
if (userIPage.getRecords().size() > 0) {
|
||||
if ("1".equals(sortKey)) {
|
||||
Map<String, Object> map = iDicTypeEOService.getDicTypeListCode();
|
||||
List<SarLawsDetailedList> list = userIPage.getRecords();
|
||||
@@ -611,6 +653,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
String[] putTime = detailedUpDto.getInforlist1().split(";");
|
||||
String[] zcc = detailedUpDto.getInforlist2().split(";");
|
||||
String[] xcx = detailedUpDto.getInforlist3().split(";");
|
||||
String[] syrz = detailedUpDto.getInforlist4().split(";");
|
||||
for (int a = 0; a < id.length; a++) {
|
||||
TimeDto dto = new TimeDto();
|
||||
dto.setStandId(id[a]);
|
||||
@@ -619,16 +662,21 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
} else {
|
||||
dto.setSsrq(putTime[a]);
|
||||
}
|
||||
if (putTime.length <= a) {
|
||||
if (xcx.length <= a) {
|
||||
dto.setXcxssrqgj(null);
|
||||
} else {
|
||||
dto.setXcxssrqgj(xcx[a]);
|
||||
}
|
||||
if (putTime.length <= a) {
|
||||
if (zcc.length <= a) {
|
||||
dto.setZccssrqgj(null);
|
||||
} else {
|
||||
dto.setZccssrqgj(zcc[a]);
|
||||
}
|
||||
if (syrz.length <= a) {
|
||||
dto.setSyrz(null);
|
||||
} else {
|
||||
dto.setSyrz(syrz[a]);
|
||||
}
|
||||
timeDto.add(dto);
|
||||
}
|
||||
} else {
|
||||
@@ -637,34 +685,77 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
dto.setSsrq(detailedUpDto.getInforlist1());
|
||||
dto.setXcxssrqgj(detailedUpDto.getInforlist2());
|
||||
dto.setZccssrqgj(detailedUpDto.getInforlist3());
|
||||
dto.setSyrz(detailedUpDto.getInforlist4());
|
||||
timeDto.add(dto);
|
||||
}
|
||||
service.updateDetailedLaws(detailedUpDto.getId(), timeDto);
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("detailed_list_id",detailedUpDto.getId());
|
||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists=sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
List<String> list1=new ArrayList<>();
|
||||
if (sarLawsAttrDetailedLists.size()>0){
|
||||
sarLawsAttrDetailedLists.forEach(sarLawsAttrDetailedList -> {list1.add(sarLawsAttrDetailedList.getStandId());});
|
||||
wrapper.eq("detailed_list_id", detailedUpDto.getId());
|
||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
List<String> list1 = new ArrayList<>();
|
||||
List<String> list2 = new ArrayList<>();
|
||||
//避免出现数据丢失 处理一下适用认证信息
|
||||
Hashtable<String, String> hashtable = new Hashtable<>();
|
||||
if (sarLawsAttrDetailedLists.size() > 0) {
|
||||
sarLawsAttrDetailedLists.forEach(sarLawsAttrDetailedList -> {
|
||||
dealWithHashTableData(list1, list2, hashtable, sarLawsAttrDetailedList);
|
||||
});
|
||||
}
|
||||
list1.removeAll(Arrays.asList(detailedUpDto.getInforlist().split(",")));
|
||||
if (list1.size()>0){
|
||||
if (list1.size() > 0) {
|
||||
QueryWrapper<SarLawsAttrDetailedList> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.in("stand_id",list1);
|
||||
List<SarLawsAttrDetailedList> res=sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
wrapper1.in("stand_id", list1);
|
||||
List<SarLawsAttrDetailedList> res = sarLawsAttrDetailedListDao.selectList(wrapper);
|
||||
if (res.size() > 0) {
|
||||
res.forEach(sarLawsAttrDetailedList -> {
|
||||
dealWithHashTableData(list1, list2, hashtable, sarLawsAttrDetailedList);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
res.forEach(sarLawsAttrDetailedList -> {
|
||||
list1.remove(sarLawsAttrDetailedList.getStandId());
|
||||
});
|
||||
if (null!=list1 && list1.size()>0){
|
||||
sarStandardsInfoDao.updateISRELATEACCESSById("2", list1);
|
||||
}
|
||||
// //前面筛选出 移除认证清单
|
||||
// if (null!=list1 && list1.size()>0){
|
||||
// sarStandardsInfoDao.updateISRELATEACCESSById("1", list1);
|
||||
// }
|
||||
|
||||
}
|
||||
//更新标准是否纳入认证清单
|
||||
sarStandardsInfoDao.updateISRELATEACCESSById("1", Arrays.asList(detailedUpDto.getInforlist().split(",")));
|
||||
//剩下的数据是需要加入到认证清单的
|
||||
list2.removeAll(list1);
|
||||
//下面写消息队列了开始
|
||||
createUpdateMQService.sendMQ(hashtable, list1, list2);
|
||||
// //更新标准是否纳入认证清单
|
||||
// sarStandardsInfoDao.updateISRELATEACCESSById("1", Arrays.asList(detailedUpDto.getInforlist().split(",")));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void dealWithHashTableData(List<String> list1, List<String> list2, Hashtable<String, String> hashtable, SarLawsAttrDetailedList sarLawsAttrDetailedList) {
|
||||
list1.add(sarLawsAttrDetailedList.getStandId());
|
||||
list2.add(sarLawsAttrDetailedList.getStandId());
|
||||
if (null != hashtable.get(sarLawsAttrDetailedList.getStandId()) && !"-".equals(sarLawsAttrDetailedList.getSyrz())) {
|
||||
if (sarLawsAttrDetailedList.getSyrz().contains(",")) {
|
||||
List<String> middle = new ArrayList<>(Arrays.asList(sarLawsAttrDetailedList.getSyrz().split(",")));
|
||||
middle.forEach(s -> {
|
||||
String as = hashtable.get(sarLawsAttrDetailedList.getStandId());
|
||||
if (!as.contains(s)) {
|
||||
hashtable.put(sarLawsAttrDetailedList.getStandId(), as + "," + s);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
hashtable.put(sarLawsAttrDetailedList.getStandId(), hashtable.get(sarLawsAttrDetailedList.getStandId()) + "," + sarLawsAttrDetailedList.getSyrz());
|
||||
}
|
||||
} else {
|
||||
// 先确定hashTable中不为空
|
||||
if (!"-".equals(sarLawsAttrDetailedList.getSyrz())) {
|
||||
hashtable.put(sarLawsAttrDetailedList.getStandId(), sarLawsAttrDetailedList.getSyrz());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SarLawsDetailedList selSarLawDetailById(String id) {
|
||||
@@ -725,7 +816,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
sarLawsAttrDetailedListService.insertDetailedList(lawsDetailed.getId(), timeDtos);
|
||||
//更新标准是否纳入认证清单
|
||||
sarStandardsInfoDao.updateISRELATEACCESSById("1", Arrays.asList(timeDto.getStandId()) );
|
||||
sarStandardsInfoDao.updateISRELATEACCESSById("1", Arrays.asList(timeDto.getStandId()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -733,4 +824,197 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExportEmptyModel> importData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<ExportEmptyModel> res = ExcelImportUtilByWk.readExcelpublic(ExportEmptyModel.class, file, stringBuilder);
|
||||
//数据字典数据组装
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
Map<String, String> dict = new HashMap<>();
|
||||
List<Map<String, String>> arr = (List<Map<String, String>>) dicTypeEO.get("SYRZCLASS");
|
||||
arr.forEach(stringStringMap -> {
|
||||
dict.put(stringStringMap.get("label"), stringStringMap.get("value"));
|
||||
});
|
||||
if (null == res) {
|
||||
stringBuilder.append("请误导入空文件;");
|
||||
}
|
||||
//先校验是否存在一堆空数据
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
int i = 1;
|
||||
for (ExportEmptyModel e : res) {
|
||||
if (null == e.getStandNumber() || e.getStandNumber().isEmpty()) {
|
||||
stringBuilder.append("第" + i + "行标准编号不能为空;");
|
||||
}
|
||||
if (null == e.getSyrz() || e.getSyrz().isEmpty()) {
|
||||
stringBuilder.append("第" + i + "行适用认证不能为空;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
//数据校验 先做重复交验+再做是否存在校验
|
||||
if (null != res && "".equals(stringBuilder.toString())) {
|
||||
for (int i = 0; i < res.size(); i++) {
|
||||
for (int j = 0; j < res.size(); j++) {
|
||||
String a = res.get(i).getStandNumber().replaceAll(" ", "").replaceAll(" ", "");
|
||||
String b = res.get(j).getStandNumber().replaceAll(" ", "").replaceAll(" ", "");
|
||||
if (a.equals(b) && i < j && !"1".equals(res.get(j).getCompareFlag())) {
|
||||
stringBuilder.append("第" + (i + 1) + "行数据与第" + (j + 1) + "行数据重复;");
|
||||
res.get(j).setCompareFlag("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
//如果没有重复 那么错误提示标识应该为空 现在开始验证标准是否存在
|
||||
if ("".equals(stringBuilder.toString())) {
|
||||
int i = 1;
|
||||
for (ExportEmptyModel exportEmptyModel : res) {
|
||||
SearchStandContext searchStandContext = new SearchStandContext();
|
||||
searchStandContext.setStandCode(exportEmptyModel.getStandNumber());
|
||||
List<StandData> standData = standDateDao.searchStandDataThree(searchStandContext);
|
||||
if (null != standData && standData.size() > 0) {
|
||||
exportEmptyModel.setId(standData.get(0).getStandId());
|
||||
}
|
||||
if (null == exportEmptyModel.getId() || exportEmptyModel.getId().isEmpty()) {
|
||||
stringBuilder.append("第" + i + "行标准号不存在,请检查标准号是否正确;");
|
||||
}
|
||||
//验证完标准号 再来验证适用认证 写的是否合理 字典编码 SYRZCLASS0
|
||||
exportEmptyModel.setSyrz(exportEmptyModel.getSyrz().trim().replaceAll(",", ","));
|
||||
if (exportEmptyModel.getSyrz().contains(",") || null != dict.get(exportEmptyModel.getSyrz())) {
|
||||
if (exportEmptyModel.getSyrz().contains(",")) {
|
||||
StringBuilder syrz = new StringBuilder();
|
||||
StringBuilder sy = new StringBuilder();
|
||||
List<String> syrzs = new ArrayList<>(Arrays.asList(exportEmptyModel.getSyrz().split(",")));
|
||||
syrzs.forEach(s -> {
|
||||
if (null != dict.get(s.trim())) {
|
||||
syrz.append(dict.get(s.trim()) + ",");
|
||||
} else {
|
||||
syrz.append("-1" + ",");
|
||||
}
|
||||
sy.append(s.trim() + ",");
|
||||
});
|
||||
if (syrz.toString().contains("-1")) {
|
||||
stringBuilder.append("第" + i + "行适用认证填写错误,请检查;");
|
||||
} else {
|
||||
exportEmptyModel.setSyrzCode(syrz.toString().substring(0, syrz.toString().length() - 1));
|
||||
exportEmptyModel.setSyrz(sy.toString().substring(0, sy.toString().length() - 1));
|
||||
}
|
||||
} else {
|
||||
if (null != dict.get(exportEmptyModel.getSyrz())) {
|
||||
exportEmptyModel.setSyrzCode(dict.get(exportEmptyModel.getSyrz()));
|
||||
} else {
|
||||
stringBuilder.append("第" + i + "行适用认证填写错误,请检查;");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append("第" + i + "行适用认证填写错误,请检查;");
|
||||
}
|
||||
i++;
|
||||
|
||||
}
|
||||
}
|
||||
//查询数据并赋值
|
||||
if (stringBuilder.toString().length() <= 0) {
|
||||
dealWithData(res);
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public List<ExportEmptyModel> dealWithData(List<ExportEmptyModel> res) {
|
||||
List<ExportEmptyModel> result = new ArrayList<>();
|
||||
//判定是不是存在于国内海外标准中
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Map<String, ExportEmptyModel> map = new HashMap<>();
|
||||
res.forEach(exportEmptyModel -> {
|
||||
if (null != exportEmptyModel.getId() && !exportEmptyModel.getId().isEmpty()) {
|
||||
stringBuilder.append(exportEmptyModel.getId() + ",");
|
||||
map.put(exportEmptyModel.getId(), exportEmptyModel);
|
||||
}
|
||||
});
|
||||
String[] ids = stringBuilder.toString().substring(0, stringBuilder.toString().length() - 1).split(",");
|
||||
|
||||
|
||||
SarStandardsInfoEOPage infoEOPage = new SarStandardsInfoEOPage();
|
||||
infoEOPage.setUserId(LoginUserUtil.getUserId());
|
||||
infoEOPage.setPage(1);
|
||||
infoEOPage.setPageSize(map.keySet().size() + 1);
|
||||
infoEOPage.setValidFlag("0");
|
||||
infoEOPage.setIdlist(ids);
|
||||
List<SarStandardsInfo> infos = null;
|
||||
try {
|
||||
infos = sarStandardsInfoService.getSarStandardsInfoPageBak1(infoEOPage);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (null != infos && infos.size() > 0) {
|
||||
infos.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
||||
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
||||
result.add(model);
|
||||
});
|
||||
}
|
||||
|
||||
//判断是否在政策里
|
||||
SarBussionessStandEOPage page = new SarBussionessStandEOPage();
|
||||
page.setPage(1);
|
||||
page.setPageSize(map.keySet().size() + 1);
|
||||
page.setValidFlag("0");
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
page.setIdlist(ids);
|
||||
page.setIsKU("0");
|
||||
List<SarBussionessStand> sarBussionessStands = null;
|
||||
try {
|
||||
sarBussionessStands = sarBussionessStandService.getSarBussionStandPage(page);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (null != sarBussionessStands && sarBussionessStands.size() > 0) {
|
||||
sarBussionessStands.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getStandName());
|
||||
model.setStandEnName(sarStandardsInfo.getStandEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("nylx").toString():"");
|
||||
model.setSycpx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("sycpx").toString():"");
|
||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbm").toString():"");
|
||||
model.setSycx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("cllx").toString():"");
|
||||
result.add(model);
|
||||
});
|
||||
}
|
||||
|
||||
//判断是否在企标里 List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page);
|
||||
SarLawsStandInfoPage lawsStandInfoPage = new SarLawsStandInfoPage();
|
||||
lawsStandInfoPage.setPage(1);
|
||||
lawsStandInfoPage.setPageSize(map.keySet().size() + 1);
|
||||
lawsStandInfoPage.setValidFlag("0");
|
||||
lawsStandInfoPage.setIdlist(ids);
|
||||
lawsStandInfoPage.setUserId(LoginUserUtil.getUserId());
|
||||
List<SarLawsStandInfo> sarLawsStandInfos = null;
|
||||
try {
|
||||
sarLawsStandInfos = sarLawsStandInfoService.getSarStandardsInfoPageBak(lawsStandInfoPage);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (null != sarLawsStandInfos && sarLawsStandInfos.size() > 0) {
|
||||
sarLawsStandInfos.forEach(sarStandardsInfo -> {
|
||||
ExportEmptyModel model = map.get(sarStandardsInfo.getId());
|
||||
model.setStandName(sarStandardsInfo.getLawsName());
|
||||
model.setStandEnName(sarStandardsInfo.getLawsEnName());
|
||||
model.setNylx(null!=sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("nylxlaws").toString():"");
|
||||
//没有使用产品线
|
||||
// model.setSycpx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
||||
model.setZrbm(null!=sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString() ?sarStandardsInfo.getAttrInfoCaseMap().get("zrbmlaws").toString():"");
|
||||
model.setSycx(null!=sarStandardsInfo.getLawsSycx() ?sarStandardsInfo.getLawsSycx():"");
|
||||
result.add(model);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
public interface SarLawsStandInfoDao extends BaseMapper<SarLawsStandInfo> {
|
||||
|
||||
List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page);
|
||||
List<SarLawsStandInfo> getSarStandardsInfoByNum(SarLawsStandInfoPage page);
|
||||
|
||||
int getSarStandardsInfoCount(SarLawsStandInfoPage page);
|
||||
|
||||
|
||||
+3
@@ -279,4 +279,7 @@ public class SarLawsStandInfoPage extends BasePage {
|
||||
@TableField(exist = false)
|
||||
private String exportAllResult;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String syncParam;
|
||||
|
||||
}
|
||||
|
||||
+9
-3
@@ -373,9 +373,9 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
// if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
// row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
// }
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
@@ -598,6 +598,11 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
|
||||
for(SarLawsStandInfoExport row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
row.setLawsType(filterValue(dicMap,row.getLawsType()));
|
||||
row.setLawsSyqy(filterValue(dicMap,row.getLawsSyqy()));
|
||||
row.setLawsSycx(filterValue(dicMap,row.getLawsSycx()));
|
||||
row.setLawsLabel(filterValue(dicMap,row.getLawsLabel()));
|
||||
row.setLawsYear(filterValue(dicMap,row.getLawsYear()));
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
@@ -877,6 +882,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
fileIds += attrValue + ",";
|
||||
} else if (InitStandAttrUtil.multiTimeFieldList.contains(attrKey)) {
|
||||
multiTimeMap.put(attrKey,attrValue);
|
||||
attrValue = "'" + attrValue + "'";
|
||||
}
|
||||
// 不同类型存储数据需单独处理值
|
||||
if (InitStandAttrUtil.numFieldListLaws.contains(attrKey)) {
|
||||
|
||||
+1
@@ -321,6 +321,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
return Result.error("该父菜单不存在");
|
||||
}
|
||||
}
|
||||
TsResource.setValidFlag(0);
|
||||
dao.insert(TsResource);
|
||||
// 把新生成的子目录加入用户的权限的下----插入ts_role_resource表
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
|
||||
+4
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarStandAttrInfo.service;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -16,4 +18,6 @@ public interface ISarStandAttrInfoService extends IService<SarStandAttrInfo> {
|
||||
String selectFieldValByStandId(String field,String standId);
|
||||
|
||||
int updateStandInfo(String standId,String field,String value);
|
||||
|
||||
Map<String, Object> getBussAttrInfo(String standId);
|
||||
}
|
||||
|
||||
+9
@@ -3,10 +3,13 @@ package com.adc.da.slrs.sarStandAttrInfo.service.impl;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.service.ISarStandAttrInfoService;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -30,4 +33,10 @@ public class SarStandAttrInfoServiceImpl extends ServiceImpl<SarStandAttrInfoDao
|
||||
public int updateStandInfo(String standId,String field,String value){
|
||||
return dao.updateStandInfo(standId,field,value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map getBussAttrInfo(String standId){
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
return this.baseMapper.selectStandFieldAndData(fieldInfo,standId);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-2
@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -286,7 +287,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
|
||||
public List<Map<String, String>> getFileType(String standId){
|
||||
List<String> fileType = dao.getFileType(standId);
|
||||
Map<String, String> typeNameMap = InitStandAttrUtil.standInlandAttrFieldList.stream()
|
||||
List<SarStandAttrDetails> res=new ArrayList<>();
|
||||
res= (List<SarStandAttrDetails>) CollectionUtils.union(InitStandAttrUtil.standInlandAttrFieldList, InitStandAttrUtil.standForeignAttrFieldList);
|
||||
Map<String, String> typeNameMap = res.stream()
|
||||
.collect(Collectors.toMap(SarStandAttrDetails::getAttrField, SarStandAttrDetails::getAttrName));
|
||||
|
||||
List<Map<String, String>> collect = fileType.stream()
|
||||
@@ -299,7 +302,9 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
|
||||
public List<Map<String, String>> getFileTypeHG(String standId){
|
||||
List<String> fileType = dao.getFileTypeHG(standId);
|
||||
Map<String, String> typeNameMap = InitStandAttrUtil.standInlandAttrFieldList.stream()
|
||||
List<SarStandAttrDetails> res=new ArrayList<>();
|
||||
res= (List<SarStandAttrDetails>) CollectionUtils.union(InitStandAttrUtil.standInlandAttrFieldList, InitStandAttrUtil.standForeignAttrFieldList);
|
||||
Map<String, String> typeNameMap = res.stream()
|
||||
.collect(Collectors.toMap(SarStandAttrDetails::getAttrField, SarStandAttrDetails::getAttrName));
|
||||
|
||||
List<Map<String, String>> collect = fileType.stream()
|
||||
|
||||
+3
@@ -50,6 +50,9 @@ public class StandAttrInfoDto {
|
||||
//责任部门
|
||||
@ExcelProperty("责任部门")
|
||||
private String ZRBM;
|
||||
|
||||
// @ExcelProperty("文本状态")
|
||||
private String textStatus;
|
||||
// //关联模块--卡车VPPS编码
|
||||
// @ExcelProperty("关联模块--卡车VPPS编码")
|
||||
// private String KCCVPPSBM;
|
||||
|
||||
+2
-1
@@ -427,7 +427,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
//cars传回值为1时判断是从车型项目库中调取
|
||||
|
||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE","(select count(*) from sar_stand_unqualified" +
|
||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","TEXT_STATUS","STAND_TYPE","(select count(*) from sar_stand_unqualified " +
|
||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ","(select count(*) from sar_stand_unqualified" +
|
||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '2' ) as counts ",
|
||||
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
||||
@@ -458,6 +458,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
p.setStandName(s.getStandName());
|
||||
p.setStandType(s.getStandType());
|
||||
p.setStandEnName(s.getStandEnName());
|
||||
p.setTextStatus(s.getTextStatus());
|
||||
if (s.getUnCount()==0L && s.getCounts()>0L) {
|
||||
p.setUnCount(s.getUnCount());
|
||||
}else if (s.getUnCount() == 0L && s.getCounts()==0L){
|
||||
|
||||
+44
-2
@@ -8,6 +8,8 @@ import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IBusinessDeptIssueService;
|
||||
import com.adc.da.slrs.sarStandUnqualified.service.IProductDeptIssueService;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -15,10 +17,14 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/api/sarStandUnqualified/productDeptIssue")
|
||||
@Api(tags = "产品规划部重点问题项管控")
|
||||
public class ProductDeptIssueController {
|
||||
@@ -52,7 +58,7 @@ public class ProductDeptIssueController {
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("查询产品规划部重点问题")
|
||||
public ResponseMessage<IPage<ProductDeptIssue>> getProductDeptIssue(@RequestParam ProductDeptIssueVo wrapper){
|
||||
public ResponseMessage<IPage<ProductDeptIssue>> getProductDeptIssue(ProductDeptIssueVo wrapper){
|
||||
IPage<ProductDeptIssue> issueList = iProductDeptIssueService.getProductDeptIssue(wrapper);
|
||||
return Result.success(issueList);
|
||||
}
|
||||
@@ -64,7 +70,6 @@ public class ProductDeptIssueController {
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/closeProductIssue")
|
||||
@ApiOperation("关闭产品规划部重点问题")
|
||||
public ResponseMessage closeProductDeptIssue(String idList){
|
||||
@@ -73,4 +78,41 @@ public class ProductDeptIssueController {
|
||||
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@GetMapping("/exportIssue")
|
||||
@ApiOperation("导出产品规划部重点问题")
|
||||
public void exportIssue(HttpServletResponse response, ProductDeptIssueVo issue ) throws IOException {
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
|
||||
if(issue.getFileName()==null || issue.getFileName()==""){
|
||||
issue.setFileName("事业部重点问题信息");
|
||||
}
|
||||
String fileName = URLEncoder.encode(issue.getFileName(), "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
/**
|
||||
* 重写了get方法,无法使用net.sf.json.JSONObject转换对象
|
||||
*/
|
||||
// net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(issue.getExportContent());
|
||||
// BusinessDeptIssueVo businessDeptIssueVo = (BusinessDeptIssueVo) net.sf.json.JSONObject.toBean(jsonObject, BusinessDeptIssueVo.class);
|
||||
|
||||
JSONObject jsonObject = JSONObject.parseObject(issue.getExportContent());
|
||||
ProductDeptIssueVo businessDeptIssueVo = JSONObject.toJavaObject(jsonObject, ProductDeptIssueVo.class);
|
||||
List<ProductDeptIssue> page = iProductDeptIssueService.getExportData(businessDeptIssueVo,businessDeptIssueVo.getIdList());
|
||||
|
||||
|
||||
// 这里需要设置不关闭流
|
||||
EasyExcel.write(response.getOutputStream(), BusinessDeptIssue.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(page);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// 重置response
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.getWriter().println(JSONObject.toJSONString(Result.error()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -15,5 +15,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface BusinessDeptIssueDao extends BaseMapper<BusinessDeptIssue> {
|
||||
|
||||
IPage<BusinessDeptIssue> findPage(IPage<BusinessDeptIssue> page, @Param(Constants.WRAPPER) QueryWrapper<BusinessDeptIssue> queryWrapper);
|
||||
IPage<BusinessDeptIssue> findPage(IPage<BusinessDeptIssue> page, @Param(Constants.WRAPPER) QueryWrapper<BusinessDeptIssue> queryWrapper
|
||||
,@Param("dept") String dept);
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -9,7 +10,10 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProductDeptIssueDao extends BaseMapper<ProductDeptIssue> {
|
||||
|
||||
public IPage<ProductDeptIssue> findPage(IPage<ProductDeptIssue> page,@Param(Constants.WRAPPER) QueryWrapper<ProductDeptIssue> wrapper);
|
||||
public IPage<ProductDeptIssue> findPage(IPage<ProductDeptIssue> page, @Param("ew") ProductDeptIssueVo objVo);
|
||||
public List<ProductDeptIssue> findExportData(@Param("ew") ProductDeptIssueVo objVo, @Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
+69
-60
@@ -19,82 +19,91 @@ import java.util.Date;
|
||||
public class BusinessDeptIssue {
|
||||
|
||||
|
||||
@ExcelIgnore
|
||||
@TableId
|
||||
private String id;
|
||||
@ExcelIgnore
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
@ExcelIgnore
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
|
||||
@ExcelProperty("标准号")
|
||||
@TableField(exist = false)
|
||||
private String lawNumber;
|
||||
@ExcelProperty("标准号")
|
||||
@TableField(exist = false)
|
||||
private String lawNumber;
|
||||
|
||||
@ExcelProperty("标准名称")
|
||||
@TableField(exist = false)
|
||||
private String lawName;
|
||||
@ExcelProperty("标准名称")
|
||||
@TableField(exist = false)
|
||||
private String lawName;
|
||||
|
||||
@ExcelProperty("产品类别")
|
||||
@TableField("product_type")
|
||||
private String productType;
|
||||
@ExcelProperty("产品类别")
|
||||
@TableField("product_type")
|
||||
private String productType;
|
||||
|
||||
@ExcelProperty("实施实践")
|
||||
@TableField("impl_time")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
private Date implTime;
|
||||
@ExcelProperty("实施实践")
|
||||
@TableField("impl_time")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
private Date implTime;
|
||||
|
||||
@ExcelProperty("实施要求")
|
||||
@TableField("impl_require")
|
||||
private String implRequire;
|
||||
@ExcelProperty("实施要求")
|
||||
@TableField("impl_require")
|
||||
private String implRequire;
|
||||
|
||||
@ExcelProperty("资源符合状态")
|
||||
@TableField("conform_situation")
|
||||
private String conformSituation;
|
||||
@ExcelProperty("资源符合状态")
|
||||
@TableField("conform_situation")
|
||||
private String conformSituation;
|
||||
|
||||
@ExcelProperty("开发情况")
|
||||
@TableField("dev_scheme")
|
||||
private String devScheme;
|
||||
@ExcelProperty("开发情况")
|
||||
@TableField("dev_scheme")
|
||||
private String devScheme;
|
||||
|
||||
@ExcelProperty("sop时间")
|
||||
@TableField("sop_time")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
private Date sopTime;
|
||||
@ExcelProperty("sop时间")
|
||||
@TableField("sop_time")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
private Date sopTime;
|
||||
|
||||
@ExcelProperty("完成情况")
|
||||
@TableField("complete_situation")
|
||||
private String completeSituation;
|
||||
@ExcelProperty("完成情况")
|
||||
@TableField("complete_situation")
|
||||
private String completeSituation;
|
||||
|
||||
@ExcelProperty("超出sop时限后计划")
|
||||
@TableField("timeout_situation")
|
||||
private String timeoutSituation;
|
||||
@ExcelProperty("超出sop时限后计划")
|
||||
@TableField("timeout_situation")
|
||||
private String timeoutSituation;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
@ExcelIgnore
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@ExcelProperty("责任部门")
|
||||
@TableField("response_dept")
|
||||
private String responseDept;
|
||||
@ExcelProperty("责任部门")
|
||||
@TableField("response_dept")
|
||||
private String responseDept;
|
||||
|
||||
@ExcelProperty("责任人")
|
||||
@TableField("response_people")
|
||||
private String responsePeople;
|
||||
@ExcelProperty("责任人")
|
||||
@TableField("response_people")
|
||||
private String responsePeople;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("is_close")
|
||||
private String isClose;
|
||||
@ExcelIgnore
|
||||
@TableField("is_close")
|
||||
private String isClose;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("is_risk")
|
||||
private String isRisk;
|
||||
@ExcelIgnore
|
||||
@TableField("is_risk")
|
||||
private String isRisk;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String responseInsId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String responseInsName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String responseUserName;
|
||||
}
|
||||
|
||||
+47
-38
@@ -15,60 +15,69 @@ import java.util.Date;
|
||||
@TableName("product_dept_issue")
|
||||
public class ProductDeptIssue {
|
||||
|
||||
@TableId
|
||||
private String id;
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
@TableField("law_id")
|
||||
private String lawId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String lawsNumber;
|
||||
@TableField(exist = false)
|
||||
private String lawsNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String lawsName;
|
||||
@TableField(exist = false)
|
||||
private String lawsName;
|
||||
|
||||
@TableField("product_business")
|
||||
private String productBusiness;
|
||||
@TableField("product_business")
|
||||
private String productBusiness;
|
||||
|
||||
@TableField("platform")
|
||||
private String platform;
|
||||
@TableField("platform")
|
||||
private String platform;
|
||||
|
||||
@TableField("poj_name")
|
||||
private String pojName;
|
||||
@TableField("poj_name")
|
||||
private String pojName;
|
||||
|
||||
@TableField("poj_description")
|
||||
private String pojDescription;
|
||||
@TableField("poj_description")
|
||||
private String pojDescription;
|
||||
|
||||
@TableField("current_node")
|
||||
private String currentNode;
|
||||
@TableField("current_node")
|
||||
private String currentNode;
|
||||
|
||||
@TableField("conceptual_state")
|
||||
private String conceptualState;
|
||||
@TableField("conceptual_state")
|
||||
private String conceptualState;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
@TableField("scheduled_issuance_time")
|
||||
private Date scheduledIssuanceTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-mm-dd")
|
||||
@TableField("scheduled_issuance_time")
|
||||
private Date scheduledIssuanceTime;
|
||||
|
||||
@TableField("revised_plan")
|
||||
private String revisedPlan;
|
||||
@TableField("revised_plan")
|
||||
private String revisedPlan;
|
||||
|
||||
@TableField("explanation")
|
||||
private String explanation;
|
||||
@TableField("explanation")
|
||||
private String explanation;
|
||||
|
||||
@TableField("response_dept")
|
||||
private String responseDept;
|
||||
@TableField("response_dept")
|
||||
private String responseDept;
|
||||
|
||||
@TableLogic(value = "0",delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@TableField("is_close")
|
||||
private String isClose;
|
||||
@TableField("is_close")
|
||||
private String isClose;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
@TableField(exist = false)
|
||||
private Integer page;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String responseInsId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String responseInsName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String responseUserName;
|
||||
|
||||
}
|
||||
|
||||
+22
@@ -1,4 +1,26 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ProductDeptIssueVo extends ProductDeptIssue {
|
||||
|
||||
private String numberOrName;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String idList;
|
||||
|
||||
private String exportContent;
|
||||
|
||||
public List<String> getIdList(){
|
||||
if (this.idList!=null){
|
||||
return Arrays.asList(this.idList.split(","));
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -132,12 +132,12 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@TableField("RESPONSIBLE_UNIT")
|
||||
private String responsibleUnit;
|
||||
|
||||
@ExcelProperty("质量工程师")
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "质量工程师")
|
||||
@TableField("QA_ENGINEER")
|
||||
private String qaEngineer;
|
||||
|
||||
@ExcelProperty("认证工程师")
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "认证工程师")
|
||||
@TableField("AUTH_ENGINEER")
|
||||
private String authEngineer;
|
||||
|
||||
+2
@@ -16,6 +16,8 @@ public interface IProductDeptIssueService extends IService<ProductDeptIssue> {
|
||||
|
||||
public IPage<ProductDeptIssue> getProductDeptIssue(ProductDeptIssueVo objVo);
|
||||
|
||||
public List<ProductDeptIssue> getExportData(ProductDeptIssueVo objVo,List<String> ids);
|
||||
|
||||
public boolean updateProductDeptIssue(ProductDeptIssue obj);
|
||||
|
||||
public boolean closeProductDeptIssue(List<String> idList);
|
||||
|
||||
+4
-4
@@ -63,9 +63,9 @@ public class BusinessDeptIssueService extends ServiceImpl<BusinessDeptIssueDao,
|
||||
wrapper.like("product_type",pageVo.getProductType());
|
||||
}
|
||||
|
||||
if (pageVo.getResponseDept()!=null){
|
||||
wrapper.like("response_dept",pageVo.getResponseDept());
|
||||
}
|
||||
// if (pageVo.getResponseDept()!=null){
|
||||
// wrapper.like("response_dept",pageVo.getResponseDept());
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出
|
||||
@@ -74,7 +74,7 @@ public class BusinessDeptIssueService extends ServiceImpl<BusinessDeptIssueDao,
|
||||
wrapper.in("issue.ID",pageVo.getIdList());
|
||||
}
|
||||
|
||||
page = businessDeptIssueDao.findPage(page, wrapper);
|
||||
page = businessDeptIssueDao.findPage(page, wrapper,pageVo.getResponseDept());
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
+28
-17
@@ -37,28 +37,39 @@ public class ProductDeptIssueService extends ServiceImpl<ProductDeptIssueDao,Pro
|
||||
@Override
|
||||
public IPage<ProductDeptIssue> getProductDeptIssue(ProductDeptIssueVo objVo) {
|
||||
|
||||
IPage<ProductDeptIssue> page=new Page<>(objVo.getPage(),objVo.getPage());
|
||||
IPage<ProductDeptIssue> page=new Page<>(objVo.getPage(),objVo.getPageSize());
|
||||
|
||||
QueryWrapper<ProductDeptIssue> wrapper = new QueryWrapper<>();
|
||||
|
||||
if (objVo.getLawsNumber()!=null){
|
||||
wrapper.like("laws.LAWS_NAME",objVo.getLawsName())
|
||||
.or()
|
||||
.like("laws.LAWS_NUMBER",objVo.getLawsNumber());
|
||||
}
|
||||
|
||||
if (objVo.getPojName()!=null){
|
||||
wrapper.like("poj_name",objVo.getPojName());
|
||||
}
|
||||
|
||||
if (objVo.getResponseDept()!=null){
|
||||
wrapper.like("response_dept",objVo.getResponseDept());
|
||||
}
|
||||
productDeptIssueDao.findPage(page,wrapper);
|
||||
// QueryWrapper<ProductDeptIssue> wrapper = new QueryWrapper<>();
|
||||
// //查询条件
|
||||
// if (objVo.getIsClose()!=null){
|
||||
// wrapper.like("is_close",objVo.getIsClose());
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (objVo.getLawsNumber()!=null){
|
||||
// wrapper.like("laws.LAWS_NAME",objVo.getLawsName())
|
||||
// .or()
|
||||
// .like("laws.LAWS_NUMBER",objVo.getLawsNumber());
|
||||
// }
|
||||
//
|
||||
// if (objVo.getPojName()!=null){
|
||||
// wrapper.like("poj_name",objVo.getPojName());
|
||||
// }
|
||||
//
|
||||
// if (objVo.getResponseDept()!=null){
|
||||
// wrapper.like("response_dept",objVo.getResponseDept());
|
||||
// }
|
||||
productDeptIssueDao.findPage(page,objVo);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductDeptIssue> getExportData(ProductDeptIssueVo objVo, List<String> ids) {
|
||||
|
||||
return productDeptIssueDao.findExportData(objVo,ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateProductDeptIssue(ProductDeptIssue obj) {
|
||||
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ public class SarStandardComplianceAssessResultController {
|
||||
|
||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||
if (null!=s.getStandardItem()) {
|
||||
String[] as=(s.getStandardItem()+",").split(",");
|
||||
String[] as=(s.getStandardItem()+".").split("\\.");
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
|
||||
+2
@@ -23,6 +23,8 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoByNum(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
|
||||
List<SarStandardsInfo> selectHighLawsPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark,@Param("list") List<String> lawsIds);
|
||||
|
||||
int getSarStandardsInfoCount(@Param("page") SarStandardsInfoEOPage page);
|
||||
|
||||
+11
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.sys.common.BasePage;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -173,6 +174,16 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String exportAllAttrInfo;
|
||||
private String exportAllResult;
|
||||
|
||||
private String syncParam;
|
||||
|
||||
public String getSyncParam() {
|
||||
return syncParam;
|
||||
}
|
||||
|
||||
public void setSyncParam(String syncParam) {
|
||||
this.syncParam = syncParam;
|
||||
}
|
||||
|
||||
public String getExportAllResult() {
|
||||
return exportAllResult;
|
||||
}
|
||||
|
||||
+3
@@ -91,6 +91,9 @@ public class SarStandardsInfoEOPage extends BasePage {
|
||||
private String orderBy1 = "SAR_STANDARDS_INFO.issue_time";
|
||||
private String order1 = "";
|
||||
|
||||
// syncParam == sync
|
||||
private String syncParam;
|
||||
|
||||
/**
|
||||
* zhaokaiyao
|
||||
* 文本状态
|
||||
|
||||
@@ -33,6 +33,8 @@ public interface SarFileSplitMenuEODao extends BaseMapper<SarFileSplitMenuEO> {
|
||||
|
||||
List<String> getChild(@Param("id") String id);
|
||||
|
||||
List<String> getChildData(@Param("id") String id);
|
||||
|
||||
int getMaxDisplayByid(@Param("id") String id);
|
||||
|
||||
int getChildrenCountByParentId(@Param("id") String id);
|
||||
|
||||
+2
@@ -30,4 +30,6 @@ public interface SarFileSplitMenuEOService {
|
||||
int copyMenuNotChildren(SarFileSplitItemsEO sarFileSplitItemsEO);
|
||||
|
||||
String addMenuForImport(SarFileSplitMenuEO sarFileSplitMenuEO);
|
||||
|
||||
List<String> getChildData(String id);
|
||||
}
|
||||
|
||||
+1
-1
@@ -273,7 +273,7 @@ public class SarFileSplitItemsEOServiceImpl implements SarFileSplitItemsEOServic
|
||||
if (getMenuList != null && !getMenuList.isEmpty()) {
|
||||
for(SarFileSplitItemsEO splitItemsEO : getMenuList){
|
||||
menuIdList.add(splitItemsEO.getMenuId());
|
||||
List<String> menuList = sarFileSplitMenuEODao.getChild(splitItemsEO.getMenuId());
|
||||
List<String> menuList = sarFileSplitMenuEOService.getChildData(splitItemsEO.getMenuId());
|
||||
menuIdList.addAll(menuList);
|
||||
}
|
||||
if(!menuIdList.isEmpty()){
|
||||
|
||||
+17
@@ -6,6 +6,7 @@ import com.adc.da.slrs.standardSplit.entity.*;
|
||||
import com.adc.da.slrs.standardSplit.service.SarFileSplitMenuEOService;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.sys.util.UUIDUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -451,4 +452,20 @@ public class SarFileSplitMenuEOServiceImpl implements SarFileSplitMenuEOService
|
||||
}*/
|
||||
return sarFileSplitMenuEO.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getChildData(String id) {
|
||||
List<String> res=new ArrayList<>();
|
||||
return dealData(id,res);
|
||||
}
|
||||
|
||||
private List<String> dealData(String id ,List<String> res){
|
||||
List<String> strings = SarFileSplitMenuEODao.getChildData(id);
|
||||
res.addAll(strings);
|
||||
if (null!=strings && strings.size()>0){
|
||||
return this.dealData(StringUtils.join(strings,","),res);
|
||||
}else {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -247,6 +247,10 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
sarStandCompareHisEO.setId(standHisId);
|
||||
sarStandCompareHisEO.setCompareStatus("比对完成");
|
||||
sarStandCompareHisEODao.updateByPrimaryKeySelective(sarStandCompareHisEO);
|
||||
if (oldList.size()==0 || newList.size()==0){
|
||||
resultMap.put("error","比对数据已删除");
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@@ -540,6 +544,7 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
sarFileSplitItemsValEOPage.setItemId(sarFileSplitItemsEO.getId());
|
||||
sarFileSplitItemsValEOPage.setValidFlag(String.valueOf(ValidFlagEnum.VALID_TRUE.getValue()));
|
||||
sarFileSplitItemsValEOPage.setType("TEXT");
|
||||
sarFileSplitItemsValEOPage.setOrderBy("DISPLAY_SEQ");
|
||||
List<SarFileSplitItemsValEO> leftValList = sarFileSplitItemsValEOService.queryByList(sarFileSplitItemsValEOPage);
|
||||
if(leftValList != null && !leftValList.isEmpty()){
|
||||
for(SarFileSplitItemsValEO sarFileSplitItemsValEO : leftValList){
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class WgdCgfyServiceImpl extends ServiceImpl<WgdCgfyDao, WgdCgfy> impleme
|
||||
@Override
|
||||
public List<WgdCgfy> importCgfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file);
|
||||
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file,stringBuilder);
|
||||
if (res != null){
|
||||
QueryWrapper<WgdCgfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdCgfy.class, info -> !info.getColumn().equals("id"));
|
||||
|
||||
+2
-2
@@ -74,8 +74,8 @@ public class WgdFyfyServiceImpl extends ServiceImpl<WgdFyfyDao, WgdFyfy> impleme
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> importFyfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file);
|
||||
if (res != null){
|
||||
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
QueryWrapper<WgdFyfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdFyfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdFyfy> wgdFyfy=iWgdFyfyService.list(queryWrapper);
|
||||
|
||||
+2
-2
@@ -79,8 +79,8 @@ public class WgdSrbServiceImpl extends ServiceImpl<WgdSrbDao, WgdSrb> implements
|
||||
@Override
|
||||
public List<WgdSrb> importSrb(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file);
|
||||
if (res != null){
|
||||
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdSrb wgdSrb: res) {
|
||||
|
||||
+2
-2
@@ -76,8 +76,8 @@ public class WgdWbtjServiceImpl extends ServiceImpl<WgdWbtjDao, WgdWbtj> impleme
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> importWbtj(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file);
|
||||
if (res != null){
|
||||
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdWbtj wgdWbtj: res) {
|
||||
|
||||
+2
-2
@@ -78,8 +78,8 @@ public class WgdWbxdServiceImpl extends ServiceImpl<WgdWbxdDao, WgdWbxd> impleme
|
||||
public List<WgdWbxd> importWbxd(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
|
||||
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file);
|
||||
if (res != null){
|
||||
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdWbxd wgdWbxd: res) {
|
||||
|
||||
+2
-2
@@ -74,8 +74,8 @@ public class WgdZcbServiceImpl extends ServiceImpl<WgdZcbDao, WgdZcb> implements
|
||||
@Override
|
||||
public List<WgdZcb> importZcb(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdZcb> res= ExcelImportUtilByWk.readExcelpublic(WgdZcb.class,file);
|
||||
if (res != null){
|
||||
List<WgdZcb> res= ExcelImportUtilByWk.readExcelpublic(WgdZcb.class,file,stringBuilder);
|
||||
if (res != null ){
|
||||
QueryWrapper<WgdZcb> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdZcb.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdZcb> wgdZcb=iWgdZcbService.list(queryWrapper);
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ public class WgdAssocCostServiceImpl extends ServiceImpl<WgdAssocCostDao, WgdAss
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> importAssocCosts(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file);
|
||||
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file,stringBuilder);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
|
||||
+2
-2
@@ -78,8 +78,8 @@ public class WgdAssocInfoServiceImpl extends ServiceImpl<WgdAssocInfoDao, WgdAss
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> delWithWkData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdAssocInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocInfo.class,file);
|
||||
if (res != null){
|
||||
List<WgdAssocInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocInfo.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdAssocInfo importExcelDTO: res) {
|
||||
|
||||
+2
-2
@@ -80,8 +80,8 @@ public class WgdCommiInfoServiceImpl extends ServiceImpl<WgdCommiInfoDao, WgdCom
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> importCommiInfo(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdCommiInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdCommiInfo.class,file);
|
||||
if (res != null){
|
||||
List<WgdCommiInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdCommiInfo.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdCommiInfo wgdCommiInfo: res) {
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class WgdExReviseCostServiceImpl extends ServiceImpl<WgdExReviseCostDao,
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> importExReviseCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file);
|
||||
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file,stringBuilder);
|
||||
if (res != null){
|
||||
QueryWrapper<WgdExReviseCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdExReviseCost.class, info -> !info.getColumn().equals("id"));
|
||||
|
||||
+2
-2
@@ -77,8 +77,8 @@ public class WgdMeetCostServiceImpl extends ServiceImpl<WgdMeetCostDao, WgdMeetC
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> importMeetCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file);
|
||||
if (res != null){
|
||||
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file,stringBuilder);
|
||||
if (res != null && "".equals(stringBuilder.toString())){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdMeetCost wgdCommiInfo: res) {
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
and DATE_FORMAT(release_time,'%Y-%m-%d')=DATE_FORMAT(#{releaseTime},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="unit != null and unit != ''">
|
||||
and unit like concat('%',#{unit},'%')
|
||||
and (select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) like concat('%',#{unit},'%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<?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.regulations.dao.StandDataDao">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.regulations.entity.StandData">
|
||||
</resultMap>
|
||||
|
||||
<select id="searchStandData" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.regulations.entity.SearchStandContext">
|
||||
SELECT
|
||||
t.standId,
|
||||
t.standType,
|
||||
t.standSort,
|
||||
t.standNumber,
|
||||
t.standName
|
||||
FROM (
|
||||
SELECT
|
||||
sar_standards_info.id AS standId,
|
||||
sar_standards_info.STAND_TYPE AS standType,
|
||||
sar_standards_info.STAND_SORT AS standSort,
|
||||
sar_standards_info.STAND_NUMBER AS standNumber,
|
||||
sar_standards_info.STAND_NAME AS standName
|
||||
FROM
|
||||
sar_standards_info
|
||||
LEFT JOIN SAR_STAND_ATTR_INFO ON (
|
||||
SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id
|
||||
AND SAR_STAND_ATTR_INFO.valid_flag = 0
|
||||
)
|
||||
WHERE sar_standards_info.valid_flag = 0
|
||||
<if test="vppsCode != null and vppsCode != ''">
|
||||
and (SAR_STAND_ATTR_INFO.KCCVPPSBM like concat('%',#{vppsCode},'%') or SAR_STAND_ATTR_INFO.CYCVPPSBM like
|
||||
concat('%',#{vppsCode},'%'))
|
||||
</if>
|
||||
<if test="vppsName != null and vppsName != ''">
|
||||
and (SAR_STAND_ATTR_INFO.KCCVPPSCN like concat('%',#{vppsName},'%') or SAR_STAND_ATTR_INFO.CYCVPPSCN like
|
||||
concat('%',#{vppsName},'%'))
|
||||
</if>
|
||||
UNION
|
||||
SELECT
|
||||
sar_bussioness_stand.id AS standId,
|
||||
'BUSINESS_STAND' AS standType,
|
||||
sar_bussioness_stand.STAND_SORT AS standSort,
|
||||
sar_bussioness_stand.STAND_NUMBER AS standNumber,
|
||||
sar_bussioness_stand.STAND_NAME AS standName
|
||||
FROM
|
||||
sar_bussioness_stand
|
||||
LEFT JOIN sar_buss_stand_attr_info ON (
|
||||
sar_buss_stand_attr_info.stand_id = sar_bussioness_stand.id
|
||||
AND sar_buss_stand_attr_info.valid_flag = 0
|
||||
)
|
||||
WHERE sar_bussioness_stand.valid_flag = 0
|
||||
<if test="vppsCode != null and vppsCode != ''">
|
||||
and (sar_buss_stand_attr_info.KCVPPSBMBUSS like concat('%',#{vppsCode},'%') or
|
||||
sar_buss_stand_attr_info.CYCVPPSBMBUSS like concat('%',#{vppsCode},'%'))
|
||||
</if>
|
||||
<if test="vppsName != null and vppsName != ''">
|
||||
and (sar_buss_stand_attr_info.KCVPPSCNBUSS like concat('%',#{vppsName},'%') or
|
||||
sar_buss_stand_attr_info.CYCVPPSCNBUSS like concat('%',#{vppsName},'%'))
|
||||
</if>
|
||||
) t
|
||||
</select>
|
||||
<select id="searchStandDataThree" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
t.standId,
|
||||
t.standType
|
||||
FROM (
|
||||
SELECT
|
||||
sar_standards_info.id AS standId,
|
||||
sar_standards_info.STAND_TYPE AS standType
|
||||
FROM
|
||||
sar_standards_info
|
||||
LEFT JOIN SAR_STAND_ATTR_INFO ON (
|
||||
SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id
|
||||
AND SAR_STAND_ATTR_INFO.valid_flag = 0
|
||||
)
|
||||
WHERE sar_standards_info.valid_flag = 0
|
||||
<if test="vppsCode != null and vppsCode != ''">
|
||||
and (SAR_STAND_ATTR_INFO.KCCVPPSBM like concat('%',#{vppsCode},'%') or SAR_STAND_ATTR_INFO.CYCVPPSBM like
|
||||
concat('%',#{vppsCode},'%'))
|
||||
</if>
|
||||
<if test="vppsName != null and vppsName != ''">
|
||||
and (SAR_STAND_ATTR_INFO.KCCVPPSCN like concat('%',#{vppsName},'%') or SAR_STAND_ATTR_INFO.CYCVPPSCN like
|
||||
concat('%',#{vppsName},'%'))
|
||||
</if>
|
||||
<if test="standCode != null and standCode != ''">
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{standCode}),'%'),' ','')) and
|
||||
SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like
|
||||
trim(replace(concat(concat('%',#{standCode}),'%'),' ',''))))
|
||||
</if>
|
||||
UNION
|
||||
SELECT
|
||||
sar_bussioness_stand.id AS standId,
|
||||
'BUSINESS_STAND' AS standType
|
||||
FROM
|
||||
sar_bussioness_stand
|
||||
LEFT JOIN sar_buss_stand_attr_info ON (
|
||||
sar_buss_stand_attr_info.stand_id = sar_bussioness_stand.id
|
||||
AND sar_buss_stand_attr_info.valid_flag = 0
|
||||
)
|
||||
WHERE sar_bussioness_stand.valid_flag = 0
|
||||
<if test="vppsCode != null and vppsCode != ''">
|
||||
and (sar_buss_stand_attr_info.KCVPPSBMBUSS like concat('%',#{vppsCode},'%') or
|
||||
sar_buss_stand_attr_info.CYCVPPSBMBUSS like concat('%',#{vppsCode},'%'))
|
||||
</if>
|
||||
<if test="vppsName != null and vppsName != ''">
|
||||
and (sar_buss_stand_attr_info.KCVPPSCNBUSS like concat('%',#{vppsName},'%') or
|
||||
sar_buss_stand_attr_info.CYCVPPSCNBUSS like concat('%',#{vppsName},'%'))
|
||||
</if>
|
||||
<if test="standCode != null" >
|
||||
and (SAR_BUSSIONESS_STAND.STAND_CODE = #{standCode}
|
||||
or REPLACE( SAR_BUSSIONESS_STAND.STAND_CODE,' ','') = REPLACE( #{standCode},' ',''))
|
||||
</if>
|
||||
|
||||
UNION
|
||||
SELECT
|
||||
SAR_LAWS_STAND_INFO.id AS standId,
|
||||
'LAWS_TYPE' AS standType
|
||||
FROM
|
||||
SAR_LAWS_STAND_INFO
|
||||
LEFT JOIN sar_laws_attr_info ON (
|
||||
sar_laws_attr_info.LAWS_ID = SAR_LAWS_STAND_INFO.id
|
||||
AND sar_laws_attr_info.valid_flag = 0
|
||||
)
|
||||
WHERE SAR_LAWS_STAND_INFO.valid_flag = 0
|
||||
|
||||
<if test="standCode != null and standCode != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NUMBER = #{standCode}
|
||||
</if>
|
||||
|
||||
) t
|
||||
</select>
|
||||
</mapper>
|
||||
+106
@@ -489,6 +489,10 @@
|
||||
and text_status_buss=#{textStatusBuss}
|
||||
</if>
|
||||
|
||||
<if test='syncParam != null and syncParam == "sync"'>
|
||||
and SAR_BUSSIONESS_STAND.MODIFY_TIME between DATE_SUB(NOW(),INTERVAL 7 day) and DATE_SUB(NOW(),INTERVAL -1 day)
|
||||
</if>
|
||||
|
||||
<if test="standCode != null" >
|
||||
<!-- and (
|
||||
(concat(dicstandSort.DIC_TYPE_NAME, ' ', SAR_BUSSIONESS_STAND.STAND_CODE, '-', SAR_BUSSIONESS_STAND.STAND_YEAR)
|
||||
@@ -616,6 +620,94 @@
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<sql id="SarBussionInfo_Where_Clause1">
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<!--<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 and sarMsType != null and sarMsType == 'filterSarMsMenu'" >-->
|
||||
<!--and SAR_BUSS_STAND_MENU.TREE_TYPE = 'sarMs'-->
|
||||
<!--and SAR_BUSS_STAND_MENU.MENU_ID in-->
|
||||
<!--<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!--#{item}-->
|
||||
<!--</foreach>-->
|
||||
<!--</if>-->
|
||||
left join TS_RESOURCE on SAR_BUSS_STAND_MENU.menu_id = TS_RESOURCE.id
|
||||
left join SAR_BUSS_STAND_ATTR_INFO on (SAR_BUSS_STAND_ATTR_INFO.STAND_ID = SAR_BUSSIONESS_STAND.id and SAR_BUSS_STAND_ATTR_INFO.valid_flag=0)
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_BUSSIONESS_STAND.text_status_buss
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="standCode != null" >
|
||||
and (SAR_BUSSIONESS_STAND.STAND_CODE = #{standCode}
|
||||
or REPLACE( SAR_BUSSIONESS_STAND.STAND_CODE,' ','') = REPLACE( #{standCode},' ',''))
|
||||
</if>
|
||||
|
||||
|
||||
<!--<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 and sarMsType != null and sarMsType == 'filterSarMsMenu'" >-->
|
||||
<!--and SAR_BUSS_STAND_MENU.MENU_ID IS NULL-->
|
||||
<!--</if>-->
|
||||
|
||||
<!--<!– 目录判断 –>-->
|
||||
<!--<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null and menuAllChildrenIdList.size()>0 " >-->
|
||||
<!--and SAR_BUSS_STAND_MENU.MENU_ID in-->
|
||||
<!--<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!--#{item}-->
|
||||
<!--</foreach>-->
|
||||
<!--</if>-->
|
||||
<!--<!– 新修改需求,根据角色查询有权限的菜单数据–>-->
|
||||
<!--<if test="menuRoleList != null">-->
|
||||
<!--and SAR_BUSS_STAND_MENU.MENU_ID in-->
|
||||
<!--<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!--#{item}-->
|
||||
<!--</foreach>-->
|
||||
<!--</if>-->
|
||||
<!--<if test="collectMenuId != null">-->
|
||||
<!--and SAR_BUSSIONESS_STAND.id in (-->
|
||||
<!--select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0-->
|
||||
<!--and collect_type='BUSINESS_STAND'-->
|
||||
<!--and TS_PERSON_COLLECT.user_id=#{userId}-->
|
||||
<!--)-->
|
||||
<!--</if>-->
|
||||
<!--<if test="validFlag != null" >-->
|
||||
<!--and SAR_BUSSIONESS_STAND.valid_flag = #{validFlag}-->
|
||||
<!--</if>-->
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null" >
|
||||
and SAR_BUSSIONESS_STAND.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--<if test="id != null and id != '' " >-->
|
||||
<!--and SAR_BUSSIONESS_STAND.id = #{id}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="standSort != null" >-->
|
||||
<!--and SAR_BUSSIONESS_STAND.stand_sort = #{standSort}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="standYear != null" >-->
|
||||
<!--and SAR_BUSSIONESS_STAND.stand_year = #{standYear}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="replaceStandNum != null" >-->
|
||||
<!--and replace_stand_num like concat(concat('%',#{replaceStandNum}),'%')-->
|
||||
<!--</if>-->
|
||||
<!--<if test="standStatus != null" >-->
|
||||
<!--and SAR_BUSSIONESS_STAND.STAND_STATUS = #{standStatus}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="standEnName != null">-->
|
||||
<!--and SAR_BUSSIONESS_STAND.STAND_EN_NAME like concat('%', #{standEnName},'%')-->
|
||||
<!--</if>-->
|
||||
<!--<if test="advanceSearchStr != null">-->
|
||||
<!--and (${advanceSearchStr})-->
|
||||
<!--</if>-->
|
||||
<!--<if test="zqcrId != null">-->
|
||||
<!--and (SELECT ZYQCR-->
|
||||
<!--FROM SAR_BUSS_STAND_ATTR_INFO-->
|
||||
<!--WHERE valid_flag = 0-->
|
||||
<!--and stand_id = SAR_BUSSIONESS_STAND.id) = #{zqcrId}-->
|
||||
<!--</if>-->
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 根据角色分页查询条件 -->
|
||||
<sql id="SarBussionInfoRole_Where_Clause">
|
||||
@@ -736,6 +828,20 @@
|
||||
<include refid="standSort_in"/>
|
||||
limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
<!--清单导入标准 根据标准号认证数据-->
|
||||
<select id="getBussionessStandInfoByNum" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(select
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow,SAR_BUSS_STAND_ATTR_INFO.DTQBBHBUSS,
|
||||
<include refid="Base_Column_List_show" />
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause1"/>
|
||||
GROUP BY standStatusShow,<include refid="Group_Column_List_show"/>
|
||||
) tmp_tb
|
||||
<include refid="standSort_in"/>
|
||||
limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<!-- 企标复审使用-->
|
||||
<select id="getBussionessStandInfoQbfs" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
|
||||
+3
-2
@@ -389,9 +389,10 @@
|
||||
</select>
|
||||
|
||||
<insert id="insertList">
|
||||
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,ssrq,xcxssrq,zccssrq) VALUES
|
||||
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ,ssrq,xcxssrq,zccssrq,syrz) VALUES
|
||||
<foreach collection ="sarLawsAttrDetailedLists" item="list" separator =",">
|
||||
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR},#{list.ssrq,jdbcType=VARCHAR},#{list.xcxssrq,jdbcType=VARCHAR},#{list.zccssrq,jdbcType=VARCHAR})
|
||||
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR},#{list.ssrq,jdbcType=VARCHAR},#{list.xcxssrq,jdbcType=VARCHAR},#{list.zccssrq,jdbcType=VARCHAR}
|
||||
,#{list.syrz,jdbcType=VARCHAR})
|
||||
</foreach >
|
||||
</insert>
|
||||
|
||||
|
||||
+168
-30
@@ -88,6 +88,9 @@
|
||||
where 1=1 and SAR_LAWS_STAND_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 基本搜索项 -->
|
||||
<if test='syncParam != null and syncParam == "sync"'>
|
||||
and SAR_LAWS_STAND_INFO.MODIFY_TIME between DATE_SUB(NOW(),INTERVAL 7 day) and DATE_SUB(NOW(),INTERVAL -1 day)
|
||||
</if>
|
||||
<if test="lawsType != null and lawsType != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TYPE like concat(concat('%',#{lawsType}),'%')
|
||||
</if>
|
||||
@@ -175,6 +178,117 @@
|
||||
</if>
|
||||
|
||||
|
||||
<if test="collectMenuId != null and collectMenuId != ''">
|
||||
and SAR_LAWS_STAND_INFO.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
and (collect_type='FOREIGN_LAWS')
|
||||
and TS_PERSON_COLLECT.user_id=#{userId}
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="advanceSearchStr != null and advanceSearchStr != ''">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
<sql id="SarStandardsInfo_in_left1">
|
||||
left join SAR_LAWS_MENU ON SAR_LAWS_STAND_INFO.id = SAR_LAWS_MENU.laws_id
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
left join SAR_LAWS_ATTR_INFO on (SAR_LAWS_ATTR_INFO.LAWS_ID = SAR_LAWS_STAND_INFO.id and SAR_LAWS_ATTR_INFO.valid_flag=0)
|
||||
where 1=1 and SAR_LAWS_STAND_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 基本搜索项 -->
|
||||
<if test="lawsType != null and lawsType != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TYPE like concat(concat('%',#{lawsType}),'%')
|
||||
</if>
|
||||
<if test="lawsNumber != null and lawsNumber != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NUMBER = #{lawsNumber}
|
||||
</if>
|
||||
<if test="numberName != null and numberName != ''">
|
||||
and (SAR_LAWS_STAND_INFO.LAWS_NAME like concat(concat('%',#{numberName}),'%')
|
||||
or SAR_LAWS_STAND_INFO.LAWS_NUMBER like concat(concat('%',#{numberName}),'%')
|
||||
or SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{numberName}),'%'))
|
||||
</if>
|
||||
<if test="lawsName != null and lawsName != ''">
|
||||
and LAWS_NAME like concat(concat('%',#{lawsName}),'%')
|
||||
</if>
|
||||
<if test="lawsEnName != null and lawsEnName != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_EN_NAME like concat(concat('%',#{lawsEnName}),'%')
|
||||
</if>
|
||||
<if test="lawsNo != null and lawsNo != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NO like concat(concat('%',#{lawsNo}),'%')
|
||||
</if>
|
||||
<if test="issueTime != null and issueTime != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.ISSUE_TIME,'%Y-%m-%d') = #{issueTime}
|
||||
</if>
|
||||
<if test="issueCompany != null and issueCompany != ''">
|
||||
and SAR_LAWS_STAND_INFO.ISSUE_COMPANY like concat(concat('%',#{issueCompany}),'%')
|
||||
</if>
|
||||
<if test="commentCycleStart != null and commentCycleStart != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START ,'%Y-%m-%d') = DATE_FORMAT(#{commentCycleStart},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="commentCycleEnd != null and commentCycleEnd != ''">
|
||||
and DATE_FORMAT(SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END ,'%Y-%m-%d') = DATE_FORMAT(#{commentCycleEnd},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="lawsTextState != null and lawsTextState != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE = #{lawsTextState}
|
||||
</if>
|
||||
<if test="lawsSyqy != null and lawsSyqy != ''">
|
||||
and FIND_IN_SET(#{lawsSyqy},SAR_LAWS_STAND_INFO.LAWS_SYQY)
|
||||
</if>
|
||||
<if test="lawsSycx != null and lawsSycx != ''">
|
||||
and FIND_IN_SET(#{lawsSycx},SAR_LAWS_STAND_INFO.LAWS_SYCX)
|
||||
</if>
|
||||
<if test="isRelateAccess != null and isRelateAccess != ''">
|
||||
and SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS = #{isRelateAccess}
|
||||
</if>
|
||||
<if test="lawsYear != null and lawsYear != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_YEAR like concat(concat('%',#{lawsYear}),'%')
|
||||
</if>
|
||||
<if test="lawsNotisyncNum != null and lawsNotisyncNum != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM like concat(concat('%',#{lawsNotisyncNum}),'%')
|
||||
</if>
|
||||
<if test="lawsBulletin != null and lawsBulletin != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_BULLETIN like concat(concat('%',#{lawsBulletin}),'%')
|
||||
</if>
|
||||
<if test="lawsLabel != null and lawsLabel != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_LABEL like concat(concat('%',#{lawsLabel}),'%')
|
||||
</if>
|
||||
<if test="lawsRemark != null and lawsRemark != ''">
|
||||
and SAR_LAWS_STAND_INFO.LAWS_REMARK like concat(concat('%',#{lawsRemark}),'%')
|
||||
</if>
|
||||
<!-- 国家、地区 -->
|
||||
<if test="country != null and country != ''">
|
||||
and SAR_LAWS_STAND_INFO.country = #{country}
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null">
|
||||
and SAR_LAWS_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_LAWS_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null">
|
||||
and SAR_LAWS_STAND_INFO.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="collectMenuId != null and collectMenuId != ''">
|
||||
and SAR_LAWS_STAND_INFO.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
@@ -273,16 +387,12 @@
|
||||
limit ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
|
||||
<select id="getSarStandardsInfoCount" resultType="java.lang.Integer"
|
||||
<!-- 查询SAR_LAWS_STAND_INFO列表 -->
|
||||
<select id="getSarStandardsInfoByNum" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage">
|
||||
select count(1) from (select count(*) from SAR_LAWS_STAND_INFO
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
GROUP BY SAR_LAWS_STAND_INFO.id) a
|
||||
</select>
|
||||
|
||||
<sql id="Base_Column_List_show_Export" >
|
||||
SELECT
|
||||
DISTINCT SAR_LAWS_STAND_INFO.ID,
|
||||
laws_type_show.DIC_TYPE_NAME as LAWS_TYPE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TYPE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NUMBER,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NAME,
|
||||
SAR_LAWS_STAND_INFO.LAWS_EN_NAME,
|
||||
@@ -292,13 +402,59 @@
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START,
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE,
|
||||
laws_sycx_show.DIC_TYPE_NAME as LAWS_SYCX,
|
||||
laws_syqy_show.DIC_TYPE_NAME as LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYCX,
|
||||
SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS,
|
||||
laws_year_show.DIC_TYPE_NAME as LAWS_YEAR,
|
||||
SAR_LAWS_STAND_INFO.LAWS_YEAR,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM,
|
||||
SAR_LAWS_STAND_INFO.LAWS_BULLETIN,
|
||||
laws_label_show.DIC_TYPE_NAME as LAWS_LABEL,
|
||||
SAR_LAWS_STAND_INFO.LAWS_LABEL,
|
||||
SAR_LAWS_STAND_INFO.LAWS_REMARK,
|
||||
SAR_LAWS_STAND_INFO.COUNTRY,
|
||||
SAR_LAWS_STAND_INFO.MODIFY_TIME,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_LAWS_ATTR_INFO.XCXSSRQLAWS ='' THEN '9999-01-01'
|
||||
ELSE SAR_LAWS_ATTR_INFO.XCXSSRQLAWS
|
||||
END
|
||||
) AS XCXSSRQLAWS
|
||||
from SAR_LAWS_STAND_INFO
|
||||
<include refid="SarStandardsInfo_in_left1"/>
|
||||
order by
|
||||
<if test='orderByA != null and orderByA != "" and order1 != null and order1 != ""'>
|
||||
${orderByA} ${order1},
|
||||
</if>
|
||||
SAR_LAWS_STAND_INFO.id
|
||||
limit ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
|
||||
<select id="getSarStandardsInfoCount" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage">
|
||||
select count(1) from (select count(*) from SAR_LAWS_STAND_INFO
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
GROUP BY SAR_LAWS_STAND_INFO.id) a
|
||||
</select>
|
||||
|
||||
<sql id="Base_Column_List_show_Export" >
|
||||
DISTINCT SAR_LAWS_STAND_INFO.ID,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TYPE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NUMBER,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NAME,
|
||||
SAR_LAWS_STAND_INFO.LAWS_EN_NAME,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NO,
|
||||
SAR_LAWS_STAND_INFO.ISSUE_TIME,
|
||||
SAR_LAWS_STAND_INFO.ISSUE_COMPANY,
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_START,
|
||||
SAR_LAWS_STAND_INFO.COMMENT_CYCLE_END,
|
||||
SAR_LAWS_STAND_INFO.LAWS_TEXT_STATE,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYCX,
|
||||
SAR_LAWS_STAND_INFO.LAWS_SYQY,
|
||||
SAR_LAWS_STAND_INFO.IS_RELATE_ACCESS,
|
||||
SAR_LAWS_STAND_INFO.LAWS_YEAR,
|
||||
SAR_LAWS_STAND_INFO.LAWS_NOTISYNC_NUM,
|
||||
SAR_LAWS_STAND_INFO.LAWS_BULLETIN,
|
||||
SAR_LAWS_STAND_INFO.LAWS_LABEL,
|
||||
SAR_LAWS_STAND_INFO.LAWS_REMARK,
|
||||
SAR_LAWS_STAND_INFO.COUNTRY,
|
||||
SAR_LAWS_STAND_INFO.MODIFY_TIME,
|
||||
@@ -384,24 +540,6 @@
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--标签-->
|
||||
LEFT JOIN TS_DICTYPE laws_label_show ON (
|
||||
laws_label_show.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_LABEL
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--适用车型-->
|
||||
LEFT JOIN TS_DICTYPE laws_sycx_show ON (
|
||||
laws_sycx_show.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_SYCX
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--适用区域-->
|
||||
LEFT JOIN TS_DICTYPE laws_syqy_show ON (
|
||||
laws_syqy_show.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_SYQY
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
<!--政策分类-->
|
||||
LEFT JOIN TS_DICTYPE laws_type_show ON (
|
||||
laws_type_show.dic_type_code = SAR_LAWS_STAND_INFO.LAWS_TYPE
|
||||
|
||||
+21
-4
@@ -23,22 +23,32 @@
|
||||
<select id="findPage" resultMap="BusinessIssuePage">
|
||||
select t.* from (
|
||||
SELECT
|
||||
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME
|
||||
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_laws_stand_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_people
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
${ew.customSqlSegment}
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.STAND_CODE AS lawNumber,
|
||||
laws.STAND_NAME AS lawName
|
||||
laws.STAND_NAME AS lawName,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_bussioness_stand AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_people
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
${ew.customSqlSegment}
|
||||
|
||||
UNION ALL
|
||||
@@ -50,15 +60,22 @@
|
||||
'-',
|
||||
laws.STAND_YEAR
|
||||
) AS lawNumber,
|
||||
laws.STAND_NAME AS lawName
|
||||
laws.STAND_NAME AS lawName,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_standards_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_people
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
${ew.customSqlSegment}
|
||||
) t
|
||||
where t.LAWS_NAME is not null and t.LAWS_NUMBER is not null
|
||||
|
||||
<if test="null != dept and dept != ''">
|
||||
and t.responseInsName like concat('%',#{dept},'%')
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+155
-5
@@ -21,12 +21,162 @@
|
||||
|
||||
|
||||
<select id="findPage" resultMap="ProductIssuePage">
|
||||
select a.* from (
|
||||
SELECT
|
||||
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME
|
||||
issue.*,
|
||||
laws.LAWS_NUMBER,
|
||||
laws.LAWS_NAME ,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_laws_stand_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_laws_stand_info AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE 1=1
|
||||
AND laws.LAWS_NAME is NOT NULL AND laws.LAWS_NUMBER is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
|
||||
UNION all
|
||||
SELECT
|
||||
issue.*,
|
||||
CONCAT(laws.
|
||||
STAND_SORT,' ',laws.STAND_NUMBER,'-',laws.STAND_YEAR)as LAWS_NUMBER,
|
||||
laws.STAND_NAME as LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_standards_info AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE
|
||||
1=1
|
||||
AND laws.STAND_SORT is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">
|
||||
and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
UNION all
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.STAND_CODE as LAWS_NUMBER,
|
||||
laws.STAND_NAME as LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_bussioness_stand AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE
|
||||
1=1
|
||||
AND laws.STAND_CODE is NOT NULL AND laws.STAND_NAME is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">
|
||||
and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
)a
|
||||
where 1=1
|
||||
<if test="null != ew.lawsNumber and ew.lawsNumber != ''">
|
||||
and ( a.LAWS_NUMBER like concat('%',#{ew.lawsNumber},'%') or a.LAWS_NAME like concat('%',#{ew.lawsNumber},'%') )
|
||||
</if>
|
||||
<if test="null != ew.responseInsName and ew.responseInsName != ''">
|
||||
and a.responseInsName like concat('%',#{ew.responseInsName},'%')
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findExportData" resultMap="ProductIssuePage">
|
||||
|
||||
select a.* from (
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.LAWS_NUMBER,
|
||||
laws.LAWS_NAME ,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_laws_stand_info AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE 1=1
|
||||
AND laws.LAWS_NAME is NOT NULL AND laws.LAWS_NUMBER is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
<if test="null != ids and ids.size()>0">
|
||||
and issue.id in
|
||||
<foreach item="msgId" collection="ids" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
UNION all
|
||||
SELECT
|
||||
issue.*,
|
||||
CONCAT(laws.
|
||||
STAND_SORT,' ',laws.STAND_NUMBER,'-',laws.STAND_YEAR)as LAWS_NUMBER,
|
||||
laws.STAND_NAME as LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_standards_info AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE
|
||||
1=1
|
||||
AND laws.STAND_SORT is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">
|
||||
and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
<if test="null != ids and ids.size()>0">
|
||||
and issue.id in
|
||||
<foreach item="msgId" collection="ids" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
UNION all
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.STAND_CODE as LAWS_NUMBER,
|
||||
laws.STAND_NAME as LAWS_NAME,
|
||||
us.INSTITUTION_ID as responseInsId,
|
||||
tsins.name as responseInsName,
|
||||
us.uname as responseUserName
|
||||
FROM
|
||||
product_dept_issue AS issue
|
||||
LEFT JOIN sar_bussioness_stand AS laws ON issue.law_id = laws.ID
|
||||
left join ts_user as us on us.USID = issue.response_dept
|
||||
left join ts_institution as tsins on us.INSTITUTION_ID = tsins.id
|
||||
WHERE
|
||||
1=1
|
||||
AND laws.STAND_CODE is NOT NULL AND laws.STAND_NAME is NOT NULL
|
||||
<if test="null != ew.isClose and ew.isClose != ''">
|
||||
and issue.is_close like concat('%',#{ew.isClose},'%')
|
||||
</if>
|
||||
<if test="null != ids and ids.size()>0">
|
||||
and issue.id in
|
||||
<foreach item="msgId" collection="ids" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
)a
|
||||
where 1=1
|
||||
<if test="null != ew.lawsNumber and ew.lawsNumber != ''">
|
||||
and ( a.LAWS_NUMBER like concat('%',#{ew.lawsNumber},'%') or a.LAWS_NAME like concat('%',#{ew.lawsNumber},'%') )
|
||||
</if>
|
||||
<if test="null != ew.responseInsName and ew.responseInsName != ''">
|
||||
and a.responseInsName like concat('%',#{ew.responseInsName},'%')
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -48,13 +48,13 @@
|
||||
and sar_stand_unqualified.STAND_ID = #{sar.standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and sar_stand_unqualified.PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
and sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and ts_institution.name like concat('%',#{sar.responsibleUnit},'%')
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and (REPLACE(sar_stand_unqualified.STAND_SERIAL_NUMBER,' ','') like concat(concat('%',REPLACE(#{sar.standSerialNumber},' ','')),'%')
|
||||
and (REPLACE(REPLACE(sar_stand_unqualified.STAND_SERIAL_NUMBER,' ',''),' ','') like concat(concat('%',REPLACE(REPLACE(#{sar.standSerialNumber},' ',''),' ','')),'%')
|
||||
or sar_stand_unqualified.STAND_NAME like concat(concat('%',#{sar.standSerialNumber}),'%'))
|
||||
</if>
|
||||
order by sar_stand_unqualified.ID,sar_stand_unqualified.STAND_ID ,sar_stand_unqualified.ITEMS_NUM asc
|
||||
|
||||
+32
-7
@@ -8,14 +8,27 @@
|
||||
select sar_stand_project_library.project_name as productName,sar_stand_project_library.project_group as projectGroup,
|
||||
sar_stand_project_library.id as sarId,
|
||||
sar_stand_project_library.product_line as productLine,sar_stand_project_library.project_number as productId,
|
||||
sar_stand_project_library.project_manager as projectManager,ts_user.UNAME as uName,
|
||||
team.ids as projectManager,team.name as uName,
|
||||
(SELECT count(*) FROM sar_stand_unqualified WHERE sar_stand_unqualified.STAND_ID = #{product.standId} AND CLOSE_STATE = '1' ) unCount,
|
||||
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} and sspa.no_involve is not null and sspa.no_involve !='' ) unCounts,
|
||||
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} ) allCounts
|
||||
FROM
|
||||
sar_stand_project_library
|
||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
||||
<!--LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager-->
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
GROUP_CONCAT(sar_stand_project_team.name) as name ,GROUP_CONCAT(sar_stand_project_team.user_id) as ids ,sar_stand_project_team.project_code
|
||||
FROM
|
||||
sar_stand_project_team
|
||||
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||
AND a.id != sar_stand_project_team.id
|
||||
group by
|
||||
sar_stand_project_team.project_code
|
||||
)
|
||||
as team
|
||||
ON team.project_code = sar_stand_project_library.project_number
|
||||
|
||||
WHERE
|
||||
sar_stand_project_library.project_number in ( SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||
<if test="null != product.productName and ''!= product.productName">
|
||||
@@ -28,10 +41,10 @@
|
||||
sar_stand_project_library.project_name,
|
||||
sar_stand_project_library.project_group,
|
||||
sar_stand_project_library.product_line,
|
||||
sar_stand_project_library.project_manager,
|
||||
team.ids,
|
||||
sar_stand_project_library.project_number,
|
||||
sar_stand_project_library.id,
|
||||
ts_user.UNAME
|
||||
team.name
|
||||
ORDER BY
|
||||
sar_stand_project_library.project_name ASC
|
||||
limit ${(page-1)*pageSize},${pageSize}
|
||||
@@ -43,7 +56,19 @@
|
||||
FROM
|
||||
sar_stand_project_library
|
||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
||||
<!--LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager-->
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
GROUP_CONCAT(sar_stand_project_team.name) as name ,GROUP_CONCAT(sar_stand_project_team.user_id) as ids ,sar_stand_project_team.project_code
|
||||
FROM
|
||||
sar_stand_project_team
|
||||
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||
AND a.id != sar_stand_project_team.id
|
||||
group by
|
||||
sar_stand_project_team.project_code
|
||||
)
|
||||
as team
|
||||
ON team.project_code = sar_stand_project_library.project_number
|
||||
WHERE
|
||||
sar_stand_project_library.project_number in (SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||
<if test="null != product.productName and ''!= product.productName">
|
||||
@@ -56,10 +81,10 @@
|
||||
sar_stand_project_library.project_name,
|
||||
sar_stand_project_library.project_group,
|
||||
sar_stand_project_library.product_line,
|
||||
sar_stand_project_library.project_manager,
|
||||
team.ids,
|
||||
sar_stand_project_library.project_number,
|
||||
sar_stand_project_library.id,
|
||||
ts_user.UNAME
|
||||
team.name
|
||||
ORDER BY
|
||||
sar_stand_project_library.project_name ASC
|
||||
</select>
|
||||
|
||||
+48
@@ -979,6 +979,9 @@
|
||||
<if test='page.standType != null and page.standType != "ALL"'>
|
||||
and stand_type = #{page.standType}
|
||||
</if>
|
||||
<if test='page.syncParam != null and page.syncParam != ""'>
|
||||
and MODIFY_TIME between DATE_SUB(NOW(),INTERVAL 7 day) and DATE_SUB(NOW(),INTERVAL -1 day)
|
||||
</if>
|
||||
<!-- 基本搜索项 -->
|
||||
<!-- 国家、地区 -->
|
||||
<if test="page.country != null and page.country != ''">
|
||||
@@ -1124,6 +1127,36 @@
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<sql id="SarStandardsInfo_in_left_3">
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = SAR_STANDARDS_INFO.stand_sort and
|
||||
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
dicstandTextStatus.dic_type_code = SAR_STANDARDS_INFO.text_status
|
||||
<!-- 标准类别DIC_ID 固定ID 区分 国家地区 -->
|
||||
AND dicstandTextStatus.dic_id = 'JKSADFH564S'
|
||||
AND dicstandTextStatus.dic_id IS NOT NULL
|
||||
AND dicstandTextStatus.valid_flag = 0
|
||||
)
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 标准分类 国内标准,国外标准 必要搜索项 -->
|
||||
<if test='page.standType != null and page.standType != "ALL"'>
|
||||
and stand_type = #{page.standType}
|
||||
</if>
|
||||
<!-- 标准编号111 -->
|
||||
<if test="page.standNumber != null and page.standNumber != ''">
|
||||
and (
|
||||
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) = trim(replace(#{page.standNumber},' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) = trim(replace(#{page.standNumber},' ',''))
|
||||
)
|
||||
)
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<sql id="SarStandardsInfo_in_left">
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = SAR_STANDARDS_INFO.stand_sort and
|
||||
@@ -1413,6 +1446,21 @@
|
||||
limit ${page.pager.startIndex-1},${page.pageSize}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSarStandardsInfoByNum" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
SELECT
|
||||
<include refid="Base_Column_List_DIS"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_in_left_3"/>
|
||||
|
||||
<if test='(page.orderByA != null and page.orderByA != "" and page.order1 != null and page.order1 != "")
|
||||
or (page.standType != null and page.standType != "") '>
|
||||
<include refid="standSort_in"/>
|
||||
</if>
|
||||
limit ${page.pager.startIndex-1},${page.pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
SELECT
|
||||
|
||||
+5
@@ -294,6 +294,11 @@
|
||||
WHERE FIND_IN_SET(n.id, t.pids)
|
||||
</select>
|
||||
|
||||
<select id="getChildData" resultType="String">
|
||||
SELECT distinct id FROM SAR_FILE_SPLIT_MENU
|
||||
WHERE FIND_IN_SET(P_ID,#{id})>0
|
||||
</select>
|
||||
|
||||
<!--<select id="getMaxDisplayByid" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">-->
|
||||
<!--SELECT max(SAR_FILE_SPLIT_MENU.DISPLAY_SEQ) FROM-->
|
||||
<!--SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = p_id-->
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.sys.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -10,6 +11,7 @@ import java.util.Date;
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
@TableName(value = "TS_LOGIN_INFO")
|
||||
public class LoginInfoEO extends BaseEntity {
|
||||
|
||||
@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@@ -21,7 +23,7 @@ public class LoginInfoEO extends BaseEntity {
|
||||
private Date loginTime;
|
||||
private String userId;
|
||||
private String id;
|
||||
private int countNum;
|
||||
// private int countNum;
|
||||
private String maxCountDate;
|
||||
|
||||
/**
|
||||
@@ -130,13 +132,13 @@ public class LoginInfoEO extends BaseEntity {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getCountNum() {
|
||||
return countNum;
|
||||
}
|
||||
// public int getCountNum() {
|
||||
// return countNum;
|
||||
// }
|
||||
|
||||
public void setCountNum(int countNum) {
|
||||
this.countNum = countNum;
|
||||
}
|
||||
// public void setCountNum(int countNum) {
|
||||
// this.countNum = countNum;
|
||||
// }
|
||||
|
||||
public String getMaxCountDate() {
|
||||
return maxCountDate;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
4.13------------------
|
||||
INSERT INTO `foton_slrs_test2`.`sar_menu`(`ID`, `SOR_DIVIDE`, `MENU_NAME`, `PARENT_ID`, `PARENT_IDS`, `LEVEL`, `DISPLAY_SEQ`, `HREF`, `VALID_FLAG`, `CREATION_TIME`, `MODIFY_TIME`, `REMARKS`) VALUES ('asdzcfgk', NULL, '政策法规库', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
Reference in New Issue
Block a user