Merge branch 'develop_master' of http://gitlab.91isoft.com:90/LiuChao/foton-slrs-system-rest into develop_master
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.adc.da.common;
|
||||
|
||||
public enum BussEnum {
|
||||
|
||||
BUSS_XD("tz4lqchzuy","修订","1"),
|
||||
BUSS_FZ("3lqnlgmgcn","作废","2"),
|
||||
BUSS_YX("9z741h2m3j","有效","3");
|
||||
|
||||
private String value;
|
||||
private String lable;
|
||||
private String state;
|
||||
|
||||
private BussEnum(String value, String lable,String state) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
this.state = state;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+34
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.workFlow.service;
|
||||
|
||||
import com.adc.da.FeignClientImpl.workFlowFeignClientImpl;
|
||||
import com.adc.da.common.BussEnum;
|
||||
import com.adc.da.common.SarConformStateEnum;
|
||||
import com.adc.da.common.SarStateColorEnum;
|
||||
import com.adc.da.common.SarTypeEnum;
|
||||
@@ -43,6 +44,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -105,6 +107,24 @@ public class ActSarItemsBussEOService {
|
||||
String reviewTime = String.valueOf(standMap.get("reviewTime"));
|
||||
String reviewResults = String.valueOf(standMap.get("reviewResults"));
|
||||
|
||||
// 更新企标文本状态
|
||||
String textStatus = "";
|
||||
if("1".equals(reviewResults)){
|
||||
textStatus = BussEnum.BUSS_XD.getValue();
|
||||
}else if("2".equals(reviewResults)){
|
||||
textStatus = BussEnum.BUSS_FZ.getValue();
|
||||
}else if("3".equals(reviewResults)){
|
||||
textStatus = BussEnum.BUSS_YX.getValue();
|
||||
}
|
||||
|
||||
Map<String, Object> attrInfoMap = sarBussStandAttrInfoService.getBussAttrInfo(standId);
|
||||
String sarStandAttrInfo = JSONObject.toJSONString(attrInfoMap);
|
||||
SarBussionessStand bussionessStand = new SarBussionessStand();
|
||||
bussionessStand.setId(standId);
|
||||
bussionessStand.setTextStatusBuss(textStatus);
|
||||
bussionessStand.setSarStandAttrEOStr(sarStandAttrInfo);
|
||||
iSarBussionessStandService.updateSarBussionessStand(bussionessStand);
|
||||
|
||||
SarBussionessStandState state = new SarBussionessStandState();
|
||||
state.setStandId(standId);
|
||||
state.setStandCode(standCode);
|
||||
@@ -138,7 +158,7 @@ public class ActSarItemsBussEOService {
|
||||
String releaseTime = String.valueOf(standMap.get("releaseTime"));
|
||||
String YYBZ = String.valueOf(standMap.get("YYBZ"));
|
||||
String CYBZ = String.valueOf(standMap.get("CYBZ"));
|
||||
String SYCXCLASS = String.valueOf(standMap.get("SYCXCLASS"));
|
||||
String SYCXCLASS = getFieldsValue(standMap,"SYCXCLASS");
|
||||
String DTQBBHBUSS = String.valueOf(standMap.get("DTQBBHBUSS"));
|
||||
String LXD = String.valueOf(standMap.get("LXD"));
|
||||
|
||||
@@ -168,6 +188,19 @@ public class ActSarItemsBussEOService {
|
||||
|
||||
}
|
||||
|
||||
private String getFieldsValue(Map<String,Object> standMap, String key){
|
||||
String str = "";
|
||||
Object json= new JSONTokener(standMap.get(key).toString()).nextValue();
|
||||
if(json instanceof org.json.JSONArray){
|
||||
str = String.join(",",JSONObject.parseArray(standMap.get(key).toString(),String.class));
|
||||
}else {
|
||||
if(!json.equals("null")){
|
||||
str = standMap.get(key).toString();
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
public void autoUpdIndex(String pid,String bussId){
|
||||
List<BusProcessEvaluationHis> evaluationHisFilter = workFlowFeignClient.evaluationHisList(pid);
|
||||
List<BusProcessEvaluationHis> evaluationHis = new ArrayList<>();
|
||||
|
||||
+26
-27
@@ -36,6 +36,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -117,48 +118,33 @@ public class ActSarItemsLawsEOService {
|
||||
// }
|
||||
|
||||
Map<String,Object> attInfoMap = new HashMap<>();
|
||||
List<String> jsonArray = new ArrayList<>();
|
||||
Object breakVal = null;
|
||||
Object itemList = null;
|
||||
for (Map.Entry<String,Object> entry : standMap.entrySet()) {
|
||||
String field = entry.getKey().toUpperCase();
|
||||
Object value = entry.getValue();
|
||||
if (InitStandAttrUtil.queryFieldListLaws.contains(field)) {
|
||||
if (value != null && value instanceof JSONArray) {
|
||||
String valStr = String.valueOf(value);
|
||||
List<String> valueArr = JSONArray.parseArray(valStr,String.class);
|
||||
if (valueArr != null && !valueArr.isEmpty()) {
|
||||
String newValue = "";
|
||||
for (String val : valueArr) {
|
||||
newValue += val + ",";
|
||||
}
|
||||
newValue = newValue.substring(0,newValue.length()-1);
|
||||
value = newValue;
|
||||
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 && !",".contains(standMap.get(entry.getKey()).toString())){
|
||||
result = String.join(",",JSONObject.parseArray(value.toString(),String.class));
|
||||
}else {
|
||||
if(!value.equals("null")){
|
||||
result =standMap.get(entry.getKey()).toString();
|
||||
}
|
||||
}
|
||||
attInfoMap.put(field,value);
|
||||
}
|
||||
if (InitStandAttrUtil.queryFieldListLaws.contains(field)) {
|
||||
attInfoMap.put(field,result);
|
||||
} else {
|
||||
createStandBaseField(sarLawsStandInfo,entry.getKey(),value);
|
||||
createStandBaseField(sarLawsStandInfo,entry.getKey(),result);
|
||||
}
|
||||
}
|
||||
//处理文件
|
||||
//此处需要处理之前的文件信息,防止文件丢失
|
||||
// attInfoMap = saveFileMsg(attInfoMap,sarStandardsInfoEO.getFileIds(),sarStandardsInfoEO.getTextStatus());
|
||||
String resData = JSON.toJSONString(attInfoMap, SerializerFeature.WriteMapNullValue);
|
||||
sarLawsStandInfo.setSarStandAttrEOStr(resData);
|
||||
// 根据标准号判断数据是否已存在
|
||||
//2021年4月9日 此处检查当前是否存在standId
|
||||
String lawsNumber = "";
|
||||
if(StringUtils.isNotBlank(sarLawsStandInfo.getLawsNumber()) && !"null".equals(sarLawsStandInfo.getLawsNumber())){
|
||||
lawsNumber = sarLawsStandInfo.getLawsNumber();
|
||||
}
|
||||
List<SarLawsStandInfo> lawsList = sarLawsStandInfoService.selectStandardsByStandNumber(lawsNumber);
|
||||
// if (StringUtils.isBlank(sarStandardsInfoEO.getMenuId()) && "INLAND".equals(sarStandardsInfoEO.getStandType())) {
|
||||
// sarStandardsInfoEO.setMenuId("64df1d5522bb49c09af2");
|
||||
// sarStandardsInfoEO.setCountry("CN");
|
||||
// } else if (StringUtils.isBlank(sarStandardsInfoEO.getMenuId()) && "FOREIGN".equals(sarStandardsInfoEO.getStandType())) {
|
||||
// sarStandardsInfoEO.setMenuId("22179d54d4e640098e29");
|
||||
// }
|
||||
//此处判断是否是带入的标准
|
||||
if(StringUtils.isNotBlank(sarLawsStandInfo.getId())) {
|
||||
SarLawsStandInfo query = new SarLawsStandInfo();
|
||||
@@ -239,6 +225,19 @@ public class ActSarItemsLawsEOService {
|
||||
}
|
||||
}
|
||||
|
||||
private String getFieldsValue(Map<String,Object> standMap, String key){
|
||||
String str = "";
|
||||
Object json= new JSONTokener(standMap.get(key).toString()).nextValue();
|
||||
if(json instanceof org.json.JSONArray){
|
||||
str = String.join(",",JSONObject.parseArray(standMap.get(key).toString(),String.class));
|
||||
}else {
|
||||
if(!json.equals("null")){
|
||||
str = standMap.get(key).toString();
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/***
|
||||
* 标准法规入库流程中技术评估结果入库归档操作
|
||||
* @param sarStandardsInfoEO
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.adc.da.login.util.IDMUtil;
|
||||
import com.adc.da.login.util.JwtUtils;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
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 +18,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;
|
||||
@@ -29,6 +27,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -78,6 +77,59 @@ public class LoginRestController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
// @GetMapping(value = "/login")
|
||||
@GetMapping(value = "/checkPage")
|
||||
@ResponseBody
|
||||
public ResponseMessage<String> checkPage(@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());
|
||||
return Result.success(userStr);
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
// @GetMapping(value = "/login")
|
||||
@GetMapping(value = "/checkPageNoEncryption")
|
||||
@ResponseBody
|
||||
public ResponseMessage<String> checkPageNoEncryption(@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());
|
||||
return Result.success(userStr);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
@PostMapping(value = "/loginIdm")
|
||||
|
||||
@@ -25,7 +25,12 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
InterceptorRegistration addInterceptor = registry.addInterceptor(getSecurityInterceptor());
|
||||
|
||||
/**
|
||||
* 登录三大金刚
|
||||
*/
|
||||
addInterceptor.excludePathPatterns("/api/loginIdm");
|
||||
addInterceptor.excludePathPatterns("/api/checkPage");
|
||||
addInterceptor.excludePathPatterns("/api/checkPageNoEncryption");
|
||||
/**
|
||||
* TODO 测试流程 开放 login 接口 正式环境 关闭
|
||||
*/
|
||||
|
||||
+5
-1
@@ -86,7 +86,11 @@ public class SearchCenterController extends BaseController<Map<String, Object>>
|
||||
if("fulltextserch".equals(searchInfoEO.getSelectIndex()) || "fulltextserch"== searchInfoEO.getSelectIndex()){
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,11 @@ public interface ElasticsearchService {
|
||||
*/
|
||||
boolean deleteIndex(String index);
|
||||
|
||||
/**
|
||||
* Elasticsearch 批量删除数据
|
||||
*/
|
||||
void deleteBatchId(List<String> list,String index);
|
||||
|
||||
/**
|
||||
* Elasticsearch 判断索引是否存在定义
|
||||
* @param index 要判断的索引名称
|
||||
|
||||
+15
@@ -8,8 +8,10 @@ import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
|
||||
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequest;
|
||||
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse;
|
||||
import org.elasticsearch.action.bulk.BulkRequest;
|
||||
import org.elasticsearch.action.bulk.BulkRequestBuilder;
|
||||
import org.elasticsearch.action.bulk.BulkResponse;
|
||||
import org.elasticsearch.action.delete.DeleteRequest;
|
||||
import org.elasticsearch.action.delete.DeleteResponse;
|
||||
import org.elasticsearch.action.get.GetRequestBuilder;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
@@ -178,6 +180,19 @@ public class ElasticsearchServiceImpl implements ElasticsearchService {
|
||||
return response.getResult().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBatchId( List<String> lists,String index) {
|
||||
logger.info("批量删除索引: "+index +", 正在删除:" + lists.size() + "条数据");
|
||||
BulkRequest request = new BulkRequest();
|
||||
for (String smsStr : lists) {
|
||||
DeleteRequest deleteRequest=new DeleteRequest(index,smsStr);
|
||||
request.add(deleteRequest);
|
||||
}
|
||||
client.bulk(request);
|
||||
logger.info("批量删除索引: "+index +", 删除成功共:" + lists.size() + "条数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Elasticsearch 删除某个index所有的文档接口实现
|
||||
* @param index 要插入的索引
|
||||
|
||||
+86
-19
@@ -760,7 +760,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";
|
||||
@@ -1287,17 +1287,17 @@ 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;
|
||||
}
|
||||
i++;
|
||||
if (-1 != num) {
|
||||
value = searchInfoEO.getSelectValue().substring(0, num).trim();
|
||||
select = searchInfoEO.getSelectValue().substring(num + 1).trim();
|
||||
real = value + " " + select;
|
||||
}else{
|
||||
value = real;
|
||||
select = "";
|
||||
}
|
||||
searchInfoEO.setSelectValue(select);
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
@@ -1307,12 +1307,79 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
BoolQueryBuilder boolQueryShould = QueryBuilders.boolQuery();
|
||||
BoolQueryBuilder boolQueryMust = QueryBuilders.boolQuery();
|
||||
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);
|
||||
String[] selects = null;
|
||||
if (StringUtils.isNotBlank(select)) {
|
||||
//判断标准号是否企标SMTC ,标准列别 (),/,字母
|
||||
Pattern pattern = Pattern.compile("^[a-zA-Z\\/\\(\\)\\(\\)]+$");
|
||||
if (pattern.matcher(value).matches()) {
|
||||
//符合标准类别
|
||||
if ("SMTC".equals(value)) {
|
||||
//符合标准SMTC
|
||||
//判断是否带有年份
|
||||
Pattern patternbianhao = Pattern.compile("^[0-9a-zA-Z\\.\\(\\(\\)\\)\\-\\s]+$");
|
||||
if (patternbianhao.matcher(select).matches()) {
|
||||
// 拆分年份,当无“-”时,也生成selects
|
||||
selects = select.replace(" ","-").replace("(","-\\(-").replace(")","-\\)-").replace("(","-\\(-").replace(")","-\\)-").split("-");
|
||||
}else{
|
||||
//wildcard查询real
|
||||
selects = select.replace(" ","-").replace("(","-\\(-").replace(")","-\\)-").replace("(","-\\(-").replace(")","-\\)-").split("-");
|
||||
// isReal = true;
|
||||
// value = null;
|
||||
// selects = null;
|
||||
}
|
||||
} else {
|
||||
//不符合标准SMTC
|
||||
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) {
|
||||
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) {
|
||||
boolQueryShould.should(QueryBuilders.wildcardQuery("title.keyword", "*" + real + "*").boost(1000f));
|
||||
for (String se : selects) {
|
||||
if (StringUtils.isNotBlank(se)) {
|
||||
boolQueryShould
|
||||
// .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){
|
||||
boolQueryShould.should(QueryBuilders.wildcardQuery("title.keyword", "*" + real + "*").boost(1000f))
|
||||
.should(QueryBuilders.wildcardQuery("textContent.keyword", "*" + real + "*").boost(0.0000000000000000000000000000000001f))
|
||||
.should(QueryBuilders.wildcardQuery("issue_time", "*" + real + "*"));
|
||||
}
|
||||
boolQueryBuilder.should(boolQueryShould);
|
||||
//在结果中检索
|
||||
// boolQueryBuilder.must(multiQueryBuilder);
|
||||
@@ -1347,11 +1414,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,7 +1426,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
n_field += fragment;
|
||||
}
|
||||
//高亮标题覆盖原标题
|
||||
sourceAsMap.put("textContent.keyword",n_field);
|
||||
sourceAsMap.put("textContent",n_field);
|
||||
}
|
||||
result.add(sourceAsMap);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ package com.adc.da.common;
|
||||
public enum SarTypeEnum {
|
||||
|
||||
INLAND_STAND("INLAND_STAND","国内标准法规"),INLAND_LAWS("INLAND_LAWS","国内政策"),
|
||||
FOREIGN_STAND("FOREIGN_STAND","国外标准法规"),FOREIGN_LAWS("FOREIGN_LAWS","国外政策"),
|
||||
FOREIGN_STAND("FOREIGN_STAND","国外标准法规"),FOREIGN_LAWS("FOREIGN_LAWS","国内外政策"),
|
||||
STAND("STAND","国内外标准法规"),
|
||||
LAWS("LAWS","国内外政策"),
|
||||
LAWS_STAND("LAWS_STAND","国内外政策"),
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/search/resetSearchCenter")
|
||||
@Api(description = "搜索中心重置索引及数据+实施预警触发")
|
||||
@Api(tags = "搜索中心重置索引及数据")
|
||||
public class ResetSearchCenterController extends BaseController<Map<String, Object>> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResetSearchCenterController.class);
|
||||
@@ -41,7 +41,7 @@ public class ResetSearchCenterController extends BaseController<Map<String, Obje
|
||||
|
||||
private ResponseMessage verifySearchCenter(SearchCenter searchCenter) {
|
||||
if(searchCenter.getExecType() == null || "".equals(searchCenter.getExecType())){
|
||||
return Result.error("执行参数 ALL 存在更新 不存在新增 ,UPD 只 更新存在 es 里的标准 ,ADD 只新增不存在 es 的标准");
|
||||
return Result.error("执行参数 ALL 存在更新 不存在新增 ,UPD 只 更新存在 es 里的标准 ,ADD 只新增不存在 es 的标准, DEL 只删除不存在标准库的数据");
|
||||
}
|
||||
|
||||
if(searchCenter.getCountStand() == null || searchCenter.getCountStand() == 0){
|
||||
|
||||
@@ -118,6 +118,8 @@ public class ResetSearchCenterService {
|
||||
List<SarStandardsInfo> rowsStand = iSarStandardsInfoService.getSarStandardsInfoPage(page);
|
||||
List<SarStandardsInfo> insList = new ArrayList<>();
|
||||
List<SarStandardsInfo> updList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<String> standIdList = rowsStand.stream().map(SarStandardsInfo::getId).collect(Collectors.toList());
|
||||
if(!esIdList.isEmpty()){
|
||||
|
||||
// 差集 (list1 - list2) 新增
|
||||
@@ -134,12 +136,17 @@ public class ResetSearchCenterService {
|
||||
.collect(Collectors.toList());
|
||||
updList.addAll(intersection);
|
||||
|
||||
// 差集 (list2 - list1) 删除
|
||||
List<String> delDataList = esIdList.stream().filter(num -> !standIdList.contains(num))
|
||||
.collect(Collectors.toList());
|
||||
delList.addAll(delDataList);
|
||||
|
||||
}else {
|
||||
// 新增
|
||||
insList.addAll(rowsStand);
|
||||
}
|
||||
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "UPD".equals(searchCenter.getExecType()))){
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarStandardsInfo sarStandardsInfoEO : updList){
|
||||
countUpdateSuccess++;
|
||||
if (sarStandardsInfoEO.getAttrInfoMap() != null) {
|
||||
@@ -149,7 +156,7 @@ public class ResetSearchCenterService {
|
||||
}
|
||||
}
|
||||
|
||||
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "ADD".equals(searchCenter.getExecType()))){
|
||||
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "ADD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarStandardsInfo sarStandardsInfoEO : insList){
|
||||
countAddSuccess++;
|
||||
if (sarStandardsInfoEO.getAttrInfoMap() != null) {
|
||||
@@ -158,8 +165,13 @@ public class ResetSearchCenterService {
|
||||
createStandMQService.sendStandMQ(sarStandardsInfoEO,"add");
|
||||
}
|
||||
}
|
||||
logger.info("重置国内外标准:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外标准共:"+rowsStand.size()+"条)");
|
||||
return Result.success("重置国内外标准:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外标准共:"+rowsStand.size()+"条)");
|
||||
|
||||
if(!delList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "DEL".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
elasticsearchService.deleteBatchId(delList,"stand");
|
||||
elasticsearchService.deleteBatchId(delList,"fulltextserch");
|
||||
}
|
||||
logger.info("重置国内外标准:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外标准共:"+rowsStand.size()+"条)删除-共"+delList.size()+"条数据");
|
||||
return Result.success("重置国内外标准:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外标准共:"+rowsStand.size()+"条)删除-共"+delList.size()+"条数据");
|
||||
}
|
||||
|
||||
@Async
|
||||
@@ -181,6 +193,9 @@ public class ResetSearchCenterService {
|
||||
List<SarLawsStandInfo> rowsStand = iSarLawsStandInfoService.getSarStandardsInfoPage(sarLawsInfoEOPage);
|
||||
List<SarLawsStandInfo> insList = new ArrayList<>();
|
||||
List<SarLawsStandInfo> updList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<String> standIdList = rowsStand.stream().map(SarLawsStandInfo::getId).collect(Collectors.toList());
|
||||
|
||||
if(!esIdList.isEmpty()){
|
||||
|
||||
// 差集 (list1 - list2) 新增
|
||||
@@ -197,12 +212,17 @@ public class ResetSearchCenterService {
|
||||
.collect(Collectors.toList());
|
||||
updList.addAll(intersection);
|
||||
|
||||
// 差集 (list2 - list1) 删除
|
||||
List<String> delDataList = esIdList.stream().filter(num -> !standIdList.contains(num))
|
||||
.collect(Collectors.toList());
|
||||
delList.addAll(delDataList);
|
||||
|
||||
}else {
|
||||
// 新增
|
||||
insList.addAll(rowsStand);
|
||||
}
|
||||
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "UPD".equals(searchCenter.getExecType()))){
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarLawsStandInfo sarLawsInfoEO : updList){
|
||||
countUpdateSuccess++;
|
||||
if (sarLawsInfoEO.getAttrInfoMap() != null) {
|
||||
@@ -212,7 +232,7 @@ public class ResetSearchCenterService {
|
||||
}
|
||||
}
|
||||
|
||||
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "ADD".equals(searchCenter.getExecType()))){
|
||||
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "ADD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarLawsStandInfo sarLawsInfoEO : insList){
|
||||
countAddSuccess++;
|
||||
if (sarLawsInfoEO.getAttrInfoMap() != null) {
|
||||
@@ -221,8 +241,14 @@ public class ResetSearchCenterService {
|
||||
createStandMQService.sendLawsMQ(sarLawsInfoEO,"add");
|
||||
}
|
||||
}
|
||||
logger.info("重置国内外政策:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外政策共:"+rowsStand.size()+"条)");
|
||||
return Result.success("重置国内外政策:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外政策共:"+rowsStand.size()+"条)");
|
||||
|
||||
if(!delList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "DEL".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
elasticsearchService.deleteBatchId(delList,"laws");
|
||||
elasticsearchService.deleteBatchId(delList,"fulltextserch");
|
||||
}
|
||||
|
||||
logger.info("重置国内外政策:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外政策共:"+rowsStand.size()+"条)删除-共"+delList.size()+"条数据");
|
||||
return Result.success("重置国内外政策:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(国内外政策共:"+rowsStand.size()+"条)删除-共"+delList.size()+"条数据");
|
||||
}
|
||||
|
||||
private void idListFunc(SarLawsStandInfoPage sarLawsInfoEOPage, SearchCenter searchCenter) {
|
||||
@@ -256,6 +282,9 @@ public class ResetSearchCenterService {
|
||||
List<SarBussionessStand> rowsStand = iSarBussionessStandService.getSarBussionStandPage(sarBussionessStandEOPage);
|
||||
List<SarBussionessStand> insList = new ArrayList<>();
|
||||
List<SarBussionessStand> updList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<String> standIdList = rowsStand.stream().map(SarBussionessStand::getId).collect(Collectors.toList());
|
||||
|
||||
if(!esIdList.isEmpty()){
|
||||
|
||||
// 差集 (list1 - list2) 新增
|
||||
@@ -272,12 +301,17 @@ public class ResetSearchCenterService {
|
||||
.collect(Collectors.toList());
|
||||
updList.addAll(intersection);
|
||||
|
||||
// 差集 (list2 - list1) 删除
|
||||
List<String> delDataList = esIdList.stream().filter(num -> !standIdList.contains(num))
|
||||
.collect(Collectors.toList());
|
||||
delList.addAll(delDataList);
|
||||
|
||||
}else {
|
||||
// 新增
|
||||
insList.addAll(rowsStand);
|
||||
}
|
||||
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "UPD".equals(searchCenter.getExecType()))){
|
||||
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarBussionessStand sarBussionessStandEO : updList){
|
||||
countUpdateSuccess++;
|
||||
if (sarBussionessStandEO.getAttrInfoMap() != null) {
|
||||
@@ -287,7 +321,7 @@ public class ResetSearchCenterService {
|
||||
}
|
||||
}
|
||||
|
||||
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "ADD".equals(searchCenter.getExecType()))){
|
||||
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "ADD".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
for(SarBussionessStand sarBussionessStandEO : insList){
|
||||
countAddSuccess++;
|
||||
if (sarBussionessStandEO.getAttrInfoMap() != null) {
|
||||
@@ -296,8 +330,13 @@ public class ResetSearchCenterService {
|
||||
createStandMQService.sendBussStandMQ(sarBussionessStandEO,"add");
|
||||
}
|
||||
}
|
||||
logger.info("重置企标:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(企标共:"+rowsStand.size()+"条)");
|
||||
return Result.success("重置企标:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(企标共:"+rowsStand.size()+"条)");
|
||||
|
||||
if(!delList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "DEL".equals(searchCenter.getExecType().toUpperCase()))){
|
||||
elasticsearchService.deleteBatchId(delList,"bussstand");
|
||||
elasticsearchService.deleteBatchId(delList,"fulltextserch");
|
||||
}
|
||||
logger.info("重置企标:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(企标共:"+rowsStand.size()+"条)删除-共"+delList.size()+"条数据");
|
||||
return Result.success("重置企标:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(企标共:"+rowsStand.size()+"条)删除-共"+delList.size()+"条数据");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -49,12 +49,12 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> queryAllPlans(EsRevisePlan esRevisePlan) {
|
||||
Integer count = esRevisePlanDao.getQueryTotal(esRevisePlan);
|
||||
esRevisePlan.getPager().setRowCount(count);
|
||||
if(StringUtils.isNotBlank(esRevisePlan.getPlanStatus())){
|
||||
List<String> list= Arrays.stream(esRevisePlan.getPlanStatus().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
esRevisePlan.setPlanStatusList(list);
|
||||
}
|
||||
Integer count = esRevisePlanDao.getQueryTotal(esRevisePlan);
|
||||
esRevisePlan.getPager().setRowCount(count);
|
||||
List<EsRevisePlan> esRevisePlans = esRevisePlanDao.queryAll(esRevisePlan);
|
||||
return esRevisePlans;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,9 @@ public class exportWkExcel {
|
||||
public ResponseMessage<?> importSplitItemsZip(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
List<importExcelDTO> res=exportService.delWithWkData(file,stringBuilder);
|
||||
if (stringBuilder.toString().length()>0){
|
||||
if(null==res){
|
||||
return Result.error("-1","","请严格按照模板上传文件");
|
||||
}else if (stringBuilder.toString().length()>0){
|
||||
return Result.error("-1","",stringBuilder.toString());
|
||||
}else {
|
||||
return Result.success(res);
|
||||
|
||||
@@ -7,6 +7,6 @@ import java.util.List;
|
||||
|
||||
public interface IExportService {
|
||||
|
||||
List<importExcelDTO> delWithWkData(MultipartFile file ,StringBuilder stringBuilder);
|
||||
List<importExcelDTO> delWithWkData(MultipartFile file ,StringBuilder stringBuilder) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
+48
-44
@@ -39,7 +39,7 @@ public class IExportServiceImpl implements IExportService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<importExcelDTO> delWithWkData(MultipartFile file ,StringBuilder stringBuilder) {
|
||||
public List<importExcelDTO> delWithWkData(MultipartFile file ,StringBuilder stringBuilder) throws Exception {
|
||||
|
||||
// //获取数据字典数据
|
||||
// Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
@@ -64,57 +64,61 @@ public class IExportServiceImpl implements IExportService {
|
||||
tsUserMap.put(tsUser.getAccount(),tsUser.getUname());
|
||||
});
|
||||
List<importExcelDTO> res= ExcelImportUtilByWk.readExcelpublic(importExcelDTO.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (importExcelDTO importExcelDTO: res) {
|
||||
if (null!=importExcelDTO.getWgLeader() && !"".equals(importExcelDTO.getWgLeader())) {
|
||||
importExcelDTO.setWgLeaderName(tsUserMap.get(importExcelDTO.getWgLeader()));
|
||||
if (null == tsUserMap.get(importExcelDTO.getWgLeader())) {
|
||||
stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;");
|
||||
if (null!=res) {
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i = 1;
|
||||
for (importExcelDTO importExcelDTO : res) {
|
||||
if (null != importExcelDTO.getWgLeader() && !"".equals(importExcelDTO.getWgLeader())) {
|
||||
importExcelDTO.setWgLeaderName(tsUserMap.get(importExcelDTO.getWgLeader())+"("+importExcelDTO.getWgLeader()+")");
|
||||
if (null == tsUserMap.get(importExcelDTO.getWgLeader())) {
|
||||
stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null!=importExcelDTO.getUnitName() && !"".equals(importExcelDTO.getUnitName())){
|
||||
importExcelDTO.setUnit(tsInstitutionMap.get(importExcelDTO.getUnitName()));
|
||||
if (null==tsInstitutionMap.get(importExcelDTO.getUnitName())){
|
||||
stringBuilder.append("第"+i+"行第4列起草责任单位填写不符合格式要求请检查;");
|
||||
if (null != importExcelDTO.getUnitName() && !"".equals(importExcelDTO.getUnitName())) {
|
||||
importExcelDTO.setUnit(tsInstitutionMap.get(importExcelDTO.getUnitName()));
|
||||
if (null == tsInstitutionMap.get(importExcelDTO.getUnitName())) {
|
||||
stringBuilder.append("第" + i + "行第4列起草责任单位填写不符合格式要求请检查;");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null!=importExcelDTO.getDrafter() && !"".equals(importExcelDTO.getDrafter())){
|
||||
importExcelDTO.setDrafterName(tsUserMap.get(importExcelDTO.getDrafter()));
|
||||
if ( null==tsUserMap.get(importExcelDTO.getDrafter())){
|
||||
stringBuilder.append("第"+i+"行第5列起草人填写不符合格式要求请检查;");
|
||||
if (null != importExcelDTO.getDrafter() && !"".equals(importExcelDTO.getDrafter())) {
|
||||
importExcelDTO.setDrafterName(tsUserMap.get(importExcelDTO.getDrafter())+"("+importExcelDTO.getDrafter()+")");
|
||||
if (null == tsUserMap.get(importExcelDTO.getDrafter())) {
|
||||
stringBuilder.append("第" + i + "行第5列起草人填写不符合格式要求请检查;");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null!=importExcelDTO.getResPerson() && !"".equals(importExcelDTO.getResPerson())){
|
||||
importExcelDTO.setResPersonName(tsUserMap.get(importExcelDTO.getResPerson()));
|
||||
if ( null==tsUserMap.get(importExcelDTO.getResPerson())){
|
||||
stringBuilder.append("第"+i+"行第6列评审责任人填写不符合格式要求请检查;");
|
||||
if (null != importExcelDTO.getResPerson() && !"".equals(importExcelDTO.getResPerson())) {
|
||||
importExcelDTO.setResPersonName(tsUserMap.get(importExcelDTO.getResPerson())+"("+importExcelDTO.getResPerson()+")");
|
||||
if (null == tsUserMap.get(importExcelDTO.getResPerson())) {
|
||||
stringBuilder.append("第" + i + "行第6列评审责任人填写不符合格式要求请检查;");
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getEndTime() && !"".equals(importExcelDTO.getEndTime())) {
|
||||
importExcelDTO.setEndTime(formater.format(HSSFDateUtil.getJavaDate(Double.valueOf(importExcelDTO.getEndTime()))));
|
||||
try {
|
||||
if (null != importExcelDTO.getEndTime() && !"".equals(importExcelDTO.getEndTime())) {
|
||||
importExcelDTO.setEndTime(formater.format(HSSFDateUtil.getJavaDate(Double.valueOf(importExcelDTO.getEndTime()))));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
stringBuilder.append("第" + i + "行第10列立项完成时间填写不符合格式要求请检查;");
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第10列立项完成时间填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getReleaseTime() && !"".equals(importExcelDTO.getReleaseTime())) {
|
||||
importExcelDTO.setReleaseTime(formater.format(HSSFDateUtil.getJavaDate(Double.valueOf(importExcelDTO.getReleaseTime()))));
|
||||
try {
|
||||
if (null != importExcelDTO.getReleaseTime() && !"".equals(importExcelDTO.getReleaseTime())) {
|
||||
importExcelDTO.setReleaseTime(formater.format(HSSFDateUtil.getJavaDate(Double.valueOf(importExcelDTO.getReleaseTime()))));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
stringBuilder.append("第" + i + "行第9列计划标准发布时间填写不符合格式要求请检查;");
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第9列计划标准发布时间填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getDraftTime() && !"".equals(importExcelDTO.getDraftTime())) {
|
||||
importExcelDTO.setDraftTime(formater.format(HSSFDateUtil.getJavaDate(Double.valueOf(importExcelDTO.getDraftTime()))));
|
||||
try {
|
||||
if (null != importExcelDTO.getDraftTime() && !"".equals(importExcelDTO.getDraftTime())) {
|
||||
importExcelDTO.setDraftTime(formater.format(HSSFDateUtil.getJavaDate(Double.valueOf(importExcelDTO.getDraftTime()))));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
stringBuilder.append("第" + i + "行第8列计划初稿完成日期填写不符合格式要求请检查;");
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第8列计划初稿完成日期填写不符合格式要求请检查;");
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
return res;
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+19
-2
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.adc.da.slrs.processModel.entity.importExcelDTO;
|
||||
import com.adc.da.util.DateUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
@@ -33,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) {
|
||||
|
||||
Workbook workbook = null;
|
||||
|
||||
@@ -83,8 +84,16 @@ public class ExcelImportUtilByWk {
|
||||
mapExcel.put(Integer.valueOf(excel.orderNum()), excel);
|
||||
}
|
||||
}
|
||||
Row headRow=sheet.getRow(firstRowNum);
|
||||
for (int j=0;j<mapExcel.keySet().size();j++){
|
||||
if (!headRow.getCell(j).toString().equals(mapExcel.get(j).name())){
|
||||
//返回null就是表头没对上 excel错误
|
||||
return null;
|
||||
}
|
||||
}
|
||||
for (int rowNum = rowStart; rowNum < rowEnd; rowNum++) {
|
||||
T o = tClass.getConstructor(new Class[]{}).newInstance(new Object[]{});
|
||||
int nums=0;
|
||||
Row row = sheet.getRow(rowNum);
|
||||
if (null == row) {
|
||||
continue;
|
||||
@@ -96,13 +105,21 @@ 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){
|
||||
nums++;
|
||||
}
|
||||
map.get(a).set(o, date);
|
||||
}else {
|
||||
String value = convertCellValueToString(cell);
|
||||
if (StringUtils.isBlank(value)){
|
||||
nums++;
|
||||
}
|
||||
map.get(a).set(o, value);
|
||||
}
|
||||
}
|
||||
resultDataList.add(o);
|
||||
if (nums==0) {
|
||||
resultDataList.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -14,6 +14,7 @@ import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE;
|
||||
|
||||
@@ -33,6 +34,20 @@ public class SarBussStandAttrInfoController extends BaseController<SarBussStandA
|
||||
@Autowired
|
||||
private ISarBussStandAttrInfoService sarBussStandAttrInfoEOService;
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|根据企标ID查询")
|
||||
@GetMapping("/getBussAttrInfo")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:list")
|
||||
public Map<String, Object> getBussAttrInfo(String standId) throws Exception {
|
||||
return sarBussStandAttrInfoEOService.getBussAttrInfo(standId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|单个查询")
|
||||
@GetMapping("/getSelectFieldValByStandId")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:list")
|
||||
public ResponseMessage<String> getSelectFieldValByStandId(String field,String standId) throws Exception {
|
||||
return Result.success(sarBussStandAttrInfoEOService.selectFieldValByStandId(field,standId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:page")
|
||||
|
||||
+4
@@ -57,6 +57,10 @@ public class SarBussStandAttrInfo extends BaseEntity {
|
||||
@TableField("TXLBBUSS")
|
||||
private String txlbbuss;
|
||||
|
||||
@ApiModelProperty(value = "被代替企标编号")
|
||||
@TableField("BDTQBBHBUSS")
|
||||
private String bdtqbbhbuss;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String glwj;
|
||||
//
|
||||
|
||||
+3
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -16,6 +17,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface ISarBussStandAttrInfoService extends IService<SarBussStandAttrInfo> {
|
||||
|
||||
Map<String, Object> getBussAttrInfo(String standId);
|
||||
|
||||
String selectFieldValByStandId(String field,String standId);
|
||||
|
||||
int updateStandInfo(String standId,String field,String value);
|
||||
|
||||
+8
@@ -4,10 +4,12 @@ import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -20,6 +22,12 @@ import java.util.List;
|
||||
@Service
|
||||
public class SarBussStandAttrInfoServiceImpl extends ServiceImpl<SarBussStandAttrInfoDao, SarBussStandAttrInfo> implements ISarBussStandAttrInfoService {
|
||||
|
||||
@Override
|
||||
public Map getBussAttrInfo(String standId){
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
return this.baseMapper.selectStandFieldAndData(fieldInfo,standId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateStandInfo(String standId,String field,String value){
|
||||
return this.baseMapper.updateStandInfo(standId,field,value);
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@ import com.adc.da.Log.BusinessType;
|
||||
import com.adc.da.Log.EpcLog;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
@@ -119,7 +120,7 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
||||
response.setContentType("application/force-download");
|
||||
//导出数据
|
||||
List<SarBussionessStand> datas = sarBussionessStandEOService.getSarBussionessStand(exportType,exportContent,userId);
|
||||
List<SarBussionessStandExport> datas = sarBussionessStandEOService.getSarBussionessStand(exportType,exportContent,userId);
|
||||
workbook = BussStandExportUtil.exportDatas(datas);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
|
||||
+2
-3
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.dao;
|
||||
|
||||
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;
|
||||
@@ -45,7 +46,7 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
int getBussionessStandInfoCountByRole(SarBussionessStandEOPage page);
|
||||
|
||||
List<SarBussionessStand> getSarBussionessStand(SarBussionessStandEOPage page);
|
||||
List<SarBussionessStandExport> getSarBussionessStand(SarBussionessStandEOPage page);
|
||||
//liwenxuan:标准法规更新数量及清单:企业标准
|
||||
Integer selectBussionessStandardsCount(Date visitTime);
|
||||
//liwenxuan:标准法规更新数量及清单:企业标准All
|
||||
@@ -54,8 +55,6 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> selectSarBussionesDownloadFileInfo(String id);
|
||||
|
||||
List<SarBussionessStand> selectStandardsByStandnumber(SarBussionessStand sarStandardsInfoEO);
|
||||
|
||||
List<SarBussionessStand> selectStandByStandNumber(@Param("standCode") String standCode);
|
||||
|
||||
/**
|
||||
|
||||
+6
@@ -130,6 +130,12 @@ public class SarBussionessStand extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String DTQBBHBUSS;
|
||||
|
||||
/**
|
||||
* 代替企标标准号
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String BDTQBBHBUSS;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String firstPutTime;
|
||||
|
||||
+608
@@ -0,0 +1,608 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.entity;
|
||||
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarBussionessStand对象", description="企业标准信息表")
|
||||
public class SarBussionessStandExport extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "企标标准号")
|
||||
@TableField("STAND_CODE")
|
||||
private String standCode;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@TableField("STAND_NUMBER")
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@TableField("STAND_NAME")
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准英文名称")
|
||||
@TableField("STAND_EN_NAME")
|
||||
private String standEnName;
|
||||
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@TableField("ISSUE_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTime;
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@TableField("PUT_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String putTime;
|
||||
|
||||
@ApiModelProperty(value = "代替标准号")
|
||||
@TableField("REPLACE_STAND_NUM")
|
||||
private String replaceStandNum;
|
||||
|
||||
@ApiModelProperty(value = "被代替标准号")
|
||||
@TableField("REPLACED_STAND_NUM")
|
||||
private String replacedStandNum;
|
||||
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
@TableField("STAND_STATUS")
|
||||
private String standStatus;
|
||||
|
||||
@ApiModelProperty(value = "适用国家/地区")
|
||||
@TableField("APPLY_COUNTRY")
|
||||
private String applyCountry;
|
||||
|
||||
@ApiModelProperty(value = "标准性质")
|
||||
@TableField("STAND_NATURE")
|
||||
private String standNature;
|
||||
|
||||
@ApiModelProperty(value = "标准类别")
|
||||
@TableField("STAND_SORT")
|
||||
private String standSort;
|
||||
|
||||
@ApiModelProperty(value = "标准年份")
|
||||
@TableField("STAND_YEAR")
|
||||
private String standYear;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
// 新添加字段
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
@TableField("TEXT_STATUS_BUSS")
|
||||
private String textStatusBuss;
|
||||
|
||||
@ApiModelProperty(value = "计划库制定状态 0 默认 1 制定 2修订")
|
||||
@TableField("REVISE_STATUS")
|
||||
private String reviseStatus;
|
||||
|
||||
@ApiModelProperty(value = "标准顺序号")
|
||||
@TableField("STAND_SN")
|
||||
private String standSn;
|
||||
|
||||
|
||||
// 非表字段
|
||||
@TableField(exist = false)
|
||||
private String newStandSn;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String firstPutTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String putTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String issueTimeStr;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTimeStr;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String processNum;//流程编号
|
||||
|
||||
//目录ID 非标准信息表中的字段
|
||||
@TableField(exist = false)
|
||||
private String menuId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuParentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String textStatusBussShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standStatusShow; // 标准状态下拉框 --单选
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standNatrueShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSortShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String applyCountryShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> standFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> opinionFilesList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> relevanceFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String collectId;
|
||||
|
||||
//文件的类型
|
||||
@TableField(exist = false)
|
||||
private String standFileClassify;
|
||||
|
||||
//文件的下载id
|
||||
@TableField(exist = false)
|
||||
private String attId;
|
||||
|
||||
//记录是否修改了替代文件号
|
||||
@TableField(exist = false)
|
||||
private int upReplaceNumFlag;
|
||||
//记录是否修改了文件号
|
||||
@TableField(exist = false)
|
||||
private int upNumFlag;
|
||||
// 数据库新加的字段
|
||||
|
||||
@TableField(exist = false)
|
||||
private String remark;//备注
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoCaseMap = new LinkedHashMap<>(); //属性表字段与值小写前端带入渲染
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoProcessMap = new LinkedHashMap<>(); //属性表字段与值小写前端带入渲染
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sarStandAttrEOStr; //新增修改时属性表信息
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fileIds; //全部文件ID
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<SarStandAttrDetailsEO> attrInfoList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 新增条件字段
|
||||
* @return
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String reviewTime;
|
||||
@TableField(exist = false)
|
||||
private String issueTimeStart;
|
||||
@TableField(exist = false)
|
||||
private String issueTimeEnd;
|
||||
@TableField(exist = false)
|
||||
private String prcCreateUser;
|
||||
|
||||
private String FZRQBUSS;
|
||||
private String FSRQBUSS;
|
||||
private String FBGBUSS;
|
||||
private String BZSMBUSS;
|
||||
private String LSBBBUSS;
|
||||
private String QTWJBUSS;
|
||||
private String QCDW;
|
||||
private String QCRBUSS;
|
||||
private String WJSCRYBUSS;
|
||||
private String SYCXCLASS;
|
||||
private String NYLXCLASS;
|
||||
private String SYCPXCLASS;
|
||||
private String TXLBBUSS;
|
||||
private String VPPSBMBUSS;
|
||||
private String VPPSCNBUSS;
|
||||
private String DTQBBHBUSS;
|
||||
private String BDTQBBHBUSS;
|
||||
private String XGJLBUSS;
|
||||
private String XGLC;
|
||||
private String GLWJBUSS;
|
||||
private String XCSJBUSS;
|
||||
private String LLCS;
|
||||
private String CS;
|
||||
private String CYCVPPSBMBUSS;
|
||||
private String CYCVPPSCNBUSS;
|
||||
private String KCVPPSBMBUSS;
|
||||
private String KCVPPSCNBUSS;
|
||||
private String DYBXHBUSS;
|
||||
private String DYMCBUSS;
|
||||
private String YYBZ;
|
||||
private String CBCD;
|
||||
private String CYCD;
|
||||
private String CYBZ;
|
||||
private String BARQ;
|
||||
private String XGD;
|
||||
private String CSZD;
|
||||
private String CDZD;
|
||||
private String CYCDYBXHBUSS;
|
||||
private String CYCDYMCBUSS;
|
||||
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getStandCode() {
|
||||
return standCode;
|
||||
}
|
||||
|
||||
public void setStandCode(String standCode) {
|
||||
this.standCode = standCode;
|
||||
}
|
||||
|
||||
public String getStandName() {
|
||||
return standName;
|
||||
}
|
||||
|
||||
public void setStandName(String standName) {
|
||||
this.standName = standName;
|
||||
}
|
||||
|
||||
public String getStandEnName() {
|
||||
return standEnName;
|
||||
}
|
||||
|
||||
public void setStandEnName(String standEnName) {
|
||||
this.standEnName = standEnName;
|
||||
}
|
||||
|
||||
public String getIssueTime() {
|
||||
return issueTime;
|
||||
}
|
||||
|
||||
public void setIssueTime(String issueTime) {
|
||||
this.issueTime = issueTime;
|
||||
}
|
||||
|
||||
public String getPutTime() {
|
||||
return putTime;
|
||||
}
|
||||
|
||||
public void setPutTime(String putTime) {
|
||||
this.putTime = putTime;
|
||||
}
|
||||
|
||||
public String getReplaceStandNum() {
|
||||
return replaceStandNum;
|
||||
}
|
||||
|
||||
public void setReplaceStandNum(String replaceStandNum) {
|
||||
this.replaceStandNum = replaceStandNum;
|
||||
}
|
||||
|
||||
public String getReplacedStandNum() {
|
||||
return replacedStandNum;
|
||||
}
|
||||
|
||||
public void setReplacedStandNum(String replacedStandNum) {
|
||||
this.replacedStandNum = replacedStandNum;
|
||||
}
|
||||
|
||||
public String getStandStatus() {
|
||||
return standStatus;
|
||||
}
|
||||
|
||||
public void setStandStatus(String standStatus) {
|
||||
this.standStatus = standStatus;
|
||||
}
|
||||
|
||||
public String getApplyCountry() {
|
||||
return applyCountry;
|
||||
}
|
||||
|
||||
public void setApplyCountry(String applyCountry) {
|
||||
this.applyCountry = applyCountry;
|
||||
}
|
||||
|
||||
public String getStandNature() {
|
||||
return standNature;
|
||||
}
|
||||
|
||||
public void setStandNature(String standNature) {
|
||||
this.standNature = standNature;
|
||||
}
|
||||
|
||||
public String getStandSort() {
|
||||
return standSort;
|
||||
}
|
||||
|
||||
public void setStandSort(String standSort) {
|
||||
this.standSort = standSort;
|
||||
}
|
||||
|
||||
public String getStandYear() {
|
||||
return standYear;
|
||||
}
|
||||
|
||||
public void setStandYear(String standYear) {
|
||||
this.standYear = standYear;
|
||||
}
|
||||
|
||||
public Integer getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(Integer validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getTextStatusBuss() {
|
||||
return textStatusBuss;
|
||||
}
|
||||
|
||||
public void setTextStatusBuss(String textStatusBuss) {
|
||||
this.textStatusBuss = textStatusBuss;
|
||||
}
|
||||
|
||||
public String getFirstPutTime() {
|
||||
return firstPutTime;
|
||||
}
|
||||
|
||||
public void setFirstPutTime(String firstPutTime) {
|
||||
this.firstPutTime = firstPutTime;
|
||||
}
|
||||
|
||||
public String getPutTimeShow() {
|
||||
return putTimeShow;
|
||||
}
|
||||
|
||||
public void setPutTimeShow(String putTimeShow) {
|
||||
this.putTimeShow = putTimeShow;
|
||||
}
|
||||
|
||||
public String getIssueTimeShow() {
|
||||
return issueTimeShow;
|
||||
}
|
||||
|
||||
public void setIssueTimeShow(String issueTimeShow) {
|
||||
this.issueTimeShow = issueTimeShow;
|
||||
}
|
||||
|
||||
public String getIssueTimeStr() {
|
||||
return issueTimeStr;
|
||||
}
|
||||
|
||||
public void setIssueTimeStr(String issueTimeStr) {
|
||||
this.issueTimeStr = issueTimeStr;
|
||||
}
|
||||
|
||||
public String getPutTimeStr() {
|
||||
return putTimeStr;
|
||||
}
|
||||
|
||||
public void setPutTimeStr(String putTimeStr) {
|
||||
this.putTimeStr = putTimeStr;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public String getMenuParentId() {
|
||||
return menuParentId;
|
||||
}
|
||||
|
||||
public void setMenuParentId(String menuParentId) {
|
||||
this.menuParentId = menuParentId;
|
||||
}
|
||||
|
||||
public String getStandStatusShow() {
|
||||
return standStatusShow;
|
||||
}
|
||||
|
||||
public void setStandStatusShow(String standStatusShow) {
|
||||
this.standStatusShow = standStatusShow;
|
||||
}
|
||||
|
||||
public String getStandNatrueShow() {
|
||||
return standNatrueShow;
|
||||
}
|
||||
|
||||
public void setStandNatrueShow(String standNatrueShow) {
|
||||
this.standNatrueShow = standNatrueShow;
|
||||
}
|
||||
|
||||
public String getStandSortShow() {
|
||||
return standSortShow;
|
||||
}
|
||||
|
||||
public void setStandSortShow(String standSortShow) {
|
||||
this.standSortShow = standSortShow;
|
||||
}
|
||||
|
||||
public String getApplyCountryShow() {
|
||||
return applyCountryShow;
|
||||
}
|
||||
|
||||
public void setApplyCountryShow(String applyCountryShow) {
|
||||
this.applyCountryShow = applyCountryShow;
|
||||
}
|
||||
|
||||
public List<AttFileVo> getStandFileList() {
|
||||
return standFileList;
|
||||
}
|
||||
|
||||
public void setStandFileList(List<AttFileVo> standFileList) {
|
||||
this.standFileList = standFileList;
|
||||
}
|
||||
|
||||
public List<AttFileVo> getOpinionFilesList() {
|
||||
return opinionFilesList;
|
||||
}
|
||||
|
||||
public void setOpinionFilesList(List<AttFileVo> opinionFilesList) {
|
||||
this.opinionFilesList = opinionFilesList;
|
||||
}
|
||||
|
||||
public List<AttFileVo> getRelevanceFileList() {
|
||||
return relevanceFileList;
|
||||
}
|
||||
|
||||
public void setRelevanceFileList(List<AttFileVo> relevanceFileList) {
|
||||
this.relevanceFileList = relevanceFileList;
|
||||
}
|
||||
|
||||
public String getCollectId() {
|
||||
return collectId;
|
||||
}
|
||||
|
||||
public void setCollectId(String collectId) {
|
||||
this.collectId = collectId;
|
||||
}
|
||||
|
||||
public String getStandFileClassify() {
|
||||
return standFileClassify;
|
||||
}
|
||||
|
||||
public void setStandFileClassify(String standFileClassify) {
|
||||
this.standFileClassify = standFileClassify;
|
||||
}
|
||||
|
||||
public String getAttId() {
|
||||
return attId;
|
||||
}
|
||||
|
||||
public void setAttId(String attId) {
|
||||
this.attId = attId;
|
||||
}
|
||||
|
||||
public int getUpReplaceNumFlag() {
|
||||
return upReplaceNumFlag;
|
||||
}
|
||||
|
||||
public void setUpReplaceNumFlag(int upReplaceNumFlag) {
|
||||
this.upReplaceNumFlag = upReplaceNumFlag;
|
||||
}
|
||||
|
||||
public int getUpNumFlag() {
|
||||
return upNumFlag;
|
||||
}
|
||||
|
||||
public void setUpNumFlag(int upNumFlag) {
|
||||
this.upNumFlag = upNumFlag;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttrInfoMap() {
|
||||
return attrInfoMap;
|
||||
}
|
||||
|
||||
public void setAttrInfoMap(Map<String, Object> attrInfoMap) {
|
||||
this.attrInfoMap = attrInfoMap;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttrInfoCaseMap() {
|
||||
return attrInfoCaseMap;
|
||||
}
|
||||
|
||||
public void setAttrInfoCaseMap(Map<String, Object> attrInfoCaseMap) {
|
||||
this.attrInfoCaseMap = attrInfoCaseMap;
|
||||
}
|
||||
|
||||
public String getSarStandAttrEOStr() {
|
||||
return sarStandAttrEOStr;
|
||||
}
|
||||
|
||||
public void setSarStandAttrEOStr(String sarStandAttrEOStr) {
|
||||
this.sarStandAttrEOStr = sarStandAttrEOStr;
|
||||
}
|
||||
|
||||
public String getFileIds() {
|
||||
return fileIds;
|
||||
}
|
||||
|
||||
public void setFileIds(String fileIds) {
|
||||
this.fileIds = fileIds;
|
||||
}
|
||||
|
||||
public List<SarStandAttrDetailsEO> getAttrInfoList() {
|
||||
return attrInfoList;
|
||||
}
|
||||
|
||||
public void setAttrInfoList(List<SarStandAttrDetailsEO> attrInfoList) {
|
||||
this.attrInfoList = attrInfoList;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarBussionessStand.service;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.search.entity.SarBussionessStandEO;
|
||||
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;
|
||||
|
||||
@@ -24,7 +25,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
||||
|
||||
ResponseMessage<SarBussionessStand> deleteSarBussionessStand(SarBussionessStandEOPage page) throws Exception;
|
||||
|
||||
List<SarBussionessStand> getSarBussionessStand(String exportType, String exportContent,String userId) throws Exception;
|
||||
List<SarBussionessStandExport> getSarBussionessStand(String exportType, String exportContent, String userId) throws Exception;
|
||||
|
||||
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
||||
|
||||
|
||||
+184
-16
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.common.ConvertMqEO;
|
||||
@@ -14,6 +15,7 @@ import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.entity.SarBussionessStandEO;
|
||||
import com.adc.da.search.entity.StandLawsEO;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||
@@ -29,6 +31,7 @@ import com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao;
|
||||
import com.adc.da.slrs.sarBussStandVal.entity.SarBussStandVal;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
@@ -52,6 +55,7 @@ import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
@@ -246,7 +250,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStand> getSarBussionessStand(String exportType, String exportContent,String userId) throws Exception {
|
||||
public List<SarBussionessStandExport> getSarBussionessStand(String exportType, String exportContent, String userId) throws Exception {
|
||||
SarBussionessStandEOPage page = new SarBussionessStandEOPage();
|
||||
if ("apart".equals(exportType)) {
|
||||
page.setIdlist(exportContent.split(","));
|
||||
@@ -321,7 +325,39 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
List<SarBussionessStand> getList = sarBussionessStandEODao.getSarBussionessStand(page);
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
|
||||
List<String> list = Arrays.asList(fieldInfo.split(",")).stream().map(s -> String.format("SAR_BUSS_STAND_ATTR_INFO."+s.trim())).collect(Collectors.toList());
|
||||
List<String> listSelect = Arrays.asList(fieldInfo.split(",")).stream().map(s -> String.format("tmp_tb."+s.trim())).collect(Collectors.toList());
|
||||
String exportAllAttrInfo = list.stream().collect(Collectors.joining(","));
|
||||
String exportAllResult = listSelect.stream().collect(Collectors.joining(","));
|
||||
if(StringUtils.isNotBlank(exportAllAttrInfo)){
|
||||
page.setExportAllAttrInfo(exportAllAttrInfo);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(exportAllResult)){
|
||||
page.setExportAllResult(exportAllResult);
|
||||
}
|
||||
|
||||
//配置列表显示的数据权限
|
||||
if ("1".equals(page.getIsKU())) {
|
||||
List<String> access = tsUserService.getResourceDataUserId(page.getUserId());
|
||||
if (null == page.getMenuId() && null == page.getMenuAllChildrenIdList()) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
page.setMenuId("");
|
||||
} else if (page.getMenuId().equals("3")) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
}
|
||||
List<String> finalData = page.getMenuAllChildrenIdList().stream().filter(s -> access.contains(s)).collect(Collectors.toList());
|
||||
if (finalData.size() > 0) {
|
||||
page.setMenuAllChildrenIdList(finalData);
|
||||
if (null == page.getMenuId() && null == page.getMenuAllChildrenIdList()) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<SarBussionessStandExport> getList = sarBussionessStandEODao.getSarBussionessStand(page);
|
||||
attrInfoShowExport(getList);
|
||||
return getList;
|
||||
}
|
||||
@@ -405,7 +441,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception {
|
||||
public void attrInfoShowExport (List<SarBussionessStandExport> sarlist) throws Exception {
|
||||
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_type_code", "dic_type_name");
|
||||
@@ -413,7 +449,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
.filter(item-> !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getDicTypeName,(value1, value2 )->value2));
|
||||
|
||||
for(SarBussionessStand row : sarlist){
|
||||
for(SarBussionessStandExport row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
Map<String, Object> getNewMap = new LinkedHashMap<>();
|
||||
@@ -456,7 +492,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
StringBuilder builder = new StringBuilder("");
|
||||
for (String s : valArr) {
|
||||
if (dicMap.containsKey(s) && !"ZRBM".equals(name)){
|
||||
builder.append(dicMap.get(s)+" ");
|
||||
builder.append(dicMap.get(s)+",");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -507,10 +543,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
createStandAttrInfo(sarBussionessStandEO);
|
||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||
updateReplaceConnect(sarBussionessStandEO);
|
||||
//修改收藏分享编号名称
|
||||
updateCollectAndShare(sarBussionessStandEO);
|
||||
|
||||
updateCiteStand(sarBussionessStandEO, beforeStandEO, "DTQBBHBUSS", "BDTQBBHBUSS");
|
||||
|
||||
// 记录修改日志
|
||||
saveUpdateLog(sarBussionessStandEO,beforeStandEO);
|
||||
if (elasflag) {
|
||||
@@ -584,6 +621,132 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
// 新增修改标准过程中,根据代替标准号,修改被代替标准号对应的标准
|
||||
public void updateCiteStand(SarBussionessStand sarBussionessStandEO, SarBussionessStand beforeSarStandardsInfo, String upField, String beUpedField) throws Exception {
|
||||
// 记录要被代替标准号的数据
|
||||
// SarStandardsInfoEO chageEO= new SarStandardsInfoEO();
|
||||
SarBussionessStand sarStandardsSelectEO = new SarBussionessStand();
|
||||
String addStrandNumber = "";
|
||||
String beforeStrandNumber = "";
|
||||
if (StringUtils.isNotEmpty(sarBussionessStandEO.getStandCode())) {
|
||||
addStrandNumber = sarBussionessStandEO.getStandCode();
|
||||
} else {
|
||||
addStrandNumber = sarBussionessStandEO.getStandCode();
|
||||
}
|
||||
|
||||
if (beforeSarStandardsInfo != null) {
|
||||
if (StringUtils.isNotEmpty(beforeSarStandardsInfo.getStandCode())) {
|
||||
beforeStrandNumber = beforeSarStandardsInfo.getStandCode();
|
||||
}
|
||||
}
|
||||
|
||||
// 以“,”分隔查看之前是否有 ,如果有不修改,如果没有,追加修改
|
||||
String newCiteStand = "";
|
||||
if ("DTQBBHBUSS".equals(upField)) {
|
||||
newCiteStand = sarBussionessStandEO.getReplaceStandNum();
|
||||
} else if ("BDTQBBHBUSS".equals(upField)) {
|
||||
newCiteStand = sarBussionessStandEO.getReplacedStandNum();
|
||||
}
|
||||
if (StringUtils.isNotEmpty(newCiteStand) && newCiteStand.split(",").length > 0) {
|
||||
// 主要逻辑处理新增的
|
||||
String nowEOrepNums[] = newCiteStand.split(",");
|
||||
for (String citeStand : nowEOrepNums) {
|
||||
sarStandardsSelectEO.setStandCode(citeStand);
|
||||
// if (StringUtils.isNotBlank(sarStandardsSelectEO.getStandNumber())) {
|
||||
// String sort = "";
|
||||
// if (sarStandardsSelectEO.getStandNumber().length() > 3) {
|
||||
// sort = sarStandardsSelectEO.getStandNumber().substring(0, 3);
|
||||
// }
|
||||
// if ("ECE".equals(sort)) {
|
||||
// int length = sarStandardsSelectEO.getStandNumber().length();
|
||||
// String number = sarStandardsSelectEO.getStandNumber().substring(3, length);
|
||||
// sarStandardsSelectEO.setStandNumber("UN(ECE)" + number);
|
||||
// }
|
||||
// }
|
||||
List<SarBussionessStand> result = this.baseMapper.selectStandardsByStandNumber(sarStandardsSelectEO);
|
||||
if (result != null && result.size() > 0) {
|
||||
String standId = result.get(0).getId();
|
||||
String field = beUpedField;
|
||||
String citedStand = sarBussStandAttrInfoEODao.selectFieldValByStandId(field, result.get(0).getId());
|
||||
String changeCitedStand = "";
|
||||
if (StringUtils.isNotBlank(citedStand)) {
|
||||
String[] beforeReplacedStandNumStr = citedStand.split(",");
|
||||
if (Arrays.asList(beforeReplacedStandNumStr).contains(addStrandNumber)) {
|
||||
continue;
|
||||
} else {
|
||||
changeCitedStand = citedStand + "," + addStrandNumber;
|
||||
}
|
||||
sarBussStandAttrInfoEODao.updateStandInfo(standId, field, changeCitedStand);
|
||||
} else {
|
||||
sarBussStandAttrInfoEODao.updateStandInfo(standId, field, addStrandNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果id不为空,说明是修改,有逻辑删除的执行以下语句,存在之前是三项,现在修改成两项的情况
|
||||
if (null != beforeSarStandardsInfo) {
|
||||
String oldCiteStand = String.valueOf(beforeSarStandardsInfo.getAttrInfoMap().get(upField));
|
||||
if (StringUtils.isNotEmpty(oldCiteStand)) {
|
||||
String[] beforeEOrepNums = oldCiteStand.split(",");
|
||||
for (String beforeStr : beforeEOrepNums) {
|
||||
// 如果再旧的中包含,在新的中没有,需要删除
|
||||
if (!Arrays.asList(nowEOrepNums).contains(beforeStr)) {
|
||||
sarStandardsSelectEO.setStandCode(beforeStr);
|
||||
List<SarBussionessStand> result = this.baseMapper.selectStandardsByStandNumber(sarStandardsSelectEO);
|
||||
if (result != null && result.size() > 0) {
|
||||
String standId = result.get(0).getId();
|
||||
String field = beUpedField;
|
||||
String citedStand = sarBussStandAttrInfoEODao.selectFieldValByStandId(field, result.get(0).getId());
|
||||
String changeCitedStand = "";
|
||||
if (StringUtils.isNotBlank(citedStand)) {
|
||||
String[] beforerepalced = citedStand.split(",");
|
||||
ArrayList beforlist = new ArrayList<>(Arrays.asList(beforerepalced));
|
||||
if (beforlist.contains(beforeStrandNumber)) {
|
||||
beforlist.remove(beforeStrandNumber);
|
||||
changeCitedStand = org.apache.commons.lang3.StringUtils.join(beforlist.toArray(), ",");
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
sarBussStandAttrInfoEODao.updateStandInfo(standId, field, changeCitedStand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// 如果为空,判断是否为修改
|
||||
if (null != beforeSarStandardsInfo) {
|
||||
String oldCiteStand = String.valueOf(beforeSarStandardsInfo.getAttrInfoMap().get(upField));
|
||||
if (StringUtils.isNotEmpty(oldCiteStand)) {
|
||||
String[] beforeEOrepNums = oldCiteStand.split(",");
|
||||
for (String beforeStr : beforeEOrepNums) {
|
||||
// 如果再旧的中包含,在新的中没有,需要删除,相关数据取第一条是因为标准号是唯一的
|
||||
sarStandardsSelectEO.setStandCode(beforeStr);
|
||||
List<SarBussionessStand> result = this.baseMapper.selectStandardsByStandNumber(sarStandardsSelectEO);
|
||||
if (result != null && result.size() > 0) {
|
||||
String standId = result.get(0).getId();
|
||||
String field = beUpedField;
|
||||
String citedStand = sarBussStandAttrInfoEODao.selectFieldValByStandId(field, result.get(0).getId());
|
||||
String changeCitedStand = "";
|
||||
if (StringUtils.isNotBlank(citedStand)) {
|
||||
String[] beforerepalced = citedStand.split(",");
|
||||
ArrayList beforlist = new ArrayList<>(Arrays.asList(beforerepalced));
|
||||
if (beforlist.contains(beforeStrandNumber)) {
|
||||
beforlist.remove(beforeStrandNumber);
|
||||
changeCitedStand = StringUtils.join(beforlist.toArray(), ",");
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
sarBussStandAttrInfoEODao.updateStandInfo(standId, field, changeCitedStand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void updateCollectAndShare(SarBussionessStand sarBussionessStandEO) throws Exception {
|
||||
//修改收藏表中
|
||||
String number = sarBussionessStandEO.getStandCode()+ ")";
|
||||
@@ -835,7 +998,9 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
convert.setStandFileClassify(field);
|
||||
convert.setConvertType(SarTypeEnum.BUSINESS.getValue());
|
||||
// convertMq.sendMQ(convert);
|
||||
if(elasflag) {
|
||||
convertMq.sendMQ(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -893,7 +1058,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfosOrderByDateDesc(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
@@ -1347,11 +1512,14 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport (SarBussionessStand row) throws Exception {
|
||||
public void attrInfoDetailsExport (SarBussionessStandExport row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
|
||||
List<String> list = Arrays.asList(fieldInfo.split(",")).stream().map(s -> String.format(s.trim())).collect(Collectors.toList());
|
||||
|
||||
Map<String, Object> getAttrMap = BeanUtils.describe(row);
|
||||
|
||||
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
|
||||
@@ -1365,6 +1533,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
List<String> filterList = list.stream().filter(a -> name.equals(a)).collect(Collectors.toList());
|
||||
if(filterList.isEmpty()){
|
||||
newMap.remove(name);
|
||||
continue;
|
||||
}
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
@@ -1386,11 +1559,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -92,4 +92,7 @@ public class SarBussionessStandState extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String QCRBUSS;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSort;
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -72,6 +72,7 @@ public class SarBussionessStandStatePage extends BasePage {
|
||||
|
||||
private String QCDW;
|
||||
private String QCRBUSS;
|
||||
private String standSort;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+57
-21
@@ -12,6 +12,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.collections.IterableMap;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -43,29 +44,61 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
// queryWrapper.eq("user_id",form.get)
|
||||
// .eq("evaluation_type","dynamic");
|
||||
|
||||
Optional.ofNullable(form.getEvaluationType())
|
||||
.ifPresent( item->{
|
||||
if ("dynamic".equals(form.getEvaluationType())){
|
||||
QueryWrapper<QualityEvaluation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("law_id",form.getLawId()) //清除此用户在动态评分中已存在的评分
|
||||
.eq("user_id",form.getUserId())
|
||||
.eq("evaluation_type","dynamic");
|
||||
this.remove(queryWrapper);
|
||||
}
|
||||
});
|
||||
// Optional.ofNullable(form.getEvaluationType())
|
||||
// .ifPresent( item->{
|
||||
// if ("dynamic".equals(form.getEvaluationType())){
|
||||
// QueryWrapper<QualityEvaluation> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("law_id",form.getLawId()) //清除此用户在动态评分中已存在的评分
|
||||
// .eq("user_id",form.getUserId())
|
||||
// .eq("evaluation_type","dynamic");
|
||||
// this.remove(queryWrapper);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
QueryWrapper<QualityEvaluation> qw = new QueryWrapper();
|
||||
qw.eq("law_id",form.getLawId());
|
||||
qw.eq("evaluation_type","dynamic");
|
||||
List<QualityEvaluation> list = this.baseMapper.selectList(qw);
|
||||
|
||||
List<QualityEvaluation> tableData = form.getTableData();
|
||||
tableData.forEach(item->{
|
||||
|
||||
item.setModifyTime(new Date());
|
||||
item.setId( UUIDUtils.randomUUID20());
|
||||
if ("number".equals(item.getValueType()) ){
|
||||
item.setScore(String.valueOf (Double.valueOf(item.getScore()) * 2) );
|
||||
if(!list.isEmpty()){
|
||||
List<QualityEvaluation> updSetList = tableData.stream()
|
||||
.map(upObj -> list.stream()
|
||||
.filter(stateQueryObj -> upObj.getEvaluationIndex().equals(stateQueryObj.getEvaluationIndex()))
|
||||
.findFirst()
|
||||
.map(stateQueryObj -> {
|
||||
// 集合交集 stream 重新赋值更新字段
|
||||
upObj.setId(stateQueryObj.getId());
|
||||
upObj.setCreateTime(new Date());
|
||||
upObj.setModifyTime(new Date());
|
||||
if ("number".equals(upObj.getValueType()) ){
|
||||
upObj.setScore(String.valueOf (Double.parseDouble(upObj.getScore()) * 2) );
|
||||
}
|
||||
if(StringUtils.isNotBlank(upObj.getReason())){
|
||||
upObj.setReason(upObj.getReason());
|
||||
}else {
|
||||
upObj.setReason("-");
|
||||
}
|
||||
return upObj;
|
||||
}).orElse(null))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
}
|
||||
});
|
||||
return this.saveBatch(tableData);
|
||||
return this.updateBatchById(updSetList);
|
||||
}else {
|
||||
tableData.forEach(item->{
|
||||
|
||||
item.setCreateTime(new Date());
|
||||
item.setModifyTime(new Date());
|
||||
item.setId( UUIDUtils.randomUUID20());
|
||||
if ("number".equals(item.getValueType()) ){
|
||||
item.setScore(String.valueOf (Double.parseDouble(item.getScore()) * 2) );
|
||||
|
||||
}
|
||||
});
|
||||
return this.saveBatch(tableData);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -169,13 +202,16 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
value=item.getProcessNode();
|
||||
}
|
||||
switch (value){
|
||||
case "会签征求意见":
|
||||
case "征求意见":
|
||||
score=Double.valueOf(item.getScore()) * 0.3;
|
||||
break;
|
||||
case "技术委员会评审/评审意见修改评审":
|
||||
case "技术委员会评审、评审意见修改":
|
||||
score=Double.valueOf(item.getScore()) * 0.4;
|
||||
break;
|
||||
case "标准法规部标准化工程师复审":
|
||||
case "重新技术委员会评审、评审意见修改":
|
||||
score=Double.valueOf(item.getScore()) * 0.4;
|
||||
break;
|
||||
case "标准化复审":
|
||||
score=Double.valueOf(item.getScore()) * 0.15;
|
||||
break;
|
||||
case "标准法规部高级经理审核":
|
||||
|
||||
+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,6 +2,7 @@ package com.adc.da.slrs.sarInstitution.dao;
|
||||
|
||||
import com.adc.da.slrs.sarInstitution.entity.InstitutionAndUser;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsInstitution;
|
||||
import com.adc.da.slrs.sarInstitution.entity.TsUserVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
@@ -31,7 +32,7 @@ public interface TsInstitutionDao extends BaseMapper<TsInstitution> {
|
||||
|
||||
List<TsInstitution> selectNextUsers(@Param("institutionIds") List<String> institutionIds,@Param("userName") String userName);
|
||||
|
||||
List<TsInstitution> selectNextUserByIds(@Param("ids") List<String> ids);
|
||||
List<TsUserVO> selectNextUserByIds(@Param("ids") List<String> ids);
|
||||
|
||||
|
||||
List<TsInstitution> selectTreeByIds(@Param("rootIds") List<String> rootIds);
|
||||
|
||||
+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);
|
||||
|
||||
/**
|
||||
* 获得第一级的部门
|
||||
|
||||
+16
-4
@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -225,11 +226,22 @@ 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<TsInstitution> tsUsers=tsInstitutionDao.selectNextUserByIds(strings);
|
||||
|
||||
return tsUsers;
|
||||
List<TsUserVO> tsUsers=tsInstitutionDao.selectNextUserByIds(strings);
|
||||
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(middle.get(s));
|
||||
});
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class IssueTrackController {
|
||||
if (b>0){
|
||||
return Result.success("200","信息已存在,更新!", true);
|
||||
}else{
|
||||
return Result.error("100","新增成功!", false);
|
||||
return Result.success("100","新增成功!", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -23,6 +23,8 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
|
||||
|
||||
//根据清单id,查出标准的id并排序
|
||||
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size,@Param("sar") SarFindDto sarFindDto);
|
||||
|
||||
List<String> selectHighLawsId(@Param("standId") String standId,@Param("sar") SarFindDto sarFindDto);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("sarFindDto") SarFindDto sarFindDto);
|
||||
//根据标准id查出数据用于清单查询
|
||||
|
||||
+4
@@ -1,7 +1,11 @@
|
||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 高级检索
|
||||
*
|
||||
|
||||
+6
-1
@@ -50,7 +50,12 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
||||
//查询标准id
|
||||
List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(sarFindDto.getId(),(sarFindDto.getPage())-1,sarFindDto.getSize(),sarFindDto);
|
||||
if (CollectionUtils.isEmpty(lawsIds)){
|
||||
return null;
|
||||
IPage<LawsDto> list1 = new Page<>();
|
||||
list1.setCurrent(selectPage.getCurrent());
|
||||
list1.setTotal(selectPage.getTotal());
|
||||
list1.setSize(selectPage.getSize());
|
||||
list1.setPages(selectPage.getPages());
|
||||
return list1;
|
||||
}
|
||||
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,sarFindDto);
|
||||
for (LawsDto lawsDto:list){
|
||||
|
||||
@@ -79,9 +79,6 @@ public class SarLawsAttrInfo extends BaseEntity {
|
||||
@TableField("JDWJLAWS")
|
||||
private String jdwjlaws;
|
||||
|
||||
@TableField("FBJGLAWS")
|
||||
private String fbjglaws;
|
||||
|
||||
@TableField("CYSDLAWS")
|
||||
private String cysdlaws;
|
||||
|
||||
|
||||
+14
-1
@@ -4,6 +4,7 @@ package com.adc.da.slrs.sarLawsStandInfo.controller;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoExport;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
@@ -191,7 +192,7 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
@GetMapping(value = "/exportStandardsInfoExcel")
|
||||
public void exportStandardsInfoExcel(String exportContent, String exportType, String exportName,String userId, HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
List<SarLawsStandInfo> data = sarLawsInfoEOService.getExportData(exportType,exportContent,userId);
|
||||
List<SarLawsStandInfoExport> data = sarLawsInfoEOService.getExportData(exportType,exportContent,userId);
|
||||
|
||||
OutputStream os = null;
|
||||
Workbook workbook = null;
|
||||
@@ -247,6 +248,18 @@ public class SarLawsStandInfoController extends BaseController<SarLawsStandInfo>
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|根据标准号查询")
|
||||
@GetMapping("/queryInfoByStandNum")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:list")
|
||||
public ResponseMessage queryInfoByStandNum(SarLawsStandInfoPage page) throws Exception {
|
||||
page.setLawsNumber(page.getLawsNumber());
|
||||
List<SarLawsStandInfo> sarLawsStandInfoList = sarLawsInfoEOService.selectStandardsByStandNumber(page.getLawsNumber());
|
||||
if(!sarLawsStandInfoList.isEmpty()){
|
||||
return Result.success(sarLawsStandInfoList.get(0));
|
||||
}
|
||||
return Result.success("0","政策已不存在");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增过程中验证标准号
|
||||
*
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoExport;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -24,7 +25,7 @@ public interface SarLawsStandInfoDao extends BaseMapper<SarLawsStandInfo> {
|
||||
|
||||
List<SarLawsStandInfo> selectStandardsInfoByKey(String id);
|
||||
|
||||
List<SarLawsStandInfo> getSarStandardsExportInfo(SarLawsStandInfoPage page);
|
||||
List<SarLawsStandInfoExport> getSarStandardsExportInfo(SarLawsStandInfoPage page);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -258,4 +258,8 @@ public class SarLawsStandInfo extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private Map<String,String> mapItems = new TreeMap<>();
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String XCXSSRQLAWS; // 新车实施日期
|
||||
|
||||
}
|
||||
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
package com.adc.da.slrs.sarLawsStandInfo.entity;
|
||||
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarLawsStandInfo对象", description="")
|
||||
public class SarLawsStandInfoExport extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "政策分类 共四级,逐级选择-配置管理中维护")
|
||||
@TableField("LAWS_TYPE")
|
||||
private String lawsType;
|
||||
|
||||
@ApiModelProperty(value = "政策编号")
|
||||
@TableField("LAWS_NUMBER")
|
||||
private String lawsNumber;
|
||||
|
||||
@ApiModelProperty(value = "中文名称")
|
||||
@TableField("LAWS_NAME")
|
||||
private String lawsName;
|
||||
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
@TableField("LAWS_EN_NAME")
|
||||
private String lawsEnName;
|
||||
|
||||
@ApiModelProperty(value = "政策文号")
|
||||
@TableField("LAWS_NO")
|
||||
private String lawsNo;
|
||||
|
||||
@ApiModelProperty(value = "发文日期")
|
||||
@TableField("ISSUE_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTime;
|
||||
|
||||
@ApiModelProperty(value = "发文单位")
|
||||
@TableField("ISSUE_COMPANY")
|
||||
private String issueCompany;
|
||||
|
||||
@ApiModelProperty(value = "征集意见周期-起始时间")
|
||||
@TableField("COMMENT_CYCLE_START")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String commentCycleStart;
|
||||
|
||||
@ApiModelProperty(value = "征集意见周期-结束时间")
|
||||
@TableField("COMMENT_CYCLE_END")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String commentCycleEnd;
|
||||
|
||||
@ApiModelProperty(value = "文件状态-配置管理中维护")
|
||||
@TableField("LAWS_TEXT_STATE")
|
||||
private String lawsTextState;
|
||||
|
||||
@ApiModelProperty(value = "适用区域-配置管理中维护")
|
||||
@TableField("LAWS_SYQY")
|
||||
private String lawsSyqy;
|
||||
|
||||
@ApiModelProperty(value = "适用车型-配置管理中维护")
|
||||
@TableField("LAWS_SYCX")
|
||||
private String lawsSycx;
|
||||
|
||||
@ApiModelProperty(value = "是/否(选择否,只有政策、政策中文名称是必填项目)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
@ApiModelProperty(value = "年度-可在配置管理中维护,根据发布日期自动带入可手动修改")
|
||||
@TableField("LAWS_YEAR")
|
||||
private String lawsYear;
|
||||
|
||||
@ApiModelProperty(value = "福田转发通知文号")
|
||||
@TableField("LAWS_NOTISYNC_NUM")
|
||||
private String lawsNotisyncNum;
|
||||
|
||||
@ApiModelProperty(value = "信息简报 xxx期次xxx板块")
|
||||
@TableField("LAWS_BULLETIN")
|
||||
private String lawsBulletin;
|
||||
|
||||
@ApiModelProperty(value = "标签-可在配置管理中维护")
|
||||
@TableField("LAWS_LABEL")
|
||||
private String lawsLabel;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("LAWS_REMARK")
|
||||
private String lawsRemark;
|
||||
|
||||
@ApiModelProperty(value = "国家地区")
|
||||
@TableField("COUNTRY")
|
||||
private String country;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "参数1")
|
||||
@TableField("PARAM1")
|
||||
private Long param1;
|
||||
|
||||
@ApiModelProperty(value = "参数2")
|
||||
@TableField("PARAM2")
|
||||
private String param2;
|
||||
|
||||
// 非表字段
|
||||
@ApiModelProperty(value = "代替文件号")
|
||||
@TableField(exist = false)
|
||||
private String replaceFileNum;
|
||||
|
||||
@ApiModelProperty(value = "被代替文件号")
|
||||
@TableField(exist = false)
|
||||
private String replacedFileNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String processNum;//流程编号
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String firstPutTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String putTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String issueTimeShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String issueTimeStr;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String putTimeStr;
|
||||
|
||||
//目录ID 非标准信息表中的字段
|
||||
@TableField(exist = false)
|
||||
private String menuId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String menuParentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standStatusShow; // 标准状态下拉框 --单选
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standNatrueShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standSortShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String applyCountryShow;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> standFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> opinionFilesList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<AttFileVo> relevanceFileList = new ArrayList<AttFileVo>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String collectId;
|
||||
|
||||
//文件的类型
|
||||
@TableField(exist = false)
|
||||
private String standFileClassify;
|
||||
|
||||
//文件的下载id
|
||||
@TableField(exist = false)
|
||||
private String attId;
|
||||
|
||||
//记录是否修改了替代文件号
|
||||
@TableField(exist = false)
|
||||
private int upReplaceNumFlag;
|
||||
//记录是否修改了文件号
|
||||
@TableField(exist = false)
|
||||
private int upNumFlag;
|
||||
// 数据库新加的字段
|
||||
|
||||
@TableField(exist = false)
|
||||
private String remark;//备注
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> attrInfoCaseMap = new LinkedHashMap<>(); //属性表字段与值小写前端带入渲染
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sarStandAttrEOStr; //新增修改时属性表信息
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fileIds; //全部文件ID
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<SarStandAttrDetailsEO> attrInfoList = new ArrayList<>();
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standTextStatusShow; // 标准文本状态显示名称
|
||||
// 以下为非表中字段
|
||||
@TableField(exist = false)
|
||||
private String countryShow; //国家地区显示名称
|
||||
@TableField(exist = false)
|
||||
private String standStateShow; // 标准状态显示名称
|
||||
@TableField(exist = false)
|
||||
private String standNatureShow; // 标准性质显示名称
|
||||
@TableField(exist = false)
|
||||
private List<DicTypeEO> dicTypeList = new ArrayList(); // 记录标准涉及到的所有数据字典数据
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<SarStandItems> itemsList = new ArrayList<>();
|
||||
@ApiModelProperty(value = "分解单条款内容")
|
||||
@TableField(exist = false)
|
||||
private Map<String,String> mapItems = new TreeMap<>();
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private String XCXSSRQLAWS; // 新车实施日期
|
||||
|
||||
@TableField(exist = false)
|
||||
private String SSRQLAWS;
|
||||
@TableField(exist = false)
|
||||
private String ZCXSSRQLAWS;
|
||||
@TableField(exist = false)
|
||||
private String ZCWBLAWS;
|
||||
@TableField(exist = false)
|
||||
private String GCWBLAWS;
|
||||
@TableField(exist = false)
|
||||
private String JDWJLAWS;
|
||||
@TableField(exist = false)
|
||||
private String CYSDLAWS;
|
||||
@TableField(exist = false)
|
||||
private String TGRLAWS;
|
||||
@TableField(exist = false)
|
||||
private String TGDWLAWS;
|
||||
@TableField(exist = false)
|
||||
private String NYLXLAWS;
|
||||
@TableField(exist = false)
|
||||
private String YYRZLAWS;
|
||||
@TableField(exist = false)
|
||||
private String ZRBMLAWS;
|
||||
@TableField(exist = false)
|
||||
private String ZRGCSLAWS;
|
||||
@TableField(exist = false)
|
||||
private String DTWJHLAWS;
|
||||
@TableField(exist = false)
|
||||
private String BDTWJHLAWS;
|
||||
@TableField(exist = false)
|
||||
private String YYBZZCLAWS;
|
||||
@TableField(exist = false)
|
||||
private String XGLC;
|
||||
@TableField(exist = false)
|
||||
private String CHJLLAWS;
|
||||
@TableField(exist = false)
|
||||
private String GLWJLAWS;
|
||||
|
||||
|
||||
}
|
||||
+5
@@ -274,4 +274,9 @@ public class SarLawsStandInfoPage extends BasePage {
|
||||
@TableField(exist = false)
|
||||
private String order1 = "";
|
||||
|
||||
@TableField(exist = false)
|
||||
private String exportAllAttrInfo;
|
||||
@TableField(exist = false)
|
||||
private String exportAllResult;
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarLawsStandInfo.service;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoExport;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
@@ -32,7 +33,7 @@ public interface ISarLawsStandInfoService extends IService<SarLawsStandInfo> {
|
||||
|
||||
SarLawsStandInfoPage updateStandardsMenu(SarLawsStandInfoPage standardsInfoEO);
|
||||
|
||||
List<SarLawsStandInfo> getExportData(String exportType, String exportContent,String userId) throws Exception;
|
||||
List<SarLawsStandInfoExport> getExportData(String exportType, String exportContent, String userId) throws Exception;
|
||||
|
||||
List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page) throws Exception;
|
||||
|
||||
|
||||
+102
-21
@@ -36,6 +36,7 @@ import com.adc.da.slrs.sarLawsMenu.dao.SarLawsMenuDao;
|
||||
import com.adc.da.slrs.sarLawsMenu.entity.SarLawsMenu;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.dao.SarLawsStandInfoDao;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoExport;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.service.ISarLawsStandInfoService;
|
||||
import com.adc.da.slrs.sarLawsVal.dao.SarLawsValDao;
|
||||
@@ -51,6 +52,7 @@ import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.constant.ValueStateEnum;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
@@ -59,6 +61,7 @@ import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -144,8 +147,11 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
@Override
|
||||
public List<SarLawsStandInfo> getSarStandardsInfoPage(SarLawsStandInfoPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
String userId = UserUtils.getUserId();
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(userId)){
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
@@ -319,11 +325,13 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetailsExport (SarLawsStandInfo row) throws Exception {
|
||||
public void attrInfoDetailsExport (SarLawsStandInfoExport row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
List<String> list = Arrays.asList(fieldInfo.split(",")).stream().map(s -> String.format(s.trim())).collect(Collectors.toList());
|
||||
|
||||
Map<String, Object> getAttrMap = BeanUtils.describe(row);
|
||||
if (InitStandAttrUtil.clobFieldListLaws != null && !InitStandAttrUtil.clobFieldListLaws.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListLaws) {
|
||||
@@ -337,7 +345,13 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
List<String> filterList = list.stream().filter(a -> name.equals(a)).collect(Collectors.toList());
|
||||
if(filterList.isEmpty()){
|
||||
newMap.remove(name);
|
||||
continue;
|
||||
}
|
||||
Object value1 = entry.getValue();
|
||||
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
@@ -359,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);
|
||||
}
|
||||
@@ -388,8 +402,19 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
|
||||
public void attrInfoShowDetails(List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_type_code", "dic_type_name");
|
||||
Map<String, String> dicMap = dicInfo.stream()
|
||||
.filter(item-> !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getDicTypeName,(value1, value2 )->value2));
|
||||
|
||||
for (SarLawsStandInfo row : sarlist) {
|
||||
attrInfoDetails(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();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
@@ -398,7 +423,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfosOrderByDateDesc(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
@@ -412,8 +437,21 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
private String filterValue (Map<String, String> dicMap,String value){
|
||||
List<String> list = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
String[] valArr = value.split(",");
|
||||
for (String s : valArr) {
|
||||
if (dicMap.containsKey(s)){
|
||||
list.add(dicMap.get(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
return String.join(",",list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarLawsStandInfo> getExportData(String exportType, String exportContent,String userId) throws Exception {
|
||||
public List<SarLawsStandInfoExport> getExportData(String exportType, String exportContent,String userId) throws Exception {
|
||||
SarLawsStandInfoPage page = new SarLawsStandInfoPage();
|
||||
if ("apart".equals(exportType)) {
|
||||
page.setIdlist(exportContent.split(","));
|
||||
@@ -462,7 +500,21 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
List<SarLawsStandInfo> rows = this.baseMapper.getSarStandardsExportInfo(page);
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldLaws;
|
||||
|
||||
List<String> list = Arrays.asList(fieldInfo.split(",")).stream().map(s -> String.format("SAR_LAWS_ATTR_INFO."+s.trim())).collect(Collectors.toList());
|
||||
List<String> listSelect = Arrays.asList(fieldInfo.split(",")).stream().map(s -> String.format("tmp_tb."+s.trim())).collect(Collectors.toList());
|
||||
String exportAllAttrInfo = list.stream().collect(Collectors.joining(","));
|
||||
String exportAllResult = listSelect.stream().collect(Collectors.joining(","));
|
||||
if(StringUtils.isNotBlank(exportAllAttrInfo)){
|
||||
page.setExportAllAttrInfo(exportAllAttrInfo);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(exportAllResult)){
|
||||
page.setExportAllResult(exportAllResult);
|
||||
}
|
||||
|
||||
List<SarLawsStandInfoExport> rows = this.baseMapper.getSarStandardsExportInfo(page);
|
||||
attrInfoShowExport(rows);
|
||||
return rows;
|
||||
}
|
||||
@@ -536,9 +588,21 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarLawsStandInfo> sarlist) throws Exception {
|
||||
for(SarLawsStandInfo row : sarlist){
|
||||
public void attrInfoShowExport (List<SarLawsStandInfoExport> sarlist) throws Exception {
|
||||
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_type_code", "dic_type_name");
|
||||
Map<String, String> dicMap = dicInfo.stream()
|
||||
.filter(item-> !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getDicTypeName,(value1, value2 )->value2));
|
||||
|
||||
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) {
|
||||
@@ -547,11 +611,11 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && InitStandAttrUtil.fileFieldListLaws.size() > 0 && InitStandAttrUtil.fileFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
// value = entry.getValue().toString();
|
||||
// if (StringUtils.isNotBlank(value)) {
|
||||
// List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
// entry.setValue(fileObj);
|
||||
// }
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapLaws.get(name);
|
||||
@@ -565,7 +629,21 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
|
||||
if(entry.getValue()!=null) {
|
||||
StringBuilder builder = new StringBuilder("");
|
||||
for (String s : valArr) {
|
||||
if (dicMap.containsKey(s) && !"ZRBM".equals(name)){
|
||||
builder.append(dicMap.get(s)+",");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (builder.toString().isEmpty()){
|
||||
value = entry.getValue().toString();
|
||||
}else {
|
||||
value = builder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
@@ -650,7 +728,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
createStandAttrInfo(sarLawsStandInfo);
|
||||
// 根据代替标准号 ,修改代替标准号标准中的,被代替标准号
|
||||
// updateReplaceConnect(sarLawsStandInfo);
|
||||
updateCiteStand(sarLawsStandInfo, null, "DTWJHLAWS", "BDTWJHLAWS");
|
||||
updateCiteStand(sarLawsStandInfo, beforeStandEO, "DTWJHLAWS", "BDTWJHLAWS");
|
||||
|
||||
//修改收藏分享编号名称
|
||||
updateCollectAndShare(sarLawsStandInfo);
|
||||
@@ -735,7 +813,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getLawsType(),"sg9gb7liywkrnv3pa5uh");
|
||||
String number = sortName + " " + sarStandardsInfoEO.getLawsNumber();
|
||||
String content = number + " 《" + sarStandardsInfoEO.getLawsName()+" " + sarStandardsInfoEO.getLawsEnName() + "》";
|
||||
sarUpdLogEOService.createUpdateLog(SarTypeEnum.BUSINESS.getValue(),sarStandardsInfoEO.getId(),oldMap,newMap,content);
|
||||
sarUpdLogEOService.createUpdateLog(SarTypeEnum.FOREIGN_LAWS.getValue(),sarStandardsInfoEO.getId(),oldMap,newMap,content);
|
||||
}
|
||||
|
||||
public Map<String,Object> changeMap (SarLawsStandInfo sarStandardsInfoEO,Map<String,Object> map) {
|
||||
@@ -804,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)) {
|
||||
@@ -935,7 +1014,9 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
convert.setStandFileClassify(field);
|
||||
convert.setConvertType(SarTypeEnum.LAWS_STAND.getValue());
|
||||
convertMq.sendMQ(convert);
|
||||
if(elasflag){
|
||||
convertMq.sendMQ(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
|
||||
public List<TsRole> getAll() {
|
||||
QueryWrapper<TsRole> tsRoleQueryWrapper=new QueryWrapper<>();
|
||||
tsRoleQueryWrapper.eq("ROLE_HIERARCHY",1);
|
||||
tsRoleQueryWrapper.orderByDesc("NAME");
|
||||
List<TsRole> rootRole=tsRoleDao.selectList(tsRoleQueryWrapper);
|
||||
for(TsRole tsRole:rootRole){
|
||||
tsRole.setChildren(recursionGetRole(tsRole));
|
||||
@@ -70,6 +71,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
|
||||
QueryWrapper<TsRole> tsRoleQueryWrapper=new QueryWrapper<>();
|
||||
tsRoleQueryWrapper.eq("parent_id",tsRole.getId());
|
||||
tsRoleQueryWrapper.eq("ROLE_HIERARCHY",tsRole.getRoleHierarchy()+1);
|
||||
tsRoleQueryWrapper.orderByDesc("NAME");
|
||||
List<TsRole> tsRoles=tsRoleDao.selectList(tsRoleQueryWrapper);
|
||||
for(TsRole tsRoleNode:tsRoles){
|
||||
tsRoleNode.setChildren(recursionGetRole(tsRoleNode));
|
||||
|
||||
+18
-8
@@ -137,17 +137,21 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
}
|
||||
List<GetExcelDto> standExcel=new ArrayList<>();
|
||||
List<GetExcelDto2> standExcel2=new ArrayList<>();
|
||||
int i=0;
|
||||
for (SarPublicIdeaAll sarPublicIdeaAll:data){
|
||||
i++;
|
||||
if ("1".equals(type)) {
|
||||
GetExcelDto2 getExcelDto = GetExcelDto2.builder()
|
||||
.partCode(sarPublicIdeaAll.getPartCode())
|
||||
.oldText(RemoveHtml.getResultsFromHtml(sarPublicIdeaAll.getOldText()))
|
||||
.newText(RemoveHtml.getResultsFromHtml(sarPublicIdeaAll.getNewText()))
|
||||
.reason(sarPublicIdeaAll.getReason())
|
||||
.userName(sarPublicIdeaAll.getUserName())
|
||||
.deptName(sarPublicIdeaAll.getDeptName())
|
||||
.state(map.get(sarPublicIdeaAll.getState()))
|
||||
.cause(sarPublicIdeaAll.getCause())
|
||||
.partName(sarPublicIdeaAll.getChapterName())
|
||||
.num(String.valueOf(i))
|
||||
// .userName(sarPublicIdeaAll.getUserName())
|
||||
// .deptName(sarPublicIdeaAll.getDeptName())
|
||||
// .state(map.get(sarPublicIdeaAll.getState()))
|
||||
// .cause(sarPublicIdeaAll.getCause())
|
||||
.build();
|
||||
standExcel2.add(getExcelDto);
|
||||
}else {
|
||||
@@ -160,24 +164,30 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
.deptName(sarPublicIdeaAll.getDeptName())
|
||||
.state(map.get(sarPublicIdeaAll.getState()))
|
||||
.cause(sarPublicIdeaAll.getCause())
|
||||
.sourceType(sarPublicIdeaAll.getSourceType())
|
||||
.partName(sarPublicIdeaAll.getChapterName())
|
||||
.num(String.valueOf(i))
|
||||
.build();
|
||||
standExcel.add(getExcelDto);
|
||||
}
|
||||
}
|
||||
|
||||
List<List<String>> headList=new ArrayList<List<String>>();
|
||||
headList.add(Lists.newArrayList("序号"));
|
||||
headList.add(Lists.newArrayList("章节编号"));
|
||||
headList.add(Lists.newArrayList("章节名称"));
|
||||
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改前"));
|
||||
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改后"));
|
||||
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改理由"));
|
||||
headList.add(Lists.newArrayList("提出部门"));
|
||||
headList.add(Lists.newArrayList("提出人"));
|
||||
headList.add(Lists.newArrayList("处理意见"));
|
||||
headList.add(Lists.newArrayList("原因"));
|
||||
if ("1".equals(type)) {
|
||||
EasyExcel.write(response.getOutputStream(), GetExcelDto2.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(standExcel2);
|
||||
}else {
|
||||
headList.add(Lists.newArrayList("提出部门"));
|
||||
headList.add(Lists.newArrayList("提出人"));
|
||||
headList.add(Lists.newArrayList("处理意见"));
|
||||
headList.add(Lists.newArrayList("原因"));
|
||||
headList.add(Lists.newArrayList("来源"));
|
||||
EasyExcel.write(response.getOutputStream(), GetExcelDto.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(standExcel);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,11 @@ import lombok.NoArgsConstructor;
|
||||
@ColumnWidth(15)
|
||||
public class GetExcelDto {
|
||||
|
||||
// @ExcelProperty("章节编号")
|
||||
private String num;
|
||||
// @ExcelProperty("章节编号")
|
||||
private String partCode;
|
||||
|
||||
private String partName;
|
||||
// @ExcelProperty("修改意见内容(包括理由或依据)")
|
||||
// private String content;
|
||||
private String oldText;
|
||||
@@ -42,6 +45,8 @@ public class GetExcelDto {
|
||||
|
||||
private String cause;
|
||||
|
||||
private String sourceType;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -21,8 +21,11 @@ import lombok.NoArgsConstructor;
|
||||
@ColumnWidth(15)
|
||||
public class GetExcelDto2 {
|
||||
|
||||
private String num;
|
||||
// @ExcelProperty("章节编号")
|
||||
private String partCode;
|
||||
|
||||
private String partName;
|
||||
// @ExcelProperty("修改意见内容(包括理由或依据)")
|
||||
// private String content;
|
||||
private String oldText;
|
||||
@@ -30,14 +33,14 @@ public class GetExcelDto2 {
|
||||
private String newText;
|
||||
|
||||
private String reason;
|
||||
// @ExcelProperty("提出部门")
|
||||
private String deptName;
|
||||
// @ExcelProperty("提出人")
|
||||
private String userName;
|
||||
|
||||
private String state;
|
||||
|
||||
private String cause;
|
||||
//// @ExcelProperty("提出部门")
|
||||
// private String deptName;
|
||||
//// @ExcelProperty("提出人")
|
||||
// private String userName;
|
||||
//
|
||||
// private String state;
|
||||
//
|
||||
// private String cause;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -79,4 +79,7 @@ public class SarPublicIdeaAll extends BaseEntity {
|
||||
@TableField("cause")
|
||||
private String cause;
|
||||
|
||||
@TableField("source_type")
|
||||
private String sourceType;
|
||||
|
||||
}
|
||||
|
||||
+8
-4
@@ -19,9 +19,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -118,7 +116,13 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (Time.compareTo(new Date()) >= 0) return "0";
|
||||
Date date=new Date(); //取时间
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(date);
|
||||
calendar.add(calendar.DATE,-1); //把日期往后增加一天,整数 往后推,负数往前移动
|
||||
date=calendar.getTime(); //这个时间就是日期往后推一天的结果
|
||||
|
||||
if (Time.compareTo(date) >= 0) return "0";
|
||||
else {
|
||||
return "1";
|
||||
}
|
||||
|
||||
+8
@@ -137,5 +137,13 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
return Result.success(fileType);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitInfoEO|根据标准id查询分解单的文本类型用在合规评估的")
|
||||
@GetMapping("getFileTypeHG")
|
||||
public ResponseMessage<List<Map<String, String>>> getFileTypeHG(String standId){
|
||||
List<Map<String, String>> fileType = ServiceImpl.getFileTypeHG(standId);
|
||||
|
||||
return Result.success(fileType);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -80,4 +80,6 @@ public interface SarStandItemsDao extends BaseMapper<SarStandItems> {
|
||||
* @return
|
||||
*/
|
||||
List<String> getFileType(@Param("standId") String standId);
|
||||
|
||||
List<String> getFileTypeHG(@Param("standId") String standId);
|
||||
}
|
||||
|
||||
+19
-1
@@ -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,24 @@ 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()
|
||||
.map(item -> new HashMap<String, String>(){ { put("label", typeNameMap.get(item));put("value", item);} }
|
||||
).collect(Collectors.toList());
|
||||
|
||||
|
||||
return collect;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> getFileTypeHG(String standId){
|
||||
List<String> fileType = dao.getFileTypeHG(standId);
|
||||
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){
|
||||
|
||||
+7
@@ -40,6 +40,13 @@ public class BusinessDeptIssueController extends BaseController {
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@PostMapping("/saveBatch")
|
||||
@ApiOperation("批量新增事业部重点问题")
|
||||
public ResponseMessage saveBatch(@RequestBody List<BusinessDeptIssue> issue){
|
||||
boolean b = iBusinessDeptIssueService.saveBatch(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除事业部重点问题")
|
||||
|
||||
+51
-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 {
|
||||
@@ -33,6 +39,13 @@ public class ProductDeptIssueController {
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@PostMapping("/saveBatch")
|
||||
@ApiOperation("新增产品规划部重点问题")
|
||||
public ResponseMessage productDeptIssueSaveBatch(@RequestBody List<ProductDeptIssue> issue){
|
||||
boolean b = iProductDeptIssueService.saveBatch(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除产品规划部重点问题")
|
||||
@@ -45,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);
|
||||
}
|
||||
@@ -57,7 +70,6 @@ public class ProductDeptIssueController {
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/closeProductIssue")
|
||||
@ApiOperation("关闭产品规划部重点问题")
|
||||
public ResponseMessage closeProductDeptIssue(String idList){
|
||||
@@ -66,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -3,10 +3,11 @@ package com.adc.da.slrs.sarStandUnqualified.service;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IProductDeptIssueService {
|
||||
public interface IProductDeptIssueService extends IService<ProductDeptIssue> {
|
||||
|
||||
|
||||
public boolean addProductDeptIssue(ProductDeptIssue obj);
|
||||
@@ -15,6 +16,8 @@ public interface IProductDeptIssueService {
|
||||
|
||||
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) {
|
||||
|
||||
|
||||
+39
-1
@@ -248,6 +248,39 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||
@GetMapping("/selectHighLawsById")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> selectHighLawsById(SarStandardsInfoEOPage page,@RequestParam(defaultValue = "0") String mark) throws Exception {
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
//不改传参强行置换
|
||||
// searchList.forEach(sarAdvanceSearchVO -> {
|
||||
// if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
// }
|
||||
// });
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.selectHighLawsById(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|新增")
|
||||
@PostMapping("/addarStandardsInfo")
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
@@ -604,7 +637,12 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
public ResponseMessage<List<SarStandMenu>> getStandMenuId(SarStandMenu getStandId){
|
||||
|
||||
List<SarStandMenu> sarStandMenus = sarStandMenuDao.getMenuByStandId(getStandId);
|
||||
|
||||
//直接对回显数据进行处理 最好的解决方式是找到数据进入的地方进行修改
|
||||
for (int i=sarStandMenus.size()-1;i>=0;i--){
|
||||
if (null!=sarStandMenus.get(i) && null==sarStandMenus.get(i).getMenuName() ){
|
||||
sarStandMenus.remove(i);
|
||||
}
|
||||
}
|
||||
return Result.success(sarStandMenus);
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -23,8 +23,12 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(@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);
|
||||
|
||||
int selectHighLawsCount(@Param("page") SarStandardsInfoEOPage page,@Param("list") List<String> lawsIds);
|
||||
|
||||
int getSarStandardsInfoCountWk1(SarStandardsInfoEOPage page);
|
||||
|
||||
int insertSelective(SarStandardsInfo page);
|
||||
|
||||
+19
@@ -170,6 +170,25 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String CYBZ;
|
||||
private String isKU;
|
||||
|
||||
private String exportAllAttrInfo;
|
||||
private String exportAllResult;
|
||||
|
||||
public String getExportAllResult() {
|
||||
return exportAllResult;
|
||||
}
|
||||
|
||||
public void setExportAllResult(String exportAllResult) {
|
||||
this.exportAllResult = exportAllResult;
|
||||
}
|
||||
|
||||
public String getExportAllAttrInfo() {
|
||||
return exportAllAttrInfo;
|
||||
}
|
||||
|
||||
public void setExportAllAttrInfo(String exportAllAttrInfo) {
|
||||
this.exportAllAttrInfo = exportAllAttrInfo;
|
||||
}
|
||||
|
||||
public String getIsKU() {
|
||||
return isKU;
|
||||
}
|
||||
|
||||
+16
@@ -116,4 +116,20 @@ public class SarStandardsInfoEOPage extends BasePage {
|
||||
* 标准号
|
||||
*/
|
||||
private String standCode;
|
||||
|
||||
private String qdFlag;
|
||||
|
||||
|
||||
private String qdid;
|
||||
// private String standName;
|
||||
// private String standEnName;
|
||||
private String typeApplicable;
|
||||
private String nylx;
|
||||
private String zrbm;
|
||||
private String sycpx;
|
||||
// private String standSort;
|
||||
// private String standType;
|
||||
// private String standNumber;
|
||||
private String types;
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -27,6 +27,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPageBak1(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
List<SarStandardsInfo> selectHighLawsById(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
+54
-1
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
@@ -128,6 +130,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Value("${file.path}")
|
||||
private String filePath;//文件存储路径
|
||||
|
||||
@Autowired
|
||||
SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
|
||||
|
||||
@Autowired
|
||||
WarningDateServiceImpl warningDateService;
|
||||
|
||||
@@ -433,6 +438,54 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandardsInfo> selectHighLawsById(SarStandardsInfoEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<String> lawsIds=new ArrayList<>();
|
||||
if ("1".equals(page.getQdFlag())){
|
||||
|
||||
SarFindDto sarFindDto=new SarFindDto();
|
||||
sarFindDto.setId(page.getQdid());
|
||||
sarFindDto.setStandEnName(page.getStandEnName());
|
||||
sarFindDto.setStandName(page.getStandName());
|
||||
sarFindDto.setTypeApplicable(page.getTypeApplicable());
|
||||
sarFindDto.setSycpx(page.getSycpx());
|
||||
sarFindDto.setNylx(page.getNylx());
|
||||
sarFindDto.setTypes(page.getTypes());
|
||||
sarFindDto.setStandSort(page.getStandSort());
|
||||
sarFindDto.setZrbm(page.getZrbm());
|
||||
sarFindDto.setStandNumber(page.getStandNumber());
|
||||
sarFindDto.setStandType(page.getStandType());
|
||||
|
||||
lawsIds = sarLawsAttrDetailedListDao.selectHighLawsId(sarFindDto.getId(),sarFindDto);
|
||||
|
||||
}
|
||||
|
||||
Integer rowCount = dao.selectHighLawsCount(page,lawsIds);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.selectHighLawsPage(page,"0",lawsIds);
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
public void attrInfo(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
@@ -627,7 +680,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && InitStandAttrUtil.fileFieldList.size() > 0 && InitStandAttrUtil.fileFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfosOrderByDateDesc(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
|
||||
+13
-7
@@ -220,14 +220,20 @@ public class SarUpdLogServiceImpl extends ServiceImpl<SarUpdLogDao, SarUpdLog> i
|
||||
|
||||
public String changeLawsName (String field,String sarType) throws Exception{
|
||||
switch (field) {
|
||||
case "country": return "适用区域";
|
||||
case "isRelateAccess": return "重要度";
|
||||
case "issueTime": return "发布日期";
|
||||
case "standEnName": return "英文名称";
|
||||
case "lawsType": return "政策分类";
|
||||
case "lawsNumber": return "政策编号";
|
||||
case "lawsName": return "政策名称";
|
||||
case "lawsEnName": return "英文名称";
|
||||
case "standName": return "中文名称";
|
||||
case "standNumber": return "政策编号";
|
||||
case "standState": return "政策状态";
|
||||
case "replaceStandNum": return "代替政策编号";
|
||||
case "lawsNo": return "政策文号";
|
||||
case "issueTime": return "发文日期";
|
||||
case "issueCompany": return "发文单位";
|
||||
case "lawsTextState": return "文本状态";
|
||||
case "lawsSyqy": return "适用区域";
|
||||
case "lawsSycx": return "适用车型";
|
||||
case "lawsYear": return "年度";
|
||||
case "lawsNotisyncNum": return "福田转发通知文号";
|
||||
case "lawsBulletin": return "信息简报";
|
||||
default:
|
||||
String name = sarStandAttrDetailsEODao.selectNameByField(field,sarType);
|
||||
return name;
|
||||
|
||||
@@ -11,6 +11,10 @@ public class RoleUserDTO {
|
||||
// 要查询的角色
|
||||
private String roleId;
|
||||
|
||||
private String institutionName;
|
||||
|
||||
private String institutionId;
|
||||
|
||||
private long pageNumber;
|
||||
|
||||
private long pageSize;
|
||||
|
||||
@@ -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){
|
||||
|
||||
+106
-101
@@ -1,101 +1,106 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdCgfyDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdCgfyService;
|
||||
import com.adc.da.util.MD5Util;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 采购费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdCgfyServiceImpl extends ServiceImpl<WgdCgfyDao, WgdCgfy> implements IWgdCgfyService {
|
||||
|
||||
@Autowired
|
||||
WgdCgfyDao wgdCgfyDao;
|
||||
|
||||
@Autowired
|
||||
IWgdCgfyService iWgdCgfyService;
|
||||
@Override
|
||||
public List<WgdCgfy> getAllWgdCgfys() {
|
||||
return wgdCgfyDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCgfy> queryAllWgdCgfys(WgdCgfy wgdCgfy) {
|
||||
Integer count = wgdCgfyDao.getQueryTotal(wgdCgfy);
|
||||
wgdCgfy.getPager().setRowCount(count);
|
||||
return wgdCgfyDao.queryAll(wgdCgfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdCgfy getWgdCgfyById(String id) {
|
||||
return wgdCgfyDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdCgfy(WgdCgfy wgdCgfy) {
|
||||
return wgdCgfyDao.updateOne(wgdCgfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdCgfy(WgdCgfy wgdCgfy) {
|
||||
wgdCgfy.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdCgfyDao.insertOne(wgdCgfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCgfy(String id) {
|
||||
return wgdCgfyDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCgfys(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdCgfyDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCgfy> importCgfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file);
|
||||
|
||||
QueryWrapper<WgdCgfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdCgfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdCgfy> wgdCgfy=iWgdCgfyService.list(queryWrapper);
|
||||
List<WgdCgfy> remove=new ArrayList<>();
|
||||
wgdCgfy.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdCgfyService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdCgfyDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdCgfyService;
|
||||
import com.adc.da.util.MD5Util;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 采购费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdCgfyServiceImpl extends ServiceImpl<WgdCgfyDao, WgdCgfy> implements IWgdCgfyService {
|
||||
|
||||
@Autowired
|
||||
WgdCgfyDao wgdCgfyDao;
|
||||
|
||||
@Autowired
|
||||
IWgdCgfyService iWgdCgfyService;
|
||||
@Override
|
||||
public List<WgdCgfy> getAllWgdCgfys() {
|
||||
return wgdCgfyDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCgfy> queryAllWgdCgfys(WgdCgfy wgdCgfy) {
|
||||
Integer count = wgdCgfyDao.getQueryTotal(wgdCgfy);
|
||||
wgdCgfy.getPager().setRowCount(count);
|
||||
return wgdCgfyDao.queryAll(wgdCgfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdCgfy getWgdCgfyById(String id) {
|
||||
return wgdCgfyDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdCgfy(WgdCgfy wgdCgfy) {
|
||||
return wgdCgfyDao.updateOne(wgdCgfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdCgfy(WgdCgfy wgdCgfy) {
|
||||
wgdCgfy.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdCgfyDao.insertOne(wgdCgfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCgfy(String id) {
|
||||
return wgdCgfyDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCgfys(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdCgfyDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCgfy> importCgfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdCgfy> res= ExcelImportUtilByWk.readExcelpublic(WgdCgfy.class,file);
|
||||
if (res != null){
|
||||
QueryWrapper<WgdCgfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdCgfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdCgfy> wgdCgfy=iWgdCgfyService.list(queryWrapper);
|
||||
List<WgdCgfy> remove=new ArrayList<>();
|
||||
wgdCgfy.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdCgfyService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+105
-101
@@ -1,101 +1,105 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdFyfyDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdFyfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdFyfyService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 翻译费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdFyfyServiceImpl extends ServiceImpl<WgdFyfyDao, WgdFyfy> implements IWgdFyfyService {
|
||||
|
||||
@Autowired
|
||||
WgdFyfyDao wgdFyfyDao;
|
||||
|
||||
@Autowired
|
||||
IWgdFyfyService iWgdFyfyService;
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> getAllWgdFyfys() {
|
||||
return wgdFyfyDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> queryAllWgdFyfys(WgdFyfy wgdFyfy) {
|
||||
Integer count = wgdFyfyDao.getQueryTotal(wgdFyfy);
|
||||
wgdFyfy.getPager().setRowCount(count);
|
||||
return wgdFyfyDao.queryAll(wgdFyfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdFyfy getWgdFyfyById(String id) {
|
||||
return wgdFyfyDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdFyfy(WgdFyfy wgdFyfy) {
|
||||
return wgdFyfyDao.updateOne(wgdFyfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdFyfy(WgdFyfy wgdFyfy) {
|
||||
wgdFyfy.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdFyfyDao.insertOne(wgdFyfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdFyfy(String id) {
|
||||
return wgdFyfyDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdFyfys(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdFyfyDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> importFyfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file);
|
||||
|
||||
QueryWrapper<WgdFyfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdFyfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdFyfy> wgdFyfy=iWgdFyfyService.list(queryWrapper);
|
||||
List<WgdFyfy> remove=new ArrayList<>();
|
||||
wgdFyfy.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdFyfyService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdFyfyDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdFyfy;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdFyfyService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 翻译费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdFyfyServiceImpl extends ServiceImpl<WgdFyfyDao, WgdFyfy> implements IWgdFyfyService {
|
||||
|
||||
@Autowired
|
||||
WgdFyfyDao wgdFyfyDao;
|
||||
|
||||
@Autowired
|
||||
IWgdFyfyService iWgdFyfyService;
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> getAllWgdFyfys() {
|
||||
return wgdFyfyDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> queryAllWgdFyfys(WgdFyfy wgdFyfy) {
|
||||
Integer count = wgdFyfyDao.getQueryTotal(wgdFyfy);
|
||||
wgdFyfy.getPager().setRowCount(count);
|
||||
return wgdFyfyDao.queryAll(wgdFyfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdFyfy getWgdFyfyById(String id) {
|
||||
return wgdFyfyDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdFyfy(WgdFyfy wgdFyfy) {
|
||||
return wgdFyfyDao.updateOne(wgdFyfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdFyfy(WgdFyfy wgdFyfy) {
|
||||
wgdFyfy.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdFyfyDao.insertOne(wgdFyfy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdFyfy(String id) {
|
||||
return wgdFyfyDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdFyfys(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdFyfyDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdFyfy> importFyfy(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdFyfy> res= ExcelImportUtilByWk.readExcelpublic(WgdFyfy.class,file);
|
||||
if (res != null){
|
||||
QueryWrapper<WgdFyfy> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdFyfy.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdFyfy> wgdFyfy=iWgdFyfyService.list(queryWrapper);
|
||||
List<WgdFyfy> remove=new ArrayList<>();
|
||||
wgdFyfy.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdFyfyService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+122
-117
@@ -1,117 +1,122 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdSrbDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdSrb;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdSrbService;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdMeetCost;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准制修订补助资金收支统计收入表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdSrbServiceImpl extends ServiceImpl<WgdSrbDao, WgdSrb> implements IWgdSrbService {
|
||||
|
||||
@Autowired
|
||||
WgdSrbDao wgdSrbDao;
|
||||
|
||||
@Autowired
|
||||
IWgdSrbService iWgdSrbService;
|
||||
|
||||
@Override
|
||||
public List<WgdSrb> getAllWgdSrbs() {
|
||||
return wgdSrbDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdSrb> queryAllWgdSrbs(WgdSrb wgdSrb) {
|
||||
Integer count = wgdSrbDao.getQueryTotal(wgdSrb);
|
||||
wgdSrb.getPager().setRowCount(count);
|
||||
return wgdSrbDao.queryAll(wgdSrb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdSrb getWgdSrbById(String id) {
|
||||
return wgdSrbDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdSrb(WgdSrb wgdSrb) {
|
||||
return wgdSrbDao.updateOne(wgdSrb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdSrb(WgdSrb wgdSrb) {
|
||||
wgdSrb.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdSrbDao.insertOne(wgdSrb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdSrb(String id) {
|
||||
return wgdSrbDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdSrbs(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdSrbDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdSrb> importSrb(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdSrb wgdSrb: res) {
|
||||
try {
|
||||
if (null!=wgdSrb.getTime() && !"".equals(wgdSrb.getTime())) {
|
||||
wgdSrb.setTime(wgdSrb.getTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第5列入账时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdSrb> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdSrb.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdSrb> wgdSrb=iWgdSrbService.list(queryWrapper);
|
||||
List<WgdSrb> remove=new ArrayList<>();
|
||||
wgdSrb.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdSrbService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdSrbDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdSrb;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdSrbService;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdMeetCost;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准制修订补助资金收支统计收入表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdSrbServiceImpl extends ServiceImpl<WgdSrbDao, WgdSrb> implements IWgdSrbService {
|
||||
|
||||
@Autowired
|
||||
WgdSrbDao wgdSrbDao;
|
||||
|
||||
@Autowired
|
||||
IWgdSrbService iWgdSrbService;
|
||||
|
||||
@Override
|
||||
public List<WgdSrb> getAllWgdSrbs() {
|
||||
return wgdSrbDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdSrb> queryAllWgdSrbs(WgdSrb wgdSrb) {
|
||||
Integer count = wgdSrbDao.getQueryTotal(wgdSrb);
|
||||
wgdSrb.getPager().setRowCount(count);
|
||||
return wgdSrbDao.queryAll(wgdSrb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdSrb getWgdSrbById(String id) {
|
||||
return wgdSrbDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdSrb(WgdSrb wgdSrb) {
|
||||
return wgdSrbDao.updateOne(wgdSrb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdSrb(WgdSrb wgdSrb) {
|
||||
wgdSrb.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdSrbDao.insertOne(wgdSrb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdSrb(String id) {
|
||||
return wgdSrbDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdSrbs(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdSrbDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdSrb> importSrb(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdSrb> res= ExcelImportUtilByWk.readExcelpublic(WgdSrb.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdSrb wgdSrb: res) {
|
||||
try {
|
||||
if (null!=wgdSrb.getTime() && !"".equals(wgdSrb.getTime())) {
|
||||
wgdSrb.setTime(wgdSrb.getTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第5列入账时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdSrb> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdSrb.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdSrb> wgdSrb=iWgdSrbService.list(queryWrapper);
|
||||
List<WgdSrb> remove=new ArrayList<>();
|
||||
wgdSrb.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdSrbService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+175
-170
@@ -1,170 +1,175 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdWbtjDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdWbtjService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参与外部协会会议统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdWbtjServiceImpl extends ServiceImpl<WgdWbtjDao, WgdWbtj> implements IWgdWbtjService {
|
||||
|
||||
@Autowired
|
||||
WgdWbtjDao wgdWbtjDao;
|
||||
|
||||
@Autowired
|
||||
IWgdWbtjService iWgdWbtjService;
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> getAllWgdWbtjs() {
|
||||
return wgdWbtjDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> queryAllWgdWbtjs(WgdWbtj wgdWbtj) {
|
||||
Integer count = wgdWbtjDao.getQueryTotal(wgdWbtj);
|
||||
wgdWbtj.getPager().setRowCount(count);
|
||||
return wgdWbtjDao.queryAll(wgdWbtj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdWbtj getWgdWbtjById(String id) {
|
||||
return wgdWbtjDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdWbtj(WgdWbtj wgdWbtj) {
|
||||
return wgdWbtjDao.updateOne(wgdWbtj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdWbtj(WgdWbtj wgdWbtj) {
|
||||
wgdWbtj.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdWbtjDao.insertOne(wgdWbtj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbtj(String id) {
|
||||
return wgdWbtjDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbtjs(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdWbtjDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> importWbtj(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdWbtj wgdWbtj: res) {
|
||||
if (null == wgdWbtj.getHost() || "".equals(wgdWbtj.getHost())){
|
||||
stringBuilder.append("第" + i + "行第1列主办单位填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getMeeting() || "".equals(wgdWbtj.getMeeting())){
|
||||
stringBuilder.append("第" + i + "行第2列会议名称填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getPlace() || "".equals(wgdWbtj.getPlace())){
|
||||
stringBuilder.append("第" + i + "行第4列会议地点填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getContributions() || "".equals(wgdWbtj.getContributions())){
|
||||
stringBuilder.append("第" + i + "行第5列会费标准填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getExpenses() || "".equals(wgdWbtj.getExpenses())){
|
||||
stringBuilder.append("第" + i + "行第7列费用列支填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getUser() || "".equals(wgdWbtj.getUser())){
|
||||
stringBuilder.append("第" + i + "行第8列参会人员填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getLeadership() || "".equals(wgdWbtj.getLeadership())){
|
||||
stringBuilder.append("第" + i + "行第9列主管领导填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getParticipants() || "".equals(wgdWbtj.getParticipants())){
|
||||
stringBuilder.append("第" + i + "行第10列参会单位填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getIssues() || "".equals(wgdWbtj.getIssues())){
|
||||
stringBuilder.append("第" + i + "行第13列主要议题填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbtj.getTime() && !"".equals(wgdWbtj.getTime())) {
|
||||
wgdWbtj.setTime(wgdWbtj.getTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第3列会议时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdWbtj> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdWbtj.class,tableFieldInfo -> !tableFieldInfo.getColumn().equals("id"));
|
||||
List<WgdWbtj> WgdWbtjs=iWgdWbtjService.list(queryWrapper);
|
||||
List<WgdWbtj> remove=new ArrayList<>();
|
||||
WgdWbtjs.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resWbtj->{
|
||||
if (null == resWbtj.getHost() || "".equals(resWbtj.getHost())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getMeeting() || "".equals(resWbtj.getMeeting())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getPlace() || "".equals(resWbtj.getPlace())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getContributions() || "".equals(resWbtj.getContributions())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getExpenses() || "".equals(resWbtj.getExpenses())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getUser() || "".equals(resWbtj.getUser())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getLeadership() || "".equals(resWbtj.getLeadership())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getParticipants() || "".equals(resWbtj.getParticipants())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getIssues() || "".equals(resWbtj.getIssues())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdWbtjService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdWbtjDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdWbtjService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参与外部协会会议统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdWbtjServiceImpl extends ServiceImpl<WgdWbtjDao, WgdWbtj> implements IWgdWbtjService {
|
||||
|
||||
@Autowired
|
||||
WgdWbtjDao wgdWbtjDao;
|
||||
|
||||
@Autowired
|
||||
IWgdWbtjService iWgdWbtjService;
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> getAllWgdWbtjs() {
|
||||
return wgdWbtjDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> queryAllWgdWbtjs(WgdWbtj wgdWbtj) {
|
||||
Integer count = wgdWbtjDao.getQueryTotal(wgdWbtj);
|
||||
wgdWbtj.getPager().setRowCount(count);
|
||||
return wgdWbtjDao.queryAll(wgdWbtj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdWbtj getWgdWbtjById(String id) {
|
||||
return wgdWbtjDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdWbtj(WgdWbtj wgdWbtj) {
|
||||
return wgdWbtjDao.updateOne(wgdWbtj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdWbtj(WgdWbtj wgdWbtj) {
|
||||
wgdWbtj.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdWbtjDao.insertOne(wgdWbtj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbtj(String id) {
|
||||
return wgdWbtjDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbtjs(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdWbtjDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbtj> importWbtj(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdWbtj> res= ExcelImportUtilByWk.readExcelpublic(WgdWbtj.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdWbtj wgdWbtj: res) {
|
||||
if (null == wgdWbtj.getHost() || "".equals(wgdWbtj.getHost())){
|
||||
stringBuilder.append("第" + i + "行第1列主办单位填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getMeeting() || "".equals(wgdWbtj.getMeeting())){
|
||||
stringBuilder.append("第" + i + "行第2列会议名称填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getPlace() || "".equals(wgdWbtj.getPlace())){
|
||||
stringBuilder.append("第" + i + "行第4列会议地点填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getContributions() || "".equals(wgdWbtj.getContributions())){
|
||||
stringBuilder.append("第" + i + "行第5列会费标准填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getExpenses() || "".equals(wgdWbtj.getExpenses())){
|
||||
stringBuilder.append("第" + i + "行第7列费用列支填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getUser() || "".equals(wgdWbtj.getUser())){
|
||||
stringBuilder.append("第" + i + "行第8列参会人员填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getLeadership() || "".equals(wgdWbtj.getLeadership())){
|
||||
stringBuilder.append("第" + i + "行第9列主管领导填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getParticipants() || "".equals(wgdWbtj.getParticipants())){
|
||||
stringBuilder.append("第" + i + "行第10列参会单位填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbtj.getIssues() || "".equals(wgdWbtj.getIssues())){
|
||||
stringBuilder.append("第" + i + "行第13列主要议题填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbtj.getTime() && !"".equals(wgdWbtj.getTime())) {
|
||||
wgdWbtj.setTime(wgdWbtj.getTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第3列会议时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdWbtj> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdWbtj.class,tableFieldInfo -> !tableFieldInfo.getColumn().equals("id"));
|
||||
List<WgdWbtj> WgdWbtjs=iWgdWbtjService.list(queryWrapper);
|
||||
List<WgdWbtj> remove=new ArrayList<>();
|
||||
WgdWbtjs.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resWbtj->{
|
||||
if (null == resWbtj.getHost() || "".equals(resWbtj.getHost())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getMeeting() || "".equals(resWbtj.getMeeting())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getPlace() || "".equals(resWbtj.getPlace())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getContributions() || "".equals(resWbtj.getContributions())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getExpenses() || "".equals(resWbtj.getExpenses())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getUser() || "".equals(resWbtj.getUser())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getLeadership() || "".equals(resWbtj.getLeadership())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getParticipants() || "".equals(resWbtj.getParticipants())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
if (null == resWbtj.getIssues() || "".equals(resWbtj.getIssues())){
|
||||
remove.add(resWbtj);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdWbtjService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+161
-156
@@ -1,156 +1,161 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdWbxdDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbxd;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdWbxdService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参与外部标准制修订信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdWbxdServiceImpl extends ServiceImpl<WgdWbxdDao, WgdWbxd> implements IWgdWbxdService {
|
||||
|
||||
@Autowired
|
||||
WgdWbxdDao wgdWbxdDao;
|
||||
|
||||
@Autowired
|
||||
IWgdWbxdService iWgdWbxdService;
|
||||
|
||||
@Override
|
||||
public List<WgdWbxd> getAllWgdWbxds() {
|
||||
return wgdWbxdDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbxd> queryAllWgdWbxds(WgdWbxd wgdWbxd) {
|
||||
Integer count = wgdWbxdDao.getQueryTotal(wgdWbxd);
|
||||
wgdWbxd.getPager().setRowCount(count);
|
||||
return wgdWbxdDao.queryAll(wgdWbxd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdWbxd getWgdWbxdById(String id) {
|
||||
return wgdWbxdDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdWbxd(WgdWbxd wgdWbxd) {
|
||||
return wgdWbxdDao.updateOne(wgdWbxd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdWbxd(WgdWbxd wgdWbxd) {
|
||||
wgdWbxd.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdWbxdDao.insertOne(wgdWbxd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbxd(String id) {
|
||||
return wgdWbxdDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbxds(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdWbxdDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbxd> importWbxd(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
|
||||
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdWbxd wgdWbxd: res) {
|
||||
if (null == wgdWbxd.getName() || "".equals(wgdWbxd.getName())){
|
||||
stringBuilder.append("第" + i + "行第3列标准名称填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbxd.getType() || "".equals(wgdWbxd.getType())){
|
||||
stringBuilder.append("第" + i + "行第6列标类型填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbxd.getPreside() || "".equals(wgdWbxd.getPreside())){
|
||||
stringBuilder.append("第" + i + "行第7列主持或参与填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbxd.getParticipants() || "".equals(wgdWbxd.getParticipants())){
|
||||
stringBuilder.append("第" + i + "行第14列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbxd.getDataStart() && !"".equals(wgdWbxd.getDataStart())) {
|
||||
wgdWbxd.setDataStart(wgdWbxd.getDataStart());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第8列发布日期填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbxd.getDataImplement() && !"".equals(wgdWbxd.getDataImplement())) {
|
||||
wgdWbxd.setDataImplement(wgdWbxd.getDataImplement());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第9列实施日期填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbxd.getDataRecord() && !"".equals(wgdWbxd.getDataRecord())) {
|
||||
wgdWbxd.setDataRecord(wgdWbxd.getDataRecord());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第12列备案时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdWbxd> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdWbxd.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdWbxd> wgdAssocInfos=iWgdWbxdService.list(queryWrapper);
|
||||
List<WgdWbxd> remove=new ArrayList<>();
|
||||
wgdAssocInfos.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resWBxd->{
|
||||
if (null == resWBxd.getName() || "".equals(resWBxd.getName())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
if (null == resWBxd.getType() || "".equals(resWBxd.getType())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
if (null == resWBxd.getPreside() || "".equals(resWBxd.getPreside())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
if (null == resWBxd.getParticipants() || "".equals(resWBxd.getParticipants())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdWbxdService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdWbxdDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdWbxd;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdWbxdService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参与外部标准制修订信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdWbxdServiceImpl extends ServiceImpl<WgdWbxdDao, WgdWbxd> implements IWgdWbxdService {
|
||||
|
||||
@Autowired
|
||||
WgdWbxdDao wgdWbxdDao;
|
||||
|
||||
@Autowired
|
||||
IWgdWbxdService iWgdWbxdService;
|
||||
|
||||
@Override
|
||||
public List<WgdWbxd> getAllWgdWbxds() {
|
||||
return wgdWbxdDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbxd> queryAllWgdWbxds(WgdWbxd wgdWbxd) {
|
||||
Integer count = wgdWbxdDao.getQueryTotal(wgdWbxd);
|
||||
wgdWbxd.getPager().setRowCount(count);
|
||||
return wgdWbxdDao.queryAll(wgdWbxd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdWbxd getWgdWbxdById(String id) {
|
||||
return wgdWbxdDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdWbxd(WgdWbxd wgdWbxd) {
|
||||
return wgdWbxdDao.updateOne(wgdWbxd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdWbxd(WgdWbxd wgdWbxd) {
|
||||
wgdWbxd.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdWbxdDao.insertOne(wgdWbxd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbxd(String id) {
|
||||
return wgdWbxdDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdWbxds(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdWbxdDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdWbxd> importWbxd(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
|
||||
List<WgdWbxd> res= ExcelImportUtilByWk.readExcelpublic(WgdWbxd.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdWbxd wgdWbxd: res) {
|
||||
if (null == wgdWbxd.getName() || "".equals(wgdWbxd.getName())){
|
||||
stringBuilder.append("第" + i + "行第3列标准名称填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbxd.getType() || "".equals(wgdWbxd.getType())){
|
||||
stringBuilder.append("第" + i + "行第6列标类型填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbxd.getPreside() || "".equals(wgdWbxd.getPreside())){
|
||||
stringBuilder.append("第" + i + "行第7列主持或参与填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdWbxd.getParticipants() || "".equals(wgdWbxd.getParticipants())){
|
||||
stringBuilder.append("第" + i + "行第14列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbxd.getDataStart() && !"".equals(wgdWbxd.getDataStart())) {
|
||||
wgdWbxd.setDataStart(wgdWbxd.getDataStart());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第8列发布日期填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbxd.getDataImplement() && !"".equals(wgdWbxd.getDataImplement())) {
|
||||
wgdWbxd.setDataImplement(wgdWbxd.getDataImplement());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第9列实施日期填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdWbxd.getDataRecord() && !"".equals(wgdWbxd.getDataRecord())) {
|
||||
wgdWbxd.setDataRecord(wgdWbxd.getDataRecord());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第12列备案时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdWbxd> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdWbxd.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdWbxd> wgdAssocInfos=iWgdWbxdService.list(queryWrapper);
|
||||
List<WgdWbxd> remove=new ArrayList<>();
|
||||
wgdAssocInfos.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resWBxd->{
|
||||
if (null == resWBxd.getName() || "".equals(resWBxd.getName())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
if (null == resWBxd.getType() || "".equals(resWBxd.getType())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
if (null == resWBxd.getPreside() || "".equals(resWBxd.getPreside())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
if (null == resWBxd.getParticipants() || "".equals(resWBxd.getParticipants())){
|
||||
remove.add(resWBxd);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdWbxdService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+110
-106
@@ -1,106 +1,110 @@
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdZcbDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdZcb;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdZcbService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准制修订补助资金收支统计支出表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdZcbServiceImpl extends ServiceImpl<WgdZcbDao, WgdZcb> implements IWgdZcbService {
|
||||
|
||||
@Autowired
|
||||
WgdZcbDao wgdZcbDao;
|
||||
|
||||
@Autowired
|
||||
IWgdZcbService iWgdZcbService;
|
||||
@Override
|
||||
public List<WgdZcb> getAllWgdZcbs() {
|
||||
return wgdZcbDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdZcb> queryAllWgdZcbs(WgdZcb wgdZcb) {
|
||||
Integer count = wgdZcbDao.getQueryTotal(wgdZcb);
|
||||
wgdZcb.getPager().setRowCount(count);
|
||||
return wgdZcbDao.queryAll(wgdZcb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdZcb getWgdZcbById(String id) {
|
||||
return wgdZcbDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdZcb(WgdZcb wgdZcb) {
|
||||
return wgdZcbDao.updateOne(wgdZcb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdZcb(WgdZcb wgdZcb) {
|
||||
wgdZcb.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdZcbDao.insertOne(wgdZcb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdZcb(String id) {
|
||||
return wgdZcbDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdZcbs(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdZcbDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdZcb> importZcb(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdZcb> res= ExcelImportUtilByWk.readExcelpublic(WgdZcb.class,file);
|
||||
|
||||
QueryWrapper<WgdZcb> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdZcb.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdZcb> wgdZcb=iWgdZcbService.list(queryWrapper);
|
||||
List<WgdZcb> remove=new ArrayList<>();
|
||||
wgdZcb.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resZcb->{
|
||||
if (null!=resZcb.getAnnexs() && !"".equals(resZcb.getAnnexs())) {
|
||||
resZcb.setAnnexs(null);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdZcbService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusLeo.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusLeo.dao.WgdZcbDao;
|
||||
import com.adc.da.slrs.wgdCensusLeo.entity.WgdZcb;
|
||||
import com.adc.da.slrs.wgdCensusLeo.service.IWgdZcbService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准制修订补助资金收支统计支出表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdZcbServiceImpl extends ServiceImpl<WgdZcbDao, WgdZcb> implements IWgdZcbService {
|
||||
|
||||
@Autowired
|
||||
WgdZcbDao wgdZcbDao;
|
||||
|
||||
@Autowired
|
||||
IWgdZcbService iWgdZcbService;
|
||||
@Override
|
||||
public List<WgdZcb> getAllWgdZcbs() {
|
||||
return wgdZcbDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdZcb> queryAllWgdZcbs(WgdZcb wgdZcb) {
|
||||
Integer count = wgdZcbDao.getQueryTotal(wgdZcb);
|
||||
wgdZcb.getPager().setRowCount(count);
|
||||
return wgdZcbDao.queryAll(wgdZcb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdZcb getWgdZcbById(String id) {
|
||||
return wgdZcbDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdZcb(WgdZcb wgdZcb) {
|
||||
return wgdZcbDao.updateOne(wgdZcb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdZcb(WgdZcb wgdZcb) {
|
||||
wgdZcb.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdZcbDao.insertOne(wgdZcb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdZcb(String id) {
|
||||
return wgdZcbDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdZcbs(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdZcbDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdZcb> importZcb(MultipartFile file, StringBuilder stringBuilder) {
|
||||
|
||||
List<WgdZcb> res= ExcelImportUtilByWk.readExcelpublic(WgdZcb.class,file);
|
||||
if (res != null){
|
||||
QueryWrapper<WgdZcb> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdZcb.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdZcb> wgdZcb=iWgdZcbService.list(queryWrapper);
|
||||
List<WgdZcb> remove=new ArrayList<>();
|
||||
wgdZcb.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resZcb->{
|
||||
if (null!=resZcb.getAnnexs() && !"".equals(resZcb.getAnnexs())) {
|
||||
resZcb.setAnnexs(null);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdZcbService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+151
-146
@@ -1,146 +1,151 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdAssocCostDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdAssocCostService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 协会费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdAssocCostServiceImpl extends ServiceImpl<WgdAssocCostDao, WgdAssocCost> implements IWgdAssocCostService {
|
||||
|
||||
@Autowired
|
||||
WgdAssocCostDao wgdAssocCostDao;
|
||||
|
||||
@Autowired
|
||||
IWgdAssocCostService iWgdAssocCostService;
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> selectAllAssocCosts() {
|
||||
return wgdAssocCostDao.selectAllAssocCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> getAllWgdAssocCosts(WgdAssocCost page) {
|
||||
Integer count = wgdAssocCostDao.getTotal();
|
||||
page.getPager().setRowCount(count);
|
||||
List<WgdAssocCost> wgdAssocCosts = wgdAssocCostDao.selectAll(page);
|
||||
return wgdAssocCosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> queryAllWgdAssocCosts(WgdAssocCost wgdAssocCost) {
|
||||
Integer count = wgdAssocCostDao.getQueryTotal(wgdAssocCost);
|
||||
wgdAssocCost.getPager().setRowCount(count);
|
||||
List<WgdAssocCost> wgdAssocCosts = wgdAssocCostDao.queryAll(wgdAssocCost);
|
||||
return wgdAssocCosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdAssocCost getWgdAssocCostById(String id) {
|
||||
return wgdAssocCostDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdAssocCost(WgdAssocCost wgdAssocCost) {
|
||||
return wgdAssocCostDao.updateOne(wgdAssocCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdAssocCost(WgdAssocCost wgdAssocCost) {
|
||||
wgdAssocCost.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdAssocCostDao.insertOne(wgdAssocCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocCost(String id) {
|
||||
return wgdAssocCostDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocCosts(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdAssocCostDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> importAssocCosts(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdAssocCost wgdAssocCost: res) {
|
||||
if (null == wgdAssocCost.getScName() || "".equals(wgdAssocCost.getScName())){
|
||||
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdAssocCost.getWgName() || "".equals(wgdAssocCost.getWgName())){
|
||||
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdAssocCost.getCostOutlay() || "".equals(wgdAssocCost.getCostOutlay())){
|
||||
stringBuilder.append("第" + i + "行第6列费用列支填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdAssocCost.getAnnualPayment() || "".equals(wgdAssocCost.getAnnualPayment())){
|
||||
stringBuilder.append("第" + i + "行第7列每年缴费情况填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdAssocCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdAssocCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdAssocCost> wgdAssocCost=iWgdAssocCostService.list(queryWrapper);
|
||||
List<WgdAssocCost> remove=new ArrayList<>();
|
||||
wgdAssocCost.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resAssoc->{
|
||||
if (null == resAssoc.getScName() || "".equals(resAssoc.getScName())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
if (null == resAssoc.getWgName() || "".equals(resAssoc.getWgName())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
if (null == resAssoc.getCostOutlay() || "".equals(resAssoc.getCostOutlay())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
if (null == resAssoc.getAnnualPayment() || "".equals(resAssoc.getAnnualPayment())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdAssocCostService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdAssocCostDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdAssocCostService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 协会费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdAssocCostServiceImpl extends ServiceImpl<WgdAssocCostDao, WgdAssocCost> implements IWgdAssocCostService {
|
||||
|
||||
@Autowired
|
||||
WgdAssocCostDao wgdAssocCostDao;
|
||||
|
||||
@Autowired
|
||||
IWgdAssocCostService iWgdAssocCostService;
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> selectAllAssocCosts() {
|
||||
return wgdAssocCostDao.selectAllAssocCosts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> getAllWgdAssocCosts(WgdAssocCost page) {
|
||||
Integer count = wgdAssocCostDao.getTotal();
|
||||
page.getPager().setRowCount(count);
|
||||
List<WgdAssocCost> wgdAssocCosts = wgdAssocCostDao.selectAll(page);
|
||||
return wgdAssocCosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> queryAllWgdAssocCosts(WgdAssocCost wgdAssocCost) {
|
||||
Integer count = wgdAssocCostDao.getQueryTotal(wgdAssocCost);
|
||||
wgdAssocCost.getPager().setRowCount(count);
|
||||
List<WgdAssocCost> wgdAssocCosts = wgdAssocCostDao.queryAll(wgdAssocCost);
|
||||
return wgdAssocCosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdAssocCost getWgdAssocCostById(String id) {
|
||||
return wgdAssocCostDao.selectOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdAssocCost(WgdAssocCost wgdAssocCost) {
|
||||
return wgdAssocCostDao.updateOne(wgdAssocCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdAssocCost(WgdAssocCost wgdAssocCost) {
|
||||
wgdAssocCost.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdAssocCostDao.insertOne(wgdAssocCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocCost(String id) {
|
||||
return wgdAssocCostDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocCosts(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdAssocCostDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocCost> importAssocCosts(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdAssocCost> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocCost.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdAssocCost wgdAssocCost: res) {
|
||||
if (null == wgdAssocCost.getScName() || "".equals(wgdAssocCost.getScName())){
|
||||
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdAssocCost.getWgName() || "".equals(wgdAssocCost.getWgName())){
|
||||
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdAssocCost.getCostOutlay() || "".equals(wgdAssocCost.getCostOutlay())){
|
||||
stringBuilder.append("第" + i + "行第6列费用列支填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdAssocCost.getAnnualPayment() || "".equals(wgdAssocCost.getAnnualPayment())){
|
||||
stringBuilder.append("第" + i + "行第7列每年缴费情况填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdAssocCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdAssocCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdAssocCost> wgdAssocCost=iWgdAssocCostService.list(queryWrapper);
|
||||
List<WgdAssocCost> remove=new ArrayList<>();
|
||||
wgdAssocCost.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resAssoc->{
|
||||
if (null == resAssoc.getScName() || "".equals(resAssoc.getScName())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
if (null == resAssoc.getWgName() || "".equals(resAssoc.getWgName())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
if (null == resAssoc.getCostOutlay() || "".equals(resAssoc.getCostOutlay())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
if (null == resAssoc.getAnnualPayment() || "".equals(resAssoc.getAnnualPayment())){
|
||||
remove.add(resAssoc);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdAssocCostService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+167
-162
@@ -1,162 +1,167 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.entity.importExcelDTO;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdAssocInfoDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdAssocInfoService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 协会信息数据统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdAssocInfoServiceImpl extends ServiceImpl<WgdAssocInfoDao, WgdAssocInfo> implements IWgdAssocInfoService {
|
||||
|
||||
@Autowired
|
||||
WgdAssocInfoDao wgdAssocInfoDao;
|
||||
@Autowired
|
||||
IWgdAssocInfoService iWgdAssocInfoService;
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> getAllWgdAssocInfos() {
|
||||
return wgdAssocInfoDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> queryAllWgdAssocInfos(WgdAssocInfo wgdAssocInfo) {
|
||||
Integer count = wgdAssocInfoDao.getQueryTotal(wgdAssocInfo);
|
||||
wgdAssocInfo.getPager().setRowCount(count);
|
||||
return wgdAssocInfoDao.queryAll(wgdAssocInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdAssocInfo getWgdAssocInfoById(String id) {
|
||||
return wgdAssocInfoDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdAssocInfo(WgdAssocInfo wgdAssocInfo) {
|
||||
return wgdAssocInfoDao.updateOne(wgdAssocInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdAssocInfo(WgdAssocInfo wgdAssocInfo) {
|
||||
wgdAssocInfo.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdAssocInfoDao.insertOne(wgdAssocInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocInfo(String id) {
|
||||
return wgdAssocInfoDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocInfos(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdAssocInfoDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> delWithWkData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdAssocInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocInfo.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdAssocInfo importExcelDTO: res) {
|
||||
if (null == importExcelDTO.getScName() || "".equals(importExcelDTO.getScName())){
|
||||
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getSscName() || "".equals(importExcelDTO.getSscName())){
|
||||
stringBuilder.append("第" + i + "行第2列协会名称-分标委填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getWgName() || "".equals(importExcelDTO.getWgName())){
|
||||
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getRole() || "".equals(importExcelDTO.getRole())){
|
||||
stringBuilder.append("第" + i + "行第4列会员角色填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getAttend() || "".equals(importExcelDTO.getAttend())){
|
||||
stringBuilder.append("第" + i + "行第5列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getIniTime() && !"".equals(importExcelDTO.getIniTime())) {
|
||||
importExcelDTO.setIniTime(importExcelDTO.getIniTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第9列初始入会时间填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getCurTime() && !"".equals(importExcelDTO.getCurTime())) {
|
||||
|
||||
importExcelDTO.setCurTime(importExcelDTO.getCurTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第10列本届入会时间填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getLastPayTime() && !"".equals(importExcelDTO.getLastPayTime())) {
|
||||
importExcelDTO.setLastPayTime(importExcelDTO.getLastPayTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第13列上次缴纳时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdAssocInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdAssocInfo.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdAssocInfo> wgdAssocInfos=iWgdAssocInfoService.list(queryWrapper);
|
||||
List<WgdAssocInfo> remove=new ArrayList<>();
|
||||
wgdAssocInfos.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resOne->{
|
||||
if (null == resOne.getScName() || "".equals(resOne.getScName())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getSscName() || "".equals(resOne.getSscName())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getWgName() || "".equals(resOne.getWgName())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getRole() || "".equals(resOne.getRole())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getAttend() || "".equals(resOne.getAttend())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
});
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdAssocInfoService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.entity.importExcelDTO;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdAssocInfoDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdAssocInfoService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 协会信息数据统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdAssocInfoServiceImpl extends ServiceImpl<WgdAssocInfoDao, WgdAssocInfo> implements IWgdAssocInfoService {
|
||||
|
||||
@Autowired
|
||||
WgdAssocInfoDao wgdAssocInfoDao;
|
||||
@Autowired
|
||||
IWgdAssocInfoService iWgdAssocInfoService;
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> getAllWgdAssocInfos() {
|
||||
return wgdAssocInfoDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> queryAllWgdAssocInfos(WgdAssocInfo wgdAssocInfo) {
|
||||
Integer count = wgdAssocInfoDao.getQueryTotal(wgdAssocInfo);
|
||||
wgdAssocInfo.getPager().setRowCount(count);
|
||||
return wgdAssocInfoDao.queryAll(wgdAssocInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdAssocInfo getWgdAssocInfoById(String id) {
|
||||
return wgdAssocInfoDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdAssocInfo(WgdAssocInfo wgdAssocInfo) {
|
||||
return wgdAssocInfoDao.updateOne(wgdAssocInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdAssocInfo(WgdAssocInfo wgdAssocInfo) {
|
||||
wgdAssocInfo.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdAssocInfoDao.insertOne(wgdAssocInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocInfo(String id) {
|
||||
return wgdAssocInfoDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdAssocInfos(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdAssocInfoDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdAssocInfo> delWithWkData(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdAssocInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdAssocInfo.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdAssocInfo importExcelDTO: res) {
|
||||
if (null == importExcelDTO.getScName() || "".equals(importExcelDTO.getScName())){
|
||||
stringBuilder.append("第" + i + "行第1列协会名称-标委会填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getSscName() || "".equals(importExcelDTO.getSscName())){
|
||||
stringBuilder.append("第" + i + "行第2列协会名称-分标委填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getWgName() || "".equals(importExcelDTO.getWgName())){
|
||||
stringBuilder.append("第" + i + "行第3列协会名称-工作组填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getRole() || "".equals(importExcelDTO.getRole())){
|
||||
stringBuilder.append("第" + i + "行第4列会员角色填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == importExcelDTO.getAttend() || "".equals(importExcelDTO.getAttend())){
|
||||
stringBuilder.append("第" + i + "行第5列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getIniTime() && !"".equals(importExcelDTO.getIniTime())) {
|
||||
importExcelDTO.setIniTime(importExcelDTO.getIniTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第9列初始入会时间填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getCurTime() && !"".equals(importExcelDTO.getCurTime())) {
|
||||
|
||||
importExcelDTO.setCurTime(importExcelDTO.getCurTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第10列本届入会时间填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=importExcelDTO.getLastPayTime() && !"".equals(importExcelDTO.getLastPayTime())) {
|
||||
importExcelDTO.setLastPayTime(importExcelDTO.getLastPayTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第13列上次缴纳时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdAssocInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdAssocInfo.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdAssocInfo> wgdAssocInfos=iWgdAssocInfoService.list(queryWrapper);
|
||||
List<WgdAssocInfo> remove=new ArrayList<>();
|
||||
wgdAssocInfos.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resOne->{
|
||||
if (null == resOne.getScName() || "".equals(resOne.getScName())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getSscName() || "".equals(resOne.getSscName())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getWgName() || "".equals(resOne.getWgName())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getRole() || "".equals(resOne.getRole())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
if (null == resOne.getAttend() || "".equals(resOne.getAttend())){
|
||||
remove.add(resOne);
|
||||
}
|
||||
});
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdAssocInfoService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+160
-155
@@ -1,155 +1,160 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdCommiInfoDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdCommiInfoService;
|
||||
import com.adc.da.util.MD5Util;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 委员信息数据统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdCommiInfoServiceImpl extends ServiceImpl<WgdCommiInfoDao, WgdCommiInfo> implements IWgdCommiInfoService {
|
||||
|
||||
@Autowired
|
||||
WgdCommiInfoDao wgdCommiInfoDao;
|
||||
|
||||
@Autowired
|
||||
IWgdCommiInfoService iWgdCommiInfoService;
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> getAllWgdCommiInfos() {
|
||||
return wgdCommiInfoDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> queryAllWgdCommiInfos(WgdCommiInfo wgdCommiInfo) {
|
||||
Integer count = wgdCommiInfoDao.getQueryTotal(wgdCommiInfo);
|
||||
wgdCommiInfo.getPager().setRowCount(count);
|
||||
return wgdCommiInfoDao.queryAll(wgdCommiInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdCommiInfo getWgdCommiInfoById(String id) {
|
||||
return wgdCommiInfoDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdCommiInfo(WgdCommiInfo wgdCommiInfo) {
|
||||
wgdCommiInfo.setPassword(MD5Util.convertMD5(wgdCommiInfo.getPassword()));
|
||||
return wgdCommiInfoDao.updateOne(wgdCommiInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdCommiInfo(WgdCommiInfo wgdCommiInfo) {
|
||||
wgdCommiInfo.setId(UUIDUtils.randomUUID(32));
|
||||
wgdCommiInfo.setPassword(MD5Util.convertMD5(wgdCommiInfo.getPassword()));
|
||||
return wgdCommiInfoDao.insertOne(wgdCommiInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCommiInfo(String id) {
|
||||
return wgdCommiInfoDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCommiInfos(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdCommiInfoDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> importCommiInfo(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdCommiInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdCommiInfo.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdCommiInfo wgdCommiInfo: res) {
|
||||
if (null == wgdCommiInfo.getScName() || "".equals(wgdCommiInfo.getScName())){
|
||||
stringBuilder.append("第" + i + "行第2列协会名称-标委会填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getSscName() || "".equals(wgdCommiInfo.getSscName())){
|
||||
stringBuilder.append("第" + i + "行第3列协会名称-分标委填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getWgName() || "".equals(wgdCommiInfo.getWgName())){
|
||||
stringBuilder.append("第" + i + "行第4列协会名称-工作组填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getRole() || "".equals(wgdCommiInfo.getRole())){
|
||||
stringBuilder.append("第" + i + "行第6列会员角色填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getAttend() || "".equals(wgdCommiInfo.getAttend())){
|
||||
stringBuilder.append("第" + i + "行第7列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getTel() || "".equals(wgdCommiInfo.getTel())){
|
||||
stringBuilder.append("第" + i + "行第10列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdCommiInfo.getCurTime() && !"".equals(wgdCommiInfo.getCurTime())) {
|
||||
wgdCommiInfo.setCurTime(wgdCommiInfo.getCurTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第5列本届入会时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdCommiInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdCommiInfo.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdCommiInfo> wgdCommiInfo=iWgdCommiInfoService.list(queryWrapper);
|
||||
List<WgdCommiInfo> remove=new ArrayList<>();
|
||||
wgdCommiInfo.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resCommiInfo->{
|
||||
if (null == resCommiInfo.getScName() || "".equals(resCommiInfo.getScName())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getSscName() || "".equals(resCommiInfo.getSscName())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getWgName() || "".equals(resCommiInfo.getWgName())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getRole() || "".equals(resCommiInfo.getRole())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getAttend() || "".equals(resCommiInfo.getAttend())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getTel() || "".equals(resCommiInfo.getTel())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
});
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdCommiInfoService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdCommiInfoDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdCommiInfoService;
|
||||
import com.adc.da.util.MD5Util;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 委员信息数据统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdCommiInfoServiceImpl extends ServiceImpl<WgdCommiInfoDao, WgdCommiInfo> implements IWgdCommiInfoService {
|
||||
|
||||
@Autowired
|
||||
WgdCommiInfoDao wgdCommiInfoDao;
|
||||
|
||||
@Autowired
|
||||
IWgdCommiInfoService iWgdCommiInfoService;
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> getAllWgdCommiInfos() {
|
||||
return wgdCommiInfoDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> queryAllWgdCommiInfos(WgdCommiInfo wgdCommiInfo) {
|
||||
Integer count = wgdCommiInfoDao.getQueryTotal(wgdCommiInfo);
|
||||
wgdCommiInfo.getPager().setRowCount(count);
|
||||
return wgdCommiInfoDao.queryAll(wgdCommiInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdCommiInfo getWgdCommiInfoById(String id) {
|
||||
return wgdCommiInfoDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdCommiInfo(WgdCommiInfo wgdCommiInfo) {
|
||||
wgdCommiInfo.setPassword(MD5Util.convertMD5(wgdCommiInfo.getPassword()));
|
||||
return wgdCommiInfoDao.updateOne(wgdCommiInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdCommiInfo(WgdCommiInfo wgdCommiInfo) {
|
||||
wgdCommiInfo.setId(UUIDUtils.randomUUID(32));
|
||||
wgdCommiInfo.setPassword(MD5Util.convertMD5(wgdCommiInfo.getPassword()));
|
||||
return wgdCommiInfoDao.insertOne(wgdCommiInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCommiInfo(String id) {
|
||||
return wgdCommiInfoDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdCommiInfos(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdCommiInfoDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdCommiInfo> importCommiInfo(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdCommiInfo> res= ExcelImportUtilByWk.readExcelpublic(WgdCommiInfo.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdCommiInfo wgdCommiInfo: res) {
|
||||
if (null == wgdCommiInfo.getScName() || "".equals(wgdCommiInfo.getScName())){
|
||||
stringBuilder.append("第" + i + "行第2列协会名称-标委会填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getSscName() || "".equals(wgdCommiInfo.getSscName())){
|
||||
stringBuilder.append("第" + i + "行第3列协会名称-分标委填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getWgName() || "".equals(wgdCommiInfo.getWgName())){
|
||||
stringBuilder.append("第" + i + "行第4列协会名称-工作组填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getRole() || "".equals(wgdCommiInfo.getRole())){
|
||||
stringBuilder.append("第" + i + "行第6列会员角色填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getAttend() || "".equals(wgdCommiInfo.getAttend())){
|
||||
stringBuilder.append("第" + i + "行第7列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
if (null == wgdCommiInfo.getTel() || "".equals(wgdCommiInfo.getTel())){
|
||||
stringBuilder.append("第" + i + "行第10列参与人填写不符合格式要求请检查;");
|
||||
}
|
||||
try {
|
||||
if (null!=wgdCommiInfo.getCurTime() && !"".equals(wgdCommiInfo.getCurTime())) {
|
||||
wgdCommiInfo.setCurTime(wgdCommiInfo.getCurTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第5列本届入会时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdCommiInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdCommiInfo.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdCommiInfo> wgdCommiInfo=iWgdCommiInfoService.list(queryWrapper);
|
||||
List<WgdCommiInfo> remove=new ArrayList<>();
|
||||
wgdCommiInfo.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
res.forEach(resCommiInfo->{
|
||||
if (null == resCommiInfo.getScName() || "".equals(resCommiInfo.getScName())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getSscName() || "".equals(resCommiInfo.getSscName())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getWgName() || "".equals(resCommiInfo.getWgName())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getRole() || "".equals(resCommiInfo.getRole())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getAttend() || "".equals(resCommiInfo.getAttend())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
if (null == resCommiInfo.getTel() || "".equals(resCommiInfo.getTel())){
|
||||
remove.add(resCommiInfo);
|
||||
}
|
||||
});
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdCommiInfoService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+106
-102
@@ -1,102 +1,106 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdExReviseCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdExReviseCostDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdExReviseCostService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参与外部标准制修订费用统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdExReviseCostServiceImpl extends ServiceImpl<WgdExReviseCostDao, WgdExReviseCost> implements IWgdExReviseCostService {
|
||||
|
||||
@Autowired
|
||||
WgdExReviseCostDao wgdExReviseCostDao;
|
||||
|
||||
@Autowired
|
||||
IWgdExReviseCostService iWgdExReviseCostService;
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> getAllWgdExReviseCosts() {
|
||||
return wgdExReviseCostDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> queryAllWgdExReviseCosts(WgdExReviseCost wgdExReviseCost) {
|
||||
Integer count = wgdExReviseCostDao.getQueryTotal(wgdExReviseCost);
|
||||
wgdExReviseCost.getPager().setRowCount(count);
|
||||
return wgdExReviseCostDao.queryAll(wgdExReviseCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdExReviseCost getWgdExReviseCostById(String id) {
|
||||
return wgdExReviseCostDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdExReviseCost(WgdExReviseCost wgdExReviseCost) {
|
||||
return wgdExReviseCostDao.updateOne(wgdExReviseCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdExReviseCost(WgdExReviseCost wgdExReviseCost) {
|
||||
wgdExReviseCost.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdExReviseCostDao.insertOne(wgdExReviseCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdExReviseCost(String id) {
|
||||
return wgdExReviseCostDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdExReviseCosts(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdExReviseCostDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> importExReviseCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file);
|
||||
|
||||
QueryWrapper<WgdExReviseCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdExReviseCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdExReviseCost> wgdExReviseCost=iWgdExReviseCostService.list(queryWrapper);
|
||||
List<WgdExReviseCost> remove=new ArrayList<>();
|
||||
wgdExReviseCost.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdExReviseCostService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdExReviseCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdExReviseCostDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdExReviseCostService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参与外部标准制修订费用统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdExReviseCostServiceImpl extends ServiceImpl<WgdExReviseCostDao, WgdExReviseCost> implements IWgdExReviseCostService {
|
||||
|
||||
@Autowired
|
||||
WgdExReviseCostDao wgdExReviseCostDao;
|
||||
|
||||
@Autowired
|
||||
IWgdExReviseCostService iWgdExReviseCostService;
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> getAllWgdExReviseCosts() {
|
||||
return wgdExReviseCostDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> queryAllWgdExReviseCosts(WgdExReviseCost wgdExReviseCost) {
|
||||
Integer count = wgdExReviseCostDao.getQueryTotal(wgdExReviseCost);
|
||||
wgdExReviseCost.getPager().setRowCount(count);
|
||||
return wgdExReviseCostDao.queryAll(wgdExReviseCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdExReviseCost getWgdExReviseCostById(String id) {
|
||||
return wgdExReviseCostDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdExReviseCost(WgdExReviseCost wgdExReviseCost) {
|
||||
return wgdExReviseCostDao.updateOne(wgdExReviseCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdExReviseCost(WgdExReviseCost wgdExReviseCost) {
|
||||
wgdExReviseCost.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdExReviseCostDao.insertOne(wgdExReviseCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdExReviseCost(String id) {
|
||||
return wgdExReviseCostDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdExReviseCosts(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdExReviseCostDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdExReviseCost> importExReviseCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdExReviseCost> res= ExcelImportUtilByWk.readExcelpublic(WgdExReviseCost.class,file);
|
||||
if (res != null){
|
||||
QueryWrapper<WgdExReviseCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdExReviseCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdExReviseCost> wgdExReviseCost=iWgdExReviseCostService.list(queryWrapper);
|
||||
List<WgdExReviseCost> remove=new ArrayList<>();
|
||||
wgdExReviseCost.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdExReviseCostService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+120
-115
@@ -1,115 +1,120 @@
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdMeetCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdMeetCostDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdMeetCostService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参会费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdMeetCostServiceImpl extends ServiceImpl<WgdMeetCostDao, WgdMeetCost> implements IWgdMeetCostService {
|
||||
|
||||
@Autowired
|
||||
WgdMeetCostDao wgdMeetCostDao;
|
||||
|
||||
@Autowired
|
||||
IWgdMeetCostService iWgdMeetCostService;
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> getAllWgdMeetCosts() {
|
||||
return wgdMeetCostDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> queryAllWgdMeetCosts(WgdMeetCost wgdMeetCost) {
|
||||
Integer count = wgdMeetCostDao.getQueryTotal(wgdMeetCost);
|
||||
wgdMeetCost.getPager().setRowCount(count);
|
||||
return wgdMeetCostDao.queryAll(wgdMeetCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdMeetCost getWgdMeetCostById(String id) {
|
||||
return wgdMeetCostDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdMeetCost(WgdMeetCost wgdMeetCost) {
|
||||
return wgdMeetCostDao.updateOne(wgdMeetCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdMeetCost(WgdMeetCost wgdMeetCost) {
|
||||
wgdMeetCost.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdMeetCostDao.insertOne(wgdMeetCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdMeetCost(String id) {
|
||||
return wgdMeetCostDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdMeetCosts(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdMeetCostDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> importMeetCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdMeetCost wgdCommiInfo: res) {
|
||||
try {
|
||||
if (null!=wgdCommiInfo.getMeetTime() && !"".equals(wgdCommiInfo.getMeetTime())) {
|
||||
wgdCommiInfo.setMeetTime(wgdCommiInfo.getMeetTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第3列本届会议时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdMeetCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdMeetCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdMeetCost> wgdMeetCost=iWgdMeetCostService.list(queryWrapper);
|
||||
List<WgdMeetCost> remove=new ArrayList<>();
|
||||
wgdMeetCost.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdMeetCostService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.wgdCensusZ.service.impl;
|
||||
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.processModel.utils.ExcelImportUtilByWk;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdCommiInfo;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdMeetCost;
|
||||
import com.adc.da.slrs.wgdCensusZ.dao.WgdMeetCostDao;
|
||||
import com.adc.da.slrs.wgdCensusZ.service.IWgdMeetCostService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 参会费用信息统计 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zcr
|
||||
* @since 2021-11-12
|
||||
*/
|
||||
@Service
|
||||
public class WgdMeetCostServiceImpl extends ServiceImpl<WgdMeetCostDao, WgdMeetCost> implements IWgdMeetCostService {
|
||||
|
||||
@Autowired
|
||||
WgdMeetCostDao wgdMeetCostDao;
|
||||
|
||||
@Autowired
|
||||
IWgdMeetCostService iWgdMeetCostService;
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> getAllWgdMeetCosts() {
|
||||
return wgdMeetCostDao.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> queryAllWgdMeetCosts(WgdMeetCost wgdMeetCost) {
|
||||
Integer count = wgdMeetCostDao.getQueryTotal(wgdMeetCost);
|
||||
wgdMeetCost.getPager().setRowCount(count);
|
||||
return wgdMeetCostDao.queryAll(wgdMeetCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WgdMeetCost getWgdMeetCostById(String id) {
|
||||
return wgdMeetCostDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateWgdMeetCost(WgdMeetCost wgdMeetCost) {
|
||||
return wgdMeetCostDao.updateOne(wgdMeetCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertWgdMeetCost(WgdMeetCost wgdMeetCost) {
|
||||
wgdMeetCost.setId(UUIDUtils.randomUUID(32));
|
||||
return wgdMeetCostDao.insertOne(wgdMeetCost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdMeetCost(String id) {
|
||||
return wgdMeetCostDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteWgdMeetCosts(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
return wgdMeetCostDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WgdMeetCost> importMeetCost(MultipartFile file, StringBuilder stringBuilder) {
|
||||
List<WgdMeetCost> res= ExcelImportUtilByWk.readExcelpublic(WgdMeetCost.class,file);
|
||||
if (res != null){
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i=1;
|
||||
for (WgdMeetCost wgdCommiInfo: res) {
|
||||
try {
|
||||
if (null!=wgdCommiInfo.getMeetTime() && !"".equals(wgdCommiInfo.getMeetTime())) {
|
||||
wgdCommiInfo.setMeetTime(wgdCommiInfo.getMeetTime());
|
||||
}
|
||||
}catch (Exception e){
|
||||
stringBuilder.append("第"+i+"行第3列本届会议时间填写不符合格式要求请检查;");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
QueryWrapper<WgdMeetCost> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select(WgdMeetCost.class, info -> !info.getColumn().equals("id"));
|
||||
List<WgdMeetCost> wgdMeetCost=iWgdMeetCostService.list(queryWrapper);
|
||||
List<WgdMeetCost> remove=new ArrayList<>();
|
||||
wgdMeetCost.forEach(WgbWbtj -> {
|
||||
WgbWbtj.setId(null);
|
||||
if (res.contains(WgbWbtj)){
|
||||
remove.add(WgbWbtj);
|
||||
}
|
||||
|
||||
});
|
||||
res.removeAll(remove);
|
||||
res.forEach(wgdAssocInfo -> {
|
||||
wgdAssocInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||
});
|
||||
if (res.size()>0 && iWgdMeetCostService.saveOrUpdateBatch(res)) {
|
||||
return res;
|
||||
}else {
|
||||
stringBuilder.append("表格数据全部重复");
|
||||
}
|
||||
return res;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.utils.util;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
@@ -24,7 +25,7 @@ public class BussStandExportUtil {
|
||||
private static final Logger logger = LoggerFactory.getLogger(BussStandExportUtil.class);
|
||||
|
||||
|
||||
public static Workbook exportDatas (List<SarBussionessStand> datas) {
|
||||
public static Workbook exportDatas (List<SarBussionessStandExport> datas) {
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
try {
|
||||
StringBuilder attrBud = new StringBuilder();
|
||||
@@ -62,13 +63,13 @@ public class BussStandExportUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static void createDatas(Workbook workbook,Sheet sheet,List<SarBussionessStand> datas,
|
||||
public static void createDatas(Workbook workbook,Sheet sheet,List<SarBussionessStandExport> datas,
|
||||
String header,Map<String,String> attrInfoMap) throws Exception{
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
if (datas != null && !datas.isEmpty()) {
|
||||
for (int i=0;i < datas.size(); i++) {
|
||||
SarBussionessStand sarStandardsInfoEO = datas.get(i);
|
||||
SarBussionessStandExport sarStandardsInfoEO = datas.get(i);
|
||||
Row row = sheet.createRow(i+1);
|
||||
String[] headerArr = header.split(",");
|
||||
int sheetNum = 0;
|
||||
@@ -85,7 +86,7 @@ public class BussStandExportUtil {
|
||||
}
|
||||
|
||||
// 根据表头返回相应值
|
||||
public static String getValueByName (String name,SarBussionessStand sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
||||
public static String getValueByName (String name,SarBussionessStandExport sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
||||
String value = "";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||
@@ -105,7 +106,7 @@ public class BussStandExportUtil {
|
||||
case "文本状态":
|
||||
value = verifyBean(sarStandardsInfoEO.getStandStatusShow());
|
||||
break;
|
||||
case "标准实施日期":
|
||||
case "企标实施日期":
|
||||
String putTime="";
|
||||
if(sarStandardsInfoEO.getPutTime() != null){
|
||||
if (Date.class.equals(sarStandardsInfoEO.getPutTime())) {
|
||||
@@ -117,12 +118,6 @@ public class BussStandExportUtil {
|
||||
}
|
||||
value = putTime;
|
||||
break;
|
||||
case "代替企标编号":
|
||||
value = verifyBean(sarStandardsInfoEO.getReplaceStandNum());
|
||||
break;
|
||||
case "被代替企标编号":
|
||||
value = verifyBean(sarStandardsInfoEO.getReplacedStandNum());
|
||||
break;
|
||||
case "发布日期":
|
||||
String issueTime="";
|
||||
if(sarStandardsInfoEO.getIssueTime() != null){
|
||||
@@ -143,6 +138,15 @@ public class BussStandExportUtil {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "备案日期":
|
||||
String field2 = attrInfoMap.get(name);
|
||||
if (attrValueMap != null) {
|
||||
value = String.valueOf(attrValueMap.get(field2));
|
||||
if (value.length()>10){
|
||||
value = value.substring(0,10);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
String field = attrInfoMap.get(name);
|
||||
if (attrValueMap != null) {
|
||||
|
||||
@@ -47,15 +47,14 @@ public class FieldConvertUtil {
|
||||
"EOP实施日期(文本),责任部门,相关部门,SVPPS,FO,项目评估角色,法规维护人,代替标准编号," +
|
||||
"对应其他标准,文字描述,等效标准,引用标准,被引用标准,覆盖关系";
|
||||
|
||||
public static String exportBaseFieldNamesLaws = "政策分类,政策编号,中文名称,英文名称,政策文号,发文日期,发文单位,征集意见周期-起始时间,征集意见周期-结束时间,文本状态," +
|
||||
"适用区域,适用车型,是否纳入认证清单,年度,福田转发通知文号,信息简报,标签,备注";
|
||||
public static String exportBaseFieldNamesLaws = "政策分类,政策编号,政策名称,英文名称,政策文号,发文日期,发文单位,征集意见周期-起始时间,征集意见周期-结束时间,文本状态," +
|
||||
"适用区域,适用车型,是否纳入认证清单,年度,福田转发通知文号,信息简报,标签,备注(最终政策发布)";
|
||||
|
||||
public static String exportAttrFieldNamesLaws = "适用车辆类型,要求类型," +
|
||||
"个性化标签,政策文本,过程稿件,新车型实施日期(文本),在产车实施日期(文本),EOP实施日期(文本),SVPPS," +
|
||||
"相关部门,责任部门,FO,维护工程师,归口管理部门,发布机构,我司是否参与,相关资料";
|
||||
|
||||
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,文本状态,发布日期,标准实施日期," +
|
||||
"代替企标编号,被代替企标编号";
|
||||
public static String exportBaseFieldNamesBuss = "企标编号,中文名称,英文名称,文本状态,发布日期,企标实施日期";
|
||||
|
||||
public static String exportAttrFieldNamesBuss = "SVPPS,规范性引用文件,废止日期,复审日期,密级,授权,相关部门," +
|
||||
"需会签部门,起草部门,主要起草人,起草分标委,企标文本,过程文本";
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.utils.util;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfo;
|
||||
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoExport;
|
||||
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
@@ -10,10 +11,8 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 标准导出工具
|
||||
@@ -24,11 +23,11 @@ public class LawsStandExportUtil {
|
||||
private static final Logger logger = LoggerFactory.getLogger(LawsStandExportUtil.class);
|
||||
|
||||
|
||||
public static Workbook exportDatas (List<SarLawsStandInfo> datas) {
|
||||
public static Workbook exportDatas (List<SarLawsStandInfoExport> datas) {
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
try {
|
||||
StringBuilder attrBud = new StringBuilder();
|
||||
List<SarStandAttrDetails> detailsEOList = InitStandAttrUtil.lawsStandAttrFieldList;
|
||||
List<SarStandAttrDetails> detailsEOList = InitStandAttrUtil.lawsForeignAttrFieldList;
|
||||
Map<String,String> attrInfoMap = new HashMap<>();
|
||||
for (SarStandAttrDetails detailsEO : detailsEOList) {
|
||||
if (!InitStandAttrUtil.fileFieldListLaws.contains(detailsEO.getAttrField())) {
|
||||
@@ -62,13 +61,13 @@ public class LawsStandExportUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static void createDatas(Workbook workbook,Sheet sheet,List<SarLawsStandInfo> datas,
|
||||
public static void createDatas(Workbook workbook,Sheet sheet,List<SarLawsStandInfoExport> datas,
|
||||
String header,Map<String,String> attrInfoMap) throws Exception{
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
if (datas != null && !datas.isEmpty()) {
|
||||
for (int i=0;i < datas.size(); i++) {
|
||||
SarLawsStandInfo sarStandardsInfoEO = datas.get(i);
|
||||
SarLawsStandInfoExport sarStandardsInfoEO = datas.get(i);
|
||||
Row row = sheet.createRow(i+1);
|
||||
String[] headerArr = header.split(",");
|
||||
int sheetNum = 0;
|
||||
@@ -85,7 +84,7 @@ public class LawsStandExportUtil {
|
||||
}
|
||||
|
||||
// 根据表头返回相应值
|
||||
public static String getValueByName (String name,SarLawsStandInfo sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
||||
public static String getValueByName (String name,SarLawsStandInfoExport sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
||||
String value = "";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||
@@ -96,7 +95,7 @@ public class LawsStandExportUtil {
|
||||
case "政策编号":
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsNumber());
|
||||
break;
|
||||
case "中文名称":
|
||||
case "政策名称":
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsName());
|
||||
break;
|
||||
case "英文名称":
|
||||
@@ -114,6 +113,11 @@ public class LawsStandExportUtil {
|
||||
issueTime=sarStandardsInfoEO.getIssueTime();
|
||||
}
|
||||
value = issueTime;
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if (value.length()>10){
|
||||
value = value.substring(0,10);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "发文单位":
|
||||
value = verifyBean(sarStandardsInfoEO.getIssueCompany());
|
||||
@@ -126,6 +130,11 @@ public class LawsStandExportUtil {
|
||||
commentCycleStart=sarStandardsInfoEO.getCommentCycleStart();
|
||||
}
|
||||
value = commentCycleStart;
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if (value.length()>10){
|
||||
value = value.substring(0,10);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "征集意见周期-结束时间":
|
||||
String commentCycleEnd="";
|
||||
@@ -135,6 +144,11 @@ public class LawsStandExportUtil {
|
||||
commentCycleEnd=sarStandardsInfoEO.getCommentCycleEnd();
|
||||
}
|
||||
value = commentCycleEnd;
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if (value.length()>10){
|
||||
value = value.substring(0,10);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "文本状态":
|
||||
value = verifyBean(sarStandardsInfoEO.getStandStatusShow());
|
||||
@@ -160,14 +174,25 @@ public class LawsStandExportUtil {
|
||||
case "标签":
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsLabel());
|
||||
break;
|
||||
case "备注":
|
||||
case "备注(最终政策发布)":
|
||||
value = verifyBean(sarStandardsInfoEO.getLawsRemark());
|
||||
break;
|
||||
default:
|
||||
List<String> list = new ArrayList<>();
|
||||
List<String > dateList = InitStandAttrUtil.timeFieldListLaws;
|
||||
List<String > dateList2 = InitStandAttrUtil.multiTimeFieldListLaws;
|
||||
list.addAll(dateList);
|
||||
list.addAll(dateList2);
|
||||
String field = attrInfoMap.get(name);
|
||||
if (attrValueMap != null) {
|
||||
List<String> finalData = list.stream().filter(field::contains).collect(Collectors.toList());
|
||||
value = String.valueOf(attrValueMap.get(field));
|
||||
}
|
||||
if (!finalData.isEmpty()) {
|
||||
if (value.length()>10){
|
||||
value = value.substring(0,10);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
|
||||
+13
-13
@@ -20,7 +20,7 @@
|
||||
</sql>
|
||||
|
||||
<select id="findPage" resultMap="IssueTrackPage" parameterType="com.adc.da.slrs.sarIssueTrack.entity.IssueTrackVo">
|
||||
(
|
||||
|
||||
SELECT
|
||||
CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
@@ -39,7 +39,7 @@
|
||||
del_flag=0
|
||||
|
||||
<if test="pageVo.lawCode != null and pageVo.lawCode != ''">
|
||||
trim(replace(CONCAT(
|
||||
and trim(replace(CONCAT(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
@@ -51,17 +51,17 @@
|
||||
|
||||
|
||||
<if test="pageVo.lawName != null and pageVo.lawName != ''">
|
||||
sarInfo.STAND_NAME LIKE CONCAT('%',#{pageVo.lawName},'%')
|
||||
and sarInfo.STAND_NAME LIKE CONCAT('%',#{pageVo.lawName},'%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="pageVo.productType != null and pageVo.productType != ''">
|
||||
issue.product_type LIKE CONCAT('%',#{pageVo.productType},'%')
|
||||
and issue.product_type LIKE CONCAT('%',#{pageVo.productType},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
) UNION ALL (
|
||||
UNION ALL
|
||||
SELECT
|
||||
sarInfo.LAWS_NUMBER AS law_code,
|
||||
sarInfo.LAWS_NAME AS law_name,
|
||||
@@ -73,20 +73,20 @@
|
||||
del_flag=0
|
||||
|
||||
<if test="pageVo.lawCode != null and pageVo.lawCode != ''">
|
||||
sarInfo.LAWS_NUMBER LIKE CONCAT('%',#{pageVo.lawCode},'%')
|
||||
and sarInfo.LAWS_NUMBER LIKE CONCAT('%',#{pageVo.lawCode},'%')
|
||||
</if>
|
||||
|
||||
<if test="pageVo.lawName != null and pageVo.lawName != ''">
|
||||
sarInfo.LAWS_NAME LIKE CONCAT('%',#{pageVo.lawName},'%')
|
||||
and sarInfo.LAWS_NAME LIKE CONCAT('%',#{pageVo.lawName},'%')
|
||||
</if>
|
||||
|
||||
<if test="pageVo.productType != null and pageVo.productType != ''">
|
||||
issue.product_type LIKE CONCAT('%',#{pageVo.productType},'%')
|
||||
and issue.product_type LIKE CONCAT('%',#{pageVo.productType},'%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
||||
) UNION ALL (
|
||||
UNION ALL
|
||||
SELECT
|
||||
sarInfo.STAND_CODE AS law_code,
|
||||
sarInfo.STAND_NAME AS law_name,
|
||||
@@ -100,21 +100,21 @@
|
||||
del_flag=0
|
||||
|
||||
<if test="pageVo.lawCode != null and pageVo.lawCode != ''">
|
||||
sarInfo.STAND_CODE LIKE CONCAT('%',#{pageVo.lawCode},'%')
|
||||
and sarInfo.STAND_CODE LIKE CONCAT('%',#{pageVo.lawCode},'%')
|
||||
</if>
|
||||
|
||||
<if test="pageVo.lawName != null and pageVo.lawName != ''">
|
||||
sarInfo.STAND_NAME LIKE CONCAT('%',#{pageVo.lawName},'%')
|
||||
and sarInfo.STAND_NAME LIKE CONCAT('%',#{pageVo.lawName},'%')
|
||||
</if>
|
||||
|
||||
<if test="pageVo.productType != null and pageVo.productType != ''">
|
||||
issue.product_type LIKE CONCAT('%',#{pageVo.productType},'%')
|
||||
and issue.product_type LIKE CONCAT('%',#{pageVo.productType},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -806,4 +806,9 @@
|
||||
SELECT FILE_type from sar_file_split_info WHERE STAND_ID = #{standId} AND VALID_FLAG = '0' GROUP BY FILE_TYPE
|
||||
</select>
|
||||
|
||||
<select id="getFileTypeHG" resultType="java.lang.String">
|
||||
SELECT FILE_type from sar_stand_items WHERE STAND_ID = #{standId} GROUP BY FILE_TYPE
|
||||
<!--SELECT FILE_type from sar_file_split_info WHERE STAND_ID = #{standId} AND VALID_FLAG = '0' GROUP BY FILE_TYPE-->
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -86,8 +86,11 @@
|
||||
<if test="area != null and area != ''">
|
||||
and area = #{area}
|
||||
</if>
|
||||
<if test="planStatus != null and planStatus != ''">
|
||||
and plan_status = #{planStatus}
|
||||
<if test="planStatusList != null">
|
||||
and plan_status in
|
||||
<foreach collection="planStatusList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="reviseStatus != null and reviseStatus != ''">
|
||||
and revise_status = #{reviseStatus}
|
||||
@@ -108,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>
|
||||
|
||||
+31
-4
@@ -25,7 +25,7 @@
|
||||
<result column="DTQBBHBUSS" property="DTQBBHBUSS"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMapExcel" type="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand" >
|
||||
<resultMap id="BaseResultMapExcel" type="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStandExport" >
|
||||
<result column="replaced_stand_num" property="replacedStandNum" />
|
||||
<result column="replace_stand_num" property="replaceStandNum" />
|
||||
<result column="put_time" property="putTime" />
|
||||
@@ -55,6 +55,24 @@
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss,SAR_BUSSIONESS_STAND.stand_number
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_show_Export" >
|
||||
DISTINCT SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.modify_time,
|
||||
SAR_BUSSIONESS_STAND.creation_time, SAR_BUSSIONESS_STAND.valid_flag,
|
||||
SAR_BUSSIONESS_STAND.apply_country, SAR_BUSSIONESS_STAND.stand_nature,SAR_BUSSIONESS_STAND.stand_sort,SAR_BUSSIONESS_STAND.stand_year,
|
||||
stand_status, replaced_stand_num,replace_stand_num,put_time,issue_time,stand_en_name,
|
||||
stand_name, stand_code,SAR_BUSSIONESS_STAND.text_status_buss,SAR_BUSSIONESS_STAND.stand_number,
|
||||
dicstandTextStatus.DIC_TYPE_NAME AS standStatusShow
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_show_ExportResult" >
|
||||
DISTINCT tmp_tb.id,tmp_tb.modify_time,
|
||||
tmp_tb.creation_time, tmp_tb.valid_flag,
|
||||
tmp_tb.apply_country, tmp_tb.stand_nature,tmp_tb.stand_sort,tmp_tb.stand_year,
|
||||
tmp_tb.stand_status, tmp_tb.replaced_stand_num,tmp_tb.replace_stand_num,tmp_tb.put_time,tmp_tb.issue_time,tmp_tb.stand_en_name,
|
||||
tmp_tb.stand_name, tmp_tb.stand_code,tmp_tb.text_status_buss,tmp_tb.stand_number,
|
||||
tmp_tb.standStatusShow
|
||||
</sql>
|
||||
|
||||
<sql id="Group_Column_List_show" >
|
||||
stand_status, replaced_stand_num, replace_stand_num,put_time,
|
||||
issue_time, stand_en_name, stand_name, stand_code,stand_status,
|
||||
@@ -575,6 +593,9 @@
|
||||
<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>
|
||||
@@ -754,11 +775,17 @@
|
||||
|
||||
<!-- 条件查询后,用于导出标准信息数据-->
|
||||
<select id="getSarBussionessStand" resultMap="BaseResultMapExcel" parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage">
|
||||
SELECT * FROM (
|
||||
select <include refid="Base_Column_List_show" />
|
||||
SELECT <include refid="Base_Column_List_show_ExportResult" />
|
||||
<if test="exportAllResult != null">
|
||||
, ${exportAllResult}
|
||||
</if>
|
||||
FROM (
|
||||
select <include refid="Base_Column_List_show_Export" />
|
||||
<if test="exportAllAttrInfo != null">
|
||||
, ${exportAllAttrInfo}
|
||||
</if>
|
||||
from SAR_BUSSIONESS_STAND
|
||||
<include refid="SarBussionInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_show"/>
|
||||
) tmp_tb
|
||||
<include refid="standSort_in"/>
|
||||
</select>
|
||||
|
||||
+27
-8
@@ -38,13 +38,13 @@
|
||||
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
and DATE_FORMAT(ISSUE_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd == null and issueTimeEnd == ''">
|
||||
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') >= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
|
||||
and DATE_FORMAT(ISSUE_TIME,'%Y-%m-%d') >= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
and DATE_FORMAT(ISSUE_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
@@ -64,26 +64,45 @@
|
||||
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
and DATE_FORMAT(ISSUE_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd == null and issueTimeEnd == ''">
|
||||
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') >= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
|
||||
and DATE_FORMAT(ISSUE_TIME,'%Y-%m-%d') >= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
|
||||
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
and DATE_FORMAT(ISSUE_TIME,'%Y-%m-%d') <= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询条件当页数据 -->
|
||||
<select id="getSarBussionessStandStatePageNo" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandStatePage">
|
||||
SELECT A.* FROM (
|
||||
SELECT
|
||||
A.ID,
|
||||
A.STAND_ID,
|
||||
A.STAND_NAME,
|
||||
A.STAND_CODE,
|
||||
A.REVIEW_TIME,
|
||||
A.ISSUE_TIME,
|
||||
A.REVIEW_RESULTS,
|
||||
A.REVIEW_PROCESS_NUM,
|
||||
A.CREATION_TIME,
|
||||
A.MODIFY_TIME,
|
||||
A.VALID_FLAG,
|
||||
A.PARAM1,
|
||||
A.PARAM2,
|
||||
A.QCDW,
|
||||
A.QCRBUSS,
|
||||
A.standSort
|
||||
FROM (
|
||||
select
|
||||
<include refid="Base_Column_List" />,
|
||||
sar_buss_stand_attr_info.QCDW,
|
||||
sar_buss_stand_attr_info.QCRBUSS
|
||||
sar_buss_stand_attr_info.QCRBUSS,
|
||||
sar_bussioness_stand.stand_sort AS standSort
|
||||
from sar_bussioness_stand_state
|
||||
LEFT JOIN sar_buss_stand_attr_info ON sar_buss_stand_attr_info.stand_id = sar_bussioness_stand_state.stand_id
|
||||
LEFT JOIN sar_bussioness_stand ON sar_bussioness_stand.id = sar_bussioness_stand_state.stand_id
|
||||
<include refid="SarBussionInfoRole_Where_Clause_Review_Results_N"/>
|
||||
ORDER BY
|
||||
REVIEW_RESULTS ASC,
|
||||
|
||||
+25
@@ -169,6 +169,31 @@
|
||||
LIMIT #{param3} , #{param2};
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsId" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standType != null">
|
||||
and si.STAND_TYPE = #{sar.standType}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and concat(concat(concat(concat(si.STAND_SORT,' '),si.STAND_NUMBER),'-'),si.STAND_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or si.STAND_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by number
|
||||
</select>
|
||||
|
||||
<select id="selectLawsId2" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
<where>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user