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/
|
||||
|
||||
#上传文件白名单-以,分隔
|
||||
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 配置
|
||||
|
||||
@@ -17,9 +17,10 @@ public class importExcelDTO {
|
||||
@Excel(name = "制修订类型",orderNum = "2", width = 20.0)
|
||||
private String reviseStatus;
|
||||
|
||||
@Excel(name = "起草责任单位" , orderNum = "3", width = 20.0)
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "起草责任单位" , orderNum = "3", width = 20.0)
|
||||
|
||||
private String unit;
|
||||
|
||||
private String drafterName;
|
||||
|
||||
+3
-3
@@ -73,9 +73,9 @@ public class IExportServiceImpl implements IExportService {
|
||||
stringBuilder.append("第" + i + "行第7列工作组组长填写不符合格式要求请检查;");
|
||||
}
|
||||
}
|
||||
if (null!=importExcelDTO.getUnit() && !"".equals(importExcelDTO.getUnit())){
|
||||
importExcelDTO.setUnitName(tsInstitutionMap.get(importExcelDTO.getUnit()));
|
||||
if (null==tsInstitutionMap.get(importExcelDTO.getUnit())){
|
||||
if (null!=importExcelDTO.getUnitName() && !"".equals(importExcelDTO.getUnitName())){
|
||||
importExcelDTO.setUnit(tsInstitutionMap.get(importExcelDTO.getUnitName()));
|
||||
if (null==tsInstitutionMap.get(importExcelDTO.getUnitName())){
|
||||
stringBuilder.append("第"+i+"行第4列起草责任单位填写不符合格式要求请检查;");
|
||||
}
|
||||
}
|
||||
|
||||
+26
-13
@@ -61,6 +61,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -550,18 +551,30 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
map.put("standEnName",verifyObj(sarStandardsInfoEO.getStandEnName()));
|
||||
map.put("standNature",verifyObj(sarStandardsInfoEO.getStandNature()));
|
||||
map.put("standState",verifyObj(sarStandardsInfoEO.getStandStatus()));
|
||||
// if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// String issueStr = format.format(sarStandardsInfoEO.getIssueTime());
|
||||
// map.put("issueTime",issueStr);
|
||||
// }
|
||||
map.put("issueTime", verifyObj(sarStandardsInfoEO.getIssueTime()));
|
||||
map.put("putTime", verifyObj(sarStandardsInfoEO.getPutTime()));
|
||||
// if (sarStandardsInfoEO.getPutTime() != null) {
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// String issueStr = format.format(sarStandardsInfoEO.getPutTime());
|
||||
// map.put("putTime",issueStr);
|
||||
// }
|
||||
if (sarStandardsInfoEO.getIssueTime() != 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.getIssueTime()));
|
||||
}catch (Exception e){
|
||||
}
|
||||
map.put("issueTime",issueStr);
|
||||
}else{
|
||||
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("replacedStandNum",sarStandardsInfoEO.getReplacedStandNum());
|
||||
return map;
|
||||
@@ -822,7 +835,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
convert.setFileSuffix(fileInfo.getFileSuffix());
|
||||
convert.setStandFileClassify(field);
|
||||
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");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||
if (!getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||
// if (!getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
@@ -180,12 +180,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||
if (!getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(userId);
|
||||
// if (!getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
List<String> ids = iTsResourceService.getChildMenuList(userId);
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
@@ -429,12 +429,12 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
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> 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);
|
||||
|
||||
@@ -92,4 +92,6 @@ public class TsPosition extends BaseEntity {
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer total;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,4 +12,6 @@ public class TsPositionRoleVO {
|
||||
private String positionId;
|
||||
@NotNull(message = "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.utils.util.ListUtil;
|
||||
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.extension.plugins.pagination.Page;
|
||||
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);
|
||||
List<String> insertIds=updateRoleIds.get("insert");
|
||||
List<String> deleteIds=updateRoleIds.get("delete");
|
||||
TsPosition tsPosition = new TsPosition();
|
||||
UpdateWrapper<TsPosition> updateWrapper = new UpdateWrapper<>();
|
||||
for(String id:insertIds){
|
||||
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){
|
||||
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());
|
||||
return Result.success(roles);
|
||||
@@ -131,6 +142,7 @@ public class TsPositionServiceImpl extends ServiceImpl<TsPositionDao, TsPosition
|
||||
if(!oldPosition.getType().equals("2")){
|
||||
return Result.error("该岗位不可修改");
|
||||
}
|
||||
tsPosition.setOperateTime(new Timestamp(System.currentTimeMillis()));
|
||||
tsPositionDao.updateById(tsPosition);
|
||||
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.Result;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||
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.Impl.SarPublicIdeaServiceImpl;
|
||||
import com.adc.da.sys.util.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdea;
|
||||
@@ -36,6 +40,9 @@ public class SarPublicIdeaController extends BaseController<SarPublicIdea> {
|
||||
@Autowired
|
||||
private ISarPublicIdeaService sarPublicIdeaService;
|
||||
|
||||
@Autowired
|
||||
private ISarPublicIdeaAllService sarPublicIdeaAllService;
|
||||
|
||||
@ApiOperation(value = "分页查询")
|
||||
@GetMapping("/SelectAllPage")
|
||||
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);
|
||||
page.getPager().setRowCount(count);
|
||||
List<SarStandItems> sarStandItems = dao.querySarItemAndInterpretation(page);
|
||||
sarStandItems.forEach(sarStandItems1 -> sarStandItems1.setTermsConditions(StringUtils.replace(sarStandItems1.getTermsConditions(),"''","'")));
|
||||
return sarStandItems;
|
||||
}
|
||||
|
||||
|
||||
+11
-3
@@ -69,6 +69,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
|
||||
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
|
||||
JsonArray LIST = (JsonArray) jsonObject.get("LIST");
|
||||
@@ -105,13 +111,15 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
.setProjectEndDate(targetEndOn);
|
||||
}
|
||||
|
||||
|
||||
projectInfo.setId(UUIDUtils.randomUUID20());
|
||||
QueryWrapper<SarStandProjectLibrary> updateCondition = new QueryWrapper<SarStandProjectLibrary>();
|
||||
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);
|
||||
|
||||
|
||||
this.saveOrUpdate(projectInfo,updateCondition);
|
||||
|
||||
}
|
||||
|
||||
+3
-4
@@ -55,8 +55,8 @@ public class SarStandardComplianceAssessResultController {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select(" STAND_ID,ANY_VALUE(STAND_NUMBER) as STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
if (eo.getStandName() != null ) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().replace(" ",""));
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
@@ -219,8 +219,7 @@ public class SarStandardComplianceAssessResultController {
|
||||
|
||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||
if (null!=s.getStandardItem()) {
|
||||
String gos= StringUtils.replace(s.getStandardItem(),".",",");
|
||||
String[] as=(gos+",").split(",");
|
||||
String[] as=(s.getStandardItem()+",").split(",");
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -233,7 +233,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
// 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)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ public class SarUpdLogServiceImpl extends ServiceImpl<SarUpdLogDao, SarUpdLog> i
|
||||
// case "country": return "适用区域";
|
||||
// case "isRelateAccess": return "重要度";
|
||||
case "issueTime": return "发布日期";
|
||||
case "putTime": return "标准实施日期";
|
||||
case "putTime": return "企标实施日期";
|
||||
// case "standYear": return "标准年份";
|
||||
// case "standNature": 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.WgCommitteeDTO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -23,4 +24,6 @@ public interface WgCommitteeDao extends BaseMapper<WgCommittee> {
|
||||
List<WgCommitteeDTO> getDataWk(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.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -44,7 +41,7 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
|
||||
wgCommittee.setCommitteer(id);
|
||||
List<WgCommitteeUser> list=new ArrayList<>();
|
||||
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())));
|
||||
iWgCommitteeUserService.saveOrUpdateBatch(list);
|
||||
}
|
||||
@@ -61,8 +58,10 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
|
||||
iWgCommitteeService.updateById(wgCommittee);
|
||||
List<WgCommitteeUser> save=new ArrayList<>();
|
||||
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()){
|
||||
List<String> res=new ArrayList<>(Arrays.asList(wgCommittee.getCommitteeIds().split(",")));
|
||||
res.forEach(s -> save.add(new WgCommitteeUser().setId(wgCommittee.getCommitteer()).setCommitterId(s)));
|
||||
List<String> res=new ArrayList<>(Collections.singletonList(wgCommittee.getCommitteeIds()));
|
||||
res.forEach(s ->
|
||||
save.add(new WgCommitteeUser().setId(wgCommittee.getCommitteer()).setCommitterId(s))
|
||||
);
|
||||
}
|
||||
if (iWgCommitteeUserService.updateBatchById(save)) {
|
||||
return true;
|
||||
@@ -74,7 +73,12 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
|
||||
@Override
|
||||
public IPage<WgCommitteeDTO> getWgCommittee(WgCommittee wgCommittee) {
|
||||
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.setSize(wgCommittee.getPageSize());
|
||||
page.setTotal(wgCommitteeDao.getDataCount(wgCommittee));
|
||||
|
||||
@@ -121,9 +121,9 @@ public class SarAdvanceSearchUtil {
|
||||
case "BETWEEN":
|
||||
String[] boundaryArray = searchVO.getValue().split(",");
|
||||
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 {
|
||||
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;
|
||||
case "equals":
|
||||
|
||||
@@ -5,18 +5,9 @@
|
||||
<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
|
||||
,t1.UNAME as committeeDirectorName,wg_committee.committee_secretary as committeeSecretary,t2.UNAME as committeeSecretaryName,
|
||||
wg_committee.committeer ,
|
||||
(
|
||||
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
|
||||
wg_committee.committeer , wg_committee_user.committer_id as committorId
|
||||
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 t2 on t2.USID = wg_committee.committee_secretary
|
||||
where 1=1
|
||||
@@ -65,5 +56,18 @@
|
||||
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
||||
</if>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user