Merge branch 'develop_master' of http://gitlab.91isoft.com:90/LiuChao/foton-slrs-system-rest into develop_master
This commit is contained in:
@@ -138,7 +138,7 @@ stand.edit.file.path = /data/slrs/file/
|
|||||||
file.downloadUrl=https://srms.foton.com.cn/file/
|
file.downloadUrl=https://srms.foton.com.cn/file/
|
||||||
|
|
||||||
#上传文件白名单-以,分隔
|
#上传文件白名单-以,分隔
|
||||||
upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt
|
upload.file.white.lists = doc,docx,xls,xlsx,pdf,PDF,png,jpg,pptx,ppt,pdg
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# elasticsearch 配置
|
# elasticsearch 配置
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ public class importExcelDTO {
|
|||||||
@Excel(name = "制修订类型",orderNum = "2", width = 20.0)
|
@Excel(name = "制修订类型",orderNum = "2", width = 20.0)
|
||||||
private String reviseStatus;
|
private String reviseStatus;
|
||||||
|
|
||||||
|
@Excel(name = "起草责任单位" , orderNum = "3", width = 20.0)
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
@Excel(name = "起草责任单位" , orderNum = "3", width = 20.0)
|
|
||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
private String drafterName;
|
private String drafterName;
|
||||||
|
|||||||
+3
-3
@@ -73,9 +73,9 @@ public class IExportServiceImpl implements IExportService {
|
|||||||
stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;");
|
stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (null!=importExcelDTO.getUnit() && !"".equals(importExcelDTO.getUnit())){
|
if (null!=importExcelDTO.getUnitName() && !"".equals(importExcelDTO.getUnitName())){
|
||||||
importExcelDTO.setUnitName(tsInstitutionMap.get(importExcelDTO.getUnit()));
|
importExcelDTO.setUnit(tsInstitutionMap.get(importExcelDTO.getUnitName()));
|
||||||
if (null==tsInstitutionMap.get(importExcelDTO.getUnit())){
|
if (null==tsInstitutionMap.get(importExcelDTO.getUnitName())){
|
||||||
stringBuilder.append("第"+i+"行第4列起草责任单位填写不符合格式要求请检查;");
|
stringBuilder.append("第"+i+"行第4列起草责任单位填写不符合格式要求请检查;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+26
-13
@@ -61,6 +61,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.sql.Clob;
|
import java.sql.Clob;
|
||||||
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -550,18 +551,30 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
map.put("standEnName",verifyObj(sarStandardsInfoEO.getStandEnName()));
|
map.put("standEnName",verifyObj(sarStandardsInfoEO.getStandEnName()));
|
||||||
map.put("standNature",verifyObj(sarStandardsInfoEO.getStandNature()));
|
map.put("standNature",verifyObj(sarStandardsInfoEO.getStandNature()));
|
||||||
map.put("standState",verifyObj(sarStandardsInfoEO.getStandStatus()));
|
map.put("standState",verifyObj(sarStandardsInfoEO.getStandStatus()));
|
||||||
// if (sarStandardsInfoEO.getIssueTime() != null) {
|
if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
// String issueStr = format.format(sarStandardsInfoEO.getIssueTime());
|
SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
// map.put("issueTime",issueStr);
|
String issueStr = "";
|
||||||
// }
|
try {
|
||||||
map.put("issueTime", verifyObj(sarStandardsInfoEO.getIssueTime()));
|
issueStr = format2.format(format.parse(sarStandardsInfoEO.getIssueTime()));
|
||||||
map.put("putTime", verifyObj(sarStandardsInfoEO.getPutTime()));
|
}catch (Exception e){
|
||||||
// if (sarStandardsInfoEO.getPutTime() != null) {
|
}
|
||||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
map.put("issueTime",issueStr);
|
||||||
// String issueStr = format.format(sarStandardsInfoEO.getPutTime());
|
}else{
|
||||||
// map.put("putTime",issueStr);
|
map.put("issueTime", "");
|
||||||
// }
|
}
|
||||||
|
if (sarStandardsInfoEO.getPutTime() != null) {
|
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String issueStr = "";
|
||||||
|
try {
|
||||||
|
issueStr = format2.format(format.parse(sarStandardsInfoEO.getPutTime()));
|
||||||
|
}catch (Exception e){
|
||||||
|
}
|
||||||
|
map.put("putTime",issueStr);
|
||||||
|
}else {
|
||||||
|
map.put("putTime", "");
|
||||||
|
}
|
||||||
map.put("replaceStandNum",sarStandardsInfoEO.getReplaceStandNum());
|
map.put("replaceStandNum",sarStandardsInfoEO.getReplaceStandNum());
|
||||||
map.put("replacedStandNum",sarStandardsInfoEO.getReplacedStandNum());
|
map.put("replacedStandNum",sarStandardsInfoEO.getReplacedStandNum());
|
||||||
return map;
|
return map;
|
||||||
@@ -822,7 +835,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
convert.setFileSuffix(fileInfo.getFileSuffix());
|
convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||||
convert.setStandFileClassify(field);
|
convert.setStandFileClassify(field);
|
||||||
convert.setConvertType(SarTypeEnum.BUSINESS.getValue());
|
convert.setConvertType(SarTypeEnum.BUSINESS.getValue());
|
||||||
convertMq.sendMQ(convert);
|
// convertMq.sendMQ(convert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-18
@@ -151,12 +151,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
|||||||
qw.isNull("PARENT_ID");
|
qw.isNull("PARENT_ID");
|
||||||
List<TsResource> children = iTsResourceService.list(qw);
|
List<TsResource> children = iTsResourceService.list(qw);
|
||||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||||
List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
// List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||||
if (!getMenuIdList.isEmpty()) {
|
// if (!getMenuIdList.isEmpty()) {
|
||||||
page.setMenuRoleList(getMenuIdList);
|
// page.setMenuRoleList(getMenuIdList);
|
||||||
} else {
|
// } else {
|
||||||
page.setMenuRoleList(null);
|
// page.setMenuRoleList(null);
|
||||||
}
|
// }
|
||||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||||
if (ids != null && !ids.isEmpty()) {
|
if (ids != null && !ids.isEmpty()) {
|
||||||
page.setMenuAllChildrenIdList(ids);
|
page.setMenuAllChildrenIdList(ids);
|
||||||
@@ -180,12 +180,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
|||||||
qw.isNull("PARENT_ID");
|
qw.isNull("PARENT_ID");
|
||||||
List<TsResource> children = iTsResourceService.list(qw);
|
List<TsResource> children = iTsResourceService.list(qw);
|
||||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||||
List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
// List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||||
if (!getMenuIdList.isEmpty()) {
|
// if (!getMenuIdList.isEmpty()) {
|
||||||
page.setMenuRoleList(getMenuIdList);
|
// page.setMenuRoleList(getMenuIdList);
|
||||||
} else {
|
// } else {
|
||||||
page.setMenuRoleList(null);
|
// page.setMenuRoleList(null);
|
||||||
}
|
// }
|
||||||
List<String> ids = iTsResourceService.getChildMenuList(userId);
|
List<String> ids = iTsResourceService.getChildMenuList(userId);
|
||||||
if (ids != null && !ids.isEmpty()) {
|
if (ids != null && !ids.isEmpty()) {
|
||||||
page.setMenuAllChildrenIdList(ids);
|
page.setMenuAllChildrenIdList(ids);
|
||||||
@@ -429,12 +429,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
|||||||
qw.isNull("PARENT_ID");
|
qw.isNull("PARENT_ID");
|
||||||
List<TsResource> children = iTsResourceService.list(qw);
|
List<TsResource> children = iTsResourceService.list(qw);
|
||||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||||
page.setMenuRoleList(getMenuIdList);
|
// page.setMenuRoleList(getMenuIdList);
|
||||||
} else {
|
// } else {
|
||||||
page.setMenuRoleList(null);
|
// page.setMenuRoleList(null);
|
||||||
}
|
// }
|
||||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||||
if (ids != null && !ids.isEmpty()) {
|
if (ids != null && !ids.isEmpty()) {
|
||||||
page.setMenuAllChildrenIdList(ids);
|
page.setMenuAllChildrenIdList(ids);
|
||||||
|
|||||||
@@ -92,4 +92,6 @@ public class TsPosition extends BaseEntity {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer total;
|
private Integer total;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ public class TsPositionRoleVO {
|
|||||||
private String positionId;
|
private String positionId;
|
||||||
@NotNull(message = "roleIds不能为空")
|
@NotNull(message = "roleIds不能为空")
|
||||||
private List<String> roleIds;
|
private List<String> roleIds;
|
||||||
|
|
||||||
|
private String operator;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
@@ -9,6 +9,7 @@ import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
|||||||
import com.adc.da.slrs.sarRole.entity.TsRole;
|
import com.adc.da.slrs.sarRole.entity.TsRole;
|
||||||
import com.adc.da.utils.util.ListUtil;
|
import com.adc.da.utils.util.ListUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -77,11 +78,21 @@ public class TsPositionServiceImpl extends ServiceImpl<TsPositionDao, TsPosition
|
|||||||
Map<String,List<String>> updateRoleIds= ListUtil.difList(tsPositionRoleVO.getRoleIds(),oldRoleIds);
|
Map<String,List<String>> updateRoleIds= ListUtil.difList(tsPositionRoleVO.getRoleIds(),oldRoleIds);
|
||||||
List<String> insertIds=updateRoleIds.get("insert");
|
List<String> insertIds=updateRoleIds.get("insert");
|
||||||
List<String> deleteIds=updateRoleIds.get("delete");
|
List<String> deleteIds=updateRoleIds.get("delete");
|
||||||
|
TsPosition tsPosition = new TsPosition();
|
||||||
|
UpdateWrapper<TsPosition> updateWrapper = new UpdateWrapper<>();
|
||||||
for(String id:insertIds){
|
for(String id:insertIds){
|
||||||
tsPositionDao.insertRole(tsPositionRoleVO.getPositionId(),id);
|
tsPositionDao.insertRole(tsPositionRoleVO.getPositionId(),id);
|
||||||
|
updateWrapper.eq("id", tsPositionRoleVO.getPositionId());
|
||||||
|
tsPosition.setOperateTime(new Timestamp(System.currentTimeMillis()));
|
||||||
|
tsPosition.setOperator(tsPositionRoleVO.getOperator());
|
||||||
|
baseMapper.update(tsPosition,updateWrapper);
|
||||||
}
|
}
|
||||||
for(String id:deleteIds){
|
for(String id:deleteIds){
|
||||||
tsPositionDao.deleteRole(tsPositionRoleVO.getPositionId(),id);
|
tsPositionDao.deleteRole(tsPositionRoleVO.getPositionId(),id);
|
||||||
|
updateWrapper.eq("id", tsPositionRoleVO.getPositionId());
|
||||||
|
tsPosition.setOperateTime(new Timestamp(System.currentTimeMillis()));
|
||||||
|
tsPosition.setOperator(tsPositionRoleVO.getOperator());
|
||||||
|
baseMapper.update(tsPosition,updateWrapper);
|
||||||
}
|
}
|
||||||
List<TsRole> roles=getRole(tsPositionRoleVO.getPositionId());
|
List<TsRole> roles=getRole(tsPositionRoleVO.getPositionId());
|
||||||
return Result.success(roles);
|
return Result.success(roles);
|
||||||
@@ -131,6 +142,7 @@ public class TsPositionServiceImpl extends ServiceImpl<TsPositionDao, TsPosition
|
|||||||
if(!oldPosition.getType().equals("2")){
|
if(!oldPosition.getType().equals("2")){
|
||||||
return Result.error("该岗位不可修改");
|
return Result.error("该岗位不可修改");
|
||||||
}
|
}
|
||||||
|
tsPosition.setOperateTime(new Timestamp(System.currentTimeMillis()));
|
||||||
tsPositionDao.updateById(tsPosition);
|
tsPositionDao.updateById(tsPosition);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -3,12 +3,16 @@ package com.adc.da.slrs.sarStandIdea.controller;
|
|||||||
|
|
||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SeByoDto;
|
import com.adc.da.slrs.sarStandIdea.entity.SeByoDto;
|
||||||
|
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
||||||
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaService;
|
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaService;
|
||||||
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaServiceImpl;
|
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaServiceImpl;
|
||||||
import com.adc.da.sys.util.DateUtil;
|
import com.adc.da.sys.util.DateUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
|
||||||
@@ -36,6 +40,9 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarPublicIdeaService sarPublicIdeaService;
|
private ISarPublicIdeaService sarPublicIdeaService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarPublicIdeaAllService sarPublicIdeaAllService;
|
||||||
|
|
||||||
@ApiOperation(value = "分页查询")
|
@ApiOperation(value = "分页查询")
|
||||||
@GetMapping("/SelectAllPage")
|
@GetMapping("/SelectAllPage")
|
||||||
public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname,
|
public ResponseMessage selectAllPage(@RequestParam(defaultValue="1")Integer page,@RequestParam(defaultValue="10")Integer size,String categorg, String cname,
|
||||||
@@ -87,4 +94,18 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "动态查询")
|
||||||
|
@GetMapping("/deletePublicIdea")
|
||||||
|
public ResponseMessage delete(@RequestParam("id") String id){
|
||||||
|
QueryWrapper<SarPublicIdea> wrapper=new QueryWrapper<>();
|
||||||
|
wrapper.eq("uniques",id);
|
||||||
|
SarPublicIdea sarPublicIdea=sarPublicIdeaService.getOne(wrapper);
|
||||||
|
sarPublicIdeaService.remove(wrapper);
|
||||||
|
QueryWrapper<SarPublicIdeaAll> wrapper1=new QueryWrapper<>();
|
||||||
|
wrapper1.eq("idea_id",sarPublicIdea.getId());
|
||||||
|
sarPublicIdeaAllService.remove(wrapper1);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -280,6 +280,7 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
Integer count=dao.sarItemCount(page);
|
Integer count=dao.sarItemCount(page);
|
||||||
page.getPager().setRowCount(count);
|
page.getPager().setRowCount(count);
|
||||||
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
||||||
|
sarStandItems.forEach(sarStandItems1 -> sarStandItems1.setTermsConditions(StringUtils.replace(sarStandItems1.getTermsConditions(),"''","'")));
|
||||||
return sarStandItems;
|
return sarStandItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-3
@@ -69,6 +69,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
|
|
||||||
head.setBIZTRANSACTIONID(HEAD.get("BIZTRANSACTIONID").getAsString());
|
head.setBIZTRANSACTIONID(HEAD.get("BIZTRANSACTIONID").getAsString());
|
||||||
|
|
||||||
|
List<String> strings=new ArrayList<>();
|
||||||
|
strings.add("G4");
|
||||||
|
strings.add("G9");
|
||||||
|
strings.add("G8");
|
||||||
|
strings.add("G7");
|
||||||
|
|
||||||
|
|
||||||
//LIST是数组,所以强转成JSONArray
|
//LIST是数组,所以强转成JSONArray
|
||||||
JsonArray LIST = (JsonArray) jsonObject.get("LIST");
|
JsonArray LIST = (JsonArray) jsonObject.get("LIST");
|
||||||
@@ -105,13 +111,15 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
.setProjectEndDate(targetEndOn);
|
.setProjectEndDate(targetEndOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
projectInfo.setId(UUIDUtils.randomUUID20());
|
projectInfo.setId(UUIDUtils.randomUUID20());
|
||||||
QueryWrapper<SarStandProjectLibrary> updateCondition = new QueryWrapper<SarStandProjectLibrary>();
|
QueryWrapper<SarStandProjectLibrary> updateCondition = new QueryWrapper<SarStandProjectLibrary>();
|
||||||
updateCondition.eq("project_number",projectInfo.getProjectNumber());
|
updateCondition.eq("project_number",projectInfo.getProjectNumber());
|
||||||
|
SarStandProjectLibrary res=this.getOne(updateCondition);
|
||||||
|
if (strings.contains(projectInfo.getCurrentNode().trim()) && !res.getCurrentNode().trim().equals(projectInfo.getCurrentNode())){
|
||||||
|
projectInfo.setFlag("0");
|
||||||
|
}
|
||||||
|
|
||||||
// .eq("project_start_date",targetBeginOn);
|
// .eq("project_start_date",targetBeginOn);
|
||||||
|
|
||||||
|
|
||||||
this.saveOrUpdate(projectInfo,updateCondition);
|
this.saveOrUpdate(projectInfo,updateCondition);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-4
@@ -55,8 +55,8 @@ public class SarStandardComplianceAssessResultController {
|
|||||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||||
queryWrapper.select(" STAND_ID,ANY_VALUE(STAND_NUMBER) as STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
queryWrapper.select(" STAND_ID,ANY_VALUE(STAND_NUMBER) as STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
if (eo.getStandName() != null ) {
|
||||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
queryWrapper.like("STAND_NAME", eo.getStandName().replace(" ",""));
|
||||||
}
|
}
|
||||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||||
@@ -219,8 +219,7 @@ public class SarStandardComplianceAssessResultController {
|
|||||||
|
|
||||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||||
if (null!=s.getStandardItem()) {
|
if (null!=s.getStandardItem()) {
|
||||||
String gos= StringUtils.replace(s.getStandardItem(),".",",");
|
String[] as=(s.getStandardItem()+",").split(",");
|
||||||
String[] as=(gos+",").split(",");
|
|
||||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -233,7 +233,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
|||||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_standards_info");
|
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
|
||||||
if (StringUtils.isNotBlank(advanceStr)) {
|
if (StringUtils.isNotBlank(advanceStr)) {
|
||||||
page.setAdvanceSearchStr(advanceStr);
|
page.setAdvanceSearchStr(advanceStr);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -239,7 +239,7 @@ public class SarUpdLogServiceImpl extends ServiceImpl<SarUpdLogDao, SarUpdLog> i
|
|||||||
// case "country": return "适用区域";
|
// case "country": return "适用区域";
|
||||||
// case "isRelateAccess": return "重要度";
|
// case "isRelateAccess": return "重要度";
|
||||||
case "issueTime": return "发布日期";
|
case "issueTime": return "发布日期";
|
||||||
case "putTime": return "标准实施日期";
|
case "putTime": return "企标实施日期";
|
||||||
// case "standYear": return "标准年份";
|
// case "standYear": return "标准年份";
|
||||||
// case "standNature": return "标准性质";
|
// case "standNature": return "标准性质";
|
||||||
case "standEnName": return "英文名称";
|
case "standEnName": return "英文名称";
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.adc.da.slrs.wgCommittee.dao;
|
|||||||
import com.adc.da.slrs.wgCommittee.entity.WgCommittee;
|
import com.adc.da.slrs.wgCommittee.entity.WgCommittee;
|
||||||
import com.adc.da.slrs.wgCommittee.entity.WgCommitteeDTO;
|
import com.adc.da.slrs.wgCommittee.entity.WgCommitteeDTO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -23,4 +24,6 @@ public interface WgCommitteeDao extends BaseMapper<WgCommittee> {
|
|||||||
List<WgCommitteeDTO> getDataWk(WgCommittee wgCommittee);
|
List<WgCommitteeDTO> getDataWk(WgCommittee wgCommittee);
|
||||||
Integer getDataCountWk(WgCommittee wgCommittee);
|
Integer getDataCountWk(WgCommittee wgCommittee);
|
||||||
|
|
||||||
|
String selectCommittor(@Param("str") List<String> str);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-8
@@ -13,10 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -44,7 +41,7 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
|
|||||||
wgCommittee.setCommitteer(id);
|
wgCommittee.setCommitteer(id);
|
||||||
List<WgCommitteeUser> list=new ArrayList<>();
|
List<WgCommitteeUser> list=new ArrayList<>();
|
||||||
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()) {
|
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()) {
|
||||||
List<String> res=new ArrayList<>(Arrays.asList(wgCommittee.getCommitteeIds().split(",")));
|
List<String> res=new ArrayList<>(Collections.singletonList(wgCommittee.getCommitteeIds()));
|
||||||
res.stream().forEach(s -> list.add(new WgCommitteeUser().setCommitterId(s).setId(wgCommittee.getCommitteer())));
|
res.stream().forEach(s -> list.add(new WgCommitteeUser().setCommitterId(s).setId(wgCommittee.getCommitteer())));
|
||||||
iWgCommitteeUserService.saveOrUpdateBatch(list);
|
iWgCommitteeUserService.saveOrUpdateBatch(list);
|
||||||
}
|
}
|
||||||
@@ -61,8 +58,10 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
|
|||||||
iWgCommitteeService.updateById(wgCommittee);
|
iWgCommitteeService.updateById(wgCommittee);
|
||||||
List<WgCommitteeUser> save=new ArrayList<>();
|
List<WgCommitteeUser> save=new ArrayList<>();
|
||||||
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()){
|
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()){
|
||||||
List<String> res=new ArrayList<>(Arrays.asList(wgCommittee.getCommitteeIds().split(",")));
|
List<String> res=new ArrayList<>(Collections.singletonList(wgCommittee.getCommitteeIds()));
|
||||||
res.forEach(s -> save.add(new WgCommitteeUser().setId(wgCommittee.getCommitteer()).setCommitterId(s)));
|
res.forEach(s ->
|
||||||
|
save.add(new WgCommitteeUser().setId(wgCommittee.getCommitteer()).setCommitterId(s))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (iWgCommitteeUserService.updateBatchById(save)) {
|
if (iWgCommitteeUserService.updateBatchById(save)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -74,7 +73,12 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
|
|||||||
@Override
|
@Override
|
||||||
public IPage<WgCommitteeDTO> getWgCommittee(WgCommittee wgCommittee) {
|
public IPage<WgCommitteeDTO> getWgCommittee(WgCommittee wgCommittee) {
|
||||||
Page page=new Page();
|
Page page=new Page();
|
||||||
page.setRecords(wgCommitteeDao.getData(wgCommittee));
|
List<WgCommitteeDTO> list = wgCommitteeDao.getData(wgCommittee);
|
||||||
|
for (WgCommitteeDTO wgCommitteeDTO : list){
|
||||||
|
List<String> str = Arrays.asList(wgCommitteeDTO.getCommittorId().split(","));
|
||||||
|
wgCommitteeDTO.setCommittor(wgCommitteeDao.selectCommittor(str));
|
||||||
|
}
|
||||||
|
page.setRecords(list);
|
||||||
page.setCurrent(wgCommittee.getPage());
|
page.setCurrent(wgCommittee.getPage());
|
||||||
page.setSize(wgCommittee.getPageSize());
|
page.setSize(wgCommittee.getPageSize());
|
||||||
page.setTotal(wgCommitteeDao.getDataCount(wgCommittee));
|
page.setTotal(wgCommitteeDao.getDataCount(wgCommittee));
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ public class SarAdvanceSearchUtil {
|
|||||||
case "BETWEEN":
|
case "BETWEEN":
|
||||||
String[] boundaryArray = searchVO.getValue().split(",");
|
String[] boundaryArray = searchVO.getValue().split(",");
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
sql += "DATE_FORMAT(" + tableName + searchVO.getField() + ",'%Y-%m-%d')" + " " + "BETWEEN" + " " + "DATE_FORMAT(" + "\'" + boundaryArray[0].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')" + " AND " + "DATE_FORMAT(" + "\'" + boundaryArray[1].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')";
|
sql += "DATE_FORMAT(left(" + tableName + searchVO.getField() + ",10),'%Y-%m-%d')" + " " + "BETWEEN" + " " + "DATE_FORMAT(" + "\'" + boundaryArray[0].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')" + " AND " + "DATE_FORMAT(" + "\'" + boundaryArray[1].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')";
|
||||||
} else {
|
} else {
|
||||||
sql += " AND " + " " + "DATE_FORMAT(" + tableName + searchVO.getField() + ",'%Y-%m-%d')" + " " + "BETWEEN" + " " + "DATE_FORMAT(" + "\'" + boundaryArray[0].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')" + " AND " + "DATE_FORMAT(" + "\'" + boundaryArray[1].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')";
|
sql += " AND " + " " + "DATE_FORMAT(left(" + tableName + searchVO.getField() + ",10),'%Y-%m-%d')" + " " + "BETWEEN" + " " + "DATE_FORMAT(" + "\'" + boundaryArray[0].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')" + " AND " + "DATE_FORMAT(" + "\'" + boundaryArray[1].replaceAll("\\s*", "") + "\'" + ",'%Y-%m-%d')";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "equals":
|
case "equals":
|
||||||
|
|||||||
@@ -5,18 +5,9 @@
|
|||||||
<select id="getData" resultType="com.adc.da.slrs.wgCommittee.entity.WgCommitteeDTO">
|
<select id="getData" resultType="com.adc.da.slrs.wgCommittee.entity.WgCommitteeDTO">
|
||||||
SELECT wg_committee.id, wg_committee.committee_name as committeeName ,wg_committee.committee_director as committeeDirector
|
SELECT wg_committee.id, wg_committee.committee_name as committeeName ,wg_committee.committee_director as committeeDirector
|
||||||
,t1.UNAME as committeeDirectorName,wg_committee.committee_secretary as committeeSecretary,t2.UNAME as committeeSecretaryName,
|
,t1.UNAME as committeeDirectorName,wg_committee.committee_secretary as committeeSecretary,t2.UNAME as committeeSecretaryName,
|
||||||
wg_committee.committeer ,
|
wg_committee.committeer , wg_committee_user.committer_id as committorId
|
||||||
(
|
|
||||||
SELECT GROUP_CONCAT(t3.UNAME) FROM wg_committee_user
|
|
||||||
LEFT JOIN ts_user t3 on t3.USID = wg_committee_user.committer_id
|
|
||||||
WHERE wg_committee_user.id = wg_committee.committeer
|
|
||||||
) as committor,
|
|
||||||
(
|
|
||||||
SELECT GROUP_CONCAT(t3.USID) FROM wg_committee_user
|
|
||||||
LEFT JOIN ts_user t3 on t3.USID = wg_committee_user.committer_id
|
|
||||||
WHERE wg_committee_user.id = wg_committee.committeer
|
|
||||||
) as committorId
|
|
||||||
from wg_committee
|
from wg_committee
|
||||||
|
LEFT JOIN wg_committee_user ON wg_committee.committeer = wg_committee_user.id
|
||||||
LEFT JOIN ts_user t1 on t1.USID = wg_committee.committee_director
|
LEFT JOIN ts_user t1 on t1.USID = wg_committee.committee_director
|
||||||
LEFT JOIN ts_user t2 on t2.USID = wg_committee.committee_secretary
|
LEFT JOIN ts_user t2 on t2.USID = wg_committee.committee_secretary
|
||||||
where 1=1
|
where 1=1
|
||||||
@@ -65,5 +56,18 @@
|
|||||||
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectCommittor" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
group_concat( tu.UNAME SEPARATOR ',' ) as committor
|
||||||
|
FROM
|
||||||
|
ts_user tu
|
||||||
|
WHERE
|
||||||
|
tu.USID
|
||||||
|
IN
|
||||||
|
<foreach collection="str" item="USID" open="(" close=")" separator=",">
|
||||||
|
<!-- 每个遍历需要生成的串 -->
|
||||||
|
#{USID}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user