Merge remote-tracking branch 'origin/develop_3' into develop_3
This commit is contained in:
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -20,6 +22,12 @@ import java.util.Set;
|
|||||||
//@FeignClient(value = "shan6")
|
//@FeignClient(value = "shan6")
|
||||||
public interface workFlowFeignClient {
|
public interface workFlowFeignClient {
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bat-wkflow/busProcessModel/saveEditFile",method = RequestMethod.GET)
|
||||||
|
BusProcessModelHis saveEditFile();
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bat-wkflow/busProcessModel/processEditFile",method = RequestMethod.GET)
|
||||||
|
BusProcessModelHis processEditFile(@RequestParam("id") String id);
|
||||||
|
|
||||||
@RequestMapping(value = "/bat-wkflow/busProcessModel/processModelHisOneUpdStatus",method = RequestMethod.GET)
|
@RequestMapping(value = "/bat-wkflow/busProcessModel/processModelHisOneUpdStatus",method = RequestMethod.GET)
|
||||||
BusProcessModelHis processModelHisOneUpdStatus(@RequestParam("pid") String pid, @RequestParam("taskId") String taskId);
|
BusProcessModelHis processModelHisOneUpdStatus(@RequestParam("pid") String pid, @RequestParam("taskId") String taskId);
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import org.springframework.stereotype.Component;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -28,6 +30,16 @@ public class workFlowFeignClientImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IUserEOService userEOService;
|
private IUserEOService userEOService;
|
||||||
|
|
||||||
|
public BusProcessModelHis saveEditFile(){
|
||||||
|
BusProcessModelHis stringWrapper = workFlowFeignClient.saveEditFile();
|
||||||
|
return stringWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusProcessModelHis processEditFile(@RequestParam("id") String id){
|
||||||
|
BusProcessModelHis stringWrapper = workFlowFeignClient.processEditFile(id);
|
||||||
|
return stringWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
public BusProcessModelHis processModelHisOneUpdStatus(@RequestParam("pid") String pid,@RequestParam("taskId") String taskId){
|
public BusProcessModelHis processModelHisOneUpdStatus(@RequestParam("pid") String pid,@RequestParam("taskId") String taskId){
|
||||||
BusProcessModelHis stringWrapper = workFlowFeignClient.processModelHisOneUpdStatus(pid,taskId);
|
BusProcessModelHis stringWrapper = workFlowFeignClient.processModelHisOneUpdStatus(pid,taskId);
|
||||||
return stringWrapper;
|
return stringWrapper;
|
||||||
|
|||||||
@@ -66,7 +66,64 @@ public class WorkFlowController {
|
|||||||
// @Autowired
|
// @Autowired
|
||||||
// private ExportExcelMapper exportExcelMapper;
|
// private ExportExcelMapper exportExcelMapper;
|
||||||
|
|
||||||
|
@ApiOperation(value = "|File|下载文件")
|
||||||
|
@GetMapping("/downloadFileForSar")
|
||||||
|
// @RequiresPermissions("sys:file:downloadFileForSar")
|
||||||
|
public void downloadFileForSar(String fileId, String oldFileName, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||||
|
BusProcessModelHis modelHisOne = workFlowFeignClient.processEditFile(fileId);
|
||||||
|
InputStream is = null;
|
||||||
|
OutputStream os = null;
|
||||||
|
response.reset();
|
||||||
|
try {
|
||||||
|
String fileOldName = fileNameEncoding(oldFileName,request);
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
|
||||||
|
response.setContentType("application/octet-stream");
|
||||||
|
File file = new File(standEditFilePath+modelHisOne.getEditFilePath());
|
||||||
|
is = new FileInputStream(file);
|
||||||
|
os = response.getOutputStream();
|
||||||
|
org.apache.commons.io.IOUtils.copy(is, os);
|
||||||
|
os.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
} finally {
|
||||||
|
org.apache.commons.io.IOUtils.closeQuietly(is);
|
||||||
|
org.apache.commons.io.IOUtils.closeQuietly(os);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author super_liu
|
||||||
|
* @Description 根据不同浏览器定义下载文件编码
|
||||||
|
* Date 2018/10/11 10:40
|
||||||
|
* @Param [fileName, request]
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
public String fileNameEncoding(String fileName, HttpServletRequest request) throws IOException {
|
||||||
|
String agent = request.getHeader("User-Agent");
|
||||||
|
if (agent.contains("Firefox")) {
|
||||||
|
/*BASE64Encoder base64Encoder = new BASE64Encoder();
|
||||||
|
fileName = "=?utf-8?B?"
|
||||||
|
+ base64Encoder.encode(fileName.getBytes("utf-8")) + "?=";*/
|
||||||
|
fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1"); // firefox浏览器
|
||||||
|
} else {
|
||||||
|
fileName = URLEncoder.encode(fileName, "utf-8");
|
||||||
|
//谷歌中空格变为+问题
|
||||||
|
fileName = fileName.replaceAll("\\+","%20");
|
||||||
|
}
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "存储在线编辑文件")
|
||||||
|
@GetMapping("/saveEditFile")
|
||||||
|
public BusProcessModelHis saveEditFile(){
|
||||||
|
return workFlowFeignClient.saveEditFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询在线编辑流程汇总文件编辑对象")
|
||||||
|
@GetMapping("/processEditFile")
|
||||||
|
public BusProcessModelHis processEditFile(@RequestParam("id") String id){
|
||||||
|
return workFlowFeignClient.processEditFile(id);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "手机获取token")
|
@ApiOperation(value = "手机获取token")
|
||||||
@PostMapping(value = "/loginMobile")
|
@PostMapping(value = "/loginMobile")
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||||||
|
|
||||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/processModelHisOne");
|
addInterceptor.excludePathPatterns("/api/lawss/activiti/processModelHisOne");
|
||||||
|
|
||||||
|
addInterceptor.excludePathPatterns("/api/lawss/activiti/downloadFileForSar");
|
||||||
|
|
||||||
|
addInterceptor.excludePathPatterns("/api/lawss/activiti/saveEditFile");
|
||||||
|
|
||||||
|
addInterceptor.excludePathPatterns("/api/lawss/activiti/processEditFile");
|
||||||
|
|
||||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/processModelHisOneCount");
|
addInterceptor.excludePathPatterns("/api/lawss/activiti/processModelHisOneCount");
|
||||||
|
|
||||||
addInterceptor.excludePathPatterns("/api/att/attFile/getSyncPdfFileInfo");
|
addInterceptor.excludePathPatterns("/api/att/attFile/getSyncPdfFileInfo");
|
||||||
@@ -105,7 +111,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||||||
|
|
||||||
|
|
||||||
// //测试接口使用
|
// //测试接口使用
|
||||||
// addInterceptor.excludePathPatterns("/api/**");
|
addInterceptor.excludePathPatterns("/api/**");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.adc.da.slrs.sarStandWarning.entity.WarningDate;
|
|||||||
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
import com.adc.da.slrs.sarStandWarning.service.IWarningDateService;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
|
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -175,7 +176,8 @@ public class ScheduledJob {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISarUpdLogService sarUpdLogEOService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -299,6 +301,7 @@ public class ScheduledJob {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// sarUpdLogEOService.createUpdateLog(sarStandardsInfoEO.getStandType() + "_STAND", sarStandardsInfoEO.getId(), oldMap, newMap, content);
|
||||||
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
System.out.println("代替标准状态更新:id为"+key+"文本状态更新失败");
|
System.out.println("代替标准状态更新:id为"+key+"文本状态更新失败");
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.adc.da.scheduled.controller;
|
|||||||
import com.adc.da.scheduled.ScheduledJob;
|
import com.adc.da.scheduled.ScheduledJob;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@@ -16,8 +17,15 @@ public class Controller {
|
|||||||
@Autowired
|
@Autowired
|
||||||
ScheduledJob scheduledJob;
|
ScheduledJob scheduledJob;
|
||||||
|
|
||||||
@PostMapping
|
@PutMapping("/warning")
|
||||||
public void run(){
|
public void warning(){
|
||||||
scheduledJob.warningSchedulingTasks();
|
scheduledJob.warningSchedulingTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("textStatus")
|
||||||
|
public void textStatus(){
|
||||||
|
scheduledJob.TextStatusSchedulingTasks();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
package com.adc.da.slrs.customWorkGroup.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroupQueryPage;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.service.IWorkGroupService;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroup;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author zhaokaiyao
|
||||||
|
* @since 2022-01-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@Api(description = "|WorkGroup|")
|
||||||
|
@RequestMapping("/${restPath}/workGroup/work-group")
|
||||||
|
public class WorkGroupController extends BaseController<WorkGroup> {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IWorkGroupService iWorkGroupService;
|
||||||
|
|
||||||
|
@ApiModelProperty("新增工作组")
|
||||||
|
@PostMapping
|
||||||
|
public ResponseMessage addWorkGroup(WorkGroup workGroup) {
|
||||||
|
boolean add = iWorkGroupService.add(workGroup);
|
||||||
|
|
||||||
|
return Result.success(add);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("删除工作组")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseMessage deleteWorkGroup(String id){
|
||||||
|
boolean delete = iWorkGroupService.delete(id);
|
||||||
|
|
||||||
|
return Result.success(delete);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty("根据组长民或者组名查询工作组")
|
||||||
|
@GetMapping
|
||||||
|
public ResponseMessage<IPage<WorkGroup>> getWorkGroupLists(WorkGroupQueryPage queryPage){
|
||||||
|
IPage<WorkGroup> workGroup = iWorkGroupService.getWorkGroup(queryPage);
|
||||||
|
|
||||||
|
return Result.success(workGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("修改工作组")
|
||||||
|
@PutMapping
|
||||||
|
public ResponseMessage updateWorkGroup(WorkGroup workGroup){
|
||||||
|
boolean update = iWorkGroupService.update(workGroup);
|
||||||
|
|
||||||
|
return Result.success(update);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.adc.da.slrs.customWorkGroup.dao;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroup;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroupQueryPage;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author zhaokaiyao
|
||||||
|
* @since 2022-01-18
|
||||||
|
*/
|
||||||
|
public interface WorkGroupDao extends BaseMapper<WorkGroup> {
|
||||||
|
|
||||||
|
|
||||||
|
public IPage<WorkGroup> getWorkGroup( @Param("page")IPage<WorkGroup> page,
|
||||||
|
@Param(Constants.WRAPPER) Wrapper<WorkGroupQueryPage> queryWrapper,
|
||||||
|
@Param("queryCondition")WorkGroupQueryPage queryCondition);
|
||||||
|
|
||||||
|
|
||||||
|
public List<String> getUserName(String userId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.adc.da.slrs.customWorkGroup.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author zhaokaiyao
|
||||||
|
* @since 2022-01-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="WorkGroup对象", description="")
|
||||||
|
public class WorkGroup extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private String workGroup;
|
||||||
|
|
||||||
|
private String workLeader;
|
||||||
|
|
||||||
|
private String workLeaderId;
|
||||||
|
|
||||||
|
private String workPeople;
|
||||||
|
|
||||||
|
private String workPeopleId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
package com.adc.da.slrs.customWorkGroup.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 22501
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WorkGroupQueryPage {
|
||||||
|
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
private String leaderName;
|
||||||
|
|
||||||
|
private String workGroupName;
|
||||||
|
|
||||||
|
|
||||||
|
public int getPage() {
|
||||||
|
return Optional.ofNullable(this.page)
|
||||||
|
.orElse(1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageSize() {
|
||||||
|
return Optional.ofNullable(this.pageSize)
|
||||||
|
.orElse(20);
|
||||||
|
}
|
||||||
|
}
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
package com.adc.da.slrs.customWorkGroup.service;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroup;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroupQueryPage;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author zhaokaiyao
|
||||||
|
* @since 2022-01-18
|
||||||
|
*/
|
||||||
|
public interface IWorkGroupService extends IService<WorkGroup> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* @param workGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean add(WorkGroup workGroup);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param workGroupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean delete(String workGroupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
* @param queryPage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public IPage<WorkGroup> getWorkGroup(WorkGroupQueryPage queryPage);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
* @param workGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean update(WorkGroup workGroup);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package com.adc.da.slrs.customWorkGroup.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroup;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.dao.WorkGroupDao;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.entity.WorkGroupQueryPage;
|
||||||
|
import com.adc.da.slrs.customWorkGroup.service.IWorkGroupService;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author zhaokaiyao
|
||||||
|
* @since 2022-01-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WorkGroupServiceImpl extends ServiceImpl<WorkGroupDao, WorkGroup> implements IWorkGroupService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
WorkGroupDao workGroupDao;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean add(WorkGroup workGroup) {
|
||||||
|
return this.save(workGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean delete(String workGroupId) {
|
||||||
|
return this.removeById(workGroupId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<WorkGroup> getWorkGroup(WorkGroupQueryPage queryPage) {
|
||||||
|
|
||||||
|
|
||||||
|
QueryWrapper<WorkGroupQueryPage> wrapper = new QueryWrapper<>();
|
||||||
|
if (queryPage.getWorkGroupName()!=null && !"".equals(queryPage.getWorkGroupName())){
|
||||||
|
wrapper.eq("work_group_name",queryPage.getWorkGroupName());
|
||||||
|
}
|
||||||
|
//可以通过组长名称模糊查询
|
||||||
|
IPage<WorkGroup> workGroupList = workGroupDao.getWorkGroup(new Page<>(queryPage.getPage(), queryPage.getPageSize()), wrapper,queryPage);
|
||||||
|
//需要把组长的id和组员的id转换为其名称
|
||||||
|
for (WorkGroup record : workGroupList.getRecords()) {
|
||||||
|
|
||||||
|
record.setWorkLeader( String.join(",",workGroupDao.getUserName(record.getWorkLeaderId())) );
|
||||||
|
record.setWorkPeople( String.join(",",workGroupDao.getUserName(record.getWorkPeopleId())));
|
||||||
|
}
|
||||||
|
|
||||||
|
return workGroupList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean update(WorkGroup workGroup) {
|
||||||
|
return this.updateById(workGroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -122,5 +122,7 @@ public class EsRevisePlan extends BasePage {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<String> planStatusList;
|
private List<String> planStatusList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "立项单")
|
||||||
|
@TableField("LXD")
|
||||||
|
private String lxd;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
|||||||
|
|
||||||
|
|
||||||
if(parent.getLevel()!=0){
|
if(parent.getLevel()!=0){
|
||||||
sarMenuQueryWrapper.like("VPPS_CODE",parent.getId());
|
sarMenuQueryWrapper.likeRight("VPPS_CODE",parent.getId());
|
||||||
}
|
}
|
||||||
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
<result property="useLevel" column="use_level"/>
|
<result property="useLevel" column="use_level"/>
|
||||||
<result property="technologic" column="technologic"/>
|
<result property="technologic" column="technologic"/>
|
||||||
<result property="bussSort" column="buss_sort"/>
|
<result property="bussSort" column="buss_sort"/>
|
||||||
|
<result property="lxd" column="LXD"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!-- 查询条件-->
|
<!-- 查询条件-->
|
||||||
<sql id="Conditions">
|
<sql id="Conditions">
|
||||||
@@ -140,6 +141,7 @@
|
|||||||
es_revise_plan.use_level,
|
es_revise_plan.use_level,
|
||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
|
es_revise_plan.LXD,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
||||||
@@ -208,6 +210,7 @@
|
|||||||
es_revise_plan.use_level,
|
es_revise_plan.use_level,
|
||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
|
es_revise_plan.LXD,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
sar_bussioness_stand.stand_number as standNum,
|
sar_bussioness_stand.stand_number as standNum,
|
||||||
@@ -280,6 +283,7 @@
|
|||||||
es_revise_plan.use_level,
|
es_revise_plan.use_level,
|
||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
|
es_revise_plan.LXD,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
||||||
@@ -354,6 +358,9 @@
|
|||||||
<if test="bussSort != null and bussSort != ''">
|
<if test="bussSort != null and bussSort != ''">
|
||||||
buss_sort=#{bussSort},
|
buss_sort=#{bussSort},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="lxd != null and lxd != ''">
|
||||||
|
LXD=#{lxd},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@@ -418,6 +425,9 @@
|
|||||||
<if test="bussSort != null and bussSort != ''">
|
<if test="bussSort != null and bussSort != ''">
|
||||||
buss_sort,
|
buss_sort,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="lxd != null and lxd != ''">
|
||||||
|
LXD,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
values
|
values
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
@@ -478,6 +488,9 @@
|
|||||||
<if test="bussSort != null and bussSort != ''">
|
<if test="bussSort != null and bussSort != ''">
|
||||||
#{bussSort},
|
#{bussSort},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="lxd != null and lxd != ''">
|
||||||
|
#{lxd},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 删除-->
|
<!-- 删除-->
|
||||||
@@ -513,6 +526,7 @@
|
|||||||
es_revise_plan.use_level,
|
es_revise_plan.use_level,
|
||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
|
es_revise_plan.LXD,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.adc.da.slrs.customWorkGroup.dao.WorkGroupDao">
|
||||||
|
|
||||||
|
<select id="getWorkGroup" resultType="com.adc.da.slrs.customWorkGroup.entity.WorkGroup">
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
work_group_name AS workGroup,
|
||||||
|
work_leader_id AS workLeaderId,
|
||||||
|
work_people_id AS workPeopleId
|
||||||
|
FROM
|
||||||
|
work_group
|
||||||
|
|
||||||
|
|
||||||
|
<where>
|
||||||
|
<if test="queryCondition.leaderName != null and queryCondition.leaderName != ''">
|
||||||
|
work_leader_id REGEXP (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(USID SEPARATOR '|')
|
||||||
|
FROM
|
||||||
|
ts_user
|
||||||
|
WHERE
|
||||||
|
UNAME LIKE CONCAT('%', #{queryCondition.leaderName}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="ew != null">
|
||||||
|
<if test="ew.nonEmptyOfWhere">
|
||||||
|
AND
|
||||||
|
</if>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getUserName" resultType="java.lang.String">
|
||||||
|
SELECT UNAME from ts_user WHERE FIND_IN_SET(USID,#{userId})
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user