合并分支 'dev_mobile_20230630' 到 'master'
Dev mobile 20230630 查看合并请求 laws-nio/laws-weilai!345
This commit is contained in:
+5
@@ -75,9 +75,12 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/ocr/ocrCheck/downFile", "anon"); //ocr校核下载文件
|
||||
filterChainDefinitionMap.put("/ocr/ocrCheck/saveFile", "anon"); //ocr校核回调
|
||||
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/phone/sys/randomImage/**", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/getRSAPublicKey", "anon"); //获取RSA公钥接口排除
|
||||
filterChainDefinitionMap.put("/phone/sys/getRSAPublicKey", "anon"); //获取RSA公钥接口排除
|
||||
filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除
|
||||
filterChainDefinitionMap.put("/phone/sys/login", "anon"); //登录接口排除
|
||||
filterChainDefinitionMap.put("/sys/mLogin", "anon"); //登录接口排除
|
||||
filterChainDefinitionMap.put("/sys/logout", "anon"); //登出接口排除
|
||||
filterChainDefinitionMap.put("/sys/thirdLogin/**", "anon"); //第三方登录
|
||||
@@ -140,6 +143,7 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/actuator/**", "anon");
|
||||
|
||||
filterChainDefinitionMap.put("/opensso/**", "anon"); //单点登录
|
||||
filterChainDefinitionMap.put("/phone/opensso/**", "anon"); //单点登录
|
||||
|
||||
filterChainDefinitionMap.put("/project/projectLibraryBase/getProjectInfo", "anon"); // 对接火山引擎接口-获取项目统计信息
|
||||
filterChainDefinitionMap.put("/project/projectLibraryBase/getProjectProgressInfo", "anon"); // 对接火山引擎接口-获取项目统计信息
|
||||
@@ -147,6 +151,7 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/project/projectLawsInventoryEO/updateFlowInfoByProjectLibraryIds", "anon"); // 项目库-法规清单 根据项目库id更新符合性流程发起人、责任人接口排除
|
||||
filterChainDefinitionMap.put("/project/projectTaskInventoryEO/processCall", "anon"); // 项目库-任务清单 工作流处理数据接口排除
|
||||
filterChainDefinitionMap.put("/wkflow/processHistoryEO/processCall", "anon"); // 流程历史 工作流处理数据接口排除
|
||||
filterChainDefinitionMap.put("/phone/wkflow/processHistoryEO/processCall", "anon"); // 流程历史 工作流处理数据接口排除
|
||||
filterChainDefinitionMap.put("/lawsOpinionGather/lawsOpinionGatherEO/processCall", "anon"); // 法规收集表 工作流处理数据接口排除
|
||||
filterChainDefinitionMap.put("/lawsOpinionGather/lawsProcessHistoryEO/processCall", "anon"); // 法规收集历史 工作流处理数据接口排除
|
||||
// 法规技术评估表-流程明细 工作流处理数据接口排除
|
||||
|
||||
+6
@@ -71,4 +71,10 @@ public class SysConfig implements Serializable {
|
||||
@ApiModelProperty(value = "配置信息说明")
|
||||
private java.lang.String configName;
|
||||
|
||||
|
||||
/**手机配置信息*/
|
||||
@Excel(name = "手机配置信息", width = 15)
|
||||
@ApiModelProperty(value = "手机配置信息")
|
||||
private java.lang.String phoneConfig;
|
||||
|
||||
}
|
||||
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
package com.jero.modules.opensso.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.system.util.JwtUtil;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.RedisUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import com.jero.modules.config.entity.SysConfig;
|
||||
import com.jero.modules.config.service.ISysConfigService;
|
||||
import com.jero.modules.system.entity.SysDepart;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.HttpRequestUtil;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 11:19 2022/3/17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/phone/opensso")
|
||||
@Api(tags="单点登录")
|
||||
@Slf4j
|
||||
public class PhoneSSOLoginController {
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private ISysDepartService sysDepartService;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Resource
|
||||
private BaseCommonService baseCommonService;
|
||||
@Autowired
|
||||
private ISysConfigService iSysConfigService;
|
||||
|
||||
private static final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
|
||||
//密码登录错误的次数前缀
|
||||
public static final String RETRY_LOGIN_PREFIX = "login:retryLoginCount_";
|
||||
//密码登录错误的最大限制次数
|
||||
public static final int RETRY_LOGIN_MAX_COUNT = 5;
|
||||
|
||||
@Value("${opensso.authorizeUrl}")
|
||||
private String authorizeUrl;
|
||||
@Value("${opensso.accessTokenUrl}")
|
||||
private String accessTokenUrl;
|
||||
@Value("${opensso.profileUrl}")
|
||||
private String profileUrl;
|
||||
@Value("${opensso.clientId}")
|
||||
private String clientId;
|
||||
@Value("${opensso.clientSecret}")
|
||||
private String clientSecret;
|
||||
@Value("${opensso.redirectUri}")
|
||||
private String redirectUri;
|
||||
|
||||
@AutoLog(value = "跳转至认证中心")
|
||||
@ApiOperation(value = "跳转至认证中心", notes = "跳转至认证中心")
|
||||
@GetMapping(value = "/ssoAuth")
|
||||
public void ssoAuth(HttpServletRequest request, HttpServletResponse response){
|
||||
String callbackUri = "http%3A%2F%2F139.9.235.66%3A8008%2Fjero-boot%2Fopensso%2Fcallback";
|
||||
String authUrl = authorizeUrl +"?client_id=" + clientId
|
||||
+ "&redirect_uri=" + redirectUri + "&response_type=code";
|
||||
try {
|
||||
response.sendRedirect(authUrl);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
//https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=http%3A%2F%2F139.9.235.66%3A8008%2Fjero-boot%2Fopensso%2Fcallback&response_type=code
|
||||
//https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=http%3A%2F%2F139.9.235.66%3A8010&response_type=code
|
||||
|
||||
//http://139.9.235.66:8010
|
||||
@AutoLog(value = "单点登录回调")
|
||||
@ApiOperation(value = "单点登录回调", notes = "单点登录回调")
|
||||
@GetMapping(value = "/callback")
|
||||
public Result<?> callback(@RequestParam(value = "code", required = false) String code,
|
||||
HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
// 获取access_token
|
||||
String getAccessTokenUrl = accessTokenUrl + "?client_id=" + clientId + "&client_secret="
|
||||
+ clientSecret + "&redirect_uri=" + redirectUri + "&code=" + code;
|
||||
log.info("access_token_url:" + getAccessTokenUrl);
|
||||
Map<String, String> headerMapToken = new HashMap<>();
|
||||
headerMapToken.put("Content-Type", "text/html;charset=utf-8");
|
||||
String accessTokenResult = HttpRequestUtil.getResponseOfGET(getAccessTokenUrl, headerMapToken);
|
||||
// String accessTokenResult = "access_token=2.0N6OFCARTH7MRCVPSENQONSA67WGHV4FDR25TSHFCCXI6FA3NRVAA----&expires=602405";
|
||||
log.info("获取access_token返回结果:" + accessTokenResult);
|
||||
// 返回结果:access_token=2.0N6OFCARTH7MRCVPSENQONSA67WGHV4FDR25TSHFCCXI6FA3NRVAA----&expires=602405
|
||||
if(StringUtils.isEmpty(accessTokenResult) || !accessTokenResult.contains("access_token")){
|
||||
return Result.error("【单点登录】获取access_token失败");
|
||||
}
|
||||
int start = accessTokenResult.indexOf("=");
|
||||
int end = accessTokenResult.indexOf("&");
|
||||
String accessToken = accessTokenResult.substring(start+1, end);
|
||||
|
||||
//https://signin-test.nio.com/oauth2/profile?access_token=2.0N6OFCARTH7MRCVPSENQONSA67WGHV4FDR25TSHFCCXI6FA3NRVAA----
|
||||
//获取登录用户
|
||||
String getProfileUrl = profileUrl + "?access_token=" + accessToken;
|
||||
log.info("profile_url:" + getProfileUrl);
|
||||
Map<String, String> headerMapProfile = new HashMap<>();
|
||||
headerMapProfile.put("Content-Type", "application/json; charset=utf-8");
|
||||
String profileResult = HttpRequestUtil.getResponseOfGET(getProfileUrl, headerMapProfile);
|
||||
// String profileResult = "{ id: \"chengjun.wang.o\", attributes: [{workNo: \"\"},{account_id: \"\"},{user_name: \"chengjun.wang.o\"},{email: \"chengjun.wang.o@nio.com\"}]}";
|
||||
log.info("获取profile返回结果:" + profileResult);
|
||||
// 返回结果:{ id: "chengjun.wang.o", attributes: [{workNo: ""},{account_id: ""},{user_name: "chengjun.wang.o"},{email: "chengjun.wang.o@nio.com"}]}
|
||||
JSONObject userThirdIdJson = JSONObject.parseObject(profileResult);
|
||||
if(ObjectUtil.isEmpty(userThirdIdJson) || !userThirdIdJson.containsKey("id")){
|
||||
return Result.error("【单点登录】获取用户profile失败");
|
||||
}
|
||||
String userThirdId = userThirdIdJson.getString("id");
|
||||
String username = userThirdId;
|
||||
|
||||
//1. 校验用户是否有效
|
||||
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysUser::getUsername,username);
|
||||
SysUser sysUser = sysUserService.getOne(queryWrapper);
|
||||
//update-end-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
||||
result = sysUserService.checkUserIsEffective(sysUser);
|
||||
if(!result.isSuccess()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
//登录成功,清除错误登录次数
|
||||
redisUtil.del(RETRY_LOGIN_PREFIX + username);
|
||||
|
||||
//用户登录信息
|
||||
userInfo(sysUser, result);
|
||||
//update-begin--Author:wangshuai Date:20200714 for:登录日志没有记录人员
|
||||
LoginUser loginUser = new LoginUser();
|
||||
BeanUtils.copyProperties(sysUser, loginUser);
|
||||
baseCommonService.addLog("用户名: " + username + ",登录成功!", CommonConstant.LOG_TYPE_1, null,loginUser);
|
||||
//update-end--Author:wangshuai Date:20200714 for:登录日志没有记录人员
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @param sysUser
|
||||
* @param result
|
||||
* @return
|
||||
*/
|
||||
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result) {
|
||||
String syspassword = sysUser.getPassword();
|
||||
String username = sysUser.getUsername();
|
||||
// 生成token
|
||||
String token = JwtUtil.sign(username, syspassword);
|
||||
// 设置token缓存有效时间
|
||||
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
|
||||
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME*2 / 1000);
|
||||
|
||||
// 获取用户部门信息
|
||||
JSONObject obj = new JSONObject();
|
||||
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
|
||||
obj.put("departs", departs);
|
||||
if (departs == null || departs.size() == 0) {
|
||||
obj.put("multi_depart", 0);
|
||||
} else if (departs.size() == 1) {
|
||||
sysUserService.updateUserDepart(username, departs.get(0).getOrgCode());
|
||||
obj.put("multi_depart", 1);
|
||||
} else {
|
||||
//查询当前是否有登录部门
|
||||
// update-begin--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
||||
SysUser sysUserById = sysUserService.getById(sysUser.getId());
|
||||
if(oConvertUtils.isEmpty(sysUserById.getOrgCode())){
|
||||
sysUserService.updateUserDepart(username, departs.get(0).getOrgCode());
|
||||
}
|
||||
// update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
||||
obj.put("multi_depart", 2);
|
||||
}
|
||||
|
||||
// 获取用户角色信息
|
||||
List<SysRole> userRoleListInfo = sysUserService.queryUserRoleListInfoByUserId(sysUser.getId());
|
||||
sysUser.setUserRoleList(userRoleListInfo);
|
||||
|
||||
//获取配置信息
|
||||
List<SysConfig> sysConfigs = iSysConfigService.queryList();
|
||||
if(CollectionUtils.isNotEmpty(sysConfigs)){
|
||||
for (SysConfig sysConfig : sysConfigs) {
|
||||
obj.put(sysConfig.getConfigName(),sysConfig.getPhoneConfig());
|
||||
}
|
||||
}
|
||||
|
||||
obj.put("token", token);
|
||||
obj.put("userInfo", sysUser);
|
||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||
result.setResult(obj);
|
||||
result.success("登录成功");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+774
@@ -0,0 +1,774 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.util.RestUtil;
|
||||
import com.jero.common.util.TokenUtils;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.util.PDFUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.server.ServletServerHttpRequest;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.HandlerMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLDecoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @Author scott
|
||||
* @since 2018-12-20
|
||||
*/
|
||||
@Api(tags="文件通用")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/phone/sys/common")
|
||||
public class PhoneCommonController {
|
||||
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
@Resource
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
/**
|
||||
* 本地:local minio:minio 阿里:alioss
|
||||
*/
|
||||
@Value(value="${jero.uploadType}")
|
||||
private String uploadType;
|
||||
/**
|
||||
* 文件后缀黑名单
|
||||
*/
|
||||
@Value(value="${jero.fileSuffixLimits}")
|
||||
private String[] fileSuffixLimits;
|
||||
|
||||
/**
|
||||
* @Author 政辉
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/403")
|
||||
public Result<?> noauth() {
|
||||
return Result.error("没有权限,请联系管理员授权");
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 文件上传统一方法
|
||||
// * @param request
|
||||
// * @param response
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping(value = "/upload")
|
||||
// public Result<OSSFile> upload(HttpServletRequest request, HttpServletResponse response) {
|
||||
// Result<OSSFile> result = new Result<>();
|
||||
// String savePath = "";
|
||||
// String bizPath = request.getParameter("biz");
|
||||
// MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
// // 获取上传文件对象
|
||||
// MultipartFile file = multipartRequest.getFile("file");
|
||||
// // 文件类型是否处于黑名单
|
||||
// if(CommonUtils.limitFileSuffix(file.getOriginalFilename(),fileSuffixLimits)){
|
||||
// result.setMessage("该文件类型不允许上传");
|
||||
// result.setSuccess(false);
|
||||
// result.setCode(0);
|
||||
// return result;
|
||||
// }
|
||||
// if(oConvertUtils.isEmpty(bizPath)){
|
||||
// bizPath = "";
|
||||
// }
|
||||
// if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)){
|
||||
// // 本地上传
|
||||
// savePath = CommonUtils.uploadLocal(file,bizPath,uploadpath);
|
||||
// }else{
|
||||
// // minio上传
|
||||
// savePath = CommonUtils.upload(file, bizPath, uploadType);
|
||||
// }
|
||||
// if(oConvertUtils.isNotEmpty(savePath)){
|
||||
// //上传成功 进行数据库存储
|
||||
// OSSFile ossFile = new OSSFile();
|
||||
// // 文件名
|
||||
// String fileName = file.getOriginalFilename();
|
||||
// fileName = CommonUtils.getFileName(fileName);
|
||||
// ossFile.setFileName(fileName);
|
||||
// ossFile.setUrl(savePath);
|
||||
// ossFileService.save(ossFile);
|
||||
// result.setMessage(savePath);
|
||||
// result.setResult(ossFile);
|
||||
// result.setSuccess(true);
|
||||
// }else {
|
||||
// result.setMessage("上传失败!");
|
||||
// result.setSuccess(false);
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 文件上传统一方法
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="文件上传统一方法", notes="文件上传统一方法")
|
||||
@PostMapping(value = "/upload")
|
||||
public Result<?> upload(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(value = "state",required = false) String state,
|
||||
@RequestParam(value = "cut",required = false) String cut) {
|
||||
Result<OSSFile> result = new Result<>();
|
||||
String bizPath = request.getParameter("biz");
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
MultipartFile file = multipartRequest.getFile("file");// 获取上传文件对象
|
||||
if (oConvertUtils.isEmpty(bizPath)) {
|
||||
bizPath = "";
|
||||
// if (CommonConstant.UPLOAD_TYPE_OSS.equals(uploadType)) {
|
||||
// //未指定目录,则用阿里云默认目录 upload
|
||||
// bizPath = "upload";
|
||||
// } else {
|
||||
// bizPath = "";
|
||||
// }
|
||||
}
|
||||
if(file.getOriginalFilename().length()>100){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("文件名长度不能超过100位,请检查!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("File name length cannot exceed 100 characters, please check!");
|
||||
}
|
||||
}
|
||||
// OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut);
|
||||
OSSFile oSSFile = ossFileService.uploadLocalOfCos(file, bizPath,state,cut); // 切换cos
|
||||
if (oConvertUtils.isNotEmpty(oSSFile)) {
|
||||
result.setResult(oSSFile);
|
||||
result.setSuccess(true);
|
||||
} else {
|
||||
if("cut".equals(CutEnum.CN.getValue())){
|
||||
result.setMessage("上传失败!");
|
||||
}else{
|
||||
result.setMessage("fail to upload!");
|
||||
}
|
||||
result.setSuccess(false);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看已上传的文件
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
@GetMapping(value = "/getFileInfos")
|
||||
public Result<?> getFileInfos(String id) {
|
||||
List<OSSFile> fileInfos = ossFileService.getFileInfos(id);
|
||||
return Result.OK(fileInfos);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 预览图片&下载文件
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
// @GetMapping(value = "/download/{id}")
|
||||
// public void view(@PathVariable String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
// // 查询数据表数据是否存在
|
||||
// LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// queryWrapper.eq(OSSFile::getId,id);
|
||||
// OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
// if( null == ossFile){
|
||||
// throw new JeroBootException("文件不存在..");
|
||||
// }
|
||||
// String fileUrl = ossFile.getUrl();
|
||||
// InputStream inputStream = null;
|
||||
// OutputStream outputStream = null;
|
||||
// try {
|
||||
// String fileName = "";
|
||||
// if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)){
|
||||
// //本地下载
|
||||
// String filePath = uploadpath + File.separator + fileUrl;
|
||||
// File file = new File(filePath);
|
||||
// if(!file.exists()){
|
||||
// response.setStatus(404);
|
||||
// throw new RuntimeException("文件不存在..");
|
||||
// }
|
||||
// // 文件名称
|
||||
// fileName = file.getName();
|
||||
// inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
// }else if(CommonConstant.UPLOAD_TYPE_MINIO.equals(uploadType)){
|
||||
// // minio 下载
|
||||
// // 通过MinioUtil查询时 只需要桶后面的路径
|
||||
// String minioUrl = MinioUtil.getMinioUrl();
|
||||
// // Linux/unix 系统下文件路径分隔符为"/" 获取minio与存储桶的路径
|
||||
// minioUrl = minioUrl + MinioUtil.getBucketName() + "/";
|
||||
// String url = fileUrl.replace(minioUrl, "");
|
||||
// // 文件名称
|
||||
// fileName = ossFile.getFileName();
|
||||
// inputStream = MinioUtil.getMinioFile(MinioUtil.getBucketName(), url);
|
||||
// }
|
||||
// response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
//// response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
// outputStream = response.getOutputStream();
|
||||
// byte[] buf = new byte[1024];
|
||||
// int len;
|
||||
// while ((len = inputStream.read(buf)) > 0) {
|
||||
// outputStream.write(buf, 0, len);
|
||||
// }
|
||||
// response.flushBuffer();
|
||||
// } catch (IOException e) {
|
||||
// log.error("预览文件失败" + e.getMessage());
|
||||
// response.setStatus(404);
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// if (inputStream != null) {
|
||||
// try {
|
||||
// inputStream.close();
|
||||
// } catch (IOException e) {
|
||||
// log.error(e.getMessage(), e);
|
||||
// }
|
||||
// }
|
||||
// if (outputStream != null) {
|
||||
// try {
|
||||
// outputStream.close();
|
||||
// } catch (IOException e) {
|
||||
// log.error(e.getMessage(), e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
/**
|
||||
* word,excel预览
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/download/{id}")
|
||||
public void downLoad(@PathVariable("id") String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
throw new JeroBootException("参数信息不全");
|
||||
}
|
||||
id = id.split("\\.")[0];
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getId,id);
|
||||
OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
if( null == ossFile){
|
||||
throw new JeroBootException("文件不存在");
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
try {
|
||||
//本地下载
|
||||
String filePath = ossFile.getUrl();
|
||||
File file = new File(filePath);
|
||||
if(!CosBootUtil.doesObjectExist(filePath)){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
// 文件名称
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
||||
inputStream = CosBootUtil.download(filePath);
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("文件下载失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* word,excel预览 cos
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/downLoadFile")
|
||||
public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
throw new JeroBootException("参数信息不全");
|
||||
}
|
||||
id = id.split("\\.")[0];
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getId,id);
|
||||
OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
if( null == ossFile){
|
||||
throw new JeroBootException("文件不存在");
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
File newFile =null;
|
||||
try {
|
||||
String fileName = "";
|
||||
//本地下载
|
||||
String filePath = ossFile.getUrl();
|
||||
if(!CosBootUtil.doesObjectExist(filePath)){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
// 文件名称
|
||||
fileName = ossFile.getFileName();
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
|
||||
File file = new File(filePath);
|
||||
if(file.getName().endsWith(".pdf") || file.getName().endsWith(".PDF")){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String currentTime = sdf.format(new Date());
|
||||
String waterContent = userName+" "+currentTime;
|
||||
InputStream download = CosBootUtil.download(filePath);
|
||||
newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
|
||||
inputStream = new FileInputStream(newFile.getPath());
|
||||
}else{
|
||||
inputStream = CosBootUtil.download(filePath);
|
||||
}
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("文件下载失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
if (newFile != null) {
|
||||
try {
|
||||
newFile.delete();
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* word,excel预览 cos -pdf无水印
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/downLoadFileNOMark")
|
||||
public void downLoadFileNoPDFWatermarkCos(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
throw new JeroBootException("参数信息不全");
|
||||
}
|
||||
id = id.split("\\.")[0];
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getId,id);
|
||||
OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
if( null == ossFile){
|
||||
throw new JeroBootException("文件不存在");
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
File newFile =null;
|
||||
try {
|
||||
String fileName = "";
|
||||
//本地下载
|
||||
String filePath = ossFile.getUrl();
|
||||
if(!CosBootUtil.doesObjectExist(filePath)){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
// 文件名称
|
||||
fileName = ossFile.getFileName();
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
|
||||
File file = new File(filePath);
|
||||
inputStream = CosBootUtil.download(filePath);
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("文件下载失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
if (newFile != null) {
|
||||
try {
|
||||
newFile.delete();
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件下载
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
// @GetMapping(value = "/downLoadFile")
|
||||
public void downLoadFile(String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getId,id);
|
||||
OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
if( null == ossFile){
|
||||
throw new JeroBootException("文件不存在");
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
try {
|
||||
String fileName = "";
|
||||
//本地下载
|
||||
String filePath = ossFile.getUrl();
|
||||
File file = new File(filePath);
|
||||
if(!file.exists()){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
// 文件名称
|
||||
fileName = file.getName();
|
||||
inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
||||
inputStream = new BufferedInputStream(new FileInputStream(filePath));
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("文件下载失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 文件预览PDF
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@GetMapping(value = "/pdf/viewFile")
|
||||
public void viewFile(String id,HttpServletRequest request, HttpServletResponse response,String userName) {
|
||||
// 查询数据表数据是否存在
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getId,id);
|
||||
OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
if( null == ossFile){
|
||||
throw new JeroBootException("文件不存在..");
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
String fileName = "";
|
||||
try {
|
||||
//本地下载
|
||||
String filePath = ossFile.getUrl();
|
||||
boolean b = CosBootUtil.doesObjectExist(filePath);
|
||||
if (!b) {
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件不存在..");
|
||||
}
|
||||
InputStream download = CosBootUtil.download(filePath);
|
||||
File file = new File(filePath);
|
||||
//水印内容
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String currentTime = sdf.format(new Date());
|
||||
String waterContent = userName+" "+currentTime;
|
||||
// String waterContent = "water mark";//临时定义(水印信息通过传过来)
|
||||
File newFile = PDFUtils.PDFWatermark(download,uploadpath,file.getName(),waterContent);
|
||||
// 文件名称
|
||||
fileName = file.getName();
|
||||
inputStream = new BufferedInputStream(new FileInputStream(newFile));
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
outputStream = response.getOutputStream();
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputStream.read(buf)) > 0) {
|
||||
outputStream.write(buf, 0, len);
|
||||
}
|
||||
response.flushBuffer();
|
||||
} catch (IOException e) {
|
||||
log.error("文件下载失败" + e.getMessage());
|
||||
response.setStatus(404);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
File fileTemp = new File(uploadpath + File.separator +fileName);
|
||||
fileTemp.delete();
|
||||
}
|
||||
|
||||
}
|
||||
// /**
|
||||
// * 文件预览PDF
|
||||
// *
|
||||
// * @param id 传入文件id
|
||||
// * @param request
|
||||
// * @param response
|
||||
// */
|
||||
// @GetMapping(value = "/pdf/viewFile")
|
||||
// public void viewFile(String id,HttpServletRequest request, HttpServletResponse response) {
|
||||
// // 查询数据表数据是否存在
|
||||
// LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// queryWrapper.eq(OSSFile::getId,id);
|
||||
// OSSFile ossFile = ossFileService.getOne(queryWrapper);
|
||||
// if( null == ossFile){
|
||||
// throw new JeroBootException("文件不存在..");
|
||||
// }
|
||||
// InputStream inputStream = null;
|
||||
// OutputStream outputStream = null;
|
||||
// try {
|
||||
// String fileName = "";
|
||||
// //本地下载
|
||||
// String filePath = ossFile.getUrl();
|
||||
// File file = new File(filePath);
|
||||
// //水印内容
|
||||
// String waterContent = "water mark";//临时定义(水印信息通过传过来)
|
||||
// File newFile = PDFUtils.PDFWatermark(file,waterContent);
|
||||
// String path = newFile.getPath();
|
||||
//// String substring = path.substring(filePath.length(), path.length());
|
||||
//
|
||||
// if(!file.exists()){
|
||||
// response.setStatus(404);
|
||||
// throw new RuntimeException("文件不存在..");
|
||||
// }
|
||||
// // 文件名称
|
||||
// fileName = file.getName();
|
||||
// inputStream = new BufferedInputStream(new FileInputStream(path));
|
||||
// response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
|
||||
// response.setContentType("application/force-download");// 设置强制下载不打开
|
||||
// outputStream = response.getOutputStream();
|
||||
// byte[] buf = new byte[1024];
|
||||
// int len;
|
||||
// while ((len = inputStream.read(buf)) > 0) {
|
||||
// outputStream.write(buf, 0, len);
|
||||
// }
|
||||
// response.flushBuffer();
|
||||
// } catch (IOException e) {
|
||||
// log.error("文件下载失败" + e.getMessage());
|
||||
// response.setStatus(404);
|
||||
// e.printStackTrace();
|
||||
// } finally {
|
||||
// if (inputStream != null) {
|
||||
// try {
|
||||
// inputStream.close();
|
||||
// } catch (IOException e) {
|
||||
// log.error(e.getMessage(), e);
|
||||
// }
|
||||
// }
|
||||
// if (outputStream != null) {
|
||||
// try {
|
||||
// outputStream.close();
|
||||
// } catch (IOException e) {
|
||||
// log.error(e.getMessage(), e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* @功能:pdf预览Iframe
|
||||
* @param modelAndView
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/pdf/pdfPreviewIframe")
|
||||
public ModelAndView pdfPreviewIframe(ModelAndView modelAndView) {
|
||||
modelAndView.setViewName("pdfPreviewIframe");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/**
|
||||
* 把指定URL后的字符串全部截断当成参数
|
||||
* 这么做是为了防止URL中包含中文或者特殊字符(/等)时,匹配不了的问题
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
private static String extractPathFromPattern(final HttpServletRequest request) {
|
||||
String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
|
||||
String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
|
||||
return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path);
|
||||
}
|
||||
|
||||
/**
|
||||
* 中转HTTP请求,解决跨域问题
|
||||
*
|
||||
* @param url 必填:请求地址
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/transitRESTful")
|
||||
public Result transitRESTful(@RequestParam("url") String url, HttpServletRequest request) {
|
||||
try {
|
||||
ServletServerHttpRequest httpRequest = new ServletServerHttpRequest(request);
|
||||
// 中转请求method、body
|
||||
HttpMethod method = httpRequest.getMethod();
|
||||
JSONObject params;
|
||||
try {
|
||||
params = JSON.parseObject(JSON.toJSONString(httpRequest.getBody()));
|
||||
} catch (Exception e) {
|
||||
params = new JSONObject();
|
||||
}
|
||||
// 中转请求问号参数
|
||||
JSONObject variables = JSON.parseObject(JSON.toJSONString(request.getParameterMap()));
|
||||
variables.remove("url");
|
||||
// 在 headers 里传递Token
|
||||
String token = TokenUtils.getTokenByRequest(request);
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("X-Access-Token", token);
|
||||
// 发送请求
|
||||
String httpURL = URLDecoder.decode(url, "UTF-8");
|
||||
ResponseEntity<String> response = RestUtil.request(httpURL, method, headers , variables, params, String.class);
|
||||
// 封装返回结果
|
||||
Result<Object> result = new Result<>();
|
||||
int statusCode = response.getStatusCodeValue();
|
||||
result.setCode(statusCode);
|
||||
result.setSuccess(statusCode == 200);
|
||||
String responseBody = response.getBody();
|
||||
try {
|
||||
// 尝试将返回结果转为JSON
|
||||
Object json = JSON.parse(responseBody);
|
||||
result.setResult(json);
|
||||
} catch (Exception e) {
|
||||
// 转成JSON失败,直接返回原始数据
|
||||
result.setResult(responseBody);
|
||||
}
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
log.debug("中转HTTP请求失败", e);
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+573
@@ -0,0 +1,573 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.crypto.asymmetric.RSA;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CacheConstant;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.util.JwtUtil;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.*;
|
||||
import com.jero.common.util.encryption.EncryptedString;
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import com.jero.modules.config.entity.SysConfig;
|
||||
import com.jero.modules.config.service.ISysConfigService;
|
||||
import com.jero.modules.system.entity.SysDepart;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.model.SysLoginModel;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysLogService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.RandImageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Author scott
|
||||
* @since 2018-12-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/phone/sys")
|
||||
@Api(tags="用户登录")
|
||||
@Slf4j
|
||||
public class PhoneLoginController {
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private ISysLogService logService;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private ISysDepartService sysDepartService;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private ISysConfigService iSysConfigService;
|
||||
@Resource
|
||||
private BaseCommonService baseCommonService;
|
||||
|
||||
private static final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
|
||||
//密码登录错误的次数前缀
|
||||
public static final String RETRY_LOGIN_PREFIX = "login:retryLoginCount_";
|
||||
//密码登录错误的最大限制次数
|
||||
public static final int RETRY_LOGIN_MAX_COUNT = 5;
|
||||
@ApiOperation("登录接口")
|
||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
||||
public Result<JSONObject> login(@RequestBody SysLoginModel sysLoginModel){
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
String username = sysLoginModel.getUsername();
|
||||
String password = sysLoginModel.getPassword();
|
||||
String rsaPublicKey = sysLoginModel.getRsaPublicKey();
|
||||
String rsaPrivateKey = String.valueOf(redisUtil.get(rsaPublicKey));
|
||||
//update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
|
||||
//前端密码加密,后端进行密码解密
|
||||
//password = AesEncryptUtil.desEncrypt(sysLoginModel.getPassword().replaceAll("%2B", "\\+")).trim();//密码解密
|
||||
//update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
|
||||
//update-begin-author:taoyan date:20190828 for:校验验证码
|
||||
String captcha = sysLoginModel.getCaptcha();
|
||||
if(captcha==null){
|
||||
result.error500("验证码无效");
|
||||
return result;
|
||||
}
|
||||
String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
String realKey = MD5Util.MD5Encode(lowerCaseCaptcha+sysLoginModel.getCheckKey(), "utf-8");
|
||||
Object checkCode = redisUtil.get(realKey);
|
||||
//当进入登录页时,有一定几率出现验证码错误 #1714
|
||||
if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
|
||||
result.error500("验证码错误");
|
||||
return result;
|
||||
}
|
||||
try {
|
||||
//解密获取密码和用户名
|
||||
password = CommonUtils.decryptBtRsaPriKey(password, rsaPrivateKey);
|
||||
username = CommonUtils.decryptBtRsaPriKey(username, rsaPrivateKey);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//1. 校验用户是否有效
|
||||
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysUser::getUsername,username);
|
||||
SysUser sysUser = sysUserService.getOne(queryWrapper);
|
||||
//update-end-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
||||
result = sysUserService.checkUserIsEffective(sysUser);
|
||||
if(!result.isSuccess()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// 若用户名有效,则查询该账号的登陆失败次数是否符合等保要求
|
||||
int retryCount = 0 ;
|
||||
if ( redisUtil.get(RETRY_LOGIN_PREFIX + username) != null){
|
||||
retryCount = (int) redisUtil.get(RETRY_LOGIN_PREFIX + username);
|
||||
}
|
||||
if (retryCount >= RETRY_LOGIN_MAX_COUNT){
|
||||
result.error500("密码错误次数过多,请稍后重试");
|
||||
return result;
|
||||
}
|
||||
//2. 校验用户名或密码是否正确
|
||||
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
||||
String syspassword = sysUser.getPassword();
|
||||
if (!syspassword.equals(userpassword)) {
|
||||
// 重试登录次数加一
|
||||
retryCount++;
|
||||
if( retryCount == 1){
|
||||
redisUtil.set(RETRY_LOGIN_PREFIX + username,retryCount,60 * 30);
|
||||
}else {
|
||||
redisUtil.set(RETRY_LOGIN_PREFIX + username,retryCount,redisUtil.getExpire(RETRY_LOGIN_PREFIX + username));
|
||||
}
|
||||
String msg = retryCount == RETRY_LOGIN_MAX_COUNT ? "密码错误次数过多,请稍后重试":"用户名或密码错误,剩余可登录次数:"+(RETRY_LOGIN_MAX_COUNT - retryCount);
|
||||
result.error500(msg);
|
||||
return result;
|
||||
}
|
||||
//登录成功,清除错误登录次数
|
||||
redisUtil.del(RETRY_LOGIN_PREFIX + username);
|
||||
|
||||
//用户登录信息
|
||||
userInfo(sysUser, result);
|
||||
//update-begin--Author:wangshuai Date:20200714 for:登录日志没有记录人员
|
||||
LoginUser loginUser = new LoginUser();
|
||||
BeanUtils.copyProperties(sysUser, loginUser);
|
||||
baseCommonService.addLog("用户名: " + username + ",登录成功!", CommonConstant.LOG_TYPE_1, null,loginUser);
|
||||
//update-end--Author:wangshuai Date:20200714 for:登录日志没有记录人员
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/logout")
|
||||
public Result<Object> logout(HttpServletRequest request,HttpServletResponse response) {
|
||||
//用户退出逻辑
|
||||
String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|
||||
if(oConvertUtils.isEmpty(token)) {
|
||||
return Result.error("退出登录失败!");
|
||||
}
|
||||
String username = JwtUtil.getUsername(token);
|
||||
LoginUser sysUser = sysBaseAPI.getUserByName(username);
|
||||
if(sysUser!=null) {
|
||||
//update-begin--Author:wangshuai Date:20200714 for:登出日志没有记录人员
|
||||
baseCommonService.addLog("用户名: "+sysUser.getRealname()+",退出成功!", CommonConstant.LOG_TYPE_1, null,sysUser);
|
||||
//update-end--Author:wangshuai Date:20200714 for:登出日志没有记录人员
|
||||
log.info(" 用户名: "+sysUser.getRealname()+",退出成功! ");
|
||||
//清空用户登录Token缓存
|
||||
redisUtil.del(CommonConstant.PREFIX_USER_TOKEN + token);
|
||||
//清空用户登录Shiro权限缓存
|
||||
redisUtil.del(CommonConstant.PREFIX_USER_SHIRO_CACHE + sysUser.getId());
|
||||
//清空用户的缓存信息(包括部门信息),例如sys:cache:user::<username>
|
||||
redisUtil.del(String.format("%s::%s", CacheConstant.SYS_USERS_CACHE, sysUser.getUsername()));
|
||||
//调用shiro的logout
|
||||
SecurityUtils.getSubject().logout();
|
||||
return Result.OK("退出登录成功!");
|
||||
}else {
|
||||
return Result.error("Token无效!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取访问量
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("loginfo")
|
||||
public Result<JSONObject> loginfo() {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
JSONObject obj = new JSONObject();
|
||||
//update-begin--Author:zhangweijian Date:20190428 for:传入开始时间,结束时间参数
|
||||
// 获取一天的开始和结束时间
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
Date dayStart = calendar.getTime();
|
||||
calendar.add(Calendar.DATE, 1);
|
||||
Date dayEnd = calendar.getTime();
|
||||
// 获取系统访问记录
|
||||
Long totalVisitCount = logService.findTotalVisitCount();
|
||||
obj.put("totalVisitCount", totalVisitCount);
|
||||
Long todayVisitCount = logService.findTodayVisitCount(dayStart,dayEnd);
|
||||
obj.put("todayVisitCount", todayVisitCount);
|
||||
Long todayIp = logService.findTodayIp(dayStart,dayEnd);
|
||||
//update-end--Author:zhangweijian Date:20190428 for:传入开始时间,结束时间参数
|
||||
obj.put("todayIp", todayIp);
|
||||
result.setResult(obj);
|
||||
result.success("登录成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取访问量
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("visitInfo")
|
||||
public Result<List<Map<String,Object>>> visitInfo() {
|
||||
Result<List<Map<String,Object>>> result = new Result<List<Map<String,Object>>>();
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
calendar.set(Calendar.HOUR_OF_DAY,0);
|
||||
calendar.set(Calendar.MINUTE,0);
|
||||
calendar.set(Calendar.SECOND,0);
|
||||
calendar.set(Calendar.MILLISECOND,0);
|
||||
calendar.add(Calendar.DAY_OF_MONTH, 1);
|
||||
Date dayEnd = calendar.getTime();
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -7);
|
||||
Date dayStart = calendar.getTime();
|
||||
List<Map<String,Object>> list = logService.findVisitCount(dayStart, dayEnd);
|
||||
result.setResult(oConvertUtils.toLowerCasePageList(list));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 登陆成功选择用户当前部门
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/selectDepart", method = RequestMethod.PUT)
|
||||
public Result<JSONObject> selectDepart(@RequestBody SysUser user) {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
String username = user.getUsername();
|
||||
if(oConvertUtils.isEmpty(username)) {
|
||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||
username = sysUser.getUsername();
|
||||
}
|
||||
String orgCode= user.getOrgCode();
|
||||
this.sysUserService.updateUserDepart(username, orgCode);
|
||||
SysUser sysUser = sysUserService.getUserByName(username);
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("userInfo", sysUser);
|
||||
result.setResult(obj);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 短信登录接口
|
||||
*
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/sms")
|
||||
public Result<String> sms(@RequestBody JSONObject jsonObject) {
|
||||
Result<String> result = new Result<String>();
|
||||
String mobile = jsonObject.get("mobile").toString();
|
||||
//手机号模式 登录模式: "2" 注册模式: "1"
|
||||
String smsmode=jsonObject.get("smsmode").toString();
|
||||
log.info(mobile);
|
||||
if(oConvertUtils.isEmpty(mobile)){
|
||||
result.setMessage("手机号不允许为空!");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
Object object = redisUtil.get(mobile);
|
||||
if (object != null) {
|
||||
result.setMessage("验证码10分钟内,仍然有效!");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
|
||||
//随机数
|
||||
String captcha = RandomUtil.randomNumbers(6);
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("code", captcha);
|
||||
try {
|
||||
boolean b = false;
|
||||
//注册模板
|
||||
if (CommonConstant.SMS_TPL_TYPE_1.equals(smsmode)) {
|
||||
SysUser sysUser = sysUserService.getUserByPhone(mobile);
|
||||
if(sysUser!=null) {
|
||||
result.error500(" 手机号已经注册,请直接登录!");
|
||||
baseCommonService.addLog("手机号已经注册,请直接登录!", CommonConstant.LOG_TYPE_1, null);
|
||||
return result;
|
||||
}
|
||||
b = DySmsHelper.sendSms(mobile, obj, DySmsEnum.REGISTER_TEMPLATE_CODE);
|
||||
}else {
|
||||
//登录模式,校验用户有效性
|
||||
SysUser sysUser = sysUserService.getUserByPhone(mobile);
|
||||
result = sysUserService.checkUserIsEffective(sysUser);
|
||||
if(!result.isSuccess()) {
|
||||
String message = result.getMessage();
|
||||
if("该用户不存在,请注册".equals(message)){
|
||||
result.error500("该用户不存在或未绑定手机号");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* smsmode 短信模板方式 0 .登录模板、1.注册模板、2.忘记密码模板
|
||||
*/
|
||||
if (CommonConstant.SMS_TPL_TYPE_0.equals(smsmode)) {
|
||||
//登录模板
|
||||
b = DySmsHelper.sendSms(mobile, obj, DySmsEnum.LOGIN_TEMPLATE_CODE);
|
||||
} else if(CommonConstant.SMS_TPL_TYPE_2.equals(smsmode)) {
|
||||
//忘记密码模板
|
||||
b = DySmsHelper.sendSms(mobile, obj, DySmsEnum.FORGET_PASSWORD_TEMPLATE_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
if (b == false) {
|
||||
result.setMessage("短信验证码发送失败,请稍后重试");
|
||||
result.setSuccess(false);
|
||||
return result;
|
||||
}
|
||||
//验证码10分钟内有效
|
||||
redisUtil.set(mobile, captcha, 600);
|
||||
//update-begin--Author:scott Date:20190812 for:issues#391
|
||||
//result.setResult(captcha);
|
||||
//update-end--Author:scott Date:20190812 for:issues#391
|
||||
result.setSuccess(true);
|
||||
|
||||
} catch (ClientException e) {
|
||||
e.printStackTrace();
|
||||
result.error500(" 短信接口未配置,请联系管理员!");
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 手机号登录接口
|
||||
*
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("手机号登录接口")
|
||||
@PostMapping("/phoneLogin")
|
||||
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject) {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
String phone = jsonObject.getString("mobile");
|
||||
|
||||
//校验用户有效性
|
||||
SysUser sysUser = sysUserService.getUserByPhone(phone);
|
||||
result = sysUserService.checkUserIsEffective(sysUser);
|
||||
if(!result.isSuccess()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
String smscode = jsonObject.getString("captcha");
|
||||
Object code = redisUtil.get(phone);
|
||||
if (!smscode.equals(code)) {
|
||||
result.setMessage("手机验证码错误");
|
||||
return result;
|
||||
}
|
||||
//用户信息
|
||||
userInfo(sysUser, result);
|
||||
//添加日志
|
||||
baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @param sysUser
|
||||
* @param result
|
||||
* @return
|
||||
*/
|
||||
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result) {
|
||||
String syspassword = sysUser.getPassword();
|
||||
String username = sysUser.getUsername();
|
||||
// 生成token
|
||||
String token = JwtUtil.sign(username, syspassword);
|
||||
// 设置token缓存有效时间
|
||||
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
|
||||
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME*2 / 1000);
|
||||
|
||||
// 获取用户部门信息
|
||||
JSONObject obj = new JSONObject();
|
||||
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
|
||||
obj.put("departs", departs);
|
||||
if (departs == null || departs.size() == 0) {
|
||||
obj.put("multi_depart", 0);
|
||||
} else if (departs.size() == 1) {
|
||||
sysUserService.updateUserDepart(username, departs.get(0).getOrgCode());
|
||||
obj.put("multi_depart", 1);
|
||||
} else {
|
||||
//查询当前是否有登录部门
|
||||
// update-begin--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
||||
SysUser sysUserById = sysUserService.getById(sysUser.getId());
|
||||
if(oConvertUtils.isEmpty(sysUserById.getOrgCode())){
|
||||
sysUserService.updateUserDepart(username, departs.get(0).getOrgCode());
|
||||
}
|
||||
// update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
||||
obj.put("multi_depart", 2);
|
||||
}
|
||||
|
||||
// 获取用户角色信息
|
||||
List<SysRole> userRoleListInfo = sysUserService.queryUserRoleListInfoByUserId(sysUser.getId());
|
||||
sysUser.setUserRoleList(userRoleListInfo);
|
||||
|
||||
//获取配置信息
|
||||
List<SysConfig> sysConfigs = iSysConfigService.queryList();
|
||||
if(CollectionUtils.isNotEmpty(sysConfigs)){
|
||||
for (SysConfig sysConfig : sysConfigs) {
|
||||
obj.put(sysConfig.getConfigName(),sysConfig.getConfig());
|
||||
}
|
||||
}
|
||||
|
||||
obj.put("token", token);
|
||||
obj.put("userInfo", sysUser);
|
||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||
result.setResult(obj);
|
||||
result.success("登录成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取加密字符串
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getEncryptedString")
|
||||
public Result<Map<String,String>> getEncryptedString(){
|
||||
Result<Map<String,String>> result = new Result<Map<String,String>>();
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("key", EncryptedString.key);
|
||||
map.put("iv",EncryptedString.iv);
|
||||
result.setResult(map);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台生成图形验证码 :有效
|
||||
* @param response
|
||||
* @param key
|
||||
*/
|
||||
@ApiOperation("获取验证码")
|
||||
@GetMapping(value = "/randomImage/{key}")
|
||||
public Result<String> randomImage(HttpServletResponse response,@PathVariable String key){
|
||||
Result<String> res = new Result<String>();
|
||||
try {
|
||||
String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
|
||||
String lowerCaseCode = code.toLowerCase();
|
||||
String realKey = MD5Util.MD5Encode(lowerCaseCode+key, "utf-8");
|
||||
redisUtil.set(realKey, lowerCaseCode, 60);
|
||||
String base64 = RandImageUtil.generate(code);
|
||||
res.setSuccess(true);
|
||||
res.setResult(base64);
|
||||
} catch (Exception e) {
|
||||
res.error500("获取验证码出错"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* app登录
|
||||
* @param sysLoginModel
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/mLogin", method = RequestMethod.POST)
|
||||
public Result<JSONObject> mLogin(@RequestBody SysLoginModel sysLoginModel) throws Exception {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
String username = sysLoginModel.getUsername();
|
||||
String password = sysLoginModel.getPassword();
|
||||
|
||||
//1. 校验用户是否有效
|
||||
SysUser sysUser = sysUserService.getUserByName(username);
|
||||
result = sysUserService.checkUserIsEffective(sysUser);
|
||||
if(!result.isSuccess()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
//2. 校验用户名或密码是否正确
|
||||
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
||||
String syspassword = sysUser.getPassword();
|
||||
if (!syspassword.equals(userpassword)) {
|
||||
result.error500("用户名或密码错误");
|
||||
return result;
|
||||
}
|
||||
|
||||
String orgCode = sysUser.getOrgCode();
|
||||
if(oConvertUtils.isEmpty(orgCode)) {
|
||||
//如果当前用户无选择部门 查看部门关联信息
|
||||
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
|
||||
if (departs == null || departs.size() == 0) {
|
||||
result.error500("用户暂未归属部门,不可登录!");
|
||||
return result;
|
||||
}
|
||||
orgCode = departs.get(0).getOrgCode();
|
||||
sysUser.setOrgCode(orgCode);
|
||||
this.sysUserService.updateUserDepart(username, orgCode);
|
||||
}
|
||||
JSONObject obj = new JSONObject();
|
||||
//用户登录信息
|
||||
obj.put("userInfo", sysUser);
|
||||
|
||||
// 生成token
|
||||
String token = JwtUtil.sign(username, syspassword);
|
||||
// 设置超时时间
|
||||
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
|
||||
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME*2 / 1000);
|
||||
|
||||
//token 信息
|
||||
obj.put("token", token);
|
||||
result.setResult(obj);
|
||||
result.setSuccess(true);
|
||||
result.setCode(200);
|
||||
baseCommonService.addLog("用户名: " + username + ",登录成功[移动端]!", CommonConstant.LOG_TYPE_1, null);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 图形验证码
|
||||
* @param sysLoginModel
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/checkCaptcha", method = RequestMethod.POST)
|
||||
public Result<?> checkCaptcha(@RequestBody SysLoginModel sysLoginModel){
|
||||
String captcha = sysLoginModel.getCaptcha();
|
||||
String checkKey = sysLoginModel.getCheckKey();
|
||||
if(captcha==null){
|
||||
return Result.error("验证码无效");
|
||||
}
|
||||
String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
String realKey = MD5Util.MD5Encode(lowerCaseCaptcha+checkKey, "utf-8");
|
||||
Object checkCode = redisUtil.get(realKey);
|
||||
if(checkCode==null || !checkCode.equals(lowerCaseCaptcha)) {
|
||||
return Result.error("验证码错误");
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
/**
|
||||
* 返回一个RSA公钥
|
||||
* @author 马志朝
|
||||
* @date 2021/4/15 15:01
|
||||
* @param
|
||||
* @return com.jero.common.api.vo.Result<java.lang.String>
|
||||
*/
|
||||
@ApiOperation("获取RSA公钥")
|
||||
@GetMapping("/getRSAPublicKey")
|
||||
public Result<String> getRSAPublicKey(){
|
||||
RSA rsa = new RSA();
|
||||
String privateKeyBase64 = rsa.getPrivateKeyBase64();
|
||||
String publicKeyBase64 = rsa.getPublicKeyBase64();
|
||||
//存到redis key为公钥 value为私钥
|
||||
redisUtil.set(publicKeyBase64, privateKeyBase64, 60L);
|
||||
Result<String> result = new Result<>();
|
||||
result.setResult(publicKeyBase64);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+856
@@ -0,0 +1,856 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.CacheConstant;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.ImportExcelUtil;
|
||||
import com.jero.common.util.SqlInjectionUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
import com.jero.modules.enums.FixedFieldEnum;
|
||||
import com.jero.modules.enums.IsTagDict;
|
||||
import com.jero.modules.system.entity.SysDict;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.model.SysDictTree;
|
||||
import com.jero.modules.system.model.TreeSelectModel;
|
||||
import com.jero.modules.system.service.IProjectUserBrandService;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.vo.SysDictPage;
|
||||
import com.jero.modules.utils.HanYuPinYinUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 字典表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @Author zhangweijian
|
||||
* @since 2018-12-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "字典控制器")
|
||||
@RequestMapping("/phone/sys/dict")
|
||||
@Slf4j
|
||||
public class PhoneSysDictController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
@Autowired
|
||||
public RedisTemplate<String, Object> redisTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IProjectUserBrandService projectUserBrandService;
|
||||
|
||||
@RequestMapping(value = "/page", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "字典控制器-分页列表查询", notes = "字典控制器-分页列表查询")
|
||||
public Result<IPage<SysDict>> queryPageList(SysDict sysDict, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
|
||||
Result<IPage<SysDict>> result = new Result<IPage<SysDict>>();
|
||||
QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, req.getParameterMap());
|
||||
queryWrapper.eq("del_flag",CommonConstant.DEL_FLAG_0);
|
||||
queryWrapper.eq("is_tag_dict", IsTagDict.SYS_DICT_SYSTEM.getValue());
|
||||
Page<SysDict> page = new Page<SysDict>(pageNo, pageSize);
|
||||
IPage<SysDict> pageList = sysDictService.page(page, queryWrapper);
|
||||
log.debug("查询当前页:"+pageList.getCurrent());
|
||||
log.debug("查询当前页数量:"+pageList.getSize());
|
||||
log.debug("查询结果数量:"+pageList.getRecords().size());
|
||||
log.debug("数据总数:"+pageList.getTotal());
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签内容-分页查询
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签内容-分页列表查询")
|
||||
@ApiOperation(value="标签内容-分页列表查询", notes="区域管理表-分页列表查询")
|
||||
@RequiresPermissions("dict:tagDictPage")
|
||||
@PostMapping(value = "/tagDictPage")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
IPage<SysDict> pageList=sysDictService.queryPageList(params);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:获取树形字典数据
|
||||
* @param sysDict
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-树形字典数据", notes = "字典控制器-树形字典数据")
|
||||
@RequestMapping(value = "/treeList", method = RequestMethod.GET)
|
||||
public Result<List<SysDictTree>> treeList(SysDict sysDict, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
|
||||
Result<List<SysDictTree>> result = new Result<>();
|
||||
LambdaQueryWrapper<SysDict> query = new LambdaQueryWrapper<>();
|
||||
// 构造查询条件
|
||||
String dictName = sysDict.getDictName();
|
||||
if(oConvertUtils.isNotEmpty(dictName)) {
|
||||
query.like(true, SysDict::getDictName, dictName);
|
||||
}
|
||||
query.orderByDesc(true, SysDict::getCreateTime);
|
||||
List<SysDict> list = sysDictService.list(query);
|
||||
List<SysDictTree> treeList = new ArrayList<>();
|
||||
for (SysDict node : list) {
|
||||
treeList.add(new SysDictTree(node));
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(treeList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
* @param dictCode 字典code
|
||||
* @param dictCode 表名,文本字段,code字段 | 举例:sys_user,realname,id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-根据字典编码获取字典数据", notes = "字典控制器-根据字典编码获取字典数据")
|
||||
@RequestMapping(value = "/getDictItems/{dictCode}", method = RequestMethod.GET)
|
||||
public Result<List<DictModel>> getDictItems(@PathVariable String dictCode, @RequestParam(value = "sign",required = false) String sign, HttpServletRequest request) {
|
||||
log.info(" dictCode : "+ dictCode);
|
||||
Result<List<DictModel>> result = new Result<List<DictModel>>();
|
||||
List<DictModel> ls = null;
|
||||
try {
|
||||
if(dictCode.indexOf(",")!=-1) {
|
||||
//关联表字典(举例:sys_user,realname,id)
|
||||
String[] params = dictCode.split(",");
|
||||
|
||||
if(params.length<3) {
|
||||
result.error500("字典Code格式不正确!");
|
||||
return result;
|
||||
}
|
||||
//SQL注入校验(只限制非法串改数据库)
|
||||
final String[] sqlInjCheck = {params[0],params[1],params[2]};
|
||||
SqlInjectionUtil.filterContent(sqlInjCheck);
|
||||
|
||||
if(params.length==4) {
|
||||
//SQL注入校验(查询条件SQL 特殊check,此方法仅供此处使用)
|
||||
SqlInjectionUtil.specialFilterContent(params[3]);
|
||||
ls = sysDictService.queryTableDictItemsByCodeAndFilter(params[0],params[1],params[2],params[3]);
|
||||
}else if (params.length==3) {
|
||||
ls = sysDictService.queryTableDictItemsByCode(params[0],params[1],params[2]);
|
||||
}else{
|
||||
result.error500("字典Code格式不正确!");
|
||||
return result;
|
||||
}
|
||||
}else {
|
||||
//字典表
|
||||
ls = sysDictService.queryDictItemsByCode(dictCode);
|
||||
}
|
||||
|
||||
// 将结果集进行排序
|
||||
/*if (CollectionUtils.isNotEmpty(ls)) {
|
||||
// 匿名比较器排序
|
||||
Collections.sort(ls, new Comparator<DictModel>() {
|
||||
@Override
|
||||
public int compare(DictModel p1, DictModel p2) {
|
||||
return p1.getText().compareTo(p2.getText());
|
||||
}
|
||||
});
|
||||
}*/
|
||||
|
||||
result.setSuccess(true);
|
||||
result.setResult(ls);
|
||||
log.debug(result.toString());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部字典数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-获取全部字典数据", notes = "字典控制器-获取全部字典数据")
|
||||
@RequestMapping(value = "/queryAllDictItems", method = RequestMethod.GET)
|
||||
public Result<?> queryAllDictItems(HttpServletRequest request) {
|
||||
Map<String, List<DictModel>> res = new HashMap<String, List<DictModel>>();
|
||||
res = sysDictService.queryAllDictItems();
|
||||
//添加成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部字典数据(中英文切换)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-获取全部字典数据", notes = "字典控制器-获取全部字典数据")
|
||||
@RequestMapping(value = "/queryAllDictItemsByCut", method = RequestMethod.GET)
|
||||
public Result<?> queryAllDictItemsByCut(HttpServletRequest request,String cut) {
|
||||
Map<String, List<DictModel>> res = new HashMap<String, List<DictModel>>();
|
||||
res = sysDictService.queryAllDictItemsByCut(cut);
|
||||
return Result.OK(res);
|
||||
}
|
||||
@ApiOperation(value = "更新浏览器内保存的数据字典数据", notes = "更新浏览器内保存的数据字典数据")
|
||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
||||
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result) {
|
||||
// 获取数据字典
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||
result.setResult(obj);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
* @param dictCode
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-通过字典code和字典值key获取字典数据", notes = "字典控制器-通过字典code和字典值key获取字典数据")
|
||||
@RequestMapping(value = "/getDictText/{dictCode}/{key}", method = RequestMethod.GET)
|
||||
public Result<String> getDictText(@PathVariable("dictCode") String dictCode, @PathVariable("key") String key) {
|
||||
log.info(" dictCode : "+ dictCode);
|
||||
Result<String> result = new Result<String>();
|
||||
String text = null;
|
||||
try {
|
||||
text = sysDictService.queryDictTextByKey(dictCode, key);
|
||||
result.setSuccess(true);
|
||||
result.setResult(text);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 大数据量的字典表 走异步加载 即前端输入内容过滤数据
|
||||
* @param dictCode
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-通过字典code获取字典数据", notes = "字典控制器-通过字典code获取字典数据")
|
||||
@RequestMapping(value = "/loadDict/{dictCode}", method = RequestMethod.GET)
|
||||
public Result<List<DictModel>> loadDict(@PathVariable String dictCode,
|
||||
@RequestParam(name="keyword") String keyword,
|
||||
@RequestParam(value = "sign",required = false) String sign,
|
||||
@RequestParam(value = "pageSize", required = false) Integer pageSize) {
|
||||
log.info(" 加载字典表数据,加载关键字: "+ keyword);
|
||||
Result<List<DictModel>> result = new Result<List<DictModel>>();
|
||||
List<DictModel> ls = null;
|
||||
try {
|
||||
if(dictCode.indexOf(",")!=-1) {
|
||||
String[] params = dictCode.split(",");
|
||||
if(params.length!=3) {
|
||||
result.error500("字典Code格式不正确!");
|
||||
return result;
|
||||
}
|
||||
if(pageSize!=null){
|
||||
ls = sysDictService.queryLittleTableDictItems(params[0],params[1],params[2],keyword, pageSize);
|
||||
}else{
|
||||
ls = sysDictService.queryTableDictItems(params[0],params[1],params[2],keyword);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(ls);
|
||||
log.info(result.toString());
|
||||
}else {
|
||||
result.error500("字典Code格式不正确!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典code加载字典text 返回
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-根据字典code加载字典text", notes = "字典控制器-根据字典code加载字典text")
|
||||
@RequestMapping(value = "/loadDictItem/{dictCode}", method = RequestMethod.GET)
|
||||
public Result<List<String>> loadDictItem(@PathVariable String dictCode, @RequestParam(name="key") String keys, @RequestParam(value = "sign",required = false) String sign, HttpServletRequest request) {
|
||||
Result<List<String>> result = new Result<>();
|
||||
try {
|
||||
if(dictCode.indexOf(",")!=-1) {
|
||||
String[] params = dictCode.split(",");
|
||||
if(params.length!=3) {
|
||||
result.error500("字典Code格式不正确!");
|
||||
return result;
|
||||
}
|
||||
List<String> texts = sysDictService.queryTableDictByKeys(params[0], params[1], params[2], keys);
|
||||
|
||||
result.setSuccess(true);
|
||||
result.setResult(texts);
|
||||
log.info(result.toString());
|
||||
}else {
|
||||
result.error500("字典Code格式不正确!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据表名——显示字段-存储字段 pid 加载树形数据
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-根据表名—显示字段-存储字段 pid 加载树形数据", notes = "字典控制器-根据表名—显示字段-存储字段 pid 加载树形数据")
|
||||
@RequestMapping(value = "/loadTreeData", method = RequestMethod.GET)
|
||||
public Result<List<TreeSelectModel>> loadTreeData(@RequestParam(name="pid") String pid, @RequestParam(name="pidField") String pidField,
|
||||
@RequestParam(name="tableName") String tbname,
|
||||
@RequestParam(name="text") String text,
|
||||
@RequestParam(name="code") String code,
|
||||
@RequestParam(name="hasChildField", required = false) String hasChildField,
|
||||
@RequestParam(value = "sign", required = false) String sign, HttpServletRequest request) {
|
||||
Result<List<TreeSelectModel>> result = new Result<List<TreeSelectModel>>();
|
||||
|
||||
// SQL注入漏洞 sign签名校验(表名,label字段,val字段,条件)
|
||||
String dictCode = tbname +","+ text +","+ code;
|
||||
SqlInjectionUtil.filterContent(dictCode);
|
||||
List<TreeSelectModel> ls = sysDictService.queryTreeList(null, tbname, text, code, pidField, pid, hasChildField);
|
||||
result.setSuccess(true);
|
||||
result.setResult(ls);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询后返回树型数据
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-根据表名—显示字段-存储字段 加载树形数据", notes = "字典控制器-根据表名—显示字段-存储字段 加载树形数据")
|
||||
@RequestMapping(value = "/queryAllTreeData", method = RequestMethod.GET)
|
||||
public Result<List<TreeSelectModel>> queryAllTreeData(@RequestParam(name="pidField") String pidField,
|
||||
@RequestParam(name="tableName") String tbname,
|
||||
@RequestParam(name="text") String text,
|
||||
@RequestParam(name="code") String code,
|
||||
HttpServletRequest request) {
|
||||
Result<List<TreeSelectModel>> result = new Result<List<TreeSelectModel>>();
|
||||
|
||||
// SQL注入漏洞 sign签名校验(表名,label字段,val字段,条件)
|
||||
String dictCode = tbname +","+ text +","+ code;
|
||||
SqlInjectionUtil.filterContent(dictCode);
|
||||
List<TreeSelectModel> ls = sysDictService.queryAllTreeData(tbname, text, code, pidField);
|
||||
result.setSuccess(true);
|
||||
result.setResult(ls);
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 查询被删除的列表
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/deleteList")
|
||||
public Result<List<SysDict>> deleteList() {
|
||||
Result<List<SysDict>> result = new Result<List<SysDict>>();
|
||||
List<SysDict> list = this.sysDictService.queryDeleteList();
|
||||
result.setSuccess(true);
|
||||
result.setResult(list);
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @功能:新增
|
||||
* @param sysDict
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-新增字典", notes = "字典控制器-新增字典")
|
||||
@RequiresRoles({"admin"})
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
@RequiresPermissions("dict:add")
|
||||
public Result<SysDict> add(@RequestBody SysDict sysDict) {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
|
||||
sysDictService.setAddOrdderNum(sysDict);
|
||||
//校验--不能重复数据
|
||||
QueryWrapper<SysDict> queryWrapper = new QueryWrapper<>();
|
||||
//查询同一模块下,同名数据
|
||||
queryWrapper.eq("dict_name",sysDict.getDictName())
|
||||
.eq("is_tag_dict",sysDict.getIsTagDict());
|
||||
List<SysDict> existDictList = this.sysDictService.list(queryWrapper);
|
||||
try {
|
||||
if(!existDictList.isEmpty()) {
|
||||
SysDict sysDictDB = existDictList.get(0);
|
||||
//存在重复同名标签内容,且已删,恢复
|
||||
if (sysDictDB.getDelFlag() == CommonConstant.DEL_FLAG_1) {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_0, sysDictDB.getId());
|
||||
}else{//存在重复同名标签内容,未删
|
||||
result.error500("标签名称不能重复");
|
||||
}
|
||||
} else {//不是同名
|
||||
if (ObjectUtils.isNotEmpty(sysDict.getIsTagDict())
|
||||
&& sysDict.getIsTagDict() == IsTagDict.TAG_DICT.getValue()) {
|
||||
String pinYin = HanYuPinYinUtil.changeToNumberPinYin(sysDict.getDictName());
|
||||
sysDict.setDictCode(pinYin.replace(" ","_"));
|
||||
|
||||
sysDict.setCreateTime(new Date());
|
||||
sysDict.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
|
||||
// sysDict.setDictName(sysDict.getDictName().replace(" ",""));
|
||||
sysDictService.save(sysDict);
|
||||
}else if(sysDict.getIsTagDict() == IsTagDict.SYS_DICT_SYSTEM.getValue()){
|
||||
sysDict.setCreateTime(new Date());
|
||||
sysDict.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
sysDictService.save(sysDict);
|
||||
}
|
||||
result.success("保存成功!");
|
||||
//添加成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:编辑
|
||||
* @param sysDict
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-编辑字典", notes = "字典控制器-编辑字典")
|
||||
@RequiresRoles({"admin"})
|
||||
@RequestMapping(value = "/edit", method = RequestMethod.PUT)
|
||||
@RequiresPermissions("dict:edit")
|
||||
public Result<SysDict> edit(@RequestBody SysDict sysDict) {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
sysDictService.setEditOrderNum(sysDict);
|
||||
SysDict sysdict = sysDictService.getById(sysDict.getId());
|
||||
if (sysdict == null) {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
if (StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可修改");
|
||||
} else {
|
||||
//校验--不能重复数据
|
||||
QueryWrapper<SysDict> queryWrapper = new QueryWrapper<>();
|
||||
//查询同一模块下,同名数据
|
||||
queryWrapper.eq("dict_name", sysDict.getDictName())
|
||||
.eq("is_tag_dict",sysDict.getIsTagDict());
|
||||
List<SysDict> existDictList = this.sysDictService.list(queryWrapper);
|
||||
if (!existDictList.isEmpty()) {
|
||||
if (existDictList.get(0).getId().equals(sysDict.getId())) {//已存在同名的数据,就是正在编辑的这个
|
||||
sysDict.setUpdateTime(new Date());
|
||||
boolean ok = sysDictService.updateById(sysDict);
|
||||
if (ok) {
|
||||
result.success("编辑成功!");
|
||||
//编辑成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
}
|
||||
} else {//已存在同名的数据,不是正在编辑的这个
|
||||
SysDict sysDictDB = existDictList.get(0);
|
||||
//存在重复同名标签内容,且已删,恢复
|
||||
if (sysDictDB.getDelFlag() == CommonConstant.DEL_FLAG_1) {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_0, sysDictDB.getId());
|
||||
} else {//存在重复同名标签内容,未删
|
||||
result.error500("标签名称不能重复");
|
||||
}
|
||||
}
|
||||
} else {//不是同名
|
||||
sysDict.setUpdateTime(new Date());
|
||||
boolean ok = sysDictService.updateById(sysDict);
|
||||
if (ok) {
|
||||
result.success("编辑成功!");
|
||||
//编辑成功后需要刷新缓存
|
||||
sysDictService.refreshCache();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-删除字典", notes = "字典控制器-删除字典")
|
||||
@RequiresRoles({"admin"})
|
||||
@DeleteMapping(value = "/delete")
|
||||
@CacheEvict(value=CacheConstant.SYS_DICT_CACHE, allEntries=true)
|
||||
public Result<SysDict> delete(@RequestParam(name="id",required=true) String id) {
|
||||
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
SysDict sysDict = sysDictService.queryById(id);
|
||||
if (StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可删除");
|
||||
} else {
|
||||
boolean ok = sysDictService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.error500("删除失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:逻辑删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-逻辑删除字典", notes = "字典控制器-逻辑删除字典")
|
||||
@RequiresRoles({"admin"})
|
||||
@GetMapping(value = "/logicDelete")
|
||||
@CacheEvict(value=CacheConstant.SYS_DICT_CACHE, allEntries=true)
|
||||
@RequiresPermissions("dict:logicDelete")
|
||||
public Result<SysDict> logicDelete(@RequestParam(name="id",required=true) String id) {
|
||||
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
try{
|
||||
SysDict sysDict = sysDictService.queryById(id);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,id);
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("删除失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-批量字典", notes = "字典控制器-批量字典")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
@CacheEvict(value= CacheConstant.SYS_DICT_CACHE, allEntries=true)
|
||||
public Result<SysDict> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
SysDict sysDict = sysDictService.queryById(ids);
|
||||
if(oConvertUtils.isEmpty(ids)) {
|
||||
result.error500("参数不识别!");
|
||||
}else {
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
for (String list : idList) {
|
||||
SysDict midDict = sysDictService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly())) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(String.valueOf(midDict.getIsReadOnly()))) {
|
||||
return result.error500("包含固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.removeByIds(idList);
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:批量逻辑删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-批量字典", notes = "字典控制器-批量字典")
|
||||
@GetMapping(value = "/logicDeleteBatch")
|
||||
@CacheEvict(value= CacheConstant.SYS_DICT_CACHE, allEntries=true)
|
||||
public Result<SysDict> logicdeleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
for(String list:idList){
|
||||
SysDict joinSystem=sysDictService.getById(list);
|
||||
if(oConvertUtils.isEmpty(ids)) {
|
||||
result.error500("参数不识别!");
|
||||
}else {
|
||||
if (StringUtils.isNotBlank(String.valueOf(joinSystem.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(joinSystem.getIsReadOnly()))) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,joinSystem.getId());
|
||||
result.success("批量删除成功!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @功能:刷新缓存
|
||||
* @date 修改时间 2021.4.8
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/refleshCache")
|
||||
public Result<?> refleshCache() {
|
||||
Result<?> result = new Result<SysDict>();
|
||||
sysDictService.refreshCache();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(SysDict sysDict, HttpServletRequest request) {
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, request.getParameterMap());
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<SysDictPage> pageList = new ArrayList<SysDictPage>();
|
||||
|
||||
List<SysDict> sysDictList = sysDictService.list(queryWrapper);
|
||||
for (SysDict dictMain : sysDictList) {
|
||||
SysDictPage vo = new SysDictPage();
|
||||
BeanUtils.copyProperties(dictMain, vo);
|
||||
// 查询机票
|
||||
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByMainId(dictMain.getId());
|
||||
vo.setSysDictItemList(sysDictItemList);
|
||||
pageList.add(vo);
|
||||
}
|
||||
|
||||
// 导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "数据字典");
|
||||
// 注解对象Class
|
||||
mv.addObject(NormalExcelConstants.CLASS, SysDictPage.class);
|
||||
// 自定义表格参数
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("数据字典列表", "导出人:"+user.getRealname(), "数据字典"));
|
||||
// 导出数据列表
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequiresRoles({"admin"})
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(2);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
//导入Excel格式校验,看匹配的字段文本概率
|
||||
Boolean t = ExcelImportCheckUtil.check(file.getInputStream(), SysDictPage.class, params);
|
||||
if(!t){
|
||||
throw new RuntimeException("导入Excel校验失败 !");
|
||||
}
|
||||
List<SysDictPage> list = ExcelImportUtil.importExcel(file.getInputStream(), SysDictPage.class, params);
|
||||
// 错误信息
|
||||
List<String> errorMessage = new ArrayList<>();
|
||||
int successLines = 0, errorLines = 0;
|
||||
for (int i=0;i< list.size();i++) {
|
||||
SysDict po = new SysDict();
|
||||
BeanUtils.copyProperties(list.get(i), po);
|
||||
po.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
try {
|
||||
Integer integer = sysDictService.saveMain(po, list.get(i).getSysDictItemList());
|
||||
if(integer>0){
|
||||
successLines++;
|
||||
}else{
|
||||
errorLines++;
|
||||
int lineNumber = i + 1;
|
||||
errorMessage.add("第 " + lineNumber + " 行:字典编码已经存在,忽略导入。");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
errorLines++;
|
||||
int lineNumber = i + 1;
|
||||
errorMessage.add("第 " + lineNumber + " 行:字典编码已经存在,忽略导入。");
|
||||
}
|
||||
}
|
||||
return ImportExcelUtil.imporReturnRes(errorLines,successLines,errorMessage);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
return Result.error("文件导入失败:"+e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.error("文件导入失败!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询选项内容
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/queryDictName")
|
||||
public Result<List<SysDict>> queryDictName(@RequestParam(name = "cut") String cut,SysDict sysDict) {
|
||||
List<SysDict> list =sysDictService.queryDictName(cut,sysDict);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 物理删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping(value = "/deletePhysic/{id}")
|
||||
public Result<?> deletePhysic(@PathVariable String id) {
|
||||
try {
|
||||
sysDictService.deleteOneDictPhysically(id);
|
||||
return Result.OK("删除成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error("删除失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取回
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@PutMapping(value = "/back/{id}")
|
||||
public Result<?> back(@PathVariable String id) {
|
||||
try {
|
||||
sysDictService.updateDictDelFlag(0,id);
|
||||
return Result.OK("操作成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询出当前用户可配置品牌")
|
||||
@GetMapping(value = "/getBrandDict")
|
||||
public Result<List<DictModel>> getBrandDict() {
|
||||
List<DictModel> dictModels = sysDictService.queryDictItemsByCode(DictCodeEnum.BRAND.getValue());
|
||||
if (!sysUserService.isAdministrator()) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> brands = projectUserBrandService.queryBrandByUserId(sysUser.getId());
|
||||
dictModels = dictModels.stream().filter(dictModel -> brands.contains(dictModel.getValue())).collect(Collectors.toList());
|
||||
}
|
||||
return Result.OK(dictModels);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取责任领域字典数据
|
||||
* @param dictCode 字典code
|
||||
* @param dictCode 表名,文本字段,code字段 | 举例:sys_user,realname,id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "字典控制器-获取责任领域字典数据", notes = "字典控制器-获取责任领域字典数据")
|
||||
@RequestMapping(value = "/getDutyTerritoryDictItems/{dictCode}", method = RequestMethod.GET)
|
||||
public Result<List<DictModel>> getDutyTerritoryDictItems(@PathVariable String dictCode, @RequestParam(value = "sign",required = false) String sign, HttpServletRequest request) {
|
||||
log.info(" dictCode : "+ dictCode);
|
||||
Result<List<DictModel>> result = new Result<List<DictModel>>();
|
||||
List<DictModel> ls = null;
|
||||
try {
|
||||
if(dictCode.indexOf(",")!=-1) {
|
||||
//关联表字典(举例:sys_user,realname,id)
|
||||
String[] params = dictCode.split(",");
|
||||
|
||||
if(params.length<3) {
|
||||
result.error500("字典Code格式不正确!");
|
||||
return result;
|
||||
}
|
||||
//SQL注入校验(只限制非法串改数据库)
|
||||
final String[] sqlInjCheck = {params[0],params[1],params[2]};
|
||||
SqlInjectionUtil.filterContent(sqlInjCheck);
|
||||
|
||||
if(params.length==4) {
|
||||
//SQL注入校验(查询条件SQL 特殊check,此方法仅供此处使用)
|
||||
SqlInjectionUtil.specialFilterContent(params[3]);
|
||||
ls = sysDictService.queryTableDictItemsByCodeAndFilter(params[0],params[1],params[2],params[3]);
|
||||
}else if (params.length==3) {
|
||||
ls = sysDictService.queryTableDictItemsByCode(params[0],params[1],params[2]);
|
||||
}else{
|
||||
result.error500("字典Code格式不正确!");
|
||||
return result;
|
||||
}
|
||||
}else {
|
||||
//字典表
|
||||
ls = sysDictService.queryDictItemsByCode(dictCode);
|
||||
}
|
||||
|
||||
// 将结果集进行排序
|
||||
if (CollectionUtils.isNotEmpty(ls)) {
|
||||
// 匿名比较器排序
|
||||
Collections.sort(ls, new Comparator<DictModel>() {
|
||||
@Override
|
||||
public int compare(DictModel p1, DictModel p2) {
|
||||
return p1.getText().compareTo(p2.getText());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
result.setSuccess(true);
|
||||
result.setResult(ls);
|
||||
log.debug(result.toString());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
+865
@@ -0,0 +1,865 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.MD5Util;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.system.entity.SysDepartPermission;
|
||||
import com.jero.modules.system.entity.SysPermission;
|
||||
import com.jero.modules.system.entity.SysPermissionDataRule;
|
||||
import com.jero.modules.system.entity.SysRolePermission;
|
||||
import com.jero.modules.system.enums.SysPermissionEnum;
|
||||
import com.jero.modules.system.mapper.TodoCenterMapper;
|
||||
import com.jero.modules.system.model.SysPermissionTree;
|
||||
import com.jero.modules.system.model.TreeModel;
|
||||
import com.jero.modules.system.service.ISysDepartPermissionService;
|
||||
import com.jero.modules.system.service.ISysPermissionDataRuleService;
|
||||
import com.jero.modules.system.service.ISysPermissionService;
|
||||
import com.jero.modules.system.service.ISysRolePermissionService;
|
||||
import com.jero.modules.system.util.PermissionDataUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @Author scott
|
||||
* @since 2018-12-21
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/phone/sys/permission")
|
||||
public class PhoneSysPermissionController {
|
||||
|
||||
@Autowired
|
||||
private ISysPermissionService sysPermissionService;
|
||||
|
||||
@Autowired
|
||||
private ISysRolePermissionService sysRolePermissionService;
|
||||
|
||||
@Autowired
|
||||
private ISysPermissionDataRuleService sysPermissionDataRuleService;
|
||||
|
||||
@Autowired
|
||||
private ISysDepartPermissionService sysDepartPermissionService;
|
||||
|
||||
@Autowired
|
||||
private TodoCenterMapper todoCenterMapper;
|
||||
|
||||
/**
|
||||
* 加载数据节点
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/page", method = RequestMethod.GET)
|
||||
public Result<List<SysPermissionTree>> list() {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<List<SysPermissionTree>> result = new Result<>();
|
||||
try {
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(SysPermission::getSortNo);
|
||||
List<SysPermission> list = sysPermissionService.list(query);
|
||||
List<SysPermissionTree> treeList = new ArrayList<>();
|
||||
getTreeList(treeList, list, null);
|
||||
result.setResult(treeList);
|
||||
result.setSuccess(true);
|
||||
log.info("======获取全部菜单数据=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:先查询一级菜单,当用户点击展开菜单时加载子菜单 */
|
||||
/**
|
||||
* 系统菜单列表(一级菜单)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getSystemMenuList", method = RequestMethod.GET)
|
||||
public Result<List<SysPermissionTree>> getSystemMenuList() {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<List<SysPermissionTree>> result = new Result<>();
|
||||
try {
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
|
||||
query.eq(SysPermission::getMenuType,CommonConstant.MENU_TYPE_0);
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(SysPermission::getSortNo);
|
||||
List<SysPermission> list = sysPermissionService.list(query);
|
||||
List<SysPermissionTree> sysPermissionTreeList = new ArrayList<SysPermissionTree>();
|
||||
for(SysPermission sysPermission : list){
|
||||
SysPermissionTree sysPermissionTree = new SysPermissionTree(sysPermission);
|
||||
sysPermissionTreeList.add(sysPermissionTree);
|
||||
}
|
||||
result.setResult(sysPermissionTreeList);
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
log.info("======获取一级菜单数据=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子菜单
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getSystemSubmenu", method = RequestMethod.GET)
|
||||
public Result<List<SysPermissionTree>> getSystemSubmenu(@RequestParam("parentId") String parentId){
|
||||
Result<List<SysPermissionTree>> result = new Result<>();
|
||||
try{
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
|
||||
query.eq(SysPermission::getParentId,parentId);
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(SysPermission::getSortNo);
|
||||
List<SysPermission> list = sysPermissionService.list(query);
|
||||
List<SysPermissionTree> sysPermissionTreeList = new ArrayList<SysPermissionTree>();
|
||||
for(SysPermission sysPermission : list){
|
||||
SysPermissionTree sysPermissionTree = new SysPermissionTree(sysPermission);
|
||||
sysPermissionTreeList.add(sysPermissionTree);
|
||||
}
|
||||
result.setResult(sysPermissionTreeList);
|
||||
result.setSuccess(true);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/*update_end author:wuxianquan date:20190908 for:先查询一级菜单,当用户点击展开菜单时加载子菜单 */
|
||||
|
||||
// update_begin author:sunjianlei date:20200108 for: 新增批量根据父ID查询子级菜单的接口 -------------
|
||||
/**
|
||||
* 查询子菜单
|
||||
*
|
||||
* @param parentIds 父ID(多个采用半角逗号分割)
|
||||
* @return 返回 key-value 的 Map
|
||||
*/
|
||||
@GetMapping("/getSystemSubmenuBatch")
|
||||
public Result getSystemSubmenuBatch(@RequestParam("parentIds") String parentIds) {
|
||||
try {
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<>();
|
||||
List<String> parentIdList = Arrays.asList(parentIds.split(","));
|
||||
query.in(SysPermission::getParentId, parentIdList);
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(SysPermission::getSortNo);
|
||||
List<SysPermission> list = sysPermissionService.list(query);
|
||||
Map<String, List<SysPermissionTree>> listMap = new HashMap<>();
|
||||
for (SysPermission item : list) {
|
||||
String pid = item.getParentId();
|
||||
if (parentIdList.contains(pid)) {
|
||||
List<SysPermissionTree> mapList = listMap.get(pid);
|
||||
if (mapList == null) {
|
||||
mapList = new ArrayList<>();
|
||||
}
|
||||
mapList.add(new SysPermissionTree(item));
|
||||
listMap.put(pid, mapList);
|
||||
}
|
||||
}
|
||||
return Result.OK(listMap);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
return Result.error("批量查询子菜单失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
// update_end author:sunjianlei date:20200108 for: 新增批量根据父ID查询子级菜单的接口 -------------
|
||||
|
||||
// /**
|
||||
// * 查询用户拥有的菜单权限和按钮权限(根据用户账号)
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @RequestMapping(value = "/queryByUser", method = RequestMethod.GET)
|
||||
// public Result<JSONArray> queryByUser(HttpServletRequest req) {
|
||||
// Result<JSONArray> result = new Result<>();
|
||||
// try {
|
||||
// String username = req.getParameter("username");
|
||||
// List<SysPermission> metaList = sysPermissionService.queryByUser(username);
|
||||
// JSONArray jsonArray = new JSONArray();
|
||||
// this.getPermissionJsonArray(jsonArray, metaList, null);
|
||||
// result.setResult(jsonArray);
|
||||
// result.success("查询成功");
|
||||
// } catch (Exception e) {
|
||||
// result.error500("查询失败:" + e.getMessage());
|
||||
// log.error(e.getMessage(), e);
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 查询用户拥有的菜单权限和按钮权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getUserPermissionByToken", method = RequestMethod.GET)
|
||||
public Result<?> getUserPermissionByToken(String cut) {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
try {
|
||||
//直接获取当前用户不适用前端token
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (oConvertUtils.isEmpty(loginUser)) {
|
||||
return Result.error("请登录系统!");
|
||||
}
|
||||
List<SysPermission> metaList = sysPermissionService.queryByUser(loginUser.getUsername());
|
||||
//添加首页路由
|
||||
//update-begin-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存
|
||||
if(!PermissionDataUtil.hasIndexPage(metaList)){
|
||||
SysPermission indexMenu = sysPermissionService.list(new LambdaQueryWrapper<SysPermission>().eq(SysPermission::getName,"首页")).get(0);
|
||||
metaList.add(0,indexMenu);
|
||||
}
|
||||
//update-end-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存
|
||||
JSONObject json = new JSONObject();
|
||||
JSONArray menujsonArray = new JSONArray();
|
||||
this.getPermissionJsonArray(menujsonArray, metaList, null,cut);
|
||||
JSONArray authjsonArray = new JSONArray();
|
||||
this.getAuthJsonArray(authjsonArray, metaList);
|
||||
//查询所有的权限
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.eq(SysPermission::getMenuType, CommonConstant.MENU_TYPE_2);
|
||||
//query.eq(SysPermission::getStatus, "1");
|
||||
List<SysPermission> allAuthList = sysPermissionService.list(query);
|
||||
JSONArray allauthjsonArray = new JSONArray();
|
||||
this.getAllAuthJsonArray(allauthjsonArray, allAuthList);
|
||||
//路由菜单
|
||||
json.put("menu", menujsonArray);
|
||||
//按钮权限(用户拥有的权限集合)
|
||||
json.put("auth", authjsonArray);
|
||||
//全部权限配置集合(按钮权限,访问权限)
|
||||
json.put("allAuth", allauthjsonArray);
|
||||
result.setResult(json);
|
||||
result.success("查询成功");
|
||||
} catch (Exception e) {
|
||||
result.error500("查询失败:" + e.getMessage());
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加菜单
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public Result<SysPermission> add(@RequestBody SysPermission permission) {
|
||||
Result<SysPermission> result = new Result<SysPermission>();
|
||||
try {
|
||||
permission = PermissionDataUtil.intelligentProcessData(permission);
|
||||
sysPermissionService.addPermission(permission);
|
||||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑菜单
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/edit", method = { RequestMethod.PUT, RequestMethod.POST })
|
||||
public Result<SysPermission> edit(@RequestBody SysPermission permission) {
|
||||
Result<SysPermission> result = new Result<>();
|
||||
try {
|
||||
permission = PermissionDataUtil.intelligentProcessData(permission);
|
||||
sysPermissionService.editPermission(permission);
|
||||
result.success("修改成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
|
||||
public Result<SysPermission> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<SysPermission> result = new Result<>();
|
||||
try {
|
||||
sysPermissionService.deletePermission(id);
|
||||
result.success("删除成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500(e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除菜单
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
|
||||
public Result<SysPermission> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
Result<SysPermission> result = new Result<>();
|
||||
try {
|
||||
String[] arr = ids.split(",");
|
||||
for (String id : arr) {
|
||||
if (oConvertUtils.isNotEmpty(id)) {
|
||||
sysPermissionService.deletePermission(id);
|
||||
}
|
||||
}
|
||||
result.success("删除成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部的权限树
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryTreeList", method = RequestMethod.GET)
|
||||
public Result<Map<String, Object>> queryTreeList() {
|
||||
Result<Map<String, Object>> result = new Result<>();
|
||||
// 全部权限ids
|
||||
List<String> ids = new ArrayList<>();
|
||||
try {
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.orderByAsc(SysPermission::getSortNo);
|
||||
List<SysPermission> list = sysPermissionService.list(query);
|
||||
for (SysPermission sysPer : list) {
|
||||
ids.add(sysPer.getId());
|
||||
}
|
||||
List<TreeModel> treeList = new ArrayList<>();
|
||||
getTreeModelList(treeList, list, null);
|
||||
|
||||
Map<String, Object> resMap = new HashMap<String, Object>();
|
||||
resMap.put("treeList", treeList); // 全部树节点数据
|
||||
resMap.put("ids", ids);// 全部树ids
|
||||
result.setResult(resMap);
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步加载数据节点
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryListAsync", method = RequestMethod.GET)
|
||||
public Result<List<TreeModel>> queryAsync(@RequestParam(name = "pid", required = false) String parentId) {
|
||||
Result<List<TreeModel>> result = new Result<>();
|
||||
try {
|
||||
List<TreeModel> list = sysPermissionService.queryListByParentId(parentId);
|
||||
if (list == null || list.size() <= 0) {
|
||||
result.error500("未找到角色信息");
|
||||
} else {
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询角色授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:role:auth")
|
||||
@RequestMapping(value = "/queryRolePermission", method = RequestMethod.GET)
|
||||
public Result<List<String>> queryRolePermission(@RequestParam(name = "roleId", required = true) String roleId) {
|
||||
Result<List<String>> result = new Result<>();
|
||||
try {
|
||||
List<SysRolePermission> list = sysRolePermissionService.list(new QueryWrapper<SysRolePermission>().lambda().eq(SysRolePermission::getRoleId, roleId));
|
||||
result.setResult(list.stream().map(SysRolePermission -> String.valueOf(SysRolePermission.getPermissionId())).collect(Collectors.toList()));
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:role:auth")
|
||||
@RequestMapping(value = "/saveRolePermission", method = RequestMethod.POST)
|
||||
//@RequiresRoles({ "admin" })
|
||||
public Result<String> saveRolePermission(@RequestBody JSONObject json) {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<String> result = new Result<>();
|
||||
try {
|
||||
String roleId = json.getString("roleId");
|
||||
String permissionIds = json.getString("permissionIds");
|
||||
String lastPermissionIds = json.getString("lastpermissionIds");
|
||||
this.sysRolePermissionService.saveRolePermission(roleId, permissionIds, lastPermissionIds);
|
||||
result.success("保存成功!");
|
||||
log.info("======角色授权成功=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
} catch (Exception e) {
|
||||
result.error500("授权失败!");
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void getTreeList(List<SysPermissionTree> treeList, List<SysPermission> metaList, SysPermissionTree temp) {
|
||||
for (SysPermission permission : metaList) {
|
||||
String tempPid = permission.getParentId();
|
||||
SysPermissionTree tree = new SysPermissionTree(permission);
|
||||
if (temp == null && oConvertUtils.isEmpty(tempPid)) {
|
||||
treeList.add(tree);
|
||||
if (!tree.getIsLeaf()) {
|
||||
getTreeList(treeList, metaList, tree);
|
||||
}
|
||||
} else if (temp != null && tempPid != null && tempPid.equals(temp.getId())) {
|
||||
temp.getChildren().add(tree);
|
||||
if (!tree.getIsLeaf()) {
|
||||
getTreeList(treeList, metaList, tree);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void getTreeModelList(List<TreeModel> treeList, List<SysPermission> metaList, TreeModel temp) {
|
||||
for (SysPermission permission : metaList) {
|
||||
String tempPid = permission.getParentId();
|
||||
TreeModel tree = new TreeModel(permission);
|
||||
if (temp == null && oConvertUtils.isEmpty(tempPid)) {
|
||||
treeList.add(tree);
|
||||
if (!tree.getIsLeaf()) {
|
||||
getTreeModelList(treeList, metaList, tree);
|
||||
}
|
||||
} else if (temp != null && tempPid != null && tempPid.equals(temp.getKey())) {
|
||||
temp.getChildren().add(tree);
|
||||
if (!tree.getIsLeaf()) {
|
||||
getTreeModelList(treeList, metaList, tree);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限JSON数组
|
||||
* @param jsonArray
|
||||
* @param allList
|
||||
*/
|
||||
private void getAllAuthJsonArray(JSONArray jsonArray,List<SysPermission> allList) {
|
||||
JSONObject json = null;
|
||||
for (SysPermission permission : allList) {
|
||||
json = new JSONObject();
|
||||
json.put("action", permission.getPerms());
|
||||
json.put("status", permission.getStatus());
|
||||
//1显示2禁用
|
||||
json.put("type", permission.getPermsType());
|
||||
json.put("describe", permission.getName());
|
||||
jsonArray.add(json);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限JSON数组
|
||||
* @param jsonArray
|
||||
* @param metaList
|
||||
*/
|
||||
private void getAuthJsonArray(JSONArray jsonArray,List<SysPermission> metaList) {
|
||||
for (SysPermission permission : metaList) {
|
||||
if(permission.getMenuType()==null) {
|
||||
continue;
|
||||
}
|
||||
JSONObject json = null;
|
||||
if(permission.getMenuType().equals(CommonConstant.MENU_TYPE_2) &&CommonConstant.STATUS_1.equals(permission.getStatus())) {
|
||||
json = new JSONObject();
|
||||
json.put("action", permission.getPerms());
|
||||
json.put("type", permission.getPermsType());
|
||||
json.put("describe", permission.getName());
|
||||
jsonArray.add(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取菜单JSON数组
|
||||
* @param jsonArray
|
||||
* @param metaList
|
||||
* @param parentJson
|
||||
*/
|
||||
private void getPermissionJsonArray(JSONArray jsonArray, List<SysPermission> metaList, JSONObject parentJson,String cut) {
|
||||
for (SysPermission permission : metaList) {
|
||||
if (permission.getMenuType() == null) {
|
||||
continue;
|
||||
}
|
||||
String tempPid = permission.getParentId();
|
||||
JSONObject json = getPermissionJsonObject(permission,cut);
|
||||
if(json==null) {
|
||||
continue;
|
||||
}
|
||||
if (parentJson == null && oConvertUtils.isEmpty(tempPid)) {
|
||||
jsonArray.add(json);
|
||||
if (!permission.isLeaf()) {
|
||||
getPermissionJsonArray(jsonArray, metaList, json,cut);
|
||||
}
|
||||
} else if (parentJson != null && oConvertUtils.isNotEmpty(tempPid) && tempPid.equals(parentJson.getString("id"))) {
|
||||
// 类型( 0:一级菜单 1:子菜单 2:按钮 )
|
||||
if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) {
|
||||
JSONObject metaJson = parentJson.getJSONObject("meta");
|
||||
if (metaJson.containsKey("permissionList")) {
|
||||
metaJson.getJSONArray("permissionList").add(json);
|
||||
} else {
|
||||
JSONArray permissionList = new JSONArray();
|
||||
permissionList.add(json);
|
||||
metaJson.put("permissionList", permissionList);
|
||||
}
|
||||
// 类型( 0:一级菜单 1:子菜单 2:按钮 )
|
||||
} else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_1) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_0)) {
|
||||
if (parentJson.containsKey("children")) {
|
||||
parentJson.getJSONArray("children").add(json);
|
||||
} else {
|
||||
JSONArray children = new JSONArray();
|
||||
children.add(json);
|
||||
parentJson.put("children", children);
|
||||
}
|
||||
|
||||
if (!permission.isLeaf()) {
|
||||
getPermissionJsonArray(jsonArray, metaList, json,cut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据菜单配置生成路由json
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
private JSONObject getPermissionJsonObject(SysPermission permission,String cut) {
|
||||
JSONObject json = new JSONObject();
|
||||
// 类型(0:一级菜单 1:子菜单 2:按钮)
|
||||
if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) {
|
||||
//json.put("action", permission.getPerms());
|
||||
//json.put("type", permission.getPermsType());
|
||||
//json.put("describe", permission.getName());
|
||||
return null;
|
||||
} else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_0) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_1)) {
|
||||
json.put("id", permission.getId());
|
||||
if (permission.isRoute()) {
|
||||
json.put("route", "1");// 表示生成路由
|
||||
} else {
|
||||
json.put("route", "0");// 表示不生成路由
|
||||
}
|
||||
|
||||
if (isWWWHttpUrl(permission.getUrl())) {
|
||||
json.put("path", MD5Util.MD5Encode(permission.getUrl(), "utf-8"));
|
||||
} else {
|
||||
json.put("path", permission.getUrl());
|
||||
}
|
||||
|
||||
// 重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用)
|
||||
if (oConvertUtils.isNotEmpty(permission.getComponentName())) {
|
||||
json.put("name", permission.getComponentName());
|
||||
} else {
|
||||
json.put("name", urlToRouteName(permission.getUrl()));
|
||||
}
|
||||
|
||||
// 是否隐藏路由,默认都是显示的
|
||||
if (permission.isHidden()) {
|
||||
json.put("hidden", true);
|
||||
}
|
||||
// 聚合路由
|
||||
if (permission.isAlwaysShow()) {
|
||||
json.put("alwaysShow", true);
|
||||
}
|
||||
json.put("component", permission.getComponent());
|
||||
JSONObject meta = new JSONObject();
|
||||
// 由用户设置是否缓存页面 用布尔值
|
||||
if (permission.isKeepAlive()) {
|
||||
meta.put("keepAlive", true);
|
||||
} else {
|
||||
meta.put("keepAlive", false);
|
||||
}
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:往菜单信息里添加外链菜单打开方式 */
|
||||
//外链菜单打开方式
|
||||
if (permission.isInternalOrExternal()) {
|
||||
meta.put("internalOrExternal", true);
|
||||
} else {
|
||||
meta.put("internalOrExternal", false);
|
||||
}
|
||||
/* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/
|
||||
|
||||
if(CutEnum.EN.getValue().equals(cut)){
|
||||
meta.put("title", permission.getMenuEn());
|
||||
}else{
|
||||
meta.put("title", permission.getName());
|
||||
}
|
||||
|
||||
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
String component = permission.getComponent();
|
||||
if(oConvertUtils.isNotEmpty(permission.getComponentName()) || oConvertUtils.isNotEmpty(component)){
|
||||
meta.put("componentName", oConvertUtils.getString(permission.getComponentName(),component.substring(component.lastIndexOf("/")+1)));
|
||||
}
|
||||
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
|
||||
if (oConvertUtils.isEmpty(permission.getParentId())) {
|
||||
// 一级菜单跳转地址
|
||||
json.put("redirect", permission.getRedirect());
|
||||
if (oConvertUtils.isNotEmpty(permission.getIcon())) {
|
||||
meta.put("icon", permission.getIcon());
|
||||
}
|
||||
} else {
|
||||
if (oConvertUtils.isNotEmpty(permission.getIcon())) {
|
||||
meta.put("icon", permission.getIcon());
|
||||
}
|
||||
}
|
||||
if (isWWWHttpUrl(permission.getUrl())) {
|
||||
meta.put("url", permission.getUrl());
|
||||
}
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("currentUserId",currentUser.getId());
|
||||
|
||||
List<String> flowTypeList = new ArrayList<>();
|
||||
//项目法规任务
|
||||
if(StringUtils.equals(permission.getId(), SysPermissionEnum.PROJECT_REGULATION_TASKS.getId())){
|
||||
flowTypeList.add("1");
|
||||
flowTypeList.add("2");
|
||||
flowTypeList.add("3");
|
||||
flowTypeList.add("4");
|
||||
flowTypeList.add("10");
|
||||
flowTypeList.add("21");
|
||||
params.put("flowTypeList",flowTypeList);
|
||||
//存在待办任务标识,true为有
|
||||
boolean existTaskFlag = false;
|
||||
int result = todoCenterMapper.todoCenterTaskCount(params);
|
||||
if(result > 0){
|
||||
existTaskFlag = true;
|
||||
}
|
||||
//查询当前登录用户是否有项目法规任务
|
||||
meta.put("existTask",existTaskFlag);
|
||||
}
|
||||
//法规评估任务
|
||||
if(StringUtils.equals(permission.getId(), SysPermissionEnum.REGULATORY_ASSESSMENT_TASKS.getId())){
|
||||
flowTypeList.add("5");
|
||||
flowTypeList.add("6");
|
||||
params.put("flowTypeList",flowTypeList);
|
||||
int result = todoCenterMapper.todoCenterTaskCount(params);
|
||||
boolean existTaskFlag = false;
|
||||
if(result > 0){
|
||||
existTaskFlag = true;
|
||||
}
|
||||
meta.put("existTask",existTaskFlag);
|
||||
}
|
||||
//项目参数任务
|
||||
if(StringUtils.equals(permission.getId(), SysPermissionEnum.PROJECT_PARAMETER_TASKS.getId())){
|
||||
boolean existTaskFlag = false;
|
||||
existTaskFlag = sysPermissionService.judgeToDo();
|
||||
meta.put("existTask",existTaskFlag);
|
||||
}
|
||||
json.put("meta", meta);
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否外网URL 例如: http://localhost:8080/jero-boot/swagger-ui.html#/ 支持特殊格式: {{
|
||||
* window._CONFIG['domianURL'] }}/druid/ {{ JS代码片段 }},前台解析会自动执行JS代码片段
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isWWWHttpUrl(String url) {
|
||||
if (url != null && (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("{{"))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过URL生成路由name(去掉URL前缀斜杠,替换内容中的斜杠‘/’为-) 举例: URL = /isystem/role RouteName =
|
||||
* isystem-role
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String urlToRouteName(String url) {
|
||||
if (oConvertUtils.isNotEmpty(url)) {
|
||||
if (url.startsWith("/")) {
|
||||
url = url.substring(1);
|
||||
}
|
||||
url = url.replace("/", "-");
|
||||
|
||||
// 特殊标记
|
||||
url = url.replace(":", "@");
|
||||
return url;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据菜单id来获取其对应的权限数据
|
||||
*
|
||||
* @param sysPermissionDataRule
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getPermRuleListByPermId", method = RequestMethod.GET)
|
||||
public Result<List<SysPermissionDataRule>> getPermRuleListByPermId(SysPermissionDataRule sysPermissionDataRule) {
|
||||
List<SysPermissionDataRule> permRuleList = sysPermissionDataRuleService.getPermRuleListByPermId(sysPermissionDataRule.getPermissionId());
|
||||
Result<List<SysPermissionDataRule>> result = new Result<>();
|
||||
result.setSuccess(true);
|
||||
result.setResult(permRuleList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加菜单权限数据
|
||||
*
|
||||
* @param sysPermissionDataRule
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/addPermissionRule", method = RequestMethod.POST)
|
||||
public Result<SysPermissionDataRule> addPermissionRule(@RequestBody SysPermissionDataRule sysPermissionDataRule) {
|
||||
Result<SysPermissionDataRule> result = new Result<SysPermissionDataRule>();
|
||||
try {
|
||||
sysPermissionDataRule.setCreateTime(new Date());
|
||||
sysPermissionDataRuleService.savePermissionDataRule(sysPermissionDataRule);
|
||||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/editPermissionRule", method = { RequestMethod.PUT, RequestMethod.POST })
|
||||
public Result<SysPermissionDataRule> editPermissionRule(@RequestBody SysPermissionDataRule sysPermissionDataRule) {
|
||||
Result<SysPermissionDataRule> result = new Result<SysPermissionDataRule>();
|
||||
try {
|
||||
sysPermissionDataRuleService.saveOrUpdate(sysPermissionDataRule);
|
||||
result.success("更新成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单权限数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@RequiresRoles({ "admin" })
|
||||
@RequestMapping(value = "/deletePermissionRule", method = RequestMethod.DELETE)
|
||||
public Result<SysPermissionDataRule> deletePermissionRule(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<SysPermissionDataRule> result = new Result<SysPermissionDataRule>();
|
||||
try {
|
||||
sysPermissionDataRuleService.deletePermissionDataRule(id);
|
||||
result.success("删除成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单权限数据
|
||||
*
|
||||
* @param sysPermissionDataRule
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryPermissionRule", method = RequestMethod.GET)
|
||||
public Result<List<SysPermissionDataRule>> queryPermissionRule(SysPermissionDataRule sysPermissionDataRule) {
|
||||
Result<List<SysPermissionDataRule>> result = new Result<>();
|
||||
try {
|
||||
List<SysPermissionDataRule> permRuleList = sysPermissionDataRuleService.queryPermissionRule(sysPermissionDataRule);
|
||||
result.setResult(permRuleList);
|
||||
result.success("查询成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门权限表
|
||||
* @param departId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/queryDepartPermission", method = RequestMethod.GET)
|
||||
public Result<List<String>> queryDepartPermission(@RequestParam(name = "departId", required = true) String departId) {
|
||||
Result<List<String>> result = new Result<>();
|
||||
try {
|
||||
List<SysDepartPermission> list = sysDepartPermissionService.list(new QueryWrapper<SysDepartPermission>().lambda().eq(SysDepartPermission::getDepartId, departId));
|
||||
result.setResult(list.stream().map(SysDepartPermission -> String.valueOf(SysDepartPermission.getPermissionId())).collect(Collectors.toList()));
|
||||
result.setSuccess(true);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存部门授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/saveDepartPermission", method = RequestMethod.POST)
|
||||
//@RequiresRoles({ "admin" })
|
||||
public Result<String> saveDepartPermission(@RequestBody JSONObject json) {
|
||||
long start = System.currentTimeMillis();
|
||||
Result<String> result = new Result<>();
|
||||
try {
|
||||
String departId = json.getString("departId");
|
||||
String permissionIds = json.getString("permissionIds");
|
||||
String lastPermissionIds = json.getString("lastpermissionIds");
|
||||
this.sysDepartPermissionService.saveDepartPermission(departId, permissionIds, lastPermissionIds);
|
||||
result.success("保存成功!");
|
||||
log.info("======部门授权成功=====耗时:" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
} catch (Exception e) {
|
||||
result.error500("授权失败!");
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+5
@@ -87,6 +87,8 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
@@ -488,12 +490,15 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
contentEn = "1. New regulations: " + org.apache.commons.lang3.StringUtils.join(serialNumberAddList,",") + "\n"
|
||||
+"2. Remove regulations: " + org.apache.commons.lang3.StringUtils.join(serialNumberDeleteList,",");
|
||||
}
|
||||
contentCn = contentCn + "-请在PC端查看";
|
||||
contentEn = contentEn + "-Check on the PC";
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn + "\n" + contentCn);
|
||||
params.put("contentInfoFeiEn",contentLogFeishuTemp + "\n" + contentEn);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",href);
|
||||
params.put("back_url_phone",backUrlPhone);
|
||||
params.put("titleCn", TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
+49
-5
@@ -175,6 +175,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
@Autowired
|
||||
private IProjectUserDutyTerritoryService projectUserDutyTerritoryService;
|
||||
@@ -829,7 +831,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
ParamsConfigDataEO paramsConfigDataEO = this.getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = this.getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
String key = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
paramsConfigDataVO.put(key, paramsConfigDataVOList);
|
||||
paramsConfigDataVO.put("0+" + key, paramsConfigDataVOList);
|
||||
}
|
||||
configMap.put("controlType",controlType);
|
||||
configMap.put("paramsConfigData",paramsConfigDataVO);
|
||||
@@ -1635,6 +1637,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
paramsConfigDataEO.setId(oldConfigDataEOs.get(0).getId());
|
||||
}
|
||||
}
|
||||
paramsConfigDataEO.setId(configDataMap.getKey());
|
||||
|
||||
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
||||
@@ -1735,9 +1738,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
pcdRemoveWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdList);
|
||||
this.paramsConfigDataEOService.remove(pcdRemoveWrap);
|
||||
|
||||
newConfigDataEOList.forEach(newConfigDataEO -> {
|
||||
newConfigDataEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
});
|
||||
// newConfigDataEOList.forEach(newConfigDataEO -> {
|
||||
// newConfigDataEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
// });
|
||||
this.paramsConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
||||
}
|
||||
|
||||
@@ -1778,6 +1781,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
Integer orderNum = (Integer) paramsConfigDataVOList.get(0).get("orderNum");
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
||||
paramsConfigDataEO.setId(configDataMap.getKey());
|
||||
|
||||
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
||||
|
||||
@@ -2302,6 +2306,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
try {
|
||||
String contentInfoFeiCn = "您好," + currentUser.getUsername() + "退回了参数" + StringUtils.join(nioNumberList,",") + ",请及时处理。";
|
||||
String contentInfoFeiEn = "Hello! " + currentUser.getUsername() + " has returned the Parameter " + StringUtils.join(nioNumberList,",") + ". Please address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
@@ -2313,6 +2320,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_BACK.getValue(),params,null);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -2324,6 +2332,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String contentInfoFeiCn = "您好," + currentUser.getUsername() + "退回了参数" + StringUtils.join(nioNumberList,",") + ",请及时处理。";
|
||||
String contentInfoFeiEn = "Hello! " + currentUser.getUsername() + " has returned the Parameter " + StringUtils.join(nioNumberList,",") + ". Please address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
@@ -2335,6 +2345,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_BACK.getValue(),params,null);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -2410,6 +2421,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String contentInfoFeiCn = "您参与填写的参数 " + StringUtils.join(nioNumberList,",") + " 已被 " + currentUser.getUsername() + " 撤回。";
|
||||
String contentInfoFeiEn = "The parameter " + StringUtils.join(nioNumberList,",") + " you filled in have been withdrawn by " + currentUser.getUsername();
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// //飞书消息(模板-20230410)
|
||||
@@ -2424,6 +2437,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate","");
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_NO_DEADLINE.getValue(),params,null);
|
||||
|
||||
return updateBatchById(updateEOList);
|
||||
@@ -2651,6 +2665,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String contentInfoFeiCn = "您好," + currentUser.getUsername() + "向您分发了认证参数填写任务,请及时处理。";
|
||||
String contentInfoFeiEn = "Hello! " + currentUser.getUsername() + " has assigned the task of filling in Homo Parameter to you. Please address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
@@ -2663,6 +2679,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -2818,6 +2835,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String contentInfoFeiCn = "您好,请及时分配参数填写人。";
|
||||
String contentInfoFeiEn = "Hello! Please assign the task of filling in Homo Parameter in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
if(StringUtils.isNotBlank(paramsCollectManifestVO.getProjectId())){
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(paramsCollectManifestVO.getProjectId());
|
||||
if(ObjectUtils.isNotEmpty(projectLibraryBase)){
|
||||
@@ -2840,6 +2859,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
// params.put("back_url_cn",(String)hrefFeishuMap.get("hrefFeishu_cn"));
|
||||
// params.put("back_url_en",(String)hrefFeishuMap.get("hrefFeishu_en"));
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
@@ -3356,7 +3376,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
for (ParamsConfigDataEO configDataEO : configDataEOList) {
|
||||
ParamsReportConfigDataEO addReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||
BeanUtils.copyProperties(configDataEO, addReportConfigDataEO);
|
||||
addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
// addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
addReportConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId()));
|
||||
addReportConfigDataEO.setParamsCollectManifestId(reportDetailId);
|
||||
addReportConfigDataEOList.add(addReportConfigDataEO);
|
||||
@@ -6454,6 +6474,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
//
|
||||
String contentInfoFeiCn = "您参与填写的参数" + join + ",还有7天到期,请及时查看处理。";
|
||||
String contentInfoFeiEn = "The parameter " + join + " you filled in will expire in 7 days. Please check and address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
userIdList7 = userIdList7.stream().distinct().collect(Collectors.toList());
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
@@ -6467,6 +6490,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate",dueDate);
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,flag);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -6492,6 +6516,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
String contentInfoFeiCn = "您参与填写的参数" + join + ",还有3天到期,请及时查看处理。";
|
||||
String contentInfoFeiEn = "The parameter " + join + " you filled in will expire in 3 days. Please check and address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
userIdList3 = userIdList3.stream().distinct().collect(Collectors.toList());
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
@@ -6505,6 +6532,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate",dueDate);
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,flag);
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -6531,6 +6559,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
String contentInfoFeiCn = "您参与填写的参数" + join + ",将于今天到期,请及时查看处理。";
|
||||
String contentInfoFeiEn = "The parameter " + join + " you filled in will expire today. Please check and address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
userIdList0 = userIdList0.stream().distinct().collect(Collectors.toList());
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
@@ -6544,6 +6575,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate",dueDate);
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,flag);
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -6896,6 +6928,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String contentInfoFeiCn = "您参与填写的参数 " + StringUtils.join(nioNumberList,",") + " 已被 " + currentUser.getUsername() + " 撤回。";
|
||||
String contentInfoFeiEn = "The parameter " + StringUtils.join(nioNumberList,",") + " you filled in have been withdrawn by " + currentUser.getUsername();
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// //飞书消息(模板-20230410)
|
||||
@@ -6910,6 +6944,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate","");
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_NO_DEADLINE.getValue(),params,null);
|
||||
|
||||
|
||||
@@ -7006,6 +7041,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String cnContentUpper = "您参与填写的参数 " + nioNumbers + ",已被 " + currentUser.getUsername() + " 重新分发给 " + dre + " 请及时查看。";
|
||||
String enContentUpper = "The parameter " + nioNumbers + " you distributed have been re-assigned to " + currentUser.getUsername() + " by " + dre;
|
||||
|
||||
cnContentUpper = cnContentUpper + "-请在PC端查看";
|
||||
enContentUpper = enContentUpper + "-Check on the PC";
|
||||
// 消息内容
|
||||
SysUser sysUser = this.sysUserService.getUserByName(sdtUserName);
|
||||
String[] thirdIds = new String[1];
|
||||
@@ -7046,6 +7083,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
|
||||
@@ -7073,6 +7111,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String cnContentUpper = "您参与填写的参数 " + nioNumbers + " 已被 " + currentUser.getUsername() + " 撤回。";
|
||||
String enContentUpper = "The parameter " + nioNumbers + " you filled in have been withdrawn by " + currentUser.getUsername();
|
||||
|
||||
cnContentUpper = cnContentUpper + "-请在PC端查看";
|
||||
enContentUpper = enContentUpper + "-Check on the PC";
|
||||
// 消息内容
|
||||
SysUser sysUser = sysUserService.getUserByName(dreUpdateFront);
|
||||
String[] thirdIds = new String[1];
|
||||
@@ -7109,6 +7149,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
|
||||
@@ -7153,6 +7194,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String contentInfoFeiCn = "您好," + currentUser.getUsername() + "向您分发了认证参数填写任务,请及时处理。";
|
||||
String contentInfoFeiEn = "Hello! " + currentUser.getUsername() + " has assigned the task of filling in Homo Parameter to you. Please address it in a timely manner.";
|
||||
|
||||
contentInfoFeiCn = contentInfoFeiCn + "-请在PC端查看";
|
||||
contentInfoFeiEn = contentInfoFeiEn + "-Check on the PC";
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
@@ -7165,6 +7208,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
|
||||
+4
-4
@@ -241,10 +241,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
|
||||
target.setVersion(1); // 设置参数项初始版本为 1
|
||||
|
||||
if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
|
||||
target.setSdt("song.gao2.o");
|
||||
target.setDre("song.gao2.o");
|
||||
}
|
||||
// if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
|
||||
//// target.setSdt("song.gao2.o");
|
||||
//// target.setDre("song.gao2.o");
|
||||
// }
|
||||
paramsCollectManifestEOList.add(target);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -2042,6 +2042,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
|
||||
paramsReportConfigDataEO.setId(configDataId);
|
||||
|
||||
newConfigDataEOList.add(paramsReportConfigDataEO);
|
||||
}
|
||||
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package com.jero.modules.collection.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.controller.BussDocumentLibraryEOController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="我的收藏")
|
||||
@RestController
|
||||
@RequestMapping("/phone/collection/onlCgformCollection")
|
||||
@Slf4j
|
||||
public class PhoneOnlCgformCollectionController extends JeroController<OnlCgformCollection, IOnlCgformCollectionService> {
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
BussDocumentLibraryEOController bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-分页列表查询")
|
||||
@ApiOperation(value="我的收藏-分页列表查询", notes="我的收藏-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params){
|
||||
IPage<OnlCgformCollection> pageList = onlCgformCollectionService.queryPageList(params);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-列表查询")
|
||||
@ApiOperation(value="我的收藏-列表查询", notes="我的收藏-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformCollection>> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
List<OnlCgformCollection> list = onlCgformCollectionService.queryList(onlCgformCollection);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformCollection
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-添加")
|
||||
@ApiOperation(value="我的收藏-添加", notes="我的收藏-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformCollection onlCgformCollection) {
|
||||
LambdaQueryWrapper<OnlCgformCollection> lambdaQueryWrapper= new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(OnlCgformCollection::getId,onlCgformCollection.getDocumentId())
|
||||
.eq(OnlCgformCollection::getDocumentId,onlCgformCollection.getDocumentId());
|
||||
int count=onlCgformCollectionService.count(lambdaQueryWrapper);
|
||||
if(count==0){
|
||||
onlCgformCollectionService.add(onlCgformCollection);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
else{
|
||||
return Result.error("该值不可重复添加,系统中已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-通过id删除")
|
||||
@ApiOperation(value="我的收藏-通过id删除", notes="我的收藏-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformCollectionService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-批量删除")
|
||||
@ApiOperation(value="我的收藏-批量删除", notes="我的收藏-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformCollectionService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-通过id查询")
|
||||
@ApiOperation(value="我的收藏-通过id查询", notes="我的收藏-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
OnlCgformCollection onlCgformCollection = onlCgformCollectionService.queryById(id);
|
||||
if(onlCgformCollection==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-表头中英文切换")
|
||||
@ApiOperation(value="我的收藏-表头中英文切换", notes="我的收藏-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformCollectionService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-查询条件中英文切换")
|
||||
@ApiOperation(value="我的收藏-查询条件中英文切换", notes="我的收藏-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformCollectionService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
+526
@@ -0,0 +1,526 @@
|
||||
package com.jero.modules.document.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.entity.OSSFileForDocumentLibrary;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档库信息表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/document/bussDocumentLibraryEO")
|
||||
@Slf4j
|
||||
public class PhoneBussDocumentLibraryEOController extends JeroController<BussDocumentLibraryEO, IBussDocumentLibraryEOService> {
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "分页查询")
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@PostMapping(value = "/queryPageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getInfoPage(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代替标准分页列表查询
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "代替标准分页列表查询")
|
||||
@ApiOperation(value="代替标准分页列表查询", notes="代替标准分页列表查询")
|
||||
@PostMapping(value = "/replacePageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<?> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
||||
// Result<IPage> ok = Result.OK(infoPage);
|
||||
// JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "ocr识别调取已入库文件分页")
|
||||
@ApiOperation(value="ocr识别调取已入库文件", notes="ocr识别调取已入库文件")
|
||||
@PostMapping(value = "/ocrPageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:ocrPageInfo")
|
||||
public Result<?> ocrPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文档翻译调取已入库文件
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译调取已入库文件")
|
||||
@ApiOperation(value="文档翻译调取已入库文件", notes="文档翻译调取已入库文件")
|
||||
@PostMapping(value = "/transPageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("documentTranslation:retrieval")
|
||||
public Result<?> transPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表查询")
|
||||
@ApiOperation(value="文档库信息表-列表查询", notes="文档库信息表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<BussDocumentLibraryEO>> queryList() {
|
||||
List<BussDocumentLibraryEO> list = bussDocumentLibraryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-通过id删除")
|
||||
@ApiOperation(value="文档库信息表-通过id删除", notes="文档库信息表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@RequiresPermissions("document:deleteBatch")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
bussDocumentLibraryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-批量删除")
|
||||
@ApiOperation(value="文档库信息表-批量删除", notes="文档库信息表-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
@RequiresPermissions("document:deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,String cut) {
|
||||
this.bussDocumentLibraryEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-通过id查询")
|
||||
@ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
@RequiresPermissions("document:queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
||||
if(bussDocumentLibraryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(bussDocumentLibraryEO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属性
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryCondition(flag,cut,null);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
@GetMapping(value = "/getHeader")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag,cut,null);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增表单
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-新增表单")
|
||||
@ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
||||
@GetMapping(value = "/getAddForm")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getAddForm(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="type",required=true) String type) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getAddForm(flag,cut,type);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-ocr表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-ocr表头和查询条件", notes="文档库信息表-ocr表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForOcr")
|
||||
@RequiresPermissions("document:ocrPageInfo")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForOcr(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForOcr(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForSplitFile")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:splitFile")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitFile(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForSplitResult")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:splitResult")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitResult(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "编辑数据查询")
|
||||
@ApiOperation(value="编辑数据查询", notes="编辑数据查询")
|
||||
@GetMapping(value = "/getDocumentInfoById")
|
||||
@RequiresPermissions("document:updateInfo")
|
||||
public Result<List<Map<String,Object>>> getDocumentInfoById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getDocumentInfoById(id,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 详情数据查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "详情数据查询")
|
||||
@ApiOperation(value="详情数据查询", notes="详情数据查询")
|
||||
@GetMapping(value = "/getInfoById")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getInfoById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getInfoById(id,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value="详情目录查询", notes="详情目录查询")
|
||||
@GetMapping(value = "/getMenuList")
|
||||
public Result<List<Map<String,Object>>> getMenuList(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getMenuList(id,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "新增数据")
|
||||
@ApiOperation(value="新增数据", notes="新增数据")
|
||||
@PostMapping(value = "/addInfo")
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<?> getInfoById(@RequestBody Map<String,Object> map) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.addInfo(map);
|
||||
} catch (Exception e) {
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("新增成功");
|
||||
}
|
||||
/**
|
||||
* 编辑数据
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "编辑数据")
|
||||
@ApiOperation(value="编辑数据", notes="编辑数据")
|
||||
@PostMapping(value = "/updateInfo")
|
||||
@RequiresPermissions("document:updateInfo")
|
||||
public Result<?> updateInfo(@RequestBody Map<String,Object> map) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.updateInfo(map);
|
||||
} catch (Exception e) {
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("编辑成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加收藏
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "添加收藏")
|
||||
@ApiOperation(value="添加收藏", notes="添加收藏")
|
||||
@GetMapping(value = "/addCollect")
|
||||
@RequiresPermissions("document:addCollect")
|
||||
public Result<?> addCollect(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.addCollect(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("收藏失败");
|
||||
}
|
||||
return Result.OK("收藏成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "取消收藏")
|
||||
@ApiOperation(value="取消收藏", notes="取消收藏")
|
||||
@GetMapping(value = "/cancelCollect")
|
||||
@RequiresPermissions("document:addCollect")
|
||||
public Result<?> cancelCollect(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.cancelCollect(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("取消收藏失败");
|
||||
}
|
||||
return Result.OK("取消收藏成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加订阅
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "添加订阅")
|
||||
@ApiOperation(value="添加订阅", notes="添加订阅")
|
||||
@GetMapping(value = "/addSubscribe")
|
||||
@RequiresPermissions("document:addSubscribe")
|
||||
public Result<?> addSubscribe(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.addSubscribe(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("订阅失败");
|
||||
}
|
||||
return Result.OK("订阅成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消订阅
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "取消订阅")
|
||||
@ApiOperation(value="取消订阅", notes="取消订阅")
|
||||
@GetMapping(value = "/cancelSubscribe")
|
||||
@RequiresPermissions("document:addSubscribe")
|
||||
public Result<?> cancelSubscribe(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.cancelSubscribe(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("取消订阅失败");
|
||||
}
|
||||
return Result.OK("取消订阅成功");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导出excel")
|
||||
@GetMapping(value = "/exportExcel")
|
||||
@RequiresPermissions("document:exportExcel")
|
||||
public void exportExcel(@RequestParam Map<String,Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request){
|
||||
bussDocumentLibraryEOService.exportExcel(map,response,request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "带文件导出")
|
||||
@GetMapping(value = "/exportZip")
|
||||
@RequiresPermissions("document:exportZip")
|
||||
public void exportZip(@RequestParam Map<String,Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
bussDocumentLibraryEOService.exportZip(map,response,request);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
@RequiresPermissions("document:exportTemplate")
|
||||
public void exportTemplate(@RequestParam Map<String,Object> map, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
bussDocumentLibraryEOService.exportTemplate(map,response,request);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导入.zip")
|
||||
@PostMapping(value = "/importZip")
|
||||
@RequiresPermissions("document:importZip")
|
||||
public Result<?> importZip(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
@RequestParam(value = "cut",required = false) String cut) throws Exception {
|
||||
try {
|
||||
bussDocumentLibraryEOService.importZip(file,cut);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("导入成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/pullMessage")
|
||||
@RequiresPermissions("document:pullMessage")
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds) {
|
||||
|
||||
bussDocumentLibraryEOService.pullMessage(departIds,userIds,documentIds);
|
||||
|
||||
return Result.OK("推送成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证文档是否被其他的文档绑定
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "验证文档是否被其他的文档绑定")
|
||||
@ApiOperation(value="验证文档是否被其他的文档绑定", notes="验证文档是否被其他的文档绑定")
|
||||
@GetMapping(value = "/verifyBind")
|
||||
public Result<?> verifyBind(@RequestParam(name="ids",required=true) String ids) {
|
||||
String msg = bussDocumentLibraryEOService.verifyBind(Arrays.asList(ids.split(",")));
|
||||
return Result.OK(msg);
|
||||
}
|
||||
|
||||
@AutoLog(value = "虚拟中心添加调用文档库数据--分页")
|
||||
@ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageInfoDummy")
|
||||
public Result<?> queryPageInfoDummy(@RequestBody BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
|
||||
Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(bussDocumentLibraryEO.getPageNo(), bussDocumentLibraryEO.getPageSize());
|
||||
IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.queryPageInfoDummy(page, queryWrapper,bussDocumentLibraryEO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageDummy")
|
||||
@ResponseBody
|
||||
public JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看已上传的文件
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
@GetMapping(value = "/getFileInfos")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<?> getFileInfos(String id) {
|
||||
List<OSSFileForDocumentLibrary> fileInfos = bussDocumentLibraryEOService.getFileInfos(id);
|
||||
return Result.OK(fileInfos);
|
||||
}
|
||||
/**
|
||||
* 根据id查询编号和标题
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
@GetMapping(value = "/getTitle")
|
||||
public Result<?> getTitle(String id,String cut) {
|
||||
String title = bussDocumentLibraryEOService.getTitle(id, cut);
|
||||
return Result.OK(title);
|
||||
}
|
||||
@ApiOperation(value="编辑ES数据(添加module_type_flag)", notes="编辑ES数据(添加module_type_flag)")
|
||||
@GetMapping(value = "/updateES")
|
||||
public Result<?> getTitle() {
|
||||
int count = bussDocumentLibraryEOService.updateES();
|
||||
return Result.OK(count);
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package com.jero.modules.document.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档库-分阶段实施详情表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/document/phasedImplementationDetailsEO")
|
||||
@Slf4j
|
||||
public class PhonePhasedImplementationDetailsEOController extends JeroController<PhasedImplementationDetailsEO, IPhasedImplementationDetailsEOService> {
|
||||
@Autowired
|
||||
private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-分页列表查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-分页列表查询", notes="文档库-分阶段实施详情表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(PhasedImplementationDetailsEO phasedImplementationDetailsEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PhasedImplementationDetailsEO> queryWrapper = QueryGenerator.initQueryWrapper(phasedImplementationDetailsEO, req.getParameterMap());
|
||||
Page<PhasedImplementationDetailsEO> page = new Page<PhasedImplementationDetailsEO>(pageNo, pageSize);
|
||||
IPage<PhasedImplementationDetailsEO> pageList = phasedImplementationDetailsEOService.page(page, queryWrapper);
|
||||
this.phasedImplementationDetailsEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-列表查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-列表查询", notes="文档库-分阶段实施详情表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PhasedImplementationDetailsEO>> queryList() {
|
||||
List<PhasedImplementationDetailsEO> list = phasedImplementationDetailsEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-添加")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-添加", notes="文档库-分阶段实施详情表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
phasedImplementationDetailsEOService.add(phasedImplementationDetailsEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-编辑")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-编辑", notes="文档库-分阶段实施详情表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
phasedImplementationDetailsEOService.editById(phasedImplementationDetailsEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-通过id删除")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-通过id删除", notes="文档库-分阶段实施详情表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
phasedImplementationDetailsEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-批量删除")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-批量删除", notes="文档库-分阶段实施详情表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.phasedImplementationDetailsEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-通过id查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-通过id查询", notes="文档库-分阶段实施详情表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
PhasedImplementationDetailsEO phasedImplementationDetailsEO = phasedImplementationDetailsEOService.queryById(id);
|
||||
if(phasedImplementationDetailsEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(phasedImplementationDetailsEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param phasedImplementationDetailsEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
return super.exportXls(request, phasedImplementationDetailsEO, PhasedImplementationDetailsEO.class, "文档库-分阶段实施详情表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, PhasedImplementationDetailsEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -4,8 +4,8 @@ package com.jero.modules.document.enums;
|
||||
* 实施类型枚举类
|
||||
*/
|
||||
public enum ImplementationTypeEnum {
|
||||
CAR_IN_PRODUCTION("1628228171473039361","在产车","Car in production","34e90bd6a000471bbdcd0ff325898740"),
|
||||
NEW_CAR_MODEL("1628228101830815745","新车型","New car model","2148610ff06641849106321531656bfc");
|
||||
CAR_IN_PRODUCTION("1628228171473039361","在产车","New Vehicle","34e90bd6a000471bbdcd0ff325898740"),
|
||||
NEW_CAR_MODEL("1628228101830815745","新车型","New Type","2148610ff06641849106321531656bfc");
|
||||
|
||||
String id;
|
||||
String nameCn;
|
||||
|
||||
+13
-1
@@ -207,6 +207,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
public static final String SEARCH_FLAG = "魑";
|
||||
|
||||
|
||||
@@ -2375,6 +2377,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
params.put("contentInfoFeiEn",contentInfoFeiShu);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",hrefTemp);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneDocumentDetails?id=" + idTemp);
|
||||
params.put("titleCn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
@@ -3662,6 +3665,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
params.put("contentInfoFeiEn",contentInfoFei);
|
||||
params.put("userIdList",userList);
|
||||
params.put("back_url",url);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneDocumentDetails?id=" + id);
|
||||
params.put("titleCn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
@@ -3778,6 +3782,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
params.put("contentInfoFeiEn",contentInfoFei);
|
||||
params.put("userIdList",userIdListUpdate);
|
||||
params.put("back_url",url);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneDocumentDetails?id=" + id);
|
||||
params.put("titleCn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
@@ -5630,6 +5635,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
||||
List<String> serialNumberList = new ArrayList<>();
|
||||
List<String> urlList = new ArrayList<>();
|
||||
List<String> urlPhonelList = new ArrayList<>();
|
||||
List<String> hrefList = new ArrayList<>();
|
||||
for (Map<String, Object> map : mapList) {
|
||||
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
@@ -5637,11 +5643,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
"&title=" + map.get("title") +
|
||||
"&serial_number=" + map.get("serial_number");
|
||||
|
||||
|
||||
String href = "<a href='/docManage/library/detail?id=" + map.get("id") +
|
||||
"&title=" + map.get("title") +
|
||||
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
|
||||
String urlPhone = backUrlPhone + "/phoneDocumentDetails?id=" + map.get("id");
|
||||
urlList.add(url);
|
||||
hrefList.add(href);
|
||||
urlPhonelList.add(urlPhone);
|
||||
}
|
||||
|
||||
|
||||
@@ -5671,7 +5681,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
try {
|
||||
for (String s : urlList) {
|
||||
for (int i = 0; i < urlList.size()-1; i++) {
|
||||
String s = urlList.get(i);
|
||||
String encode = UriEncoder.encode(s);
|
||||
List<String> list = new ArrayList<>();
|
||||
mapList.stream().forEach(e->{
|
||||
@@ -5695,6 +5706,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
params.put("contentInfoFeiEn",contentTemp);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",encode);
|
||||
params.put("back_url_phone",urlPhonelList.get(i));
|
||||
params.put("titleCn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
+5
@@ -94,6 +94,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
@Autowired
|
||||
@@ -574,12 +576,15 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentEn = "1. New regulations: " + StringUtils.join(serialNumberAddList,",") + "\n"
|
||||
+"2. Remove regulations: " + StringUtils.join(serialNumberDeleteList,",");
|
||||
}
|
||||
contentCn = contentCn + "-请在PC端查看";
|
||||
contentEn = contentEn + "-Check on the PC";
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn + "\n" + contentCn);
|
||||
params.put("contentInfoFeiEn",contentLogFeishuTemp + "\n" + contentEn);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",href);
|
||||
params.put("back_url_phone",backUrlPhone);
|
||||
params.put("titleCn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
+11
-3
@@ -1425,7 +1425,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
paramsMap.put("user_ids", userIdArr);
|
||||
paramsMap.put("msg_type", "interactive");
|
||||
paramsMap.put("card", templateJson);
|
||||
|
||||
log.error("请求飞书消息:" + paramsMap.toJSONString());
|
||||
// 发送请求给飞书
|
||||
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
|
||||
// 获取返回结果
|
||||
@@ -1445,6 +1445,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
String contentCn = (String) params.get("contentInfoFeiCn");
|
||||
String contentEn = (String) params.get("contentInfoFeiEn");
|
||||
String back_url = (String) params.get("back_url");
|
||||
String back_url_phone = (String) params.get("back_url_phone");
|
||||
String titleCn = (String) params.get("titleCn");
|
||||
String titleEn = (String) params.get("titleEn");
|
||||
try {
|
||||
@@ -1460,6 +1461,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
templateVariableMap.put("contentInfoFeiEn",contentEn);
|
||||
templateVariableMap.put("view_url_cn",back_url);
|
||||
templateVariableMap.put("view_url_en",back_url);
|
||||
templateVariableMap.put("view_url_Phone",back_url_phone);
|
||||
templateVariableMap.put("titleCn",titleCn);
|
||||
templateVariableMap.put("titleEn",titleEn);
|
||||
|
||||
@@ -1487,6 +1489,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
String contentCn = (String) params.get("contentInfoFeiCn");
|
||||
String contentEn = (String) params.get("contentInfoFeiEn");
|
||||
String back_url = (String) params.get("back_url");
|
||||
String back_url_phone = (String) params.get("back_url_phone");
|
||||
String titleCn = (String) params.get("titleCn");
|
||||
String titleEn = (String) params.get("titleEn");
|
||||
String regulationNo = (String) params.get("regulationNo");
|
||||
@@ -1505,6 +1508,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
templateVariableMap.put("contentInfoFeiEn",contentEn);
|
||||
templateVariableMap.put("view_url_cn",back_url);
|
||||
templateVariableMap.put("view_url_en",back_url);
|
||||
templateVariableMap.put("back_url_phone",back_url_phone);
|
||||
templateVariableMap.put("titleCn",titleCn);
|
||||
templateVariableMap.put("titleEn",titleEn);
|
||||
templateVariableMap.put("regulationNo",regulationNo);
|
||||
@@ -1535,6 +1539,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
String contentCn = (String) params.get("contentInfoFeiCn");
|
||||
String contentEn = (String) params.get("contentInfoFeiEn");
|
||||
String back_url = (String) params.get("back_url");
|
||||
String back_url_Phone = (String) params.get("back_url_Phone");
|
||||
String titleCn = (String) params.get("titleCn");
|
||||
String titleEn = (String) params.get("titleEn");
|
||||
String regulationNo = (String) params.get("regulationNo");
|
||||
@@ -1555,7 +1560,8 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
templateVariableMap.put("contentInfoFeiCn",contentCn);
|
||||
templateVariableMap.put("contentInfoFeiEn",contentEn);
|
||||
templateVariableMap.put("view_url_cn",back_url);
|
||||
templateVariableMap.put("view_url_en",back_url);
|
||||
templateVariableMap.put("view_url_en",back_url);;
|
||||
templateVariableMap.put("back_url_Phone",back_url_Phone);
|
||||
templateVariableMap.put("titleCn",titleCn);
|
||||
templateVariableMap.put("titleEn",titleEn);
|
||||
templateVariableMap.put("regulationNo",regulationNo);
|
||||
@@ -1590,6 +1596,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
String contentEn = (String) params.get("contentInfoFeiEn");
|
||||
String back_url_cn = (String) params.get("back_url_cn");
|
||||
String back_url_en = (String) params.get("back_url_en");
|
||||
String back_url_Phone = (String) params.get("back_url_phone");
|
||||
String projectCn = (String) params.get("projectCn");
|
||||
String projectEn = (String) params.get("projectEn");
|
||||
String initiatorCn = (String) params.get("initiatorCn");
|
||||
@@ -1608,13 +1615,14 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
templateVariableMap.put("contentInfoFeiEn",contentEn);
|
||||
templateVariableMap.put("view_url_cn",back_url_cn);
|
||||
templateVariableMap.put("view_url_en",back_url_en);
|
||||
templateVariableMap.put("back_url_Phone",back_url_Phone);
|
||||
templateVariableMap.put("projectCn"," " + projectCn);
|
||||
templateVariableMap.put("projectEn"," " + projectEn);
|
||||
templateVariableMap.put("initiatorCn"," " + initiatorCn);
|
||||
if(StringUtils.isNotBlank(flag)){
|
||||
templateVariableMap.put("initiatorEn"," " + initiatorEn);
|
||||
}else{
|
||||
templateVariableMap.put("initiatorEn"," " + initiatorCn);
|
||||
templateVariableMap.put("initiatorCn"," " + initiatorCn);
|
||||
}
|
||||
templateVariableMap.put("dueDate"," " + dueDate);
|
||||
|
||||
|
||||
+4
@@ -84,6 +84,9 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
@Autowired
|
||||
private ILawsOpinionAssessmentResultEOService lawsOpinionAssessmentResultEOService;
|
||||
@Autowired
|
||||
@@ -462,6 +465,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
params.put("contentInfoFeiEn",enContentUpper);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",hrefFeishu);
|
||||
params.put("back_url_Phone",backUrlPhone);
|
||||
params.put("titleCn"," "+lawsOpinionGatherEO.getTitle());
|
||||
params.put("titleEn"," "+bussDocumentLibraryEO.getTitleEn());
|
||||
params.put("regulationNo"," "+lawsOpinionGatherEO.getSerialNumber());
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
*/
|
||||
public enum ComplianceResultEnum {
|
||||
CONFORMITY("符合","Compliance","Compliance"),
|
||||
INCONFORMITY("不符合","Non-Compliance","Non-Compliance"),
|
||||
INCONFORMITY("不符合","Non-compliance","Non-Compliance"),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+3
@@ -100,6 +100,8 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
private ISysUserService sysUserService;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService;
|
||||
@Autowired
|
||||
@@ -977,6 +979,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
params.put("contentInfoFeiEn",enContentUpper);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",hrefFeishu);
|
||||
params.put("back_url_Phone",backUrlPhone);
|
||||
params.put("titleCn"," "+lawsTechnologyEvaluationEO.getTitle());
|
||||
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO)){
|
||||
params.put("titleEn"," "+bussDocumentLibraryEO.getTitleEn());
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
*/
|
||||
@Api(tags="最近浏览表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/recentBrowse")
|
||||
@RequestMapping("/phone/phone/recentBrowse")
|
||||
@Slf4j
|
||||
public class RecentBrowseController extends JeroController<RecentBrowse, IRecentBrowseService> {
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/search")
|
||||
@RequestMapping("/phone/phone/search")
|
||||
public class SearchCenterController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-任务统计")
|
||||
@RestController
|
||||
@RequestMapping("/phone/taskStatistics")
|
||||
@RequestMapping("/phone/phone/taskStatistics")
|
||||
public class TaskStatisticsController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-待办中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/toDoCenter")
|
||||
@RequestMapping("/phone/phone/toDoCenter")
|
||||
public class ToDoCenterController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import com.jero.modules.system.util.StringUtils;
|
||||
*/
|
||||
public enum BrowseTypeEnum {
|
||||
WDK("Document Library", "文档库", "Document Library"),
|
||||
ZSFX("Knowledge sharing", "知识分享", "Knowledge sharing"),
|
||||
ZSFX("Knowledge sharing", "知识分享", "Knowledge Sharing"),
|
||||
FGYB("Regulatory Monthly Report", "法规月报", "Regulatory Monthly Report"),
|
||||
;
|
||||
|
||||
|
||||
+16
-1
@@ -123,7 +123,7 @@ public class ToDoCenterServiceImpl implements IToDoCenterService {
|
||||
List<ProcessInfoVO> datas = result.getRecords();
|
||||
|
||||
this.disposeData(cut, datas);
|
||||
|
||||
Collections.sort(datas, Comparator.comparing(ProcessInfoVO::getEndTime));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -148,6 +148,21 @@ public class ToDoCenterServiceImpl implements IToDoCenterService {
|
||||
|
||||
// 判断当前用户在这个认证流程中 有几个任务。 责任人 接受、责任人 提交交付物、认证工程审批
|
||||
if (CollectionUtils.isNotEmpty(pidEos)) {
|
||||
|
||||
List<ProcessInfoDetailEO> rzgcsjsPidEos = pidEos.stream().filter(pidEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSJSRW.getKey())
|
||||
|| StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJJRW.getKey())
|
||||
);
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(rzgcsjsPidEos)) {
|
||||
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
|
||||
BeanUtils.copyProperties(data, processInfoVOTemp);
|
||||
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.CHECKLIST_VERIFICATION.getKey());
|
||||
datasTemp.add(processInfoVOTemp);
|
||||
}
|
||||
|
||||
List<ProcessInfoDetailEO> zrrjsrwPidEos = pidEos.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseBrowsingHistoryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库浏览历史表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseBrowsingHistoryEOController extends JeroController<ProblemKnowledgeBaseBrowsingHistoryEO, IProblemKnowledgeBaseBrowsingHistoryEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseBrowsingHistoryEOService problemKnowledgeBaseBrowsingHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-分页列表查询", notes="问题知识库浏览历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseBrowsingHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseBrowsingHistoryEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseBrowsingHistoryEO> page = new Page<ProblemKnowledgeBaseBrowsingHistoryEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseBrowsingHistoryEO> pageList = problemKnowledgeBaseBrowsingHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-列表查询", notes="问题知识库浏览历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseBrowsingHistoryEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseBrowsingHistoryEO> list = problemKnowledgeBaseBrowsingHistoryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-添加")
|
||||
@ApiOperation(value="问题知识库浏览历史表-添加", notes="问题知识库浏览历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.add(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-编辑")
|
||||
@ApiOperation(value="问题知识库浏览历史表-编辑", notes="问题知识库浏览历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.editById(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id删除", notes="问题知识库浏览历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-批量删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-批量删除", notes="问题知识库浏览历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseBrowsingHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id查询", notes="问题知识库浏览历史表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO = problemKnowledgeBaseBrowsingHistoryEOService.queryById(id);
|
||||
if(problemKnowledgeBaseBrowsingHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseBrowsingHistoryEO, ProblemKnowledgeBaseBrowsingHistoryEO.class, "问题知识库浏览历史表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseBrowsingHistoryEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库收藏表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseCollectEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseCollectEOController extends JeroController<ProblemKnowledgeBaseCollectEO, IProblemKnowledgeBaseCollectEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCollectEOService problemKnowledgeBaseCollectEOService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-分页列表查询", notes="问题知识库收藏表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCollectEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseCollectEO> page = new Page<ProblemKnowledgeBaseCollectEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCollectEO> pageList = problemKnowledgeBaseCollectEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-列表查询", notes="问题知识库收藏表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCollectEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseCollectEO> list = problemKnowledgeBaseCollectEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-添加")
|
||||
@ApiOperation(value="问题知识库收藏表-添加", notes="问题知识库收藏表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.add(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-编辑")
|
||||
@ApiOperation(value="问题知识库收藏表-编辑", notes="问题知识库收藏表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.editById(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id删除")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id删除", notes="问题知识库收藏表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCollectEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-批量删除")
|
||||
@ApiOperation(value="问题知识库收藏表-批量删除", notes="问题知识库收藏表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCollectEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id查询")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id查询", notes="问题知识库收藏表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO = problemKnowledgeBaseCollectEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCollectEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCollectEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCollectEO, ProblemKnowledgeBaseCollectEO.class, "问题知识库收藏表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCollectEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的收藏-分页列表查询-问题知识库")
|
||||
@ApiOperation(value="我的收藏-分页列表查询-问题知识库", notes="我的收藏-分页列表查询-问题知识库")
|
||||
@GetMapping(value = "/queryCollectPageList")
|
||||
public Result<?> queryCollectPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> collectEOQueryWrapper = new QueryWrapper<>();
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectUserId,currentUser.getId());
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectStatus, CollectStatusEnum.COLLECT.getValue());
|
||||
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(collectEOList)){
|
||||
List<String> problemKnowledgeBaseIdList = collectEOList.stream().map(ProblemKnowledgeBaseCollectEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
|
||||
queryWrapper.lambda().in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = this.problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
this.problemKnowledgeBaseEOService.disposeData(pageList.getRecords(),problemKnowledgeBaseEO.getCut());
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.vo.ProblemKnowledgeBaseCommentVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库评论表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseCommentEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseCommentEOController extends JeroController<ProblemKnowledgeBaseCommentEO, IProblemKnowledgeBaseCommentEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCommentEOService problemKnowledgeBaseCommentEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-分页列表查询", notes="问题知识库评论表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCommentEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseCommentEO> page = new Page<ProblemKnowledgeBaseCommentEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCommentEO> pageList = problemKnowledgeBaseCommentEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-列表查询", notes="问题知识库评论表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCommentVO>> queryList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO, HttpServletRequest req) {
|
||||
List<ProblemKnowledgeBaseCommentVO> list = this.problemKnowledgeBaseCommentEOService.getInfoList(problemKnowledgeBaseCommentEO,req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-添加")
|
||||
@ApiOperation(value="问题知识库评论表-添加", notes="问题知识库评论表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.add(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-编辑")
|
||||
@ApiOperation(value="问题知识库评论表-编辑", notes="问题知识库评论表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.editById(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id删除")
|
||||
@ApiOperation(value="问题知识库评论表-通过id删除", notes="问题知识库评论表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCommentEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-批量删除")
|
||||
@ApiOperation(value="问题知识库评论表-批量删除", notes="问题知识库评论表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCommentEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id查询")
|
||||
@ApiOperation(value="问题知识库评论表-通过id查询", notes="问题知识库评论表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO = problemKnowledgeBaseCommentEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCommentEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCommentEO, ProblemKnowledgeBaseCommentEO.class, "问题知识库评论表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCommentEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseEOController extends JeroController<ProblemKnowledgeBaseEO, IProblemKnowledgeBaseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库表-分页列表查询", notes="问题知识库表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
//如果当前登录人是超级管理员角色,进入到管理发布页面时,查询所有的数据,其它用户只能查询自己创建的数据。
|
||||
if(administrator){
|
||||
problemKnowledgeBaseEO.setCreateBy(null);
|
||||
}
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
this.problemKnowledgeBaseEOService.disposeData(pageList.getRecords(),problemKnowledgeBaseEO.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-列表查询")
|
||||
@ApiOperation(value="问题知识库表-列表查询", notes="问题知识库表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseEO>> queryList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
HttpServletRequest req) {
|
||||
List<ProblemKnowledgeBaseEO> list = problemKnowledgeBaseEOService.queryList(problemKnowledgeBaseEO,req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-添加")
|
||||
@ApiOperation(value="问题知识库表-添加", notes="问题知识库表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.add(problemKnowledgeBaseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-编辑")
|
||||
@ApiOperation(value="问题知识库表-编辑", notes="问题知识库表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.editById(problemKnowledgeBaseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id删除")
|
||||
@ApiOperation(value="问题知识库表-通过id删除", notes="问题知识库表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-批量删除")
|
||||
@ApiOperation(value="问题知识库表-批量删除", notes="问题知识库表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id查询")
|
||||
@ApiOperation(value="问题知识库表-通过id查询", notes="问题知识库表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = problemKnowledgeBaseEOService.phoneQueryById(id,cut);
|
||||
if(problemKnowledgeBaseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseEO, ProblemKnowledgeBaseEO.class, "问题知识库表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "问题知识库表-转发")
|
||||
@ApiOperation(value="问题知识库表-转发", notes="问题知识库表-转发")
|
||||
@PostMapping(value = "/forward")
|
||||
public Result<?> forward(@RequestBody JSONObject json) {
|
||||
return this.problemKnowledgeBaseEOService.forward(json);
|
||||
}
|
||||
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBasePraiseEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库点赞表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBasePraiseEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBasePraiseEOController extends JeroController<ProblemKnowledgeBasePraiseEO, IProblemKnowledgeBasePraiseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBasePraiseEOService problemKnowledgeBasePraiseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-分页列表查询", notes="问题知识库点赞表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBasePraiseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBasePraiseEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBasePraiseEO> page = new Page<ProblemKnowledgeBasePraiseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBasePraiseEO> pageList = problemKnowledgeBasePraiseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-列表查询", notes="问题知识库点赞表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBasePraiseEO>> queryList() {
|
||||
List<ProblemKnowledgeBasePraiseEO> list = problemKnowledgeBasePraiseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-添加")
|
||||
@ApiOperation(value="问题知识库点赞表-添加", notes="问题知识库点赞表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.add(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-编辑")
|
||||
@ApiOperation(value="问题知识库点赞表-编辑", notes="问题知识库点赞表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.editById(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id删除")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id删除", notes="问题知识库点赞表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBasePraiseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-批量删除")
|
||||
@ApiOperation(value="问题知识库点赞表-批量删除", notes="问题知识库点赞表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBasePraiseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id查询")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id查询", notes="问题知识库点赞表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO = problemKnowledgeBasePraiseEOService.queryById(id);
|
||||
if(problemKnowledgeBasePraiseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBasePraiseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBasePraiseEO, ProblemKnowledgeBasePraiseEO.class, "问题知识库点赞表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBasePraiseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -189,4 +189,12 @@ public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnow
|
||||
return this.problemKnowledgeBaseEOService.forward(json);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="知识分享更新ES", notes="知识分享更新ES")
|
||||
@PostMapping(value = "/updateEs")
|
||||
public Result<?> updateEs() {
|
||||
this.problemKnowledgeBaseEOService.updateEs();
|
||||
return Result.OK("更新成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -17,6 +17,13 @@ import java.util.List;
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledgeBaseEO> {
|
||||
|
||||
/**
|
||||
* 知识分享更新ES
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
void updateEs();
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -57,6 +64,8 @@ public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledg
|
||||
*/
|
||||
ProblemKnowledgeBaseEO queryById(String id,String cut);
|
||||
|
||||
ProblemKnowledgeBaseEO phoneQueryById(String id,String cut);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
+3
@@ -72,6 +72,8 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -128,6 +130,7 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
params.put("contentInfoFeiEn",contentENNo);
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("back_url",url);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneProblemKnowledgeBase?id=" + problemKnowledgeBaseEO.getId());
|
||||
params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
+64
-1
@@ -14,6 +14,8 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.config.entity.SysConfig;
|
||||
import com.jero.modules.config.service.ISysConfigService;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
@@ -103,6 +105,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IRecentBrowseService recentBrowseService;
|
||||
@Autowired
|
||||
private ISysConfigService iSysConfigService;
|
||||
|
||||
|
||||
public static final String SEARCH_FLAG = "魑";
|
||||
@@ -110,6 +114,29 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
private String uploadpath;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
|
||||
/**
|
||||
* 知识分享更新ES
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void updateEs() {
|
||||
int index = 0;
|
||||
List<ProblemKnowledgeBaseEO> list = this.list();
|
||||
log.error("知识分享更新ES==开始==总数:" + list.size());
|
||||
for (ProblemKnowledgeBaseEO problemKnowledgeBaseEO : list) {
|
||||
if (StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.HAVE_RELEASED.getValue())) {
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
log.error("知识分享更新ES==结束==更新数量:" + index);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -433,7 +460,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
convertAfterMap.put("stand_number",problemKnowledgeBaseEO.getStandNumber());
|
||||
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
|
||||
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
|
||||
convertAfterMap.put("create_time",new Date());
|
||||
convertAfterMap.put("create_time",problemKnowledgeBaseEO.getCreateTime());
|
||||
convertAfterMap.put("create_by",problemKnowledgeBaseEO.getCreateBy());
|
||||
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
|
||||
|
||||
@@ -538,6 +565,41 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}
|
||||
return problemKnowledgeBaseEO;
|
||||
}
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseEO phoneQueryById(String id,String cut) {
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = getById(id);
|
||||
List<SysConfig> sysConfigs = iSysConfigService.queryList();
|
||||
if(org.apache.commons.collections.CollectionUtils.isNotEmpty(sysConfigs)){
|
||||
for (SysConfig sysConfig : sysConfigs) {
|
||||
if(sysConfig.getConfigName().equals("domainWebImgURL")){
|
||||
String pcUrl = sysConfig.getConfig();
|
||||
String phoneUrl = sysConfig.getPhoneConfig();
|
||||
if(ObjectUtils.isNotEmpty(problemKnowledgeBaseEO) && StringUtils.isNotBlank(problemKnowledgeBaseEO.getContent())){
|
||||
String content = problemKnowledgeBaseEO.getContent().replace(pcUrl,phoneUrl);
|
||||
content = content.replace("jero-boot/","jero-boot/phone/");
|
||||
problemKnowledgeBaseEO.setContent(content);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ProblemKnowledgeBaseEO> problemKnowledgeBaseEOList = new ArrayList<>();
|
||||
if (ObjectUtils.isNotEmpty(problemKnowledgeBaseEO)) {
|
||||
problemKnowledgeBaseEOList.add(problemKnowledgeBaseEO);
|
||||
}
|
||||
this.disposeData(problemKnowledgeBaseEOList,cut);
|
||||
if (CollectionUtils.isNotEmpty(problemKnowledgeBaseEOList)) {
|
||||
problemKnowledgeBaseEO = problemKnowledgeBaseEOList.get(0);
|
||||
}
|
||||
return problemKnowledgeBaseEO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
@@ -946,6 +1008,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
params.put("contentInfoFeiEn",msgContentENTemp);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",hrefFeishu);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneProblemKnowledgeBase?id=" + problemKnowledgeBaseId);
|
||||
params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
|
||||
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
|
||||
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
|
||||
|
||||
+356
@@ -0,0 +1,356 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库-认证清单表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库-认证清单表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/project/projectCertificationInventoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProjectCertificationInventoryEOController extends JeroController<ProjectCertificationInventoryEO, IProjectCertificationInventoryEOService> {
|
||||
@Autowired
|
||||
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param projectCertificationInventoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-分页列表查询")
|
||||
@ApiOperation(value="项目库-认证清单表-分页列表查询", notes="项目库-认证清单表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
String flowStatusStr = "";
|
||||
if (StringUtils.isNotEmpty(projectCertificationInventoryEO.getFlowStatus())) {
|
||||
flowStatusStr = projectCertificationInventoryEO.getFlowStatus();
|
||||
projectCertificationInventoryEO.setFlowStatus(null);
|
||||
}
|
||||
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryEO, req.getParameterMap());
|
||||
if (StringUtils.isNotEmpty(flowStatusStr)) {
|
||||
String finalflowStatusStr = flowStatusStr.replaceAll("\\*","");
|
||||
queryWrapper.and(query -> {
|
||||
query.lambda().like(ProjectCertificationInventoryEO::getFlowStatus, finalflowStatusStr);
|
||||
if(StringUtils.contains(finalflowStatusStr,",")){
|
||||
String[] flowStatusArr = finalflowStatusStr.split(",");
|
||||
for (String fs : flowStatusArr) {
|
||||
query.or(q -> {
|
||||
q.like("flow_status",fs);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProjectCertificationInventoryEO> page = new Page<ProjectCertificationInventoryEO>(pageNo, pageSize);
|
||||
IPage<ProjectCertificationInventoryEO> pageList = this.projectCertificationInventoryEOService.queryPage(queryWrapper,page,projectCertificationInventoryEO,cut);
|
||||
return Result.OK(cut,pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-列表查询")
|
||||
@ApiOperation(value="项目库-认证清单表-列表查询", notes="项目库-认证清单表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectCertificationInventoryEO>> queryList() {
|
||||
List<ProjectCertificationInventoryEO> list = projectCertificationInventoryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectCertificationInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-添加")
|
||||
@ApiOperation(value="项目库-认证清单表-添加", notes="项目库-认证清单表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) {
|
||||
projectCertificationInventoryEOService.add(projectCertificationInventoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectCertificationInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-编辑")
|
||||
@ApiOperation(value="项目库-认证清单表-编辑", notes="项目库-认证清单表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) {
|
||||
projectCertificationInventoryEOService.editById(projectCertificationInventoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-通过id删除")
|
||||
@ApiOperation(value="项目库-认证清单表-通过id删除", notes="项目库-认证清单表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
projectCertificationInventoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-批量删除")
|
||||
@ApiOperation(value="项目库-认证清单表-批量删除", notes="项目库-认证清单表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.projectCertificationInventoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-通过id查询")
|
||||
@ApiOperation(value="项目库-认证清单表-通过id查询", notes="项目库-认证清单表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProjectCertificationInventoryEO projectCertificationInventoryEO = projectCertificationInventoryEOService.queryById(id);
|
||||
if(projectCertificationInventoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectCertificationInventoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectCertificationInventoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectCertificationInventoryEO projectCertificationInventoryEO) {
|
||||
return super.exportXls(request, projectCertificationInventoryEO, ProjectCertificationInventoryEO.class, "项目库-认证清单表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProjectCertificationInventoryEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-批量添加")
|
||||
@ApiOperation(value="项目库-认证清单表-批量添加", notes="项目库-认证清单表-批量添加")
|
||||
@PostMapping(value = "/batchAdd")
|
||||
public Result<?> batchAdd(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.batchAdd(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-批量设置")
|
||||
@ApiOperation(value="项目库-认证清单表-批量设置", notes="项目库-认证清单表-批量设置")
|
||||
@PostMapping(value = "/setBatch")
|
||||
public Result<?> setBatch(@RequestBody ProjectCertificationInventoryEO projectCertificationInventoryEO) {
|
||||
return this.projectCertificationInventoryEOService.setBatch(projectCertificationInventoryEO);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-studio发布")
|
||||
@ApiOperation(value="项目库-认证清单表-studio发布", notes="项目库-认证清单表-studio发布")
|
||||
@PostMapping(value = "/issue")
|
||||
public Result<?> issue(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.issue(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-当前登录用户角色")
|
||||
@ApiOperation(value="项目库-认证清单表-当前登录用户角色", notes="项目库-认证清单表-当前登录用户角色")
|
||||
@GetMapping(value = "/getRoleByUserId")
|
||||
public Result<List<SysRole>> getRoleByUserId(@RequestParam Map<String,Object> params) {
|
||||
return this.projectCertificationInventoryEOService.getRoleByUserId(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-获取流程状态列表")
|
||||
@ApiOperation(value="项目库-认证清单表-获取流程状态列表", notes="项目库-认证清单表-获取流程状态列表")
|
||||
@GetMapping(value = "/getFlowStatusList")
|
||||
public Result<?> getFlowStatusList(@RequestParam("cut") String cut) {
|
||||
return this.projectCertificationInventoryEOService.getFlowStatusList(cut);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-认证流程统一提交任务接口")
|
||||
@ApiOperation(value="项目库-认证清单表-认证流程统一提交任务接口", notes="项目库-认证清单表-认证流程统一提交任务接口")
|
||||
@PostMapping(value = "/submitTask")
|
||||
public Result<?> submitTask(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.submitTask(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-批量保存")
|
||||
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
|
||||
@PostMapping(value = "/saveBatch")
|
||||
public Result<?> saveBatch(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.saveBatch(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-流程重置")
|
||||
@ApiOperation(value="项目库-认证清单表-流程重置", notes="项目库-认证清单表-流程重置")
|
||||
@PostMapping(value = "/resetFlow")
|
||||
public Result<?> resetFlow(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.resetFlow(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-转办")
|
||||
@ApiOperation(value="项目库-认证清单表-转办", notes="项目库-认证清单表-转办")
|
||||
@PostMapping(value = "/transferTask")
|
||||
public Result<?> transferTask(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.transferTask(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-催办")
|
||||
@ApiOperation(value="项目库-认证清单表-催办", notes="项目库-认证清单表-催办")
|
||||
@PostMapping(value = "/expediting")
|
||||
public Result<?> expediting(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.expediting(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-批量修改配置项")
|
||||
@ApiOperation(value="项目库-认证清单表-批量修改配置项", notes="项目库-认证清单表-批量修改配置项")
|
||||
@PostMapping(value = "/updateConfigItemBatch")
|
||||
public Result<?> updateConfigItemBatch(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.updateConfigItemBatch(json);
|
||||
}
|
||||
|
||||
@ApiOperation(value="项目库-认证清单表-模板下载", notes="项目库-认证清单表-模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
public void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
projectCertificationInventoryEOService.exportTemplate(projectCertificationInventoryEO,response,request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param file
|
||||
* @param projectCertificationInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="项目库-认证清单表-导入数据", notes="项目库-认证清单表-导入数据")
|
||||
@RequestMapping(value = "/importData", method = RequestMethod.POST)
|
||||
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
ProjectCertificationInventoryEO projectCertificationInventoryEO) {
|
||||
projectCertificationInventoryEOService.importData(file,projectCertificationInventoryEO);
|
||||
return Result.OK("导入成功");
|
||||
}
|
||||
/**
|
||||
* 导出数据
|
||||
* @param request
|
||||
* @param projectCertificationInventoryEO
|
||||
*/
|
||||
@ApiOperation(value="项目库-认证清单表-导出数据", notes="项目库-认证清单表-导出数据")
|
||||
@RequestMapping(value = "/exportData",method = RequestMethod.GET)
|
||||
// @RequiresPermissions("projectLawsInventory:exportData")
|
||||
public void exportData(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
ProjectCertificationInventoryEO projectCertificationInventoryEO) {
|
||||
projectCertificationInventoryEOService.exportData(response,request, projectCertificationInventoryEO);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-调取添加")
|
||||
@ApiOperation(value="项目库-认证清单表-调取添加", notes="项目库-认证清单表-调取添加")
|
||||
@PostMapping(value = "/callAdd")
|
||||
public Result<?> callAdd(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.callAdd(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-引用交付物")
|
||||
@ApiOperation(value="项目库-认证清单表-引用交付物", notes="项目库-认证清单表-引用交付物")
|
||||
@PostMapping(value = "/citeDeliverable")
|
||||
public Result<?> citeDeliverable(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.citeDeliverable(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新法规清单状态
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-批量更新流程状态")
|
||||
@ApiOperation(value="项目库-认证清单表-批量更新流程状态", notes="项目库-认证清单表-批量更新流程状态")
|
||||
@PostMapping(value = "/updateStatusBatch")
|
||||
public Result<?> updateStatusBatch(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.updateStatusBatch(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加配置 等同于 复制
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-添加配置")
|
||||
@ApiOperation(value="项目库-认证清单表-添加配置", notes="项目库-认证清单表-添加配置")
|
||||
@PostMapping(value = "/addConfigByIds")
|
||||
public Result<?> addConfigByIds(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.addConfigByIds(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取责任人和接口人
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-认证清单表-获取责任人和接口人")
|
||||
@ApiOperation(value="项目库-认证清单表-获取责任人和接口人", notes="项目库-认证清单表-获取责任人和接口人")
|
||||
@GetMapping(value = "/queryDutyPersonByProjectId")
|
||||
public Result<?> queryDutyPersonByProjectId(@RequestParam Map<String,Object> params) {
|
||||
return Result.OK(this.projectCertificationInventoryEOService.queryDutyPersonByProjectId(params));
|
||||
}
|
||||
}
|
||||
+564
@@ -0,0 +1,564 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-04-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库-法规清单表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/project/projectLawsInventoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProjectLawsInventoryEOController extends JeroController<ProjectLawsInventoryEO, IProjectLawsInventoryEOService> {
|
||||
@Autowired
|
||||
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IDummyInventoryBaseEOService dummyInventoryBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-分页列表查询")
|
||||
@ApiOperation(value="项目库-法规清单表-分页列表查询", notes="项目库-法规清单表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectLawsInventoryEO projectLawsInventoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<ProjectLawsInventoryEO> pageList = this.projectLawsInventoryEOService.queryPage(projectLawsInventoryEO,pageNo,pageSize,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-列表查询")
|
||||
@ApiOperation(value="项目库-法规清单表-列表查询", notes="项目库-法规清单表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
@RequiresPermissions("projectLawsInventory:list")
|
||||
public Result<List<ProjectLawsInventoryEO>> queryList(ProjectLawsInventoryEO projectLawsInventoryEO,HttpServletRequest req) {
|
||||
List<ProjectLawsInventoryEO> list = projectLawsInventoryEOService.queryList(projectLawsInventoryEO,req);
|
||||
return Result.OK(projectLawsInventoryEO.getCut(),list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-添加")
|
||||
@ApiOperation(value="项目库-法规清单表-添加", notes="项目库-法规清单表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.add(projectLawsInventoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-编辑")
|
||||
@ApiOperation(value="项目库-法规清单表-编辑", notes="项目库-法规清单表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.editById(projectLawsInventoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过id删除")
|
||||
@ApiOperation(value="项目库-法规清单表-通过id删除", notes="项目库-法规清单表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="projectLibraryId",required=true) String projectLibraryId,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
projectLawsInventoryEOService.deleteById(id,projectLibraryId,cut);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-批量删除")
|
||||
@ApiOperation(value="项目库-法规清单表-批量删除", notes="项目库-法规清单表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestBody JSONObject json) {
|
||||
String ids = json.getString("ids");
|
||||
String projectLibraryId = json.getString("projectLibraryId");
|
||||
String cut = json.getString("cut");
|
||||
this.projectLawsInventoryEOService.deleteByIds(Arrays.asList(ids.split(",")),projectLibraryId,cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过id查询")
|
||||
@ApiOperation(value="项目库-法规清单表-通过id查询", notes="项目库-法规清单表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.queryById(id);
|
||||
if(projectLawsInventoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectLawsInventoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectLawsInventoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
return super.exportXls(request, projectLawsInventoryEO, ProjectLawsInventoryEO.class, "项目库-法规清单表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProjectLawsInventoryEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新法规清单状态
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-批量更新状态")
|
||||
@ApiOperation(value="项目库-法规清单表-批量更新状态", notes="项目库-法规清单表-批量更新状态")
|
||||
@PostMapping(value = "/updateStatusBatch")
|
||||
public Result<?> updateStatusBatch(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.updateStatusBatch(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-匹配相关人员")
|
||||
@ApiOperation(value="项目库-法规清单表-匹配相关人员", notes="项目库-法规清单表-匹配相关人员")
|
||||
@PostMapping(value = "/matchRelevantPeople")
|
||||
public Result<?> matchRelevantPeople(@RequestBody Map<String,Object> params){
|
||||
return this.projectLawsInventoryEOService.matchRelevantPeople(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-流程调用")
|
||||
@ApiOperation(value="项目库-法规清单表-流程调用", notes="项目库-法规清单表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.projectLawsInventoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过id与操作类型查询")
|
||||
@ApiOperation(value="项目库-法规清单表-通过id与操作类型查询", notes="项目库-法规清单表-通过id与操作类型查询")
|
||||
@GetMapping(value = "/queryProjectLawsInventoryInfoById")
|
||||
public Result<?> queryProjectLawsInventoryInfoById(@RequestParam Map<String,Object> params) {
|
||||
List<ProjectLawsInventoryEO> result = projectLawsInventoryEOService.queryProjectLawsInventoryInfoById(params);
|
||||
return Result.OK((String) params.get("cut"),result);
|
||||
}
|
||||
|
||||
@AutoLog(value = "法规清单添加调用文档库数据--分页")
|
||||
@ApiOperation(value="法规清单添加调用文档库数据--分页", notes="法规清单添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageInfoBussDocument")
|
||||
public Result<?> queryPageInfo(@RequestBody BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
|
||||
Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(bussDocumentLibraryEO.getPageNo(), bussDocumentLibraryEO.getPageSize());
|
||||
IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.queryPageInfoDummy(page, queryWrapper,bussDocumentLibraryEO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "复制")
|
||||
@ApiOperation(value="复制", notes="复制")
|
||||
@GetMapping(value = "/copyInfoByIds")
|
||||
public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="operateType",required=true) String operateType) {
|
||||
try {
|
||||
projectLawsInventoryEOService.copyInfoByIds(ids,operateType);
|
||||
} catch (Exception e) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.error("复制失败");
|
||||
}else{
|
||||
return Result.error("Copy the failure");
|
||||
}
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.OK("复制成功");
|
||||
}else{
|
||||
return Result.OK("Copy success");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量设置
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "批量设置")
|
||||
@ApiOperation(value="批量设置", notes="批量设置")
|
||||
@PostMapping(value = "/setBatch")
|
||||
public Result<?> setBatch(@RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
String cut = projectLawsInventoryEO.getCut();
|
||||
try {
|
||||
projectLawsInventoryEOService.setBatch(projectLawsInventoryEO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("批量设置失败:" + e.getMessage());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.error("批量设置失败!");
|
||||
}else{
|
||||
return Result.error("Batch set success");
|
||||
}
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.OK("批量设置成功");
|
||||
}else{
|
||||
return Result.OK("Batch set success");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调取虚拟清单数据
|
||||
*
|
||||
* @param dummyInventoryBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调取虚拟清单数据")
|
||||
@ApiOperation(value="调取虚拟清单数据", notes="调取虚拟清单数据")
|
||||
@PostMapping(value = "/getPageInfoDummy")
|
||||
public Result<?> getPageInfoDummy(@RequestBody DummyInventoryBaseEO dummyInventoryBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// dummyInventoryBaseEO.setName("*发*");
|
||||
QueryWrapper<DummyInventoryBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryBaseEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
|
||||
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfoDummy(page,queryWrapper);
|
||||
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
public void exportTemplate(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
projectLawsInventoryEOService.exportTemplate(projectLawsInventoryEO,response,request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param request
|
||||
* @param projectLawsInventoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportData")
|
||||
@RequiresPermissions("projectLawsInventory:exportData")
|
||||
public void exportData(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.exportData(response,request, projectLawsInventoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param file
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importData", method = RequestMethod.POST)
|
||||
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.importData(file,projectLawsInventoryEO);
|
||||
return Result.OK("导入成功");
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "变更")
|
||||
@ApiOperation(value="变更", notes="变更")
|
||||
@PostMapping(value = "/change")
|
||||
public Result<?> change(@RequestBody JSONObject params) {
|
||||
return this.projectLawsInventoryEOService.change(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "下载pdf报告")
|
||||
@ApiOperation(value="下载pdf报告", notes="下载pdf报告")
|
||||
@GetMapping(value = "/downloadReport")
|
||||
public void downloadReport(@RequestParam Map<String,Object> params, HttpServletRequest req, HttpServletResponse resp) throws DocumentException {
|
||||
this.projectLawsInventoryEOService.downloadReport(params,req,resp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属
|
||||
* 法规清单添加调取文档库时高级搜索条件
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规清单添加调取文档库时高级搜索条件")
|
||||
@ApiOperation(value="法规清单添加调取文档库时高级搜索条件", notes="法规清单添加调取文档库时高级搜索条件")
|
||||
@GetMapping(value = "/queryConditionInventory")
|
||||
public Result<List<Map<String,Object>>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="法规清单中添加调用文档库数据--分页", notes="法规清单中添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageDummy")
|
||||
@ResponseBody
|
||||
public net.sf.json.JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param params
|
||||
* cut:中英文标识
|
||||
* id:法规清单id
|
||||
* @param req
|
||||
* @param resp
|
||||
* @throws DocumentException
|
||||
*/
|
||||
@AutoLog(value = "下载docx报告")
|
||||
@ApiOperation(value="下载docx报告", notes="下载docx报告")
|
||||
@GetMapping(value = "/downloadDocxReport")
|
||||
public void downloadDocxReport(@RequestParam Map<String,Object> params, HttpServletRequest req, HttpServletResponse resp) throws DocumentException {
|
||||
this.projectLawsInventoryEOService.downloadDocxReport(params,req,resp);
|
||||
}
|
||||
|
||||
@AutoLog(value = "催办")
|
||||
@ApiOperation(value="催办", notes="催办")
|
||||
@PostMapping(value = "/expediting")
|
||||
public Result<?> expediting(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.expediting(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前登录用户角色
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "当前登录用户角色")
|
||||
@RequestMapping(value = "/getRoleByUserId", method = RequestMethod.GET)
|
||||
public Result<List<SysRole>> getRoleByUserId(String projectLibraryId,String cut) {
|
||||
Result<List<SysRole>> result = new Result<>();
|
||||
List<SysRole> list = projectLawsInventoryEOService.getRoleByUserId(projectLibraryId,cut);
|
||||
if(list==null||list.size()<=0) {
|
||||
result.error500("未找到角色信息");
|
||||
}else {
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "任务清单催办")
|
||||
@ApiOperation(value="任务清单催办", notes="任务清单催办")
|
||||
@PostMapping(value = "/taskUrg")
|
||||
public Result<?> taskUrg(@RequestBody ProjectTaskUrgVo projectTaskUrgVo) {
|
||||
return this.projectLawsInventoryEOService.taskUrg(projectTaskUrgVo);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
|
||||
@ApiOperation(value="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口", notes="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
|
||||
@GetMapping(value = "/updateFlowInfoByProjectLibraryIds")
|
||||
public Result<?> updateFlowInfoByProjectLibraryIds(@RequestParam("projectLibraryIds") String projectLibraryIds){
|
||||
return this.projectLawsInventoryEOService.updateFlowInfoByProjectLibraryIds(projectLibraryIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-studio发布")
|
||||
@ApiOperation(value="项目库-法规清单表-studio发布", notes="项目库-法规清单表-studio发布")
|
||||
@PostMapping(value = "/studioPublish")
|
||||
public Result<?> studioPublish(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.studioPublish(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-studio撤回")
|
||||
@ApiOperation(value="项目库-法规清单表-studio撤回", notes="项目库-法规清单表-studio撤回")
|
||||
@PostMapping(value = "/studioWithdrew")
|
||||
public Result<?> studioWithdrew(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.studioWithdrew(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-法规工程师退回")
|
||||
@ApiOperation(value="项目库-法规清单表-法规工程师退回", notes="项目库-法规清单表-法规工程师退回")
|
||||
@PostMapping(value = "/regulationOwnerReturned")
|
||||
public Result<?> regulationOwnerReturned(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.regulationOwnerReturned(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "流程重置-迁移法规清单流程历史数据专用")
|
||||
@ApiOperation(value="流程重置-迁移法规清单流程历史数据专用", notes="流程重置-迁移法规清单流程历史数据专用")
|
||||
@PostMapping(value = "/resetFlowTemp")
|
||||
public Result<?> resetFlowTemp(@RequestBody JSONObject params) {
|
||||
return this.projectLawsInventoryEOService.resetFlowTemp(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新法规清单状态
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-批量更新流程状态")
|
||||
@ApiOperation(value="项目库-法规清单表-批量更新流程状态", notes="项目库-法规清单表-批量更新流程状态")
|
||||
@PostMapping(value = "/updateFlowStatusBatch")
|
||||
public Result<?> updateFlowStatusBatch(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.updateFlowStatusBatch(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-引用交付物")
|
||||
@ApiOperation(value="项目库-法规清单表-引用交付物", notes="项目库-法规清单表-引用交付物")
|
||||
@PostMapping(value = "/citeDeliverable")
|
||||
public Result<?> citeDeliverable(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.citeDeliverable(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-强制转办")
|
||||
@ApiOperation(value="项目库-法规清单表-强制转办", notes="项目库-法规清单表-强制转办")
|
||||
@PostMapping(value = "/compulsoryTransfer")
|
||||
public Result<?> compulsoryTransfer(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.compulsoryTransfer(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过projectId查询责任人
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过projectId查询责任人")
|
||||
@ApiOperation(value="项目库-法规清单表-通过projectId查询责任人", notes="项目库-法规清单表-通过projectId查询责任人")
|
||||
@GetMapping(value = "/queryDutyPersonByProjectId")
|
||||
public Result<?> queryDutyPersonByProjectId(@RequestParam Map<String,Object> params){
|
||||
Map<String, List<Map<String, Object>>> res = this.projectLawsInventoryEOService.queryDutyPersonByProjectId(params);
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询不符合项列表
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-查询不符合项列表")
|
||||
@ApiOperation(value="项目库-法规清单表-查询不符合项列表", notes="项目库-法规清单表-查询不符合项列表")
|
||||
@GetMapping(value = "/queryNotComplianList")
|
||||
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
|
||||
List<Map<String,Object>> result = this.projectLawsInventoryEOService.queryNotComplianList(params);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出不符合项列表
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-导出不符合项列表")
|
||||
@ApiOperation(value="项目库-法规清单表-导出不符合项列表", notes="项目库-法规清单表-导出不符合项列表")
|
||||
@RequestMapping(value = "/exportNotComplianList")
|
||||
public void exportNotComplianList(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
@RequestParam Map<String,Object> params) {
|
||||
this.projectLawsInventoryEOService.exportNotComplianList(response,request, params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-定版校验")
|
||||
@ApiOperation(value="项目库-法规清单表-定版校验", notes="项目库-法规清单表-定版校验")
|
||||
@GetMapping(value = "/finalizationVerify")
|
||||
public Result<?> finalizationVerify(@RequestParam Map<String,Object> params){
|
||||
return this.projectLawsInventoryEOService.finalizationVerify(params);
|
||||
}
|
||||
}
|
||||
+285
@@ -0,0 +1,285 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.ParseException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库基础表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库基础表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/project/projectLibraryBase")
|
||||
@Slf4j
|
||||
public class PhoneProjectLibraryBaseController extends JeroController<ProjectLibraryBase, IProjectLibraryBaseService> {
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-分页列表查询")
|
||||
@ApiOperation(value="项目库基础表-分页列表查询", notes="项目库基础表-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
List<ProjectLibraryBase> pageList= projectLibraryBaseService.queryPageList(params);
|
||||
Page pages = projectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), pageList);
|
||||
return Result.OK(params.get("cut").toString(),pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-列表查询")
|
||||
@ApiOperation(value="项目库基础表-列表查询", notes="项目库基础表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectLibraryBase>> queryList(ProjectLibraryBase projectLibraryBase) {
|
||||
List<ProjectLibraryBase> list = projectLibraryBaseService.getList(projectLibraryBase);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-添加")
|
||||
@ApiOperation(value="项目库基础表-添加", notes="项目库基础表-添加")
|
||||
@RequiresPermissions("projectLibraryBase:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) throws ParseException {
|
||||
projectLibraryBaseService.add(projectLibraryBase);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
/**
|
||||
* 项目扩展(添加子项目子项目基本信息、相关人员名单、法规/认证任务计划与被扩展项目保持一致)
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目扩展(添加子项目)")
|
||||
@ApiOperation(value="项目扩展(添加子项目)", notes="项目扩展(添加子项目)")
|
||||
@RequiresPermissions("projectLibraryBase:add")
|
||||
@PostMapping(value = "/addChild")
|
||||
public Result<?> addChild(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) throws ParseException {
|
||||
projectLibraryBaseService.addChild(projectLibraryBase);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-编辑")
|
||||
@ApiOperation(value="项目库基础表-编辑", notes="项目库基础表-编辑")
|
||||
@RequiresPermissions("projectLibraryBase:edit")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) {
|
||||
projectLibraryBaseService.editById(projectLibraryBase);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-通过id删除")
|
||||
@ApiOperation(value="项目库基础表-通过id删除", notes="项目库基础表-通过id删除")
|
||||
@RequiresPermissions("projectLibraryBase:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
projectLibraryBaseService.deleteById(id,cut);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-批量删除")
|
||||
@ApiOperation(value="项目库基础表-批量删除", notes="项目库基础表-批量删除")
|
||||
@RequiresPermissions("projectLibraryBase:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
this.projectLibraryBaseService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-通过id查询")
|
||||
@ApiOperation(value="项目库基础表-通过id查询", notes="项目库基础表-通过id查询")
|
||||
@RequiresPermissions("projectLibraryBase:queryById")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<ProjectLibraryBase> data = projectLibraryBaseService.queryById(id,cut);
|
||||
if(data==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(cut,data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectLibraryBase
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLibraryBase projectLibraryBase) {
|
||||
return super.exportXls(request, projectLibraryBase, ProjectLibraryBase.class, "项目库基础表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProjectLibraryBase.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情-统计接口
|
||||
* @param id 项目库id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-统计接口")
|
||||
@ApiOperation(value="项目详情-统计接口", notes="项目详情-统计接口")
|
||||
@GetMapping(value = "/getProjectDetailsStatistics")
|
||||
public Result<?> getProjectDetailsStatistics(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
Map<String,Object> data = projectLibraryBaseService.getProjectDetailsStatistics(id);
|
||||
return Result.OK(cut,data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情-统计接口-根据领域分组
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-统计接口-根据领域分组")
|
||||
@ApiOperation(value="项目详情-统计接口-根据领域分组", notes="项目详情-统计接口-根据领域分组")
|
||||
@GetMapping(value = "/getProjectDetailsStatisticsGroupByTerritory")
|
||||
public Result<?> getProjectDetailsStatisticsGroupByTerritory(@RequestParam Map<String,Object> params) {
|
||||
Map<String,Object> data = projectLibraryBaseService.getProjectDetailsStatisticsGroupByTerritory(params);
|
||||
return Result.OK((String)params.get("cut"),data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
@RequestMapping(value = "/exportProjectDetailsStatisticsGroupByTerritoryXls")
|
||||
public void exportProjectDetailsStatisticsGroupByTerritoryXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
|
||||
projectLibraryBaseService.exportProjectDetailsStatisticsGroupByTerritoryXls(response,request, params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 项目置顶,取消置顶(只置顶主项目)
|
||||
* @param id
|
||||
* @param flag 0为置顶, 1为取消置顶
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目置顶,取消置顶(只置顶主项目)")
|
||||
@ApiOperation(value="项目置顶,取消置顶(只置顶主项目)", notes="项目置顶,取消置顶(只置顶主项目)")
|
||||
@GetMapping(value = "/top")
|
||||
public Result<?> top(String id,String flag) {
|
||||
projectLibraryBaseService.top(id,flag);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目所有的版本(主版本和子版本的集合)
|
||||
* @param id 项目id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "获取项目所有的版本(主版本和子版本的集合)")
|
||||
@ApiOperation(value="获取项目所有的版本(主版本和子版本的集合)", notes="获取项目所有的版本(主版本和子版本的集合)")
|
||||
@GetMapping(value = "/getVersionsInfo")
|
||||
public Result<?> getVersionsInfo(String id) {
|
||||
List<String> versionsInfoList = projectLibraryBaseService.getVersionsInfo(id);
|
||||
return Result.OK(versionsInfoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本统计
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "版本统计")
|
||||
@ApiOperation(value="版本统计)", notes="版本统计")
|
||||
@PostMapping(value = "/versionStatistics")
|
||||
public Result<?> versionStatistics(@RequestBody Map<String,Object> params) {
|
||||
List<ProjectLibraryBase> projectLibraryBasesList = projectLibraryBaseService.versionStatistics(String.valueOf(params.get("id")));
|
||||
Page pages = projectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), projectLibraryBasesList);
|
||||
return Result.OK(pages);
|
||||
}
|
||||
|
||||
@AutoLog(value = "对接火山引擎接口getProjectInfo")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息1", notes="对接火山引擎接口-获取项目统计信息1")
|
||||
@PostMapping(value = "/getProjectInfo")
|
||||
public Result<?> getProjectInfo(){
|
||||
JSONArray resList = projectLibraryBaseService.getProjectInfo();
|
||||
return Result.OK(resList);
|
||||
}
|
||||
|
||||
@AutoLog(value = "对接火山引擎接口getProjectProgressInfo")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息2", notes="对接火山引擎接口-获取项目统计信息2")
|
||||
@PostMapping(value = "/getProjectProgressInfo")
|
||||
public Result<?> getProjectProgressInfo(){
|
||||
JSONArray resList = this.projectLibraryBaseService.getProjectProgressInfo();
|
||||
return Result.OK(resList);
|
||||
}
|
||||
|
||||
// 导出项目进度统计(状态导出)
|
||||
@RequestMapping(value = "/exportProjectProgressStatisticsXls")
|
||||
public void exportProjectProgressStatisticsXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
|
||||
this.projectLibraryBaseService.exportProjectProgressStatisticsXls(response,request, params);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -25,9 +25,9 @@ public enum CertificationFlowNodeEnum {
|
||||
* 任务办理 -> 责任人接受之后,等待提交交付物
|
||||
* 任务审查 -> 责任人提交交付物之后,认证工程师审查。
|
||||
*/
|
||||
CHECKLIST_VERIFICATION ("Task initiation","任务发起","Task initiation"),
|
||||
TASK_RESPONSIBILITY_CONFIRMATION ("Task responsibility confirmation","任务责任确认","Task responsibility confirmation"),
|
||||
TASK_HANDLING ("Task handling","任务办理","Task handling"),
|
||||
CHECKLIST_VERIFICATION ("Task initiation","任务发起","Task Initiation"),
|
||||
TASK_RESPONSIBILITY_CONFIRMATION ("Task responsibility confirmation","任务责任确认","Responsibilty Confirmation"),
|
||||
TASK_HANDLING ("Task handling","任务办理","Task Handling"),
|
||||
TASK_REVIEW ("Task Review","任务审查","Task Review"),
|
||||
;
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ public enum ComplianceFlowStatusEnum {
|
||||
RESULTS_TO_BE_SUBMITTED("结果待提交","Results to be submitted","Results to be submitted"),
|
||||
RESULTS_TO_BE_REVIEWED("结果待审查","Results to be reviewed","Results to be reviewed"),
|
||||
CONFORMITY("符合","Compliance","Compliance"),
|
||||
INCONFORMITY("不符合","Non-Compliance","Non-Compliance"),
|
||||
INCONFORMITY("不符合","Non-compliance","Non-Compliance"),
|
||||
TO_TRACK("待追踪","To be tracked","To be tracked"),
|
||||
UNINVOLVED("不涉及","NA","NA"),
|
||||
TERMINATION_OF_TASK("任务终止","Termination of task","Termination of task"),
|
||||
|
||||
+6
@@ -29,6 +29,12 @@ public enum JumpLinkEnum {
|
||||
PROBLEM_KNOWLEDGE_BASE("问题知识库,列表页","","/problemknowledgeBase",""),
|
||||
|
||||
|
||||
TO_DO_CENTER_PHONE("手机端待办中心","","/phoneToDoCenter",""),
|
||||
TASK_HANDING_PHONE("手机端任务办理","","/phoneProcessManagement",""),
|
||||
PRE_TASK_HANDING_PHONE("手机端认证任务办理","","/phoneHandlingPage",""),
|
||||
|
||||
|
||||
|
||||
//认证参数收集,认证工程师发起,工程接口人接收
|
||||
// PROBLEM_KNOWLEDGE_BASE("问题知识库,列表页","","/problemknowledgeBase",""),
|
||||
|
||||
|
||||
+34
-15
@@ -7,6 +7,7 @@ import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
|
||||
import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
|
||||
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
@@ -112,7 +113,8 @@ public class CertificationInventoryJob implements Job {
|
||||
certificationEngineerId,
|
||||
threeDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE6.getValue(),
|
||||
threeDaysList.get(0).getEndTime()
|
||||
threeDaysList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_REVIEW.getKey()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -126,7 +128,8 @@ public class CertificationInventoryJob implements Job {
|
||||
certificationEngineerId,
|
||||
currentDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE7.getValue(),
|
||||
currentDaysList.get(0).getEndTime()
|
||||
currentDaysList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_REVIEW.getKey()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -140,7 +143,8 @@ public class CertificationInventoryJob implements Job {
|
||||
certificationEngineerId,
|
||||
overdueList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE8.getValue(),
|
||||
overdueList.get(0).getEndTime()
|
||||
overdueList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_REVIEW.getKey()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -170,7 +174,7 @@ public class CertificationInventoryJob implements Job {
|
||||
certificationEngineerId,
|
||||
threeDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE6.getValue(),
|
||||
threeDaysList.get(0).getInventoryVerifyEndTime()
|
||||
threeDaysList.get(0).getInventoryVerifyEndTime(),""
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -184,7 +188,7 @@ public class CertificationInventoryJob implements Job {
|
||||
certificationEngineerId,
|
||||
currentDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE7.getValue(),
|
||||
currentDaysList.get(0).getInventoryVerifyEndTime()
|
||||
currentDaysList.get(0).getInventoryVerifyEndTime(),""
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -198,7 +202,7 @@ public class CertificationInventoryJob implements Job {
|
||||
certificationEngineerId,
|
||||
overdueList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE8.getValue(),
|
||||
overdueList.get(0).getInventoryVerifyEndTime()
|
||||
overdueList.get(0).getInventoryVerifyEndTime(),""
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -253,7 +257,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
fourteenDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE19.getValue(),
|
||||
fourteenDaysList.get(0).getEndTime()
|
||||
fourteenDaysList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -266,7 +271,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
sevenDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE20.getValue(),
|
||||
sevenDaysList.get(0).getEndTime()
|
||||
sevenDaysList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -279,7 +285,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
currentDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE21.getValue(),
|
||||
currentDaysList.get(0).getEndTime()
|
||||
currentDaysList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -291,7 +298,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
overdueList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE22.getValue(),
|
||||
overdueList.get(0).getEndTime()
|
||||
overdueList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -325,7 +333,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
fourteenDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE19.getValue(),
|
||||
fourteenDaysList.get(0).getTaskConfirmEndTime()
|
||||
fourteenDaysList.get(0).getTaskConfirmEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -338,7 +347,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
sevenDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE20.getValue(),
|
||||
sevenDaysList.get(0).getTaskConfirmEndTime()
|
||||
sevenDaysList.get(0).getTaskConfirmEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -351,7 +361,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
currentDaysList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE21.getValue(),
|
||||
currentDaysList.get(0).getTaskConfirmEndTime()
|
||||
currentDaysList.get(0).getTaskConfirmEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey()
|
||||
);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -363,7 +374,8 @@ public class CertificationInventoryJob implements Job {
|
||||
dutyPersonUserId,
|
||||
overdueList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE22.getValue(),
|
||||
overdueList.get(0).getTaskConfirmEndTime()
|
||||
overdueList.get(0).getTaskConfirmEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -687,7 +699,8 @@ public class CertificationInventoryJob implements Job {
|
||||
List<SysUser> userList,String userId,
|
||||
List<ProjectCertificationInventoryEO> list,
|
||||
String templateId,
|
||||
Date endTime) {
|
||||
Date endTime,
|
||||
String taskDefinitionKey){
|
||||
String thirdId = this.sysUserService.getUserThirdIdByUserId(userList,userId);
|
||||
|
||||
if(StringUtils.isNotEmpty(thirdId)){
|
||||
@@ -698,6 +711,10 @@ public class CertificationInventoryJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectCertificationInventoryEOService.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
if(StringUtils.isNotEmpty(taskDefinitionKey)){
|
||||
hrefFeishu_CN_P = this.projectCertificationInventoryEOService.handlePhoneLink(projectLibraryBase.getId(),PRN_CN,taskDefinitionKey);
|
||||
}
|
||||
|
||||
Map<String, Object> standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(list);
|
||||
String standName = (String) standNameAndItemName.get("standName");
|
||||
@@ -717,6 +734,8 @@ public class CertificationInventoryJob implements Job {
|
||||
templateVariableMap.put("endTime", DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
|
||||
+3
@@ -137,6 +137,7 @@ public class InventoryAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN, ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE4.getValue(),params);
|
||||
@@ -168,6 +169,7 @@ public class InventoryAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN,ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE4.getValue(),params);
|
||||
@@ -199,6 +201,7 @@ public class InventoryAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN,ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE4.getValue(),params);
|
||||
|
||||
+6
@@ -147,6 +147,7 @@ public class TaskAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = designDutyDataList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -187,6 +188,7 @@ public class TaskAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = designDutyDataList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -227,6 +229,7 @@ public class TaskAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = overdueList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -282,6 +285,7 @@ public class TaskAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = threeDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -322,6 +326,7 @@ public class TaskAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = currentDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -362,6 +367,7 @@ public class TaskAffirmJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = overdueList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
|
||||
+4
@@ -136,6 +136,7 @@ public class VerifyComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = fourteenDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -175,6 +176,7 @@ public class VerifyComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = sevenDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -214,6 +216,7 @@ public class VerifyComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = currentDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -252,6 +255,7 @@ public class VerifyComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = overdueList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
|
||||
+4
@@ -136,6 +136,7 @@ public class designComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = fourteenDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -175,6 +176,7 @@ public class designComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = sevenDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -214,6 +216,7 @@ public class designComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = currentDaysList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -252,6 +255,7 @@ public class designComplianceJob implements Job {
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = overdueList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
|
||||
+2
-2
@@ -226,7 +226,7 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @param userIdList
|
||||
* @param userInfoList
|
||||
*/
|
||||
void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS, String templeteId, List<String> userIdList, List<SysUser> userInfoList, Date endTime);
|
||||
void sendMessageByTemplateId(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS, String templeteId, List<String> userIdList, List<SysUser> userInfoList, Date endTimeString, String taskDefinitionKey);
|
||||
|
||||
/**
|
||||
* 数据唯一校验。
|
||||
@@ -249,7 +249,7 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @return
|
||||
*/
|
||||
Result<?> addConfigByIds(JSONObject json);
|
||||
|
||||
String handlePhoneLink(String id, String prn_cn, String key);
|
||||
void certificationInventoryEOListSortByEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
|
||||
void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
|
||||
void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
|
||||
|
||||
+66
-12
@@ -3,6 +3,7 @@ package com.jero.modules.project.service.impl;
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -152,6 +153,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@Autowired
|
||||
@@ -228,7 +232,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
|
||||
userIdList,
|
||||
userInfoList,
|
||||
projectCertificationInventoryEO.getEndTime()
|
||||
projectCertificationInventoryEO.getEndTime(),""
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -256,7 +260,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE15.getValue(),
|
||||
userIdList,
|
||||
userInfoList,
|
||||
projectCertificationInventoryEO.getEndTime()
|
||||
projectCertificationInventoryEO.getEndTime(),""
|
||||
);
|
||||
|
||||
// 如果责任人有变更,将之前责任人的待办中心任务,移交给新的责任人。
|
||||
@@ -640,7 +644,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
|
||||
userIdList,
|
||||
userInfoList,
|
||||
projectCertificationInventoryEO.getEndTime()
|
||||
projectCertificationInventoryEO.getEndTime(),""
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -683,7 +687,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
String templeteId,
|
||||
List<String> userIdList,
|
||||
List<SysUser> userInfoList,
|
||||
Date endTime){
|
||||
Date endTime,
|
||||
String taskDefinitionKey){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId());
|
||||
@@ -695,6 +700,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
if(StringUtils.isNotEmpty(taskDefinitionKey)){
|
||||
hrefFeishu_CN_P = this.handlePhoneLink(projectLibraryBase.getId(),PRN_CN,taskDefinitionKey);
|
||||
}
|
||||
|
||||
Map<String, Object> standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(projectCertificationInventoryEOS);
|
||||
String standName = (String) standNameAndItemName.get("standName");
|
||||
@@ -722,6 +731,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
templateVariableMap.put("operateUserName",currentUser.getUsername());
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
@@ -1159,6 +1170,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryId, PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
|
||||
|
||||
List<SysUser> certificationEngineerUserInfoList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
|
||||
certificationEngineerIdList.forEach(userId -> {
|
||||
@@ -1177,6 +1190,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(inventoryVerifyEndTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
@@ -1852,7 +1867,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE24.getValue(),
|
||||
dutyPersonIdList,
|
||||
dutyPersonList,
|
||||
projectCertificationInventoryEOList.get(0).getEndTime()
|
||||
projectCertificationInventoryEOList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
@@ -1915,7 +1931,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE25.getValue(),
|
||||
dutyPersonIdList,
|
||||
dutyPersonList,
|
||||
projectCertificationInventoryEOList.get(0).getEndTime()
|
||||
projectCertificationInventoryEOList.get(0).getEndTime(),""
|
||||
);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
@@ -2037,7 +2053,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE23.getValue(),
|
||||
certificationEngineerList,
|
||||
certificationEngineers,
|
||||
projectCertificationInventoryEOList.get(0).getEndTime()
|
||||
projectCertificationInventoryEOList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_REVIEW.getKey()
|
||||
);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
@@ -2100,6 +2117,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = this.handlePhoneLink(projectLibraryBase.getId(),PRN_CN,CertificationFlowNodeEnum.TASK_HANDLING.getKey());
|
||||
|
||||
Map<String, Object> standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(projectCertificationInventoryEOList);
|
||||
String standName = (String) standNameAndItemName.get("standName");
|
||||
@@ -2149,8 +2167,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
templateVariableMap.put("operateUserName",currentUser.getUsername());
|
||||
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
}
|
||||
@@ -2217,6 +2237,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
|
||||
Map<String, Object> standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(projectCertificationInventoryEOList);
|
||||
String standName = (String) standNameAndItemName.get("standName");
|
||||
@@ -2287,6 +2308,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
templateVariableMap.put("operateUserName",currentUser.getUsername());
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
@@ -2345,6 +2368,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
|
||||
// 给studio分配待办中心任务
|
||||
/*List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
||||
@@ -2416,6 +2440,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
templateVariableMap.put("certificationEngineer",currentUser.getUsername());
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
@@ -2475,6 +2501,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
//飞书手机跳转链接
|
||||
String hrefFeishu_CN_P = this.handlePhoneLink(projectLibraryBase.getId(),PRN_CN,CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey());
|
||||
|
||||
Map<String, List<ProjectCertificationInventoryEO>> certifycationInventoryListByDutyPersonMap = projectCertificationInventoryEOList.stream().collect(Collectors.groupingBy(ProjectCertificationInventoryEO::getDutyPerson));
|
||||
try {
|
||||
@@ -2536,6 +2564,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(taskConfirmEndTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
templateVariableMap.put("certificationEngineer",currentUser.getUsername());
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
@@ -2555,6 +2585,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
return Result.OK("发起任务成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handlePhoneLink(String id, String prn_cn, String key) {
|
||||
String hrefFeishu_CN_P = backUrlPhone
|
||||
+ JumpLinkEnum.PRE_TASK_HANDING_PHONE.getLink() + "?isDisplay=false&projectLibraryId=" + id
|
||||
+ "&projectName=" + prn_cn + "&taskDefinitionKey=" + key;
|
||||
return URLUtil.encode(hrefFeishu_CN_P);
|
||||
}
|
||||
|
||||
/**
|
||||
* 认证清单数据排序,根据截至时间顺序排序
|
||||
* @param projectCertificationInventoryEOList
|
||||
@@ -2971,6 +3009,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryId, PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
|
||||
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
|
||||
@@ -3068,6 +3108,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone",hrefFeishu_CN_P);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
@@ -3186,7 +3227,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE17.getValue(),
|
||||
userIdList,
|
||||
userInfoList,
|
||||
projectCertificationInventoryEOList.get(0).getEndTime()
|
||||
projectCertificationInventoryEOList.get(0).getEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
|
||||
// 获取认证清单 - 飞书跳转链接
|
||||
@@ -3254,6 +3296,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
Map<String, Object> hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryId, PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) hrefFeishuMap.get("hrefFeishu_CN_P");
|
||||
|
||||
/**
|
||||
* studio催办:除了 清单待发布、审查通过、认证退回 的 催办当前办理人
|
||||
@@ -3307,8 +3350,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("itemName",itemName);
|
||||
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlEnPhone",hrefFeishu_CN_P);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
@@ -3368,6 +3413,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(inventoryVerifyEndTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
templateVariableMap.put("viewBtnUrlEnPhone",hrefFeishu_CN_P);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
@@ -3412,7 +3458,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE16.getValue(),
|
||||
userIdList,
|
||||
dutyPersonList,
|
||||
taskConfirmEndTime
|
||||
taskConfirmEndTime,
|
||||
CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3433,7 +3480,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(),
|
||||
userIdList,
|
||||
dutyPersonList,
|
||||
toBeSubmitOrReturnPciEoList.get(0).getTaskConfirmEndTime()
|
||||
toBeSubmitOrReturnPciEoList.get(0).getTaskConfirmEndTime(),
|
||||
CertificationFlowNodeEnum.TASK_HANDLING.getKey()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3574,8 +3622,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
|
||||
+ "&projectName=" + PRN_EN;
|
||||
|
||||
result.put("hrefFeishu_CN",hrefFeishu_CN);
|
||||
result.put("hrefFeishu_EN",hrefFeishu_EN);
|
||||
//飞书手机跳转链接
|
||||
String hrefFeishu_CN_P = backUrlPhone
|
||||
+ JumpLinkEnum.TO_DO_CENTER_PHONE.getLink()+ "?keyWord=" + PRN_CN;
|
||||
|
||||
|
||||
result.put("hrefFeishu_CN", URLUtil.encode(hrefFeishu_CN));
|
||||
result.put("hrefFeishu_EN",URLUtil.encode(hrefFeishu_EN));
|
||||
result.put("hrefFeishu_CN_P",URLUtil.encode(hrefFeishu_CN_P));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+94
-7
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -45,6 +46,7 @@ import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.lawsOpinionGather.enums.LawsOpinionGatherNodeEnum;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
@@ -203,6 +205,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
private String simfangFontFilePath;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@@ -762,8 +766,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
todoCenterParams.put("projectNameCn", PRN_CN);
|
||||
todoCenterParams.put("projectNameEn", PRN_EN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN", hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
@@ -867,6 +872,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
@@ -903,6 +909,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
@@ -948,6 +955,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
@@ -992,6 +1000,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
@@ -1038,7 +1047,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
//处理手机端飞书消息跳转
|
||||
String hrefFeishu_CN_P = this.handlePhoneDesignLink(projectLawsInventoryEO);
|
||||
params.put("hrefFeishu_CN_P", hrefFeishu_CN_P);
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
@@ -1078,6 +1089,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
//处理手机端飞书消息跳转
|
||||
String hrefFeishu_CN_P = this.handlePhoneVerifyLink(projectLawsInventoryEO);
|
||||
params.put("hrefFeishu_CN_P", hrefFeishu_CN_P);
|
||||
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
@@ -1090,6 +1104,40 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
}
|
||||
|
||||
private String handlePhoneDesignLink(ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
String url = backUrlPhone + JumpLinkEnum.TO_DO_CENTER_PHONE.getLink();
|
||||
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId, projectLawsInventoryEO.getId());
|
||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType, FlowTypeEnum.SJFHXSHLC.getValue());
|
||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getStatus, TaskStatusEnum.NOT_DONE.getValue());
|
||||
List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(processInfoDetailEOS)) {
|
||||
String designPId = processInfoDetailEOS.get(0).getActiProcInstId();
|
||||
url = backUrlPhone + JumpLinkEnum.TASK_HANDING_PHONE.getLink() + "?actiProcInstId=" + designPId + "&projectTaskInventoryId=" + projectLawsInventoryEO.getId()
|
||||
+ "&projectLibraryId=" + projectLawsInventoryEO.getProjectLibraryId() + "&TaskKey=" + processInfoDetailEOS.get(0).getTaskDefinitionKey()
|
||||
+ "&TaskKeyName=" + DesignComplianceFlowNodeKeyEnum.getTextByValue(processInfoDetailEOS.get(0).getTaskDefinitionKey(), CutEnum.CN.getValue())
|
||||
+ "&isDisplay=false&flowType=2&Sponsor=regulationOwnerName&personLiable=designDutyIdName&typeOfDeliverables=designDeliverableTypeName&deliverableTemplate=designDeliverableTemplate&DueDate=designDueDate&remarks=designRemark";
|
||||
}
|
||||
return URLUtil.encode(url);
|
||||
}
|
||||
|
||||
private String handlePhoneVerifyLink(ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
String url = backUrlPhone + JumpLinkEnum.TO_DO_CENTER_PHONE.getLink();
|
||||
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId, projectLawsInventoryEO.getId());
|
||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType, FlowTypeEnum.YZFHXSCLC.getValue());
|
||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getStatus, TaskStatusEnum.NOT_DONE.getValue());
|
||||
List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(processInfoDetailEOS)) {
|
||||
String verifyPId = processInfoDetailEOS.get(0).getActiProcInstId();
|
||||
url = backUrlPhone + JumpLinkEnum.TASK_HANDING_PHONE.getLink() + "?actiProcInstId="+verifyPId+"&projectTaskInventoryId="+projectLawsInventoryEO.getId()
|
||||
+"&projectLibraryId="+projectLawsInventoryEO.getProjectLibraryId()+"&TaskKey="+processInfoDetailEOS.get(0).getTaskDefinitionKey()
|
||||
+"&TaskKeyName="+ VerifyComplianceFlowNodeKeyEnum.getTextByValue(processInfoDetailEOS.get(0).getTaskDefinitionKey(),CutEnum.CN.getValue())
|
||||
+"&isDisplay=false&flowType=4&Sponsor=regulationOwnerName&personLiable=verifyDutyIdName&typeOfDeliverables=verifyDeliverableTypeName&deliverableTemplate=verifyDeliverableTemplate&DueDate=verifyDueDate&remarks=verifyRemark";
|
||||
}
|
||||
return URLUtil.encode(url);
|
||||
}
|
||||
|
||||
private void setProjectLawsInventoryPermission(String userId, String projectId, String lawsInventoryId, Date now, List<ProjectUserPermission> adds, String belong) {
|
||||
QueryWrapper<ProjectUserPermission> del = new QueryWrapper<>();
|
||||
del.eq("project_id", projectId)
|
||||
@@ -3571,6 +3619,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
String projectLawsInventoryId = (String) prarams.get("id");
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = this.baseMapper.selectById(projectLawsInventoryId);
|
||||
|
||||
//处理手机端飞书消息跳转
|
||||
String flowType = jsonObject.getString("flowType");
|
||||
if(StringUtils.isNotEmpty(flowType)){
|
||||
if("Design".equals(flowType)){
|
||||
String hrefFeishu_CN_P = this.handlePhoneDesignLink(projectLawsInventoryEO);
|
||||
prarams.put("hrefFeishu_CN_P", hrefFeishu_CN_P);
|
||||
}else if("Verify".equals(flowType)){
|
||||
String hrefFeishu_CN_P = this.handlePhoneVerifyLink(projectLawsInventoryEO);
|
||||
prarams.put("hrefFeishu_CN_P", hrefFeishu_CN_P);
|
||||
}
|
||||
}
|
||||
String regulationOwnerId = projectLawsInventoryEO.getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
@@ -6879,6 +6939,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN, com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
paramsMsg.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
paramsMsg.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
paramsMsg.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
paramsMsg.put("Initiator", projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(), paramsMsg);
|
||||
@@ -10639,6 +10700,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -10706,6 +10768,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryId, todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -10772,6 +10835,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
@@ -10834,6 +10898,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN, com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator", projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(), params);
|
||||
@@ -10895,6 +10960,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -10962,6 +11028,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryId, todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
@@ -11028,6 +11095,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P",(String)hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
@@ -11090,6 +11158,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN, com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator", projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(), params);
|
||||
@@ -11794,6 +11863,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN, com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator", projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(), params);
|
||||
@@ -11885,6 +11955,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN, com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator", projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(), params);
|
||||
@@ -11955,6 +12026,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN, com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue());
|
||||
params.put("hrefFeishu_CN", (String) hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN", (String) hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("hrefFeishu_CN_P", (String) hrefFeishuMap.get("hrefFeishu_CN_P"));
|
||||
params.put("Initiator", projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE3.getValue(), params);
|
||||
@@ -12017,6 +12089,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String flowTypeEn = (String) params.get("flowTypeEn");
|
||||
String hrefFeishu_CN = (String) params.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) params.get("hrefFeishu_EN");
|
||||
String hrefFeishu_CN_P = (String) params.get("hrefFeishu_CN_P");
|
||||
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBase)) {
|
||||
@@ -12042,6 +12116,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
templateVariableMap.put("studioEngineerName", projectLibraryBase.getStudioEngineerName());
|
||||
templateVariableMap.put("endTime", endTime);
|
||||
templateVariableMap.put("viewBtnUrlCn", hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlCnPhone", hrefFeishu_CN_P);
|
||||
templateVariableMap.put("viewBtnUrlEn", hrefFeishu_EN);
|
||||
templateVariableMap.put("operateUserName", ObjectUtils.isNotEmpty(currentUser) ? currentUser.getUsername() : projectLibraryBase.getStudioEngineerName());
|
||||
templateVariableMap.put("standName", serialNumbers);
|
||||
@@ -12078,8 +12153,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
+ "&projectName=" + PRN_EN
|
||||
+ "&roleOpen=" + roleOpen;
|
||||
|
||||
result.put("hrefFeishu_CN", hrefFeishu_CN);
|
||||
result.put("hrefFeishu_EN", hrefFeishu_EN);
|
||||
//飞书手机跳转链接
|
||||
String hrefFeishu_CN_P = backUrlPhone
|
||||
+ JumpLinkEnum.TO_DO_CENTER_PHONE.getLink()+ "?keyWord=" + PRN_CN;
|
||||
|
||||
result.put("hrefFeishu_CN", URLUtil.encode(hrefFeishu_CN));
|
||||
result.put("hrefFeishu_EN", URLUtil.encode(hrefFeishu_EN));
|
||||
result.put("hrefFeishu_CN_P", URLUtil.encode(hrefFeishu_CN_P));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -12100,8 +12180,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String hrefFeishu_EN = backUrl
|
||||
+ JumpLinkEnum.FGRW_TO_DO_CENTER_LINK.getLink() + "?projectName=" + projectNameEn;
|
||||
|
||||
result.put("hrefFeishu_CN", hrefFeishu_CN);
|
||||
result.put("hrefFeishu_EN", hrefFeishu_EN);
|
||||
//飞书手机端跳转链接
|
||||
String hrefFeishu_CN_P = backUrlPhone
|
||||
+ JumpLinkEnum.TO_DO_CENTER_PHONE.getLink() + "?keyWord=" + projectNameCn;
|
||||
|
||||
result.put("hrefFeishu_CN", URLUtil.encode(hrefFeishu_CN));
|
||||
result.put("hrefFeishu_EN", URLUtil.encode(hrefFeishu_EN));
|
||||
result.put("hrefFeishu_CN_P",URLUtil.encode(hrefFeishu_CN_P));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -12959,6 +13044,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMsgJson.put("requestSource", RequestSourceEnum.WORK_FLOW.getValue());
|
||||
sendMsgJson.put("operatorType", OperatorTypeEnum.SEND_MSG.getValue());
|
||||
sendMsgJson.put("templateId", templateId);
|
||||
sendMsgJson.put("flowType", "Design");
|
||||
sendMsgJson.put("params", params);
|
||||
this.processCall(sendMsgJson);
|
||||
}
|
||||
@@ -13069,6 +13155,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMsgJson.put("requestSource", RequestSourceEnum.WORK_FLOW.getValue());
|
||||
sendMsgJson.put("operatorType", OperatorTypeEnum.SEND_MSG.getValue());
|
||||
sendMsgJson.put("templateId", templateId);
|
||||
sendMsgJson.put("flowType", "Verify");
|
||||
sendMsgJson.put("params", params);
|
||||
this.processCall(sendMsgJson);
|
||||
}
|
||||
|
||||
+1
-1
@@ -472,7 +472,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE13.getValue(),
|
||||
originalCertificationEngineerIdList,
|
||||
userInfoList,
|
||||
projectCertificationInventoryEOList.get(0).getEndTime()
|
||||
projectCertificationInventoryEOList.get(0).getEndTime(),""
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-1
@@ -190,4 +190,12 @@ public class LawsMonthlyReportManageEOController extends JeroController<LawsMont
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ApiOperation(value="法规月报更新ES", notes="法规月报更新ES")
|
||||
@PostMapping(value = "/updateES")
|
||||
public Result<?> updateES() {
|
||||
lawsMonthlyReportManageEOService.updateES();
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -72,6 +72,6 @@ public interface ILawsMonthlyReportManageEOService extends IService<LawsMonthlyR
|
||||
|
||||
void issue(LawsMonthlyReportManageEO lawsMonthlyReportManageEO);
|
||||
|
||||
|
||||
void updateES();
|
||||
|
||||
}
|
||||
|
||||
+22
@@ -24,6 +24,7 @@ import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -157,6 +158,27 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
syncElasticsearch(id, issueStatus, issueTime);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 法规月报更新ES
|
||||
*/
|
||||
@Override
|
||||
public void updateES() {
|
||||
int index = 0;
|
||||
List<LawsMonthlyReportManageEO> list = this.list();
|
||||
log.error("法规月报更新ES==开始==总数:" + list.size());
|
||||
for (LawsMonthlyReportManageEO lmr : list) {
|
||||
if (ObjectUtils.isNotEmpty(lmr) && "1".equals(lmr.getIssueStatus())) {
|
||||
syncElasticsearch(lmr.getId(),"2",lmr.getUpdateTime());
|
||||
syncElasticsearch(lmr.getId(),"1",lmr.getUpdateTime());
|
||||
index++;
|
||||
}
|
||||
}
|
||||
log.error("法规月报更新ES==结束==更新数量:" + index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void syncElasticsearch(String id, String issueStatus, Date issueTime) {
|
||||
LawsMonthlyReportManageEO monthlyReportManageEO = getById(id);
|
||||
|
||||
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.jero.modules.searchcenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.searchcenter.service.impl.IDocumentSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/3/14 9:56
|
||||
* @auth zhn
|
||||
*/
|
||||
@Api(tags="搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/search/document")
|
||||
@Slf4j
|
||||
public class PhoneDocumentSearchController {
|
||||
|
||||
@Autowired
|
||||
private IDocumentSearchService iDocumentSearchService;
|
||||
|
||||
/**
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属性
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @param cut 中英文切换
|
||||
* @param searchFlag 搜索中心标识 searchFlag = 0时,查询下拉,树形,日期等字段 type = 1时,查询输入框字段
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="searchFlag",required=true) String searchFlag) {
|
||||
List<Map<String,Object>> list = iDocumentSearchService.queryCondition(flag,cut,searchFlag);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 列表表头
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="searchFlag",required=true) String searchFla) {
|
||||
List<Map<String,Object>> list = iDocumentSearchService.getHeader(flag,cut,searchFla);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value="列表查询", notes="列表查询")
|
||||
@PostMapping(value = "/getInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getInfoList(map);
|
||||
return Result.OK(infoList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="全部查询", notes="全部查询")
|
||||
@PostMapping(value = "/getFullTextInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getFullTextInfoList(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = iDocumentSearchService.getFullTextInfoList(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value="文档库查询段落", notes="文档库查询段落")
|
||||
@PostMapping(value = "/getParagraphInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getParagraphInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage pageInfo = iDocumentSearchService.getParagraphInfoList(map);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="根据id删除", notes="根据id删除")
|
||||
@GetMapping(value = "/deleteById")
|
||||
public Result<?> deleteById(@RequestParam String ids) {
|
||||
iDocumentSearchService.deleteById(ids);
|
||||
return Result.OK();
|
||||
}
|
||||
@ApiOperation(value="全部删除", notes="全部删除")
|
||||
@GetMapping(value = "/deleteAll")
|
||||
public Result<?> deleteAll() {
|
||||
iDocumentSearchService.deleteAll();
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value="列表查询问题知识库", notes="列表查询问题知识库")
|
||||
@PostMapping(value = "/getProblemKnowledgeBasePage")
|
||||
//@RequiresPermissions("document:search")
|
||||
public Result<?> getProblemKnowledgeBasePage(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getProblemKnowledgeBasePage(map);
|
||||
return Result.OK(infoList);
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.modules.searchcenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @description 搜索中心-法规月报 控制层
|
||||
* @date 2022/8/17 15:03
|
||||
* @auth liyawei
|
||||
*/
|
||||
@Api(tags="搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/search/lawsMonthlyReport")
|
||||
@Slf4j
|
||||
public class PhoneLawsMonthlyReportSearchController {
|
||||
|
||||
@Autowired
|
||||
private ILawsMonthlyReportSearchService lawsMonthlyReportSearchService;
|
||||
|
||||
@ApiOperation(value="法规月报查询", notes="法规月报查询")
|
||||
@PostMapping(value = "/page")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> queryPageInfo(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = lawsMonthlyReportSearchService.pageInfo(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
package com.jero.modules.subscribe.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 我的订阅
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="我的订阅")
|
||||
@RestController
|
||||
@RequestMapping("/phone/subscribe/onlCgformSubscribe")
|
||||
@Slf4j
|
||||
public class PhoneOnlCgformSubscribeController extends JeroController<OnlCgformSubscribe, IOnlCgformSubscribeService> {
|
||||
@Autowired
|
||||
private IOnlCgformSubscribeService onlCgformSubscribeService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param onlCgformSubscribe
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-分页列表查询")
|
||||
@ApiOperation(value="我的订阅-分页列表查询", notes="我的订阅-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
/*
|
||||
public Result<?> queryPageList(OnlCgformSubscribe onlCgformSubscribe,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OnlCgformSubscribe> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformSubscribe, req.getParameterMap());
|
||||
Page<OnlCgformSubscribe> page = new Page<OnlCgformSubscribe>(pageNo, pageSize);
|
||||
IPage<OnlCgformSubscribe> pageList = onlCgformSubscribeService.page(page, queryWrapper);
|
||||
*/
|
||||
IPage<OnlCgformSubscribe> pageList = onlCgformSubscribeService.queryPageList(params);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-表头中英文切换")
|
||||
@ApiOperation(value="我的订阅-表头中英文切换", notes="我的订阅-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformSubscribeService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-查询条件中英文切换")
|
||||
@ApiOperation(value="我的订阅-查询条件中英文切换", notes="我的订阅-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformSubscribeService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-列表查询")
|
||||
@ApiOperation(value="我的订阅-列表查询", notes="我的订阅-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformSubscribe>> queryList(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
List<OnlCgformSubscribe> list = onlCgformSubscribeService.queryList(onlCgformSubscribe);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformSubscribe
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-添加")
|
||||
@ApiOperation(value="我的订阅-添加", notes="我的订阅-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformSubscribe onlCgformSubscribe) {
|
||||
LambdaQueryWrapper<OnlCgformSubscribe> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(OnlCgformSubscribe::getDocumentId, onlCgformSubscribe.getDocumentId())
|
||||
.eq(OnlCgformSubscribe::getId, onlCgformSubscribe.getId());
|
||||
int count = onlCgformSubscribeService.count(lambdaQueryWrapper);
|
||||
if (count == 0) {
|
||||
onlCgformSubscribeService.add(onlCgformSubscribe);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
else{
|
||||
return Result.error("该值不可重复添加,系统中已存在");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param onlCgformSubscribe
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-编辑")
|
||||
@ApiOperation(value="我的订阅-编辑", notes="我的订阅-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformSubscribe onlCgformSubscribe) {
|
||||
onlCgformSubscribeService.editById(onlCgformSubscribe);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-通过id删除")
|
||||
@ApiOperation(value="我的订阅-通过id删除", notes="我的订阅-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformSubscribeService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-批量删除")
|
||||
@ApiOperation(value="我的订阅-批量删除", notes="我的订阅-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformSubscribeService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-通过id查询")
|
||||
@ApiOperation(value="我的订阅-通过id查询", notes="我的订阅-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
OnlCgformSubscribe onlCgformSubscribe = onlCgformSubscribeService.queryById(id);
|
||||
if(onlCgformSubscribe==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param onlCgformSubscribe
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OnlCgformSubscribe onlCgformSubscribe) {
|
||||
return super.exportXls(request, onlCgformSubscribe, OnlCgformSubscribe.class, "我的订阅");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, OnlCgformSubscribe.class);
|
||||
}
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.jero.modules.todoCenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.todoCenter.service.IParamsManifestTodoCenterService;
|
||||
import com.jero.modules.todoCenter.vo.ParamsManifestTodoCenterEOPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 09:43 2022/10/11
|
||||
*/
|
||||
|
||||
@Api(tags="待办中心-参数清单")
|
||||
@RestController
|
||||
@RequestMapping("/phone/todoCenter/params/manifest")
|
||||
@Slf4j
|
||||
public class PhoneParamsManifestTodoCenterController {
|
||||
|
||||
@Autowired
|
||||
private IParamsManifestTodoCenterService paramsManifestTodoCenterService;
|
||||
|
||||
@AutoLog(value = "分页查询")
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@GetMapping(value = "/page")
|
||||
// @RequiresPermissions("params:collectManifest:list")
|
||||
public Result<?> page(ParamsManifestTodoCenterEOPage pageVO) {
|
||||
IPage page = paramsManifestTodoCenterService.queryPage(pageVO);
|
||||
return Result.OK(page);
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.jero.modules.todoCenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags="待办中心-项目流程")
|
||||
@RestController
|
||||
@RequestMapping("/phone/todoCenter/projectProcess")
|
||||
@Slf4j
|
||||
public class PhoneProjectProcessTodoCenterController {
|
||||
|
||||
@Autowired
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
|
||||
@AutoLog(value = "分页查询-待办任务列表")
|
||||
@ApiOperation(value="分页查询-待办任务列表", notes="分页查询-待办任务列表")
|
||||
@GetMapping(value = "/todoTaskList")
|
||||
public Result<?> todoTaskList(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.processInfoEOService.projectProcessTodoTaskList(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "分页查询-已办任务列表")
|
||||
@ApiOperation(value="分页查询-已办任务列表", notes="分页查询-已办任务列表")
|
||||
@GetMapping(value = "/doneProcess")
|
||||
public Result<?> doneProcess(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.processInfoEOService.projectProcessDoneProcess(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "分页查询-已发任务列表")
|
||||
@ApiOperation(value="分页查询-已发任务列表", notes="分页查询-已发任务列表")
|
||||
@GetMapping(value = "/issuedProcess")
|
||||
public Result<?> issuedProcess(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.processInfoEOService.projectProcessIssuedProcess(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "待办中心-法规评估-初始化历史数据")
|
||||
@ApiOperation(value="待办中心-法规评估-初始化历史数据", notes="待办中心-法规评估-初始化历史数据")
|
||||
@GetMapping(value = "/initHistoryData")
|
||||
public Result<?> initHistoryData(@RequestParam Map<String,Object> params) {
|
||||
return this.processInfoEOService.initHistoryData(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "待办中心-符合性流程数据迁移")
|
||||
@ApiOperation(value="待办中心-符合性流程数据迁移", notes="待办中心-符合性流程数据迁移")
|
||||
@GetMapping(value = "/complianceDataMigration")
|
||||
public Result<?> complianceDataMigration(@RequestParam Map<String,Object> params) {
|
||||
return this.processInfoEOService.complianceDataMigration(params);
|
||||
}
|
||||
}
|
||||
+9
-9
@@ -7,17 +7,17 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* 待办中心-设计符合性流程节点key枚举类
|
||||
*/
|
||||
public enum DesignComplianceFlowNodeKeyEnum {
|
||||
FQLC("发起流程","Initiate the process","fqlc"),
|
||||
ZRRQR("任务责任确认","Confirmation of mission responsibility","zrrqr"), // 责任人确认
|
||||
DEZRRQR("任务责任确认","Confirmation of mission responsibility","dezrrqr"),// 第二责任人确认
|
||||
ZRRTJJFW("符合性确认","Compliance confirmation","zrrtjjfw"),// "责任人提交交付物"
|
||||
DEZRRTJJFW("符合性确认","Compliance confirmation","dezrrtjjfw"),// 第二责任人提交交付物
|
||||
FGGCSSH("符合性审查","Compliance review","fggcssh"), // 法规工程师审核
|
||||
FQLC("发起流程","Task Initiation","fqlc"),
|
||||
ZRRQR("任务责任确认","Responsibilty Confirmation","zrrqr"), // 责任人确认
|
||||
DEZRRQR("任务责任确认","Responsibilty Confirmation","dezrrqr"),// 第二责任人确认
|
||||
ZRRTJJFW("符合性确认","Compliance Confirmation","zrrtjjfw"),// "责任人提交交付物"
|
||||
DEZRRTJJFW("符合性确认","Compliance Confirmation","dezrrtjjfw"),// 第二责任人提交交付物
|
||||
FGGCSSH("符合性审查","Compliance Review","fggcssh"), // 法规工程师审核
|
||||
|
||||
// 修改交付物流程
|
||||
BCTJ_ZRRBCTJFQ("补充提交","Supplementary submission","zrrbctjfq"), // 责任人补充提交发起
|
||||
BCTJ_ZRRBCTJXG("补充提交","Supplementary submission","zrrbctjxg"), // 责任人补充提交修改
|
||||
BCTJ_FGGCSBCSH("补充审查","Supplemental Examination","fggcsbcsh"), // 法规工程师补充审核
|
||||
BCTJ_ZRRBCTJFQ("补充提交","Supplementary Submission","zrrbctjfq"), // 责任人补充提交发起
|
||||
BCTJ_ZRRBCTJXG("补充提交","Supplementary Submission","zrrbctjxg"), // 责任人补充提交修改
|
||||
BCTJ_FGGCSBCSH("补充审查","Supplementary Review","fggcsbcsh"), // 法规工程师补充审核
|
||||
;
|
||||
|
||||
String cnName;
|
||||
|
||||
+9
-9
@@ -7,17 +7,17 @@ import org.apache.commons.lang3.StringUtils;
|
||||
* 待办中心-验证符合性流程节点key枚举类
|
||||
*/
|
||||
public enum VerifyComplianceFlowNodeKeyEnum {
|
||||
FQLC("发起流程","Initiate the process","fqlc"),
|
||||
ZRRQR("任务责任确认","Confirmation of mission responsibility","zrrqr"), // 责任人确认
|
||||
DEZRRQR("任务责任确认","Confirmation of mission responsibility","dezrrqr"),// 第二责任人确认
|
||||
ZRRTJJFW("符合性确认","Compliance confirmation","zrrtjjfw"),// "责任人提交交付物"
|
||||
DEZRRTJJFW("符合性确认","Compliance confirmation","dezrrtjjfw"),// 第二责任人提交交付物
|
||||
FGGCSSH("符合性审查","Compliance review","fggcssh"), // 法规工程师审核
|
||||
FQLC("发起流程","Task Initiation","fqlc"),
|
||||
ZRRQR("任务责任确认","Responsibility Confirm","zrrqr"), // 责任人确认
|
||||
DEZRRQR("任务责任确认","Responsibility Confirm","dezrrqr"),// 第二责任人确认
|
||||
ZRRTJJFW("符合性确认","Compliance Confirm","zrrtjjfw"),// "责任人提交交付物"
|
||||
DEZRRTJJFW("符合性确认","Compliance Confirm","dezrrtjjfw"),// 第二责任人提交交付物
|
||||
FGGCSSH("符合性审查","Compliance Review","fggcssh"), // 法规工程师审核
|
||||
|
||||
// 修改交付物流程
|
||||
BCTJ_ZRRBCTJFQ("补充提交","Supplementary submission","zrrbctjfq"), // 责任人补充提交发起
|
||||
BCTJ_ZRRBCTJXG("补充提交","Supplementary submission","zrrbctjxg"), // 责任人补充提交修改
|
||||
BCTJ_FGGCSBCSH("补充审查","Supplemental Examination","fggcsbcsh"), // 法规工程师补充审核
|
||||
BCTJ_ZRRBCTJFQ("补充提交","Supplementary Submission","zrrbctjfq"), // 责任人补充提交发起
|
||||
BCTJ_ZRRBCTJXG("补充提交","Supplementary Submission","zrrbctjxg"), // 责任人补充提交修改
|
||||
BCTJ_FGGCSBCSH("补充审查","Supplementary Review","fggcsbcsh"), // 法规工程师补充审核
|
||||
;
|
||||
|
||||
String cnName;
|
||||
|
||||
+1
-1
@@ -782,7 +782,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
||||
if(StringUtils.equals(data.getFlowType(),FlowTypeEnum.QDQR.getValue())){
|
||||
String taskDefinitionKeyName = "任务发起";
|
||||
if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
taskDefinitionKeyName = "Task initiation";
|
||||
taskDefinitionKeyName = "Task Initiation";
|
||||
}
|
||||
data.setTaskDefinitionKeyName(taskDefinitionKeyName);
|
||||
}
|
||||
|
||||
+5
-2
@@ -87,6 +87,8 @@ public class LawsWarnService {
|
||||
private ISysUserService sysUserService;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
@Resource
|
||||
@@ -566,8 +568,8 @@ public class LawsWarnService {
|
||||
for (String s : urlList) {
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
String encode = UriEncoder.encode(s);
|
||||
String contentInfoFei = sysUser.getUsername() +" shared Regulation Early Warning infomation with you.";
|
||||
String contentInfoFeiCn = sysUser.getUsername() +"向您分享了法规预警信息.";
|
||||
String contentInfoFei = sysUser.getUsername() +" shared Regulation Early Warning infomation with you."+ "-Check on the PC";
|
||||
String contentInfoFeiCn = sysUser.getUsername() +"向您分享了法规预警信息."+ "-请在PC端查看";
|
||||
List<String> userIdListNew = userIdList;
|
||||
mapList.stream().forEach(e->{
|
||||
if(s.contains((String)e.get("id"))){
|
||||
@@ -599,6 +601,7 @@ public class LawsWarnService {
|
||||
params.put("contentInfoFeiEn",contentInfoFei);
|
||||
params.put("userIdList",userIdListNew);
|
||||
params.put("back_url",encode);
|
||||
params.put("back_url_phone",backUrlPhone);
|
||||
params.put("titleCn", " "+documentTitleCn);
|
||||
params.put("titleEn"," "+documentTitleEn);
|
||||
params.put("regulationNo"," "+serialNumber);
|
||||
|
||||
+11
-6
@@ -56,6 +56,8 @@ public class TimedTaskWarn implements Job {
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
@Value(value = "${jero.backUrlPhone}")
|
||||
private String backUrlPhone;
|
||||
|
||||
/**
|
||||
* 法规预警定时任务
|
||||
@@ -106,6 +108,7 @@ public class TimedTaskWarn implements Job {
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
//跳转文档详情
|
||||
String url = backUrl + "/docManage/library/detail?id=" + id;
|
||||
String urlPhone = backUrlPhone + "/phoneDocumentDetails?id=" + id;
|
||||
//订阅的用户
|
||||
List<OnlCgformSubscribe> onlCgformSubscribe = subscribeList.stream().filter(e -> e.getDocumentId().equals(bussDocumentLibraryEO.getId())).collect(Collectors.toList());
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
@@ -139,19 +142,19 @@ public class TimedTaskWarn implements Job {
|
||||
// }
|
||||
if(currentTime.equals(beforeTimeSixTen)){
|
||||
//发送飞书消息(提前一年)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1",userIdList);
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, urlPhone,thirdIdList,"1",userIdList);
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSix)){
|
||||
//发送飞书消息(提前6个月)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6",userIdList);
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, urlPhone,thirdIdList,"6",userIdList);
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||
//发送飞书消息(当天)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0",userIdList);
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, urlPhone,thirdIdList,"0",userIdList);
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href);
|
||||
}
|
||||
@@ -178,19 +181,19 @@ public class TimedTaskWarn implements Job {
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSixTen)){
|
||||
//发送飞书消息(提前一年)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1",userIdList);
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, urlPhone,thirdIdList,"1",userIdList);
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSix)){
|
||||
//发送飞书消息(提前6个月)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6",userIdList);
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, urlPhone,thirdIdList,"6",userIdList);
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(implementTimeStr)){
|
||||
//发送飞书消息(当天)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0",userIdList);
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, urlPhone,thirdIdList,"0",userIdList);
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href);
|
||||
}
|
||||
@@ -201,6 +204,7 @@ public class TimedTaskWarn implements Job {
|
||||
private void sendFeishu(SimpleDateFormat sdf,
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
String url,
|
||||
String urlPhone,
|
||||
List<String> thirdIdList,
|
||||
String flag,
|
||||
List<String> userIdList) {
|
||||
@@ -241,6 +245,7 @@ public class TimedTaskWarn implements Job {
|
||||
params.put("contentInfoFeiEn",contentEn);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("back_url",url);
|
||||
params.put("back_url_phone",urlPhone);
|
||||
params.put("titleCn", " "+ bussDocumentLibraryEO.getTitle());
|
||||
params.put("titleEn", " "+ bussDocumentLibraryEO.getTitleEn());
|
||||
params.put("regulationNo", " "+ bussDocumentLibraryEO.getSerialNumber());
|
||||
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.wkflow.entity.ProcessHistoryEO;
|
||||
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="流程历史表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/wkflow/processHistoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProcessHistoryEOController extends JeroController<ProcessHistoryEO, IProcessHistoryEOService> {
|
||||
@Autowired
|
||||
private IProcessHistoryEOService processHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param processHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-分页列表查询")
|
||||
@ApiOperation(value="流程历史表-分页列表查询", notes="流程历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProcessHistoryEO processHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProcessHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(processHistoryEO, req.getParameterMap());
|
||||
Page<ProcessHistoryEO> page = new Page<ProcessHistoryEO>(pageNo, pageSize);
|
||||
IPage<ProcessHistoryEO> pageList = processHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-列表查询")
|
||||
@ApiOperation(value="流程历史表-列表查询", notes="流程历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProcessHistoryEO>> queryList(@RequestParam Map<String,Object> params) {
|
||||
List<ProcessHistoryEO> list = processHistoryEOService.queryList(params);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param processHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-添加")
|
||||
@ApiOperation(value="流程历史表-添加", notes="流程历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProcessHistoryEO processHistoryEO) {
|
||||
processHistoryEOService.add(processHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param processHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-编辑")
|
||||
@ApiOperation(value="流程历史表-编辑", notes="流程历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProcessHistoryEO processHistoryEO) {
|
||||
processHistoryEOService.editById(processHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-通过id删除")
|
||||
@ApiOperation(value="流程历史表-通过id删除", notes="流程历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
processHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-批量删除")
|
||||
@ApiOperation(value="流程历史表-批量删除", notes="流程历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.processHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-通过id查询")
|
||||
@ApiOperation(value="流程历史表-通过id查询", notes="流程历史表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProcessHistoryEO processHistoryEO = processHistoryEOService.queryById(id);
|
||||
if(processHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(processHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param processHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProcessHistoryEO processHistoryEO) {
|
||||
return super.exportXls(request, processHistoryEO, ProcessHistoryEO.class, "流程历史表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProcessHistoryEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-任务清单表-流程调用")
|
||||
@ApiOperation(value="项目库-任务清单表-流程调用", notes="项目库-任务清单表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.processHistoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-符合性流程-列表查询")
|
||||
@ApiOperation(value="流程历史表-符合性流程-列表查询", notes="流程历史表-符合性流程-列表查询")
|
||||
@GetMapping(value = "/queryComplianceProcessHistoryList")
|
||||
public Result<List<ProcessHistoryEO>> queryComplianceProcessHistoryList(@RequestParam Map<String,Object> params) {
|
||||
List<ProcessHistoryEO> list = processHistoryEOService.queryComplianceProcessHistoryList(params);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
}
|
||||
+285
@@ -0,0 +1,285 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.project.service.IProjectNameInfoEOService;
|
||||
import com.jero.modules.project.service.IProjectYearNameInfoEOService;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.entity.BusProcessName;
|
||||
import com.jero.modules.wkflow.entity.BusProcessNew;
|
||||
import com.jero.modules.wkflow.entity.TaskCommonQuery;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import com.jero.modules.wkflow.feginClient.impl.TaskFeignClientImpl;
|
||||
import com.jero.modules.wkflow.page.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="待办任务")
|
||||
@RestController
|
||||
@RequestMapping("/phone/task")
|
||||
public class PhoneTaskController {
|
||||
|
||||
@Autowired
|
||||
private TaskFeignClientImpl taskFeignClient;
|
||||
@Autowired
|
||||
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
@Autowired
|
||||
private IProjectNameInfoEOService projectNameInfoEOService;
|
||||
@Autowired
|
||||
private IProjectYearNameInfoEOService projectYearNameInfoEOService;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询待办任务数据")
|
||||
@ApiOperation(value="查询待办任务数据", notes="查询待办任务数据")
|
||||
@GetMapping("/queryTaskByTaskIds")
|
||||
public BusProcessNew queryTaskByTaskIds(@RequestParam("taskIds") String taskIds){
|
||||
return taskFeignClient.queryTaskByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据待办id,查询任务明细数据")
|
||||
@ApiOperation(value="根据待办id,查询任务明细数据", notes="根据待办id,查询任务明细数据")
|
||||
@GetMapping("/queryTaskDetailByTaskIds")
|
||||
public String queryTaskDetailByTaskIds(@RequestParam("taskIds") String taskIds) {
|
||||
return taskFeignClient.queryTaskDetailByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "保存任务")
|
||||
@ApiOperation(value="保存任务", notes="保存任务")
|
||||
@PostMapping("/saveTask")
|
||||
public Result<String> saveTask(@RequestBody BusMes busMes){
|
||||
return taskFeignClient.saveTask(busMes);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的已办任务列表")
|
||||
@ApiOperation(value="我的已办任务列表", notes="我的已办任务列表")
|
||||
@PostMapping("/hastodoTasksList")
|
||||
public Result<Map<String, Object>> HastodoTasksListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
return taskFeignClient.HastodoTasksListByUserId(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的待办任务列表")
|
||||
@ApiOperation(value="我的待办任务列表", notes="我的待办任务列表")
|
||||
@PostMapping("/todoTaskList")
|
||||
public Page todoTaskListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
taskCommonQuery.setUserId(sysUser.getId());
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.todoTaskListByUserId(taskCommonQuery);
|
||||
List list1 = this.startPage(busProcessNames, taskCommonQuery.getCurrent(), taskCommonQuery.getSize());
|
||||
Page pageInfo = new Page();
|
||||
if(busProcessNames!=null){
|
||||
this.disposeTaskToConfirm(busProcessNames,taskCommonQuery);
|
||||
pageInfo.setList(list1);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(busProcessNames.size()));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}else{
|
||||
List<BusProcessName> list = new ArrayList<>();
|
||||
pageInfo.setList(list);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(0));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理任务确认流程回显数据
|
||||
* @param busProcessNames
|
||||
*/
|
||||
public void disposeTaskToConfirm(List<BusProcessName> busProcessNames,TaskCommonQuery taskCommonQuery){
|
||||
List<String> projectLawsInventoryIdList = busProcessNames.stream().filter(busProcessName -> {
|
||||
boolean flag = false;
|
||||
if(org.apache.commons.lang3.StringUtils.equals(busProcessName.getPrcType(), FlowTypeEnum.RWQRLC.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(BusProcessName::getProjectLawsInventoryId).distinct().collect(Collectors.toList());
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){
|
||||
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrap = new QueryWrapper<>();
|
||||
lawsInventoryQueryWrap.lambda().in(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList);
|
||||
projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryQueryWrap);
|
||||
|
||||
List<String> projectLibraryIdList = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryIdList)){
|
||||
QueryWrapper<ProjectLibraryBase> libraryBaseQueryWrap = new QueryWrapper<>();
|
||||
libraryBaseQueryWrap.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
|
||||
projectLibraryBaseList = this.projectLibraryBaseService.list(libraryBaseQueryWrap);
|
||||
this.projectLibraryBaseService.disposeData(projectLibraryBaseList,taskCommonQuery.getCut(),true);
|
||||
}
|
||||
for (BusProcessName busProcessName : busProcessNames) {
|
||||
if(org.apache.commons.lang3.StringUtils.equals(busProcessName.getPrcType(),FlowTypeEnum.RWQRLC.getValue())){
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryS = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag = false;
|
||||
if(org.apache.commons.lang3.StringUtils.equals(busProcessName.getProjectLawsInventoryId(),lawsInventory.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryS) && CollectionUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryS.get(0);
|
||||
busProcessName.setSerialNumber(projectLawsInventoryEO.getSerialNumber());
|
||||
busProcessName.setTitle(projectLawsInventoryEO.getTitle());
|
||||
|
||||
List<ProjectLibraryBase> projectLibraryBaseS = projectLibraryBaseList.stream().filter(projectLibraryBase -> {
|
||||
boolean flag = false;
|
||||
if (org.apache.commons.lang3.StringUtils.equals(projectLibraryBase.getId(), projectLawsInventoryEO.getProjectLibraryId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryBaseS)){
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseS.get(0);
|
||||
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
|
||||
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBase.getProjectNameId())
|
||||
);
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(
|
||||
new QueryWrapper<ProjectYearNameInfoEO>().lambda().eq(ProjectYearNameInfoEO::getId, projectLibraryBase.getYearNameId())
|
||||
);
|
||||
|
||||
busProcessName.setProjectName(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" +projectLibraryBase.getTargetMarketName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询草稿")
|
||||
@ApiOperation(value="查询草稿", notes="查询草稿")
|
||||
@PostMapping("/queryTaskDraft")
|
||||
public Page queryTaskDraft(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.queryTaskDraft(taskCommonQuery);
|
||||
List list1 = this.startPage(busProcessNames, taskCommonQuery.getCurrent(), taskCommonQuery.getSize());
|
||||
Page pageInfo = new Page();
|
||||
if(busProcessNames!=null){
|
||||
pageInfo.setList(list1);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(busProcessNames.size()));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}else{
|
||||
List<BusProcessName> list = new ArrayList<BusProcessName>();
|
||||
pageInfo.setList(list);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(0));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@AutoLog(value = "已办流程")
|
||||
@ApiOperation(value="已办流程", notes="已办流程")
|
||||
@PostMapping("/doneProcess")
|
||||
public Page doneProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
taskCommonQuery.setUserId(sysUser.getId());
|
||||
return taskFeignClient.doneProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "已发流程")
|
||||
@ApiOperation(value="已发流程", notes="已发流程")
|
||||
@PostMapping("/IssuedProcess")
|
||||
public Page IssuedProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
taskCommonQuery.setUserId(sysUser.getId());
|
||||
return taskFeignClient.issuedProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "监控流程列表")
|
||||
@ApiOperation(value="监控流程列表", notes="监控流程列表")
|
||||
@PostMapping("/allProcess")
|
||||
public Page allProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
return taskFeignClient.allProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "已办流程-根据taskId查询已办明细")
|
||||
@ApiOperation(value="已办流程-根据taskId查询已办明细", notes="已办流程-根据taskId查询已办明细")
|
||||
@GetMapping("/haveFinishedFlowDetail")
|
||||
public String haveFinishedFlowDetail(@RequestParam Map<String,Object> params){
|
||||
/**
|
||||
* params
|
||||
* taskId: 待办id 不能为null
|
||||
*/
|
||||
if(StringUtils.isEmpty((String) params.get("taskId"))){
|
||||
throw new RuntimeException("待办id不能为空。");
|
||||
}
|
||||
return taskFeignClient.haveFinishedFlowDetail(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除草稿")
|
||||
@ApiOperation(value="删除草稿", notes="删除草稿")
|
||||
@GetMapping("/deleteDraft")
|
||||
public Result<String> deleteDraft(@RequestParam("id")String id){
|
||||
return taskFeignClient.deleteDraft(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始分页
|
||||
* @param list
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页多少条数据
|
||||
* @return
|
||||
*/
|
||||
public static List startPage(List list, Integer pageNum,
|
||||
Integer pageSize) {
|
||||
if (list == null) {
|
||||
return null;
|
||||
}
|
||||
if (list.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Integer count = list.size(); // 记录总数
|
||||
Integer pageCount = 0; // 页数
|
||||
if (count % pageSize == 0) {
|
||||
pageCount = count / pageSize;
|
||||
} else {
|
||||
pageCount = count / pageSize + 1;
|
||||
}
|
||||
|
||||
int fromIndex = 0; // 开始索引
|
||||
int toIndex = 0; // 结束索引
|
||||
|
||||
if (pageNum != pageCount) {
|
||||
fromIndex = (pageNum - 1) * pageSize;
|
||||
toIndex = fromIndex + pageSize;
|
||||
} else {
|
||||
fromIndex = (pageNum - 1) * pageSize;
|
||||
toIndex = count;
|
||||
}
|
||||
|
||||
List pageList = list.subList(fromIndex, toIndex);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
}
|
||||
+244
@@ -0,0 +1,244 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||
import com.jero.modules.project.enums.CurrentProjectStatusEnum;
|
||||
import com.jero.modules.project.enums.ProjectRoleEnum;
|
||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="工作流管理")
|
||||
@RestController
|
||||
@RequestMapping("/phone/workFlow")
|
||||
public class PhoneworkFlowController {
|
||||
|
||||
@Autowired
|
||||
private WorkFlowFeignClientImpl workFlowFeignClient;
|
||||
|
||||
@Autowired
|
||||
private IConditionAssessmentEOService conditionAssessmentEOService;
|
||||
|
||||
@Autowired
|
||||
private WebSocket webSocket;
|
||||
|
||||
public Result activiti_define_start(@RequestBody JSONObject jsonObject){
|
||||
return workFlowFeignClient.activiti_define_start(jsonObject);
|
||||
}
|
||||
|
||||
@AutoLog(value = "启动流程-以流程定义id")
|
||||
@ApiOperation(value="启动流程-以流程定义id", notes="启动流程-以流程定义id")
|
||||
@PostMapping("/startProcess")
|
||||
public Result startProcess(@RequestBody JSONObject jsonObject){
|
||||
String type = jsonObject.getString("type");
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
jsonObject.put("loginUserId", currentUser.getId());
|
||||
jsonObject.put("loginUserName", currentUser.getUsername());
|
||||
if(StringUtils.equals(type,FlowTypeEnum.RWQRLC.getValue())){
|
||||
/*jsonObject.put("id", FlowTypeEnum.RWQRLC.getProcessDefinitionKey()); //流程定义id
|
||||
return this.activiti_define_start(jsonObject);*/
|
||||
jsonObject.put("processDefinitionKey", FlowTypeEnum.RWQRLC.getProcessDefinitionKey());
|
||||
return this.startTaskToConfirmProcess(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.SJFHXSHLC.getProcessDefinitionKey());
|
||||
//initConditionAssessmentEO(jsonObject);
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.PREHOMOQRLC.getProcessDefinitionKey());
|
||||
//initConditionAssessmentEO(jsonObject);
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.YZFHXSCLC.getProcessDefinitionKey());
|
||||
//initConditionAssessmentEO(jsonObject);
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.FGYJSJLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.FGYJSJLC.getProcessDefinitionKey());
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.FGJSPG.getValue())){
|
||||
jsonObject.put("processDefinitionKey", FlowTypeEnum.FGJSPG.getProcessDefinitionKey());
|
||||
return this.startLawsTechnologyEvaluationProcess(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.XGJFWLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.XGJFWLC.getProcessDefinitionKey());
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@AutoLog(value = "完成任务")
|
||||
@ApiOperation(value="完成任务", notes="完成任务")
|
||||
@PostMapping("/completeTask")
|
||||
public Result<String> completeTaskByUserId(@RequestBody BusMes busMes){
|
||||
if(StringUtils.isEmpty(busMes.getUserId())){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
busMes.setUserId(currentUser.getId());
|
||||
}
|
||||
Result<String> str = workFlowFeignClient.completeTaskByUserId(busMes);
|
||||
if(str.getCode() == 500){
|
||||
str.setSuccess(false);
|
||||
}
|
||||
sendWebsocket(busMes.getTaskId(),busMes.getTaskId());
|
||||
return str;
|
||||
}
|
||||
|
||||
@AutoLog(value = "批量完成任务")
|
||||
@ApiOperation(value="批量完成任务", notes="批量完成任务")
|
||||
@PostMapping("/completeTaskBatch")
|
||||
public Result<String> completeTaskByUserIdBatch(@RequestBody BusMes busMes){
|
||||
if(StringUtils.isEmpty(busMes.getUserId())){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
busMes.setUserId(currentUser.getId());
|
||||
}
|
||||
Result<String> str = workFlowFeignClient.completeTaskByUserIdBatch(busMes);
|
||||
if(str.getCode() == 500){
|
||||
str.setSuccess(false);
|
||||
}
|
||||
// sendWebsocket(busMes.getTaskId(),busMes.getTaskId());
|
||||
return str;
|
||||
}
|
||||
|
||||
public void sendWebsocket(String msgId, String msgTet) {
|
||||
com.alibaba.fastjson.JSONObject obj = new com.alibaba.fastjson.JSONObject();
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||
obj.put(WebsocketConst.MSG_ID, msgId);
|
||||
obj.put(WebsocketConst.MSG_TXT, msgTet);
|
||||
webSocket.sendMessage(obj.toJSONString());
|
||||
}
|
||||
|
||||
@AutoLog(value = "通过流程实例id查询当前待办的流程实例是否结束")
|
||||
@ApiOperation(value="通过流程实例id查询当前待办的流程实例是否结束", notes="通过流程实例id查询当前待办的流程实例是否结束")
|
||||
@GetMapping("/queryTaskWhetherToEnd")
|
||||
public String queryTaskWhetherToEnd(@RequestParam("prcId") String prcId) {
|
||||
return workFlowFeignClient.queryTaskWhetherToEnd(prcId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "改派")
|
||||
@ApiOperation(value="改派", notes="改派")
|
||||
@GetMapping("/changeAssigneeNew")
|
||||
public Result<String> run(@RequestParam("taskId")String taskId,@RequestParam("assignee") String assignee,
|
||||
@RequestParam("userId")String userId,@RequestParam("pId") String pId) {
|
||||
return workFlowFeignClient.run(taskId,assignee,userId,pId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "保存任务第一步")
|
||||
@ApiOperation(value="保存任务第一步", notes="保存任务第一步")
|
||||
@PostMapping("/saveTaskFirst")
|
||||
public Result<String> saveTaskFirst(BusMes busMes){
|
||||
return workFlowFeignClient.saveTaskFirst(busMes);
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询流程是否结束")
|
||||
@ApiOperation(value="查询流程是否结束", notes="查询流程是否结束")
|
||||
@GetMapping("/isEnd")
|
||||
public String isEnd(@RequestParam("pId")String pId){
|
||||
return workFlowFeignClient.isEnd(pId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除流程")
|
||||
@ApiOperation(value="删除流程", notes="删除流程")
|
||||
@GetMapping("/deleteProcessInstance")
|
||||
public Result<String> deleteProcessInstance(@RequestParam("pId")String pId){
|
||||
return workFlowFeignClient.deleteProcessInstance(pId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "流程实例明细列表")
|
||||
@ApiOperation(value="流程实例明细列表", notes="流程实例明细列表")
|
||||
@GetMapping("/get_list_by_instance")
|
||||
public List<Map<String, Object>> get_list_by_instance(@RequestParam("prcNum") String prcNum,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){
|
||||
return workFlowFeignClient.get_list_by_instance(prcNum,cut,prcType,sortWord,shunxu);
|
||||
}
|
||||
|
||||
@AutoLog(value = "获取图片")
|
||||
@ApiOperation(value="获取图片", notes="获取图片")
|
||||
@GetMapping("/getImg")
|
||||
public void getImg(@RequestParam("prcNum")String prcNum,HttpServletResponse response) throws IOException {
|
||||
OutputStream os = null;
|
||||
response.setContentType("image/jpg");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
os.write(workFlowFeignClient.getImg(prcNum));
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
|
||||
@AutoLog(value = "强制撤回")
|
||||
@ApiOperation(value="强制撤回", notes="强制撤回")
|
||||
@GetMapping("/forceRecall")
|
||||
public Result<String> forceRecall(@RequestParam("prcId") String prcId){
|
||||
return workFlowFeignClient.forceRecall(prcId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询流程列表")
|
||||
@ApiOperation(value="查询流程列表", notes="查询流程列表")
|
||||
@GetMapping("/modelListPage")
|
||||
public Result<Map<String, Object>> modelListPage(@RequestParam(value="name",required = false)String name, @RequestParam(value="category_id ",required = false)String category_id,
|
||||
@RequestParam("current")int current, @RequestParam("size")int size){
|
||||
return workFlowFeignClient.modelListPage(name,category_id,current,size);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据流程实例id查询流程历史")
|
||||
@ApiOperation(value="根据流程实例id查询流程历史", notes="根据流程实例id查询流程历史")
|
||||
@GetMapping("/queryProcessHistoryByPrcId")
|
||||
public List<Map<String, Object>> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){
|
||||
return workFlowFeignClient.queryProcessHistoryByPrcId(prcId,cut,prcType,sortWord,shunxu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化这条法规的 当前项目状态
|
||||
*/
|
||||
public void initConditionAssessmentEO(JSONObject jsonObject){
|
||||
Object msg = jsonObject.get("msg");
|
||||
Map<String,Object> projectLawsInventoryMap = com.alibaba.fastjson.JSONObject.parseObject(com.alibaba.fastjson.JSONObject.toJSONString(msg), Map.class);
|
||||
|
||||
ConditionAssessmentEO conditionAssessmentEO = new ConditionAssessmentEO();
|
||||
conditionAssessmentEO.setRoleCode(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue());
|
||||
conditionAssessmentEO.setProjectLawsInventoryId(projectLawsInventoryMap.get("id").toString());
|
||||
conditionAssessmentEO.setConditionAssessment(CurrentProjectStatusEnum.BLUE.getValue());
|
||||
conditionAssessmentEOService.addOrUpdate(conditionAssessmentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程-法规技术评估流程
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
public Result startLawsTechnologyEvaluationProcess(@RequestBody JSONObject jsonObject){
|
||||
return workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程-任务确认流程
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
public Result startTaskToConfirmProcess(@RequestBody JSONObject jsonObject){
|
||||
return workFlowFeignClient.startTaskToConfirmProcess(jsonObject);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据taskId删除流程")
|
||||
@ApiOperation(value="根据taskId删除流程", notes="根据taskId删除流程")
|
||||
@GetMapping("/deleteProcessInstanceByTaskId")
|
||||
public Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId")String taskId){
|
||||
return workFlowFeignClient.deleteProcessInstance(taskId);
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -9,17 +9,17 @@ import org.apache.commons.lang3.StringUtils;
|
||||
*/
|
||||
public enum FlowTypeEnum {
|
||||
|
||||
RWQRLC("1","任务确认流程","RWQRLC","任务确认流程","rwqrlc","清单任务确认","List task Confirmation"),
|
||||
RWQRLC("1","任务确认流程","RWQRLC","任务确认流程","rwqrlc","清单任务确认","List task confirmation"),
|
||||
SJFHXSHLC("2","设计符合性审查流程","SJFHXSHLC","设计符合性审查流程","sjfhxlc","设计符合性流程","Design Compliance Process"),
|
||||
PREHOMOQRLC("3","prehomo确认流程","PREHOMOQRLC","prehomo确认流程","prehomoqrlc","Pre-Homo确认","The Pre - Homo confirmation"),
|
||||
YZFHXSCLC("4","验证符合性审查流程","YZFHXSCLC","验证符合性审查流程","yzfhxsclc","验证符合性流程","Verify Compliance Process"),
|
||||
FGYJSJLC("5","法规意见收集流程","FGYJSJLC","法规意见收集流程","fgyjsjlc","法规意见收集","Collection of Legislative Comments"),
|
||||
FGJSPG("6","法规技术评估流程","FGJSPG","法规技术评估流程","fgjspglc","法规技术评估","Regulatory and technical assessment"),
|
||||
QDQR("10","清单确认","QDQR","清单确认流程","qdqr","法规清单发布","Release of regulatory list"),
|
||||
CERTIFICATION_LC("21","认证流程","CERTIFICATION_LC","认证流程","certification_lc","Pre-Homo流程","Pre-Homo flow"),
|
||||
PREHOMOQRLC("3","prehomo确认流程","PREHOMOQRLC","prehomo确认流程","prehomoqrlc","Pre-Homo确认","Pre-Homo Confirmation"),
|
||||
YZFHXSCLC("4","验证符合性审查流程","YZFHXSCLC","验证符合性审查流程","yzfhxsclc","验证符合性流程","Verification Compliance Process"),
|
||||
FGYJSJLC("5","法规意见收集流程","FGYJSJLC","法规意见收集流程","fgyjsjlc","法规意见收集","Opinion Collection on Regulation"),
|
||||
FGJSPG("6","法规技术评估流程","FGJSPG","法规技术评估流程","fgjspglc","法规技术评估","Regulatory Technical Assessment"),
|
||||
QDQR("10","清单确认","QDQR","清单确认流程","qdqr","法规清单发布","Regulation List Release"),
|
||||
CERTIFICATION_LC("21","认证流程","CERTIFICATION_LC","认证流程","certification_lc","Pre-Homo流程","Pre-Homo Process"),
|
||||
XGJFWLC("31","修改交付物流程","XGJFWLC","修改交付物流程","xgjfwlc","修改交付物流程","Update Deliverable"),
|
||||
SJ_XGJFWLC("32","设计-修改交付物流程","SJ_XGJFWLC","设计-修改交付物流程","sj_xgjfwlc","设计-修改交付物流程","Design Update Deliverable"),
|
||||
YZ_XGJFWLC("34","验证-修改交付物流程","YZ_XGJFWLC","验证-修改交付物流程","yz_xgjfwlc","验证-修改交付物流程","Verify Update Deliverable"),
|
||||
YZ_XGJFWLC("34","验证-修改交付物流程","YZ_XGJFWLC","验证-修改交付物流程","yz_xgjfwlc","验证-修改交付物流程","Verification Update Deliverable"),
|
||||
;
|
||||
|
||||
private String value;
|
||||
|
||||
@@ -131,6 +131,7 @@ spring:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://121.36.69.172:3307/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
# url: jdbc:mysql://127.0.0.1:3306/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
username: root
|
||||
password: hzwlsoft.com
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
@@ -185,6 +186,7 @@ jero :
|
||||
# 本地:local\Minio:minio\阿里云:alioss\腾讯云 cos
|
||||
uploadType: local
|
||||
backUrl: http://localhost:3000
|
||||
backUrlPhone: http://localhost:3000
|
||||
#拆分图片展示地址
|
||||
splitUrl: http://localhost:8080
|
||||
path :
|
||||
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
.my-photo {
|
||||
width: 100%;
|
||||
}
|
||||
.container{
|
||||
padding: 0!important;
|
||||
}
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0 ,user-scalable=yes">
|
||||
<title>蔚来全球法规平台</title>
|
||||
<!--<link rel="icon" href="<%= BASE_URL %>logo.png">-->
|
||||
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
|
||||
|
||||
@@ -216,4 +216,7 @@
|
||||
height: 32px !important;
|
||||
line-height: 32px !important;
|
||||
}
|
||||
.van-dialog .van-goods-action-button--danger{
|
||||
background: #00B3BE!important;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
@@ -123,7 +123,7 @@ module.exports = {
|
||||
MergeAll: 'Merge All',
|
||||
TreeOperation: 'Tree Operation',
|
||||
essentialInformation: 'General Information',
|
||||
DetailsPhasedImplementation: 'Details of the phased implementation',
|
||||
DetailsPhasedImplementation: 'Phased Implementation',
|
||||
Statutenumberclause: 'Statute number/clause',
|
||||
OrganizationName: 'Organization Name',
|
||||
EnterOrganizationDepartment: 'Please enter organization / department name',
|
||||
@@ -501,9 +501,9 @@ module.exports = {
|
||||
feedback: 'Feedback',
|
||||
approvalHistory: 'Approval History',
|
||||
cannotExceed500characters: 'Cannot Exceed 500 characters',
|
||||
accord: 'Compliant',
|
||||
nonConformity: 'Non-compliant',
|
||||
Tracked: 'To Be Tracked',
|
||||
accord: 'Compliance',
|
||||
nonConformity: 'Non-compliance',
|
||||
Tracked: 'To be tracked',
|
||||
notInvolved: 'NA',
|
||||
Operator: 'Operator',
|
||||
role: 'Role',
|
||||
@@ -875,7 +875,7 @@ module.exports = {
|
||||
engineer: 'Engineer',
|
||||
engineeringConfirmationDetails: 'Engineering Deliverable Details',
|
||||
reminder: 'Reminder',
|
||||
adopt: 'Pass',
|
||||
adopt: 'Approve',
|
||||
reviewedByThePersonInCharge: 'Reviewed by Owner',
|
||||
onlyDeleted: 'Only delete data when the process is not started or already ended',
|
||||
experimentPassed: 'Test Passed',
|
||||
@@ -906,11 +906,11 @@ module.exports = {
|
||||
maintainVirtualList: 'Maintain Market List',
|
||||
certificationListMaintenance: 'Homo List Maintenance',
|
||||
reasonsForRejection: 'Reason for Rejection',
|
||||
inconformity: 'Non-compliant',
|
||||
toTrack: 'To Be Tracked',
|
||||
inconformity: 'Non-compliance',
|
||||
toTrack: 'To be tracked',
|
||||
Launch: 'Initiate',
|
||||
maintainProgress: 'Maintain Schedule',
|
||||
redSchedule: 'Red: non-compliant, without acceptable solutions or timeline ',
|
||||
redSchedule: 'Red: non-compliance, without acceptable solutions or timeline ',
|
||||
yellowSchedule: 'Yellow: non-compliant/to be tracked, with acceptable solutions and timeline ',
|
||||
greenRequirements: 'Green: compliant or meeting the requirements',
|
||||
blueUndeterminedState: 'Blue: pending',
|
||||
@@ -986,7 +986,7 @@ module.exports = {
|
||||
CollectionInitiated: 'To be collected',
|
||||
handledInterface: 'To be processed by eng. interface',
|
||||
ReturnedPerson: 'Rejected by eng. interface',
|
||||
completed: 'To Be Filled',
|
||||
completed: 'To be filled',
|
||||
Filledreturn: 'Rejected by the applicant',
|
||||
Submitted: 'Submitted',
|
||||
ReturnedEngineer: 'Rejected by homo engineer',
|
||||
@@ -1037,7 +1037,7 @@ module.exports = {
|
||||
primaryCoverageEn: 'Description (En)',
|
||||
workProgressCn: 'NIO Work Progress (Cn)',
|
||||
workProgressEn: 'NIO Work Progress (En)',
|
||||
initiatingProcess: 'Initiate Process',
|
||||
initiatingProcess: 'Process Initiation',
|
||||
collectResults: 'Collect Results',
|
||||
dateOfInitiation: 'Date Of Initiation',
|
||||
closingDate: 'Due Date',
|
||||
@@ -1361,10 +1361,11 @@ module.exports = {
|
||||
taskConfirmationHandling:'Task confirmation handling',
|
||||
relatedVersion:'Related Version',
|
||||
filledBy:'Filled by',
|
||||
parameterToBeInitiated:'Parameter to be initiated',
|
||||
parameterToBeInitiated:'To be initiated',
|
||||
listTaskConfirmation:'List task confirmation',
|
||||
completednum: 'To Be Filled',
|
||||
completednum: 'To be filled',
|
||||
filledBynum:'Filled by',
|
||||
filledByPhone:'To be assigned',
|
||||
parameterToBeInitiatednum:'Parameter to be initiated',
|
||||
listToConfirm:'To Be Confirmed',
|
||||
toSubmit:'To Be Submitted',
|
||||
@@ -1414,8 +1415,8 @@ module.exports = {
|
||||
returnedForApproval:'Returned',
|
||||
changeSetting:'Change Configuration',
|
||||
referenceDeliverables:'Reference Deliverable',
|
||||
missionAccepted:'Task Accepted',
|
||||
missionRejection:'Task Rejected',
|
||||
missionAccepted:'Accept',
|
||||
missionRejection:'Reject',
|
||||
turnToDo:'Forward',
|
||||
initiateTask:'Initiate Task',
|
||||
compliancereport:'Generate Compliance report',
|
||||
@@ -1525,11 +1526,11 @@ module.exports = {
|
||||
VINcodelist:'VIN code list',
|
||||
VINcodeupload:'VIN code upload',
|
||||
Tasknode:'Task Node',
|
||||
Taskresponsibilityrecognition:'Responsibility Confirm',
|
||||
Taskresponsibilityrecognition:'Responsibilty Confirmation',
|
||||
uploadattachment:'Upload',
|
||||
Processhistory:'Process history',
|
||||
Processhistory:'Process History',
|
||||
historyData:'1. Regulatory Engineer, 2. Responsible person, 3. Responsible person, 4. Regulatory Engineer',
|
||||
resultofhandling:'Result of handling',
|
||||
resultofhandling:'Result',
|
||||
cause:'cause',
|
||||
networksecurityrequirements:'Network security requirements',
|
||||
upgradefunctionrequirements:'Upgrade function requirements',
|
||||
@@ -1664,7 +1665,6 @@ module.exports = {
|
||||
taskname:'Task name',
|
||||
updatereleasetime:'Update release time',
|
||||
upgradeplanexpirationtime:'Upgrade plan expiration time',
|
||||
resultofhandling:'Result of handling',
|
||||
Listoftreatableregulations:'List of treatable regulations',
|
||||
Listofuntractableregulations:'List of untractable regulations',
|
||||
project:'Project',
|
||||
@@ -1712,7 +1712,6 @@ module.exports = {
|
||||
implementedupgrade:'Whether the implemented upgrade is consistent with the record',
|
||||
numberofvehicles:'Number of vehicles that have completed upgrades',
|
||||
vehicleshavenotcompletedonlineupgrade:'The reason why some vehicles have not completed online upgrade',
|
||||
cause:'cause',
|
||||
implementationrecords:'Fault handling measures and emergency response implementation records',
|
||||
onlyDataWithListStatusDraftCanBeDeleted:'Only data with a list status of Draft can be deleted',
|
||||
implementationDateTwo:'Implementation Date',
|
||||
@@ -1754,13 +1753,13 @@ module.exports = {
|
||||
taskToBeConfirmed:'Task to be confirmed',
|
||||
resultsToBeSubmitted:'Results to be submitted',
|
||||
resultsToBeReviewed:'Results to be reviewed',
|
||||
compliance:'Compliant',
|
||||
nonCompliance:'Non-compliant',
|
||||
toBeTracked:'To Be Tracked',
|
||||
compliance:'Compliance',
|
||||
nonCompliance:'Non-compliance',
|
||||
toBeTracked:'To be tracked',
|
||||
NA:'NA',
|
||||
electroniccontrollerparameter:'Electronic controller parameter',
|
||||
reviewAndPass:'Review and pass',
|
||||
reviewAndReturn:'Review and return',
|
||||
reviewAndPass:'Approve',
|
||||
reviewAndReturn:'Reject',
|
||||
marketRegulationListDetails:'Market Regulation List Details',
|
||||
marketRegulationList:'Market Regulation List',
|
||||
onlyDataWithTheCurrentCanBeManipulated:'Only data with the current user as the responsible person can be manipulated',
|
||||
@@ -1829,7 +1828,7 @@ module.exports = {
|
||||
proportion:'Proportion',
|
||||
projectProgressStatistics:'Project Progress Statistics',
|
||||
GRPSystemProjectProgressStatistics:'GRP system project progress statistics',
|
||||
statisticalNodes:'Statistical Nodes',
|
||||
statisticalNodes:'Responsible Department',
|
||||
proportionWithInTheAreaOfResponsibility:'Proportion within the area of responsibility',
|
||||
contentsearch:'Content Search',
|
||||
masterProject:'Master Project',
|
||||
@@ -1858,47 +1857,52 @@ module.exports = {
|
||||
recentBrowsing:'Recent Browsing',
|
||||
mySubscription:'My Subscription',
|
||||
languageSwitching:'Language Switching',
|
||||
phoneSearch:'search',
|
||||
phoneSearch:'Search',
|
||||
taskStatistics:'Task Statistics',
|
||||
mine:'Mine',
|
||||
regulatoryCertificationProcess:'Regulatory certification process',
|
||||
authenticationParameterCollection:'Authentication parameter collection',
|
||||
regulatoryCertificationProcessData:'Regulatory Certification Process Data',
|
||||
regulationListIssuance:'Regulation list issuance',
|
||||
designTheComplianceProcess:'Design the compliance process',
|
||||
verifyComplianceProcess:'Verify compliance process',
|
||||
thePreHomeProcess:'Pre-Home Process',
|
||||
technicalAssessmentOfRegulations:'Technical Assessment Regulations',
|
||||
legalOpinionCollection:'Legal Opinion Collection',
|
||||
authenticationParameterCollectionData:'Authentication parameter collection data',
|
||||
phoneRelatedItems:'Related items',
|
||||
listHeading:'List heading',
|
||||
phoneVersionNumber:'Version number',
|
||||
regulatoryCertificationProcess:'Regulatoion Homologation Process',
|
||||
authenticationParameterCollection:'Homo Parameter Collection',
|
||||
regulatoryCertificationProcessData:'Regulatoion Homologation Process Data',
|
||||
regulationListIssuance:'Regulation List Release',
|
||||
designTheComplianceProcess:'Design Compliance Process',
|
||||
verifyComplianceProcess:'Validation Compliance Process',
|
||||
thePreHomeProcess:'Pre-Homo Process',
|
||||
technicalAssessmentOfRegulations:'Regulation Technical Assessment',
|
||||
legalOpinionCollection:'Opinion Collection on Regulation',
|
||||
authenticationParameterCollectionData:'Homo Parameter Collection Data',
|
||||
phoneRelatedItems:'Project',
|
||||
listHeading:'List Name',
|
||||
phoneVersionNumber:'Version',
|
||||
node:'Node',
|
||||
goToCheck:'View',
|
||||
stored:'Stored',
|
||||
individual:'a ',
|
||||
document:'document',
|
||||
treatmentMode:'Treatment Mode',
|
||||
onlyMobilePhoneAreDisplayed:'Only the tasks that can be handled by the mobile phone are displayed',
|
||||
onlyMobilePhoneAreDisplayed:'Only display tasks that can be processed by the mobile terminal',
|
||||
phoneReset:'Reset',
|
||||
noMore:'No More',
|
||||
loading:'Loading...',
|
||||
howAboutComment:'How about a comment',
|
||||
howAboutComment:'Comment...',
|
||||
send:'Send',
|
||||
pleaseProcessThePC:'Please process it on the PC',
|
||||
clickAndSelect:'Click and select',
|
||||
phoneCreationTime:'Creation Time',
|
||||
pleaseProcessThePC:'Please handle it on the PC side',
|
||||
clickAndSelect:'Click and Select',
|
||||
phoneCreationTime:'Create Time',
|
||||
theCurrentFormatSupportPreview:'The current format does not support preview',
|
||||
nearlyMonth:'Nearly a month',
|
||||
nearlyThreeMonths:'Nearly Three Months',
|
||||
nearlySixMonths:'Nearly Six Months',
|
||||
nearlyYear:'Nearly a Year',
|
||||
nearlyMonth:'In a month',
|
||||
nearlyThreeMonths:'In three months',
|
||||
nearlySixMonths:'In six months',
|
||||
nearlyYear:'In a year',
|
||||
browsingTime:'Browsing Time',
|
||||
pleaseViewOnPc:'Please view on PC',
|
||||
taskHandling:'Task Handling',
|
||||
taskHandling:'Task handling',
|
||||
pleaseEnterUserAccountSearchFor:'Please enter a user account to search for',
|
||||
exportOption:'Export Option',
|
||||
includeTitle:'Include title',
|
||||
Notitleincluded:'No title included',
|
||||
backToHomePage:'Back To Home Page',
|
||||
documentsHaveBeenStored:'documents have been stored',
|
||||
knowledgeSharingHaveBeenStored:'Knowledge Sharing have been stored',
|
||||
regulationMonthlyReportHaveBeenStored:'Regulation Monthly Report have been stored',
|
||||
sendBackOne:'Return',
|
||||
}
|
||||
@@ -1462,6 +1462,7 @@ module.exports = {
|
||||
taskConfirmationHandling: '任务确认办理',
|
||||
relatedVersion: '相关版本',
|
||||
filledBy: '待分配填写人',
|
||||
filledByPhone:'待分配填写人',
|
||||
parameterToBeInitiated: '参数待发起',
|
||||
listTaskConfirmation: '清单任务确认',
|
||||
completednum: '待填写',
|
||||
@@ -1637,7 +1638,6 @@ module.exports = {
|
||||
Categoryofdeliverables: "交付物类型",
|
||||
Taskconfirmationresult: '任务确认结果',
|
||||
Compliancetaskhandling: '符合性任务办理',
|
||||
resultofhandling: '处理结果',
|
||||
networksecurityrequirements: '网络安全要求',
|
||||
upgradefunctionrequirements: '升级功能要求',
|
||||
usernotificationrequirement: '用户告知要求',
|
||||
@@ -1928,7 +1928,7 @@ module.exports = {
|
||||
proportion:'占比',
|
||||
projectProgressStatistics:'项目进度统计',
|
||||
GRPSystemProjectProgressStatistics:'GRP系统项目进度统计',
|
||||
statisticalNodes:'统计节点',
|
||||
statisticalNodes:'责任部门',
|
||||
proportionWithInTheAreaOfResponsibility:'责任领域内占比',
|
||||
contentsearch:'内容搜索',
|
||||
masterProject:'主项目',
|
||||
@@ -2838,8 +2838,6 @@ module.exports = {
|
||||
blueUndeterminedState: '蓝:未判断状态',
|
||||
authenticationMessage: '认证参数任务',
|
||||
taskRegulationComplianceTask: '法规符合性任务',
|
||||
accept: '接受',
|
||||
refuse: '拒绝',
|
||||
taskTermination: '任务终止',
|
||||
projectStatusAndProgress: '项目状态进度',
|
||||
listConfirmationProgress: '清单确认进度',
|
||||
@@ -3539,14 +3537,12 @@ module.exports = {
|
||||
uploadattachment: '上传附件',
|
||||
Processhistory: '流程历史',
|
||||
historyData: '1.法规工程师,2.责任人,3.责任人,4.法规工程师',
|
||||
resultofhandling: '处理结果',
|
||||
Listoftreatableregulations: '可处理法规列表',
|
||||
Listofuntractableregulations: '不可处理法规列表',
|
||||
project: '项目',
|
||||
Categoryofdeliverables: "交付物类型",
|
||||
Taskconfirmationresult: '任务确认结果',
|
||||
Compliancetaskhandling: '符合性任务办理',
|
||||
resultofhandling: '处理结果',
|
||||
networksecurityrequirements: '网络安全要求',
|
||||
upgradefunctionrequirements: '升级功能要求',
|
||||
usernotificationrequirement: '用户告知要求',
|
||||
@@ -3837,7 +3833,7 @@ module.exports = {
|
||||
proportion:'占比',
|
||||
projectProgressStatistics:'项目进度统计',
|
||||
GRPSystemProjectProgressStatistics:'GRP系统项目进度统计',
|
||||
statisticalNodes:'统计节点',
|
||||
statisticalNodes:'责任部门',
|
||||
proportionWithInTheAreaOfResponsibility:'责任领域内占比',
|
||||
contentsearch:'内容搜索',
|
||||
masterProject:'主项目',
|
||||
@@ -3864,4 +3860,6 @@ module.exports = {
|
||||
exportOption:'导出选项',
|
||||
includeTitle:'包含标题',
|
||||
Notitleincluded:'不包含标题',
|
||||
backToHomePage:'返回主页',
|
||||
sendBackOne:'退回',
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
<div class='box'>
|
||||
<!-- 纯文本-->
|
||||
<div v-if='detailDate.controlType === "1" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="text"'>
|
||||
@@ -93,7 +93,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
<!-- 默认值-->
|
||||
<div v-if='detailDate.controlType === "11" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="text"'>
|
||||
@@ -128,7 +128,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@
|
||||
</div>
|
||||
<!-- 纯下拉单选-->
|
||||
<div v-else-if='detailDate.controlType === "2" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type === "pull"'>
|
||||
@@ -156,7 +156,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -164,7 +164,7 @@
|
||||
</div>
|
||||
<!-- 纯下拉多选-->
|
||||
<div v-else-if='detailDate.controlType === "3" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' style='flex: 1'
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' style='flex: 1'
|
||||
class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block;" class='valflex'
|
||||
@@ -186,7 +186,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -194,7 +194,7 @@
|
||||
</div>
|
||||
<!-- 纯附件-->
|
||||
<div v-else-if='detailDate.controlType === "4" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' style='flex: 1'
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' style='flex: 1'
|
||||
class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
@@ -210,7 +210,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -218,7 +218,7 @@
|
||||
</div>
|
||||
<!-- 文本+下拉单选-->
|
||||
<div v-else-if='detailDate.controlType === "5" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="pull"'>
|
||||
@@ -320,7 +320,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -328,7 +328,7 @@
|
||||
</div>
|
||||
<!-- 文本+下拉多选-->
|
||||
<div v-else-if='detailDate.controlType === "6" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block"
|
||||
:class="{'multiple':itemval.type==='pull_more'?true:false}"
|
||||
@@ -432,7 +432,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -440,7 +440,7 @@
|
||||
</div>
|
||||
<!-- 文本+附件-->
|
||||
<div v-else-if='detailDate.controlType === "7" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="text"'>
|
||||
@@ -537,7 +537,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -545,7 +545,7 @@
|
||||
</div>
|
||||
<!-- 下拉单选+附件-->
|
||||
<div v-else-if='detailDate.controlType === "8" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]'
|
||||
:key='index1' style="display: inline-block" class='valflex'>
|
||||
<!-- <div v-for='(itemval,val) in val' :key='val'>-->
|
||||
@@ -574,7 +574,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -582,7 +582,7 @@
|
||||
</div>
|
||||
<!-- 下拉多选+附件-->
|
||||
<div v-else-if='detailDate.controlType === "9" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block"
|
||||
:class="{'multiple':itemval.type==='pull_more'?true:false}"
|
||||
@@ -613,7 +613,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -621,7 +621,7 @@
|
||||
</div>
|
||||
<!-- 文本+下拉单选+附件-->
|
||||
<div v-else-if='detailDate.controlType === "10" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in keyIndex()' :key='index' class='add-width'>
|
||||
<!-- <div v-for='(item,index) in detailDateList' :key='index' class='add-width'>-->
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
@@ -732,7 +732,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -765,7 +765,8 @@
|
||||
detailDatetransformation: [],
|
||||
fileNameOne: '',
|
||||
fileNameTwo: '',
|
||||
fileIndex: ''
|
||||
fileIndex: '',
|
||||
key:[],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -788,6 +789,11 @@
|
||||
// })
|
||||
// this.detailDatetransformation.push(item)
|
||||
})
|
||||
this.key = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
onInput(r) {
|
||||
@@ -855,16 +861,36 @@
|
||||
return id
|
||||
// return Math.random().toString(32)
|
||||
},
|
||||
|
||||
keyIndex(){
|
||||
let key = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
return key
|
||||
},
|
||||
addconfig() {
|
||||
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
|
||||
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
for (let i = 0; i < paramsConfigData.length; i++) {
|
||||
// this.detailDate.paramsConfigData[paramsConfigData[i]][0].orderNum = i + 1
|
||||
if (i == paramsConfigData.length - 1) {
|
||||
let name = paramsConfigData[i]
|
||||
let generateRandom = this.generateRandom()
|
||||
console.log(generateRandom)
|
||||
let index = name.lastIndexOf('+')
|
||||
let num
|
||||
if (index == '-1') {
|
||||
num = 0
|
||||
} else {
|
||||
num = name.slice(0, index)
|
||||
}
|
||||
console.log(num)
|
||||
num = parseInt(num)
|
||||
let generateRandom = (num + 1) + '+' + this.generateRandom()
|
||||
this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name]))
|
||||
this.detailDate.paramsConfigData[generateRandom].forEach(res => {
|
||||
this.detailDate.paramsConfigData[generateRandom].forEach((res, index) => {
|
||||
if (res.type === 'pull_more') {
|
||||
res.dataValue = []
|
||||
} else {
|
||||
@@ -873,7 +899,20 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
this.detailDate.paramsConfigData = { ...this.detailDate.paramsConfigData }
|
||||
const ordered = {}
|
||||
let that = this
|
||||
|
||||
Object.keys(this.detailDate.paramsConfigData).sort().forEach(function(key) {
|
||||
ordered[key] = that.detailDate.paramsConfigData[key]
|
||||
})
|
||||
console.log(ordered)
|
||||
this.key = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
console.log(this.key)
|
||||
this.detailDate.paramsConfigData = { ...ordered }
|
||||
this.$emit('consolidateData')
|
||||
// postAction('params/configData/add', {
|
||||
// paramsCollectManifestId: this.recordList.id,
|
||||
@@ -885,8 +924,9 @@
|
||||
// }
|
||||
// })
|
||||
},
|
||||
delconfig(item) {
|
||||
delconfig(item,index) {
|
||||
delete this.detailDate.paramsConfigData[item]
|
||||
this.key.splice(index,1)
|
||||
this.detailDate.paramsConfigData = { ...this.detailDate.paramsConfigData }
|
||||
this.$emit('consolidateData')
|
||||
// for (const key in this.detailDate.paramsConfigData) {
|
||||
|
||||
@@ -259,7 +259,7 @@ export default {
|
||||
// encodeURIComponent('http://localhost:3000/dashboard/analysis') + '&response_type=code' //本地
|
||||
// TODO 在部署线上时解开以下代码
|
||||
// window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' +
|
||||
// encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上
|
||||
// encodeURIComponent(window.loginUrl) + '&response_type=code' //线上
|
||||
|
||||
localStorage.removeItem('language')
|
||||
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||
|
||||
@@ -482,83 +482,83 @@ export const constantRouterMap = [
|
||||
|
||||
/* 手机端开始 */
|
||||
//搜索
|
||||
{
|
||||
path: '/phoneSearch',
|
||||
name: 'phoneSearch',
|
||||
component: () => import('@/views/phoneView/search')
|
||||
},
|
||||
//待办中心
|
||||
{
|
||||
path: '/phoneToDoCenter',
|
||||
name: 'phoneToDoCenter',
|
||||
component: () => import('@/views/phoneView/toDoCenter')
|
||||
},
|
||||
//任务数据
|
||||
{
|
||||
path: '/phoneTaskData',
|
||||
name: 'phoneTaskData',
|
||||
component: () => import('@/views/phoneView/taskData')
|
||||
},
|
||||
//我的
|
||||
{
|
||||
path: '/phoneHome',
|
||||
name: 'phoneHome',
|
||||
component: () => import('@/views/phoneView/home')
|
||||
},
|
||||
//搜索列表
|
||||
{
|
||||
path: '/phoneSearchList',
|
||||
name: 'phoneSearchList',
|
||||
component: () => import('@/views/phoneView/searchList')
|
||||
},
|
||||
//文档详情
|
||||
{
|
||||
path: '/phoneDocumentDetails',
|
||||
name: 'phoneDocumentDetails',
|
||||
component: () => import('@/views/phoneView/documentDetails')
|
||||
},
|
||||
//流程
|
||||
{
|
||||
path: '/phoneProcessManagement',
|
||||
name: 'phoneProcessManagement',
|
||||
component: () => import('@/views/phoneView/processManagement')
|
||||
},
|
||||
//知识分享
|
||||
{
|
||||
path: '/phoneProblemKnowledgeBase',
|
||||
name: 'phoneProblemKnowledgeBase',
|
||||
component: () => import('@/views/phoneView/problemKnowledgeBase')
|
||||
},
|
||||
//办理页面
|
||||
{
|
||||
path: '/phoneHandlingPage',
|
||||
name: 'phoneHandlingPage',
|
||||
component: () => import('@/views/phoneView/handlingPage')
|
||||
},
|
||||
//我的收藏
|
||||
{
|
||||
path: '/phoneMyCollection',
|
||||
name: 'phoneMyCollection',
|
||||
component: () => import('@/views/phoneView/myCollection')
|
||||
},
|
||||
//最近预览
|
||||
{
|
||||
path: '/phoneRecentBrowsing',
|
||||
name: 'phoneRecentBrowsing',
|
||||
component: () => import('@/views/phoneView/recentBrowsing')
|
||||
},
|
||||
//我的订阅
|
||||
{
|
||||
path: '/phoneMySubscribe',
|
||||
name: 'phoneMySubscribe',
|
||||
component: () => import('@/views/phoneView/mySubscribe')
|
||||
},
|
||||
//perhome办理流程
|
||||
{
|
||||
path: '/phonePreHomoMangement',
|
||||
name: 'phonePreHomoMangement',
|
||||
component: () => import('@/views/phoneView/preHomoMangement')
|
||||
},
|
||||
// {
|
||||
// path: '/phoneSearch',
|
||||
// name: 'phoneSearch',
|
||||
// component: () => import('@/views/phoneView/search')
|
||||
// },
|
||||
// //待办中心
|
||||
// {
|
||||
// path: '/phoneToDoCenter',
|
||||
// name: 'phoneToDoCenter',
|
||||
// component: () => import('@/views/phoneView/toDoCenter')
|
||||
// },
|
||||
// //任务数据
|
||||
// {
|
||||
// path: '/phoneTaskData',
|
||||
// name: 'phoneTaskData',
|
||||
// component: () => import('@/views/phoneView/taskData')
|
||||
// },
|
||||
// //我的
|
||||
// {
|
||||
// path: '/phoneHome',
|
||||
// name: 'phoneHome',
|
||||
// component: () => import('@/views/phoneView/home')
|
||||
// },
|
||||
// //搜索列表
|
||||
// {
|
||||
// path: '/phoneSearchList',
|
||||
// name: 'phoneSearchList',
|
||||
// component: () => import('@/views/phoneView/searchList')
|
||||
// },
|
||||
// //文档详情
|
||||
// {
|
||||
// path: '/phoneDocumentDetails',
|
||||
// name: 'phoneDocumentDetails',
|
||||
// component: () => import('@/views/phoneView/documentDetails')
|
||||
// },
|
||||
// //流程
|
||||
// {
|
||||
// path: '/phoneProcessManagement',
|
||||
// name: 'phoneProcessManagement',
|
||||
// component: () => import('@/views/phoneView/processManagement')
|
||||
// },
|
||||
// //知识分享
|
||||
// {
|
||||
// path: '/phoneProblemKnowledgeBase',
|
||||
// name: 'phoneProblemKnowledgeBase',
|
||||
// component: () => import('@/views/phoneView/problemKnowledgeBase')
|
||||
// },
|
||||
// //办理页面
|
||||
// {
|
||||
// path: '/phoneHandlingPage',
|
||||
// name: 'phoneHandlingPage',
|
||||
// component: () => import('@/views/phoneView/handlingPage')
|
||||
// },
|
||||
// //我的收藏
|
||||
// {
|
||||
// path: '/phoneMyCollection',
|
||||
// name: 'phoneMyCollection',
|
||||
// component: () => import('@/views/phoneView/myCollection')
|
||||
// },
|
||||
// //最近预览
|
||||
// {
|
||||
// path: '/phoneRecentBrowsing',
|
||||
// name: 'phoneRecentBrowsing',
|
||||
// component: () => import('@/views/phoneView/recentBrowsing')
|
||||
// },
|
||||
// //我的订阅
|
||||
// {
|
||||
// path: '/phoneMySubscribe',
|
||||
// name: 'phoneMySubscribe',
|
||||
// component: () => import('@/views/phoneView/mySubscribe')
|
||||
// },
|
||||
// //perhome办理流程
|
||||
// {
|
||||
// path: '/phonePreHomoMangement',
|
||||
// name: 'phonePreHomoMangement',
|
||||
// component: () => import('@/views/phoneView/preHomoMangement')
|
||||
// },
|
||||
/* 手机端结束 */
|
||||
// {
|
||||
// path:'/vehicleinformation',
|
||||
@@ -716,6 +716,12 @@ export const phoneConstantRouterMap = [
|
||||
name: 'phonePreHomoMangement',
|
||||
component: () => import('@/views/phoneView/preHomoMangement')
|
||||
},
|
||||
//法规月报详情页
|
||||
{
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
name: 'phoneProblemKnowledgeBaseFile',
|
||||
component: () => import('@/views/phoneView/problemKnowledgeBaseFile')
|
||||
},
|
||||
/* 手机端结束 */
|
||||
{
|
||||
path: '/404',
|
||||
|
||||
@@ -11,34 +11,7 @@ import { getAction } from '@/api/manage'
|
||||
import { welcome } from '@/utils/util'
|
||||
|
||||
let isPhone = localStorage.getItem('isPhone')
|
||||
console.log(isPhone)
|
||||
|
||||
// 判断当前设备
|
||||
function isMobile() {
|
||||
var userAgentInfo = navigator.userAgent
|
||||
|
||||
var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
|
||||
|
||||
var mobile_flag = false
|
||||
|
||||
//根据userAgent判断是否是手机
|
||||
for (var v = 0; v < mobileAgents.length; v++) {
|
||||
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
||||
mobile_flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
var screen_width = window.screen.width
|
||||
var screen_height = window.screen.height
|
||||
|
||||
//根据屏幕分辨率判断是否是手机
|
||||
if (screen_width < 500 && screen_height < 800) {
|
||||
mobile_flag = true
|
||||
}
|
||||
return mobile_flag
|
||||
}
|
||||
|
||||
let mobile = isMobile()
|
||||
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||
// TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码
|
||||
|
||||
@@ -49,6 +22,7 @@ const whiteList = ['/user/login', '/user/register', '/user/register-result', '/u
|
||||
// const whiteList = []
|
||||
|
||||
|
||||
|
||||
// no redirect whitelist
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
||||
@@ -135,10 +135,19 @@ const user = {
|
||||
const menuData = response.result.menu
|
||||
const authData = response.result.auth
|
||||
const allAuthData = response.result.allAuth
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
let isPhone = localStorage.getItem('isPhone')
|
||||
if (isPhone == 'yes'){
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
}else{
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
}
|
||||
|
||||
window._CONFIG['httpsOnlinePreviewDomainURL'] = Vue.ls.get('httpsOnlinePreviewDomainURL') + '/onlinePreview'
|
||||
//Vue.ls.set(USER_AUTH,authData);
|
||||
sessionStorage.setItem(USER_AUTH, JSON.stringify(authData))
|
||||
|
||||
@@ -10,11 +10,12 @@ export function kkFileView(fileName, fileId) {
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix)
|
||||
window.open(url)
|
||||
return url
|
||||
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadImgUrl + '/' + fileId + fileSuffix)
|
||||
window.open(url)
|
||||
return url
|
||||
} else {
|
||||
Toast('当前格式不支持预览')
|
||||
return ''
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,15 @@ import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
||||
* 则映射后端域名,通过 vue.config.js
|
||||
* @type {*|string}
|
||||
*/
|
||||
let apiBaseUrl = window._CONFIG['domianURL'] || '/jero-boot'
|
||||
|
||||
let apiBaseUrl = ''
|
||||
let isPhone = localStorage.getItem('isPhone')
|
||||
if (isPhone == 'yes'){
|
||||
apiBaseUrl = '/jero-boot/phone'
|
||||
}else{
|
||||
apiBaseUrl = '/jero-boot'
|
||||
}
|
||||
// let apiBaseUrl = window._CONFIG['domianURL'] || '/jero-boot'
|
||||
//console.log("apiBaseUrl= ",apiBaseUrl)
|
||||
// 创建 axios 实例
|
||||
const service = axios.create({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{serial_number}}
|
||||
</span>
|
||||
@@ -103,7 +103,7 @@
|
||||
import { getAction, postAction, downFile } from '@/api/manage'
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import eventBUs from '../../common/event'
|
||||
import { Toast } from 'vant'
|
||||
import { Dialog, Toast } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'phoneDocumentDetails',
|
||||
@@ -261,8 +261,30 @@
|
||||
this.getPage()
|
||||
}
|
||||
},
|
||||
isBrowser() {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return userAgent.includes('lark') || userAgent.includes('feishu')
|
||||
},
|
||||
fileClick(item) {
|
||||
kkFileView(item.fileName, item.id)
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
let url = kkFileView(item.fileName, item.id)
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.fileName,
|
||||
fileId: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
urlClick(item) {
|
||||
window.open(item.value)
|
||||
@@ -317,7 +339,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{$route.query.projectName + ' ' + $t('preHomoFlow')}}
|
||||
</span>
|
||||
@@ -68,7 +68,7 @@
|
||||
activeTab: this.$route.query.activeTab,
|
||||
searchFlowType: this.$route.query.searchFlowType,
|
||||
checked: this.$route.query.checked,
|
||||
selectModel: this.$route.query.selectModel
|
||||
selectModel: this.$route.query.selectModel,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -82,6 +82,7 @@
|
||||
taskDefinitionKey: this.$route.query.taskDefinitionKey,
|
||||
projectName: this.$route.query.projectName,
|
||||
id: item.id,
|
||||
TaskKeyName:this.$route.query.TaskKeyName,
|
||||
isDisplay: this.isDisplay
|
||||
}
|
||||
})
|
||||
@@ -147,7 +148,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="img-header">
|
||||
<img src="~@/assets/logoOne.png" alt="">
|
||||
<img src="~@/assets/Avatar.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="name-header">
|
||||
@@ -43,11 +43,12 @@
|
||||
<div class="content-box">
|
||||
<img src="~@/assets/yuyan.png" class="content-box-img" alt="">
|
||||
<span class="content-box-text-one">
|
||||
{{$t('languageSwitching')}}
|
||||
<!-- {{$t('languageSwitching')}}-->
|
||||
语言/Language
|
||||
</span>
|
||||
<span class="lang" v-if="checked">En</span>
|
||||
<span class="lang" v-else>中文</span>
|
||||
<span class="lang" :class="{'langWeight':!checked}">Cn</span>
|
||||
<van-switch @change="checkedChange" :loading="isLoading" v-model="checked"/>
|
||||
<span class="lang" :class="{'langWeight':checked}">En</span>
|
||||
</div>
|
||||
<van-tabbar v-model="active" @change="onChange">
|
||||
<van-tabbar-item name="search" icon="search">{{$t('phoneSearch')}}</van-tabbar-item>
|
||||
@@ -194,11 +195,15 @@
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
border-radius: 50%;
|
||||
background: #D9D9D9;
|
||||
/*background: #D9D9D9;*/
|
||||
line-height: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.img-header img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.name-header {
|
||||
font-size: 0.4rem;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
@@ -286,7 +291,20 @@
|
||||
font-weight: 400;
|
||||
color: #595E72;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
width: 0.6rem;
|
||||
margin-right: 0.2rem;
|
||||
margin-left: 0.2rem;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar {
|
||||
height: 74px !important;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar-item {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
.langWeight{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{$t('myCollection')}}
|
||||
</span>
|
||||
@@ -232,7 +232,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{$t('mySubscription')}}
|
||||
</span>
|
||||
@@ -135,7 +135,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{$route.query.projectName + ' ' + $t('preHomoFlow')}}
|
||||
</span>
|
||||
@@ -93,7 +93,7 @@
|
||||
{{queryForm.deliveryResult}}
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item :title="$t('taskHandling')" v-if="!isDisplay" name="4">
|
||||
<van-collapse-item :title="$route.query.TaskKeyName" v-if="!isDisplay" name="4">
|
||||
<van-form @submit="onSubmit" ref="form">
|
||||
<div class="resultofhandlingClass"
|
||||
v-if="$route.query.taskDefinitionKey == 'Task Review' ||
|
||||
@@ -274,7 +274,7 @@
|
||||
queryForm: {},
|
||||
queryData: {},
|
||||
form: {},
|
||||
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
|
||||
uploadAction: window._CONFIG['domianURL'] + '/phone/sys/common/upload',
|
||||
queryProject: {},
|
||||
dataSourceFile: [],
|
||||
deliverablesResultFile: [],
|
||||
@@ -490,8 +490,30 @@
|
||||
this.form.deliveryResult.splice(index, 1)
|
||||
this.form = { ...this.form }
|
||||
},
|
||||
isBrowser() {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return userAgent.includes('lark') || userAgent.includes('feishu')
|
||||
},
|
||||
deliverablesResultFileClick(item) {
|
||||
kkFileView(item.fileName, item.id)
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
let url = kkFileView(item.fileName, item.id)
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.fileName,
|
||||
fileId: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
standardClick(item) {
|
||||
this.$router.push({
|
||||
@@ -534,7 +556,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{queryForm.title}}
|
||||
</span>
|
||||
@@ -354,8 +354,30 @@
|
||||
vanField.focus()
|
||||
})
|
||||
},
|
||||
isBrowser() {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return userAgent.includes('lark') || userAgent.includes('feishu')
|
||||
},
|
||||
fileClick(item) {
|
||||
kkFileView(item.fileName, item.id)
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
let url = kkFileView(item.fileName, item.id)
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.fileName,
|
||||
fileId: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
messageClick(item) {
|
||||
this.isDisplay = true
|
||||
@@ -439,7 +461,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
@@ -452,8 +474,11 @@
|
||||
}
|
||||
|
||||
.header-buttom {
|
||||
margin-top: 0.36rem;
|
||||
margin-top: 0.16rem;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.header-buttom-text {
|
||||
@@ -467,11 +492,12 @@
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
margin-left: 0.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.problemName {
|
||||
display: flex;
|
||||
margin-top: 0.16rem;
|
||||
height: 1rem;
|
||||
line-height: 1rem;
|
||||
}
|
||||
@@ -501,9 +527,14 @@
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
::v-deep .content img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.contentFile {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
@@ -514,6 +545,7 @@
|
||||
font-weight: 400;
|
||||
color: #01A0AC;
|
||||
margin-bottom: 0.2rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.iconText {
|
||||
@@ -531,6 +563,7 @@
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-left: 0.12rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.iconTextLeft {
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<iframe :src="url" frameborder="0" marginwidth="0"
|
||||
id="iframeEle"
|
||||
@load="loadFrame"
|
||||
width="100%" height="100%"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import { Dialog } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'phoneProblemKnowledgeBaseFile',
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'NIO GRP'
|
||||
// this.url = 'http://localhost:3000/phoneHome'
|
||||
this.url = kkFileView(this.$route.query.fileName, this.$route.query.fileId)
|
||||
},
|
||||
methods: {
|
||||
loadFrame() {
|
||||
const iframe = document.getElementById('iframeEle')
|
||||
const body = iframe.contentWindow.document
|
||||
const head = body.getElementsByTagName('head')
|
||||
const cssLink = document.createElement('link')
|
||||
cssLink.href = '/iframe.css'
|
||||
cssLink.rel = 'stylesheet'
|
||||
cssLink.type = 'text/css'
|
||||
head[0].appendChild(cssLink)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
html {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#iframeEle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,21 +1,22 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{queryForm.serialNumber}} {{title}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<van-collapse class="collapse" v-model="activeNames">
|
||||
<van-collapse-item :title="$t('essentialInformation')" name="1">
|
||||
<van-collapse-item :title="$t('basicInformation')" name="1">
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left">{{$t('entryName')}}</span>
|
||||
<span class="content-box-text">{{queryForm.projectName+'-'+queryForm.projectVersion}}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left">{{$t('regulationNo')}}</span>
|
||||
<span class="content-box-text">{{queryForm.serialNumber || '--'}}</span>
|
||||
<span class="content-box-text content-box-text-color"
|
||||
@click="standardClick(queryForm)">{{queryForm.serialNumber || '--'}}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left">{{$t('title')}}</span>
|
||||
@@ -103,7 +104,7 @@
|
||||
</van-step>
|
||||
</van-steps>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item :title="$t('taskHandling')" name="4" v-if="!queryData.isDisplay">
|
||||
<van-collapse-item :title="$route.query.TaskKeyName" name="4" v-if="!queryData.isDisplay">
|
||||
<van-form @submit="onSubmit" ref="form">
|
||||
<div class="resultofhandlingClass" style="margin-bottom: 0.1rem">
|
||||
<span>{{$t('resultofhandling')}}</span>
|
||||
@@ -142,9 +143,14 @@
|
||||
</van-radio>
|
||||
<van-radio name="Returned"
|
||||
v-if="queryData.TaskKey == 'dezrrqr' || queryData.TaskKey == 'dezrrtjjfw' ||
|
||||
queryData.TaskKey == 'zrrtjjfw' || queryData.TaskKey == 'fggcssh' || queryData.TaskKey == 'fggcsbcsh'">
|
||||
queryData.TaskKey == 'zrrtjjfw'">
|
||||
{{$t('sendBack')}}
|
||||
</van-radio>
|
||||
<van-radio name="Returned"
|
||||
v-if="queryData.TaskKey == 'fggcssh' || queryData.TaskKey == 'fggcsbcsh'">
|
||||
{{$t('sendBackOne')}}
|
||||
</van-radio>
|
||||
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
@@ -209,6 +215,7 @@
|
||||
import Vue from 'vue'
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { Dialog } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'phoneProcessManagement',
|
||||
@@ -246,7 +253,7 @@
|
||||
dataSourceFile: [],
|
||||
textLoading: '',
|
||||
fileList: [],
|
||||
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
|
||||
uploadAction: window._CONFIG['domianURL'] + '/phone/sys/common/upload',
|
||||
examineTitle: '',
|
||||
isAdopt: false
|
||||
}
|
||||
@@ -258,11 +265,51 @@
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
isBrowser() {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return userAgent.includes('lark') || userAgent.includes('feishu')
|
||||
},
|
||||
dataSourceFileClick(item) {
|
||||
kkFileView(item.fileName, item.id)
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
let url = kkFileView(item.fileName, item.id)
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.fileName,
|
||||
fileId: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
approvalFileClick(item, index) {
|
||||
kkFileView(item.approvalFileName[index], item.approvalFile[index])
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
let url = kkFileView(item.approvalFileName[index],item.approvalFile[index])
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.approvalFileName[index],
|
||||
fileId: item.approvalFile[index]
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
iconClick() {
|
||||
if (this.$route.query.goRouter) {
|
||||
@@ -376,7 +423,15 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
standardClick(item) {
|
||||
console.log(item)
|
||||
this.$router.push({
|
||||
path: '/phoneDocumentDetails',
|
||||
query: {
|
||||
id: item.standId
|
||||
}
|
||||
})
|
||||
},
|
||||
getFileInfos(item) {
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -514,7 +569,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
@@ -911,4 +966,7 @@
|
||||
font-size: 0.38rem;
|
||||
margin-left: 0.06rem;
|
||||
}
|
||||
.content-box-text-color {
|
||||
color: #01A0AC;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<span class="header-search-text">
|
||||
{{$t('recentBrowsing')}}
|
||||
</span>
|
||||
@@ -38,6 +38,7 @@
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import { Dialog } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'phoneRecentBrowsing',
|
||||
@@ -72,6 +73,10 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
isBrowser() {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return userAgent.includes('lark') || userAgent.includes('feishu')
|
||||
},
|
||||
recentBrowsingClick(item) {
|
||||
if (item.browseType == 'Document Library') {
|
||||
this.$router.push({
|
||||
@@ -81,7 +86,25 @@
|
||||
}
|
||||
})
|
||||
} else if (item.browseType == 'Regulatory Monthly Report') {
|
||||
kkFileView(item.title, item.fileId)
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
let url = kkFileView(item.title, item.fileId)
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.title,
|
||||
fileId: item.fileId
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (item.browseType == 'Knowledge sharing') {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBase',
|
||||
@@ -121,7 +144,7 @@
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
margin-left: 0.2rem;
|
||||
/*margin-left: 0.2rem;*/
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
|
||||
@@ -1,53 +1,57 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header-box">
|
||||
<img src="~@/assets/logoOne.png" alt="">
|
||||
<span class="logoTitle">NIO GRP</span>
|
||||
<img src="~@/assets/niogrp.png" class="header-box-img" alt="">
|
||||
<!-- <span class="logoTitle">NIO GRP</span>-->
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<form action="/">
|
||||
<van-search v-model="value" @search="onSearch" left-icon="none" right-icon="search"
|
||||
:placeholder="$t('phoneSearch')"/>
|
||||
<van-search v-model="value" @search="onSearch" left-icon="none" right-icon="search"
|
||||
:placeholder="$t('phoneSearch')"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="content-box-value">
|
||||
<div class="content-box-value" @click="documentDetailsClick">
|
||||
<div class="left-img">
|
||||
<img src="~@/assets/wendang.png" alt="">
|
||||
</div>
|
||||
<div class="text-left">
|
||||
<div class="text-left-top">{{$t('DocumentLibrary')}}</div>
|
||||
<div class="text-left-button">{{$t('stored')+ ' '+documentLibraryTotal+' ' + $t('individual')+$t('document')}}
|
||||
<div class="text-left-button">
|
||||
{{language == 'en-us'? documentLibraryTotal + ' ' + $t('documentsHaveBeenStored') :
|
||||
'已存储'+documentLibraryTotal+'个文档'}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right" @click="documentDetailsClick">
|
||||
<div class="text-right">
|
||||
{{$t('goToCheck')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-value">
|
||||
<div class="content-box-value" @click="phoneProblemKnowledgeBaseClick">
|
||||
<div class="left-img">
|
||||
<img src="~@/assets/icon_wiki.png" alt="">
|
||||
</div>
|
||||
<div class="text-left">
|
||||
<div class="text-left-top">{{$t('problemKnowledgeBase')}}</div>
|
||||
<div class="text-left-button">{{$t('stored')+ ' '+problemKnowledgeBaseTotal+' ' +
|
||||
$t('individual')+$t('problemKnowledgeBase')}}
|
||||
<div class="text-left-button">
|
||||
{{language == 'en-us'? problemKnowledgeBaseTotal + ' ' + $t('knowledgeSharingHaveBeenStored') :
|
||||
'已存储'+problemKnowledgeBaseTotal+'个知识分享'}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right" @click="phoneProblemKnowledgeBaseClick">
|
||||
<div class="text-right">
|
||||
{{$t('goToCheck')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-value">
|
||||
<div class="content-box-value" @click="processManagementClick">
|
||||
<div class="left-img">
|
||||
<img src="~@/assets/yuebao.png" alt="">
|
||||
</div>
|
||||
<div class="text-left">
|
||||
<div class="text-left-top">{{$t('monthlyReportRegulations')}}</div>
|
||||
<div class="text-left-button">{{$t('stored')+ ' '+monthlyReportRegulationsTotal+' ' +
|
||||
$t('individual')+$t('monthlyReportRegulations')}}
|
||||
<div class="text-left-button">
|
||||
{{language == 'en-us'? monthlyReportRegulationsTotal + ' ' + $t('regulationMonthlyReportHaveBeenStored') :
|
||||
'已存储'+monthlyReportRegulationsTotal+'个法规月报'}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right" @click="processManagementClick">
|
||||
<div class="text-right">
|
||||
{{$t('goToCheck')}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +75,8 @@
|
||||
value: '',
|
||||
documentLibraryTotal: 0,
|
||||
problemKnowledgeBaseTotal: 0,
|
||||
monthlyReportRegulationsTotal: 0
|
||||
monthlyReportRegulationsTotal: 0,
|
||||
language: localStorage.getItem('language')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -161,6 +166,10 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header-box-img {
|
||||
width: 4.6rem;
|
||||
}
|
||||
|
||||
.logoTitle {
|
||||
font-size: 0.64rem;
|
||||
margin-left: 0.24rem;
|
||||
@@ -266,4 +275,13 @@
|
||||
color: #00B3BE;
|
||||
margin-top: 0.22rem;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar {
|
||||
height: 74px !important;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar-item {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="box">
|
||||
<div class="fixed">
|
||||
<div class="header-search">
|
||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
|
||||
<!-- <van-dropdown-menu v-if="activeTab == 'documentLibrary'">-->
|
||||
<!-- <van-dropdown-item @change="selectModelChange" v-model="selectModel" :options="option"/>-->
|
||||
<!-- </van-dropdown-menu>-->
|
||||
@@ -200,6 +200,7 @@
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import { Dialog } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'phoneSearchList',
|
||||
@@ -317,9 +318,10 @@
|
||||
this.getList()
|
||||
},
|
||||
activeChange() {
|
||||
this.searchValue = ''
|
||||
this.value = ''
|
||||
this.selectModelName = ''
|
||||
this.searchValue = this.value
|
||||
// this.searchValue = ''
|
||||
// this.value = ''
|
||||
// this.selectModelName = ''
|
||||
if (this.activeTab == 'whole') {
|
||||
this.list = []
|
||||
} else if (this.activeTab == 'documentLibrary') {
|
||||
@@ -342,6 +344,10 @@
|
||||
postAction('/phone/recentBrowse/add', query).then((res) => {
|
||||
})
|
||||
},
|
||||
isBrowser() {
|
||||
const userAgent = window.navigator.userAgent.toLowerCase()
|
||||
return userAgent.includes('lark') || userAgent.includes('feishu')
|
||||
},
|
||||
dataClick(item) {
|
||||
if (item.module_type_flag == 'WDK') {
|
||||
this.recentBrowseAdd('Document Library', item.id.slice(0, 32))
|
||||
@@ -350,8 +356,8 @@
|
||||
query: {
|
||||
id: item.id.slice(0, 32),
|
||||
goRouter: '/phoneSearchList',
|
||||
searchValue:this.value,
|
||||
activeTab:this.activeTab
|
||||
searchValue: this.value,
|
||||
activeTab: this.activeTab
|
||||
}
|
||||
})
|
||||
} else if (item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX') {
|
||||
@@ -362,13 +368,31 @@
|
||||
query: {
|
||||
id: id,
|
||||
goRouter: '/phoneSearchList',
|
||||
searchValue:this.value,
|
||||
activeTab:this.activeTab
|
||||
searchValue: this.value,
|
||||
activeTab: this.activeTab
|
||||
}
|
||||
})
|
||||
} else if (item.module_type_flag == 'FGYB') {
|
||||
if (!this.isBrowser()) {
|
||||
Dialog.alert({
|
||||
message: '未授权用户 <br> Unauthorized User',
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
this.recentBrowseAdd('Regulatory Monthly Report', item.id)
|
||||
kkFileView(item.file_name, item.file_id)
|
||||
let url = kkFileView(item.file_name, item.file_id)
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
path: '/phoneProblemKnowledgeBaseFile',
|
||||
query: {
|
||||
fileName: item.file_name,
|
||||
fileId: item.file_id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -497,8 +521,11 @@
|
||||
font-size: 0.66rem;
|
||||
}
|
||||
|
||||
/*::v-deep .van-search {*/
|
||||
/* padding: 0 0 0 0.2rem;*/
|
||||
/*}*/
|
||||
::v-deep .van-search {
|
||||
padding: 0 0 0 0.2rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::v-deep .van-search__action {
|
||||
@@ -596,6 +623,7 @@
|
||||
font-weight: 600;
|
||||
color: #040B29;
|
||||
font-size: 0.42rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.content-box-type {
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="regulatory" v-if="activeTab == 'regulatoryCertification'">
|
||||
<!-- <div class="content-box-text">-->
|
||||
<!-- {{$t('regulatoryCertificationProcessData')}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="content-box-text">-->
|
||||
<!-- {{$t('regulatoryCertificationProcessData')}}-->
|
||||
<!-- </div>-->
|
||||
<div class="regulatory-box">
|
||||
<div class="content-box-data" @click="regulationListIssuanceClick">
|
||||
<div class="content-box-data-text">
|
||||
@@ -64,9 +64,9 @@
|
||||
</div>
|
||||
|
||||
<div class="parameter" v-else-if="activeTab == 'parametercollection'">
|
||||
<!-- <div class="content-box-text">-->
|
||||
<!-- {{$t('authenticationParameterCollectionData')}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="content-box-text">-->
|
||||
<!-- {{$t('authenticationParameterCollectionData')}}-->
|
||||
<!-- </div>-->
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
<div class="parame-box-bottom-box">
|
||||
<div class="parame-box-bottom-box-text-top">
|
||||
{{$t('filledBy')}}
|
||||
{{$t('filledByPhone')}}
|
||||
</div>
|
||||
<div class="parame-box-bottom-box-text-num">
|
||||
{{item.waitSdtNum || '--'}}
|
||||
@@ -170,6 +170,9 @@
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'NIO GRP'
|
||||
if (this.$route.query.activeTab) {
|
||||
this.activeTab = this.$route.query.activeTab
|
||||
}
|
||||
this.getProcessDataCount()
|
||||
},
|
||||
methods: {
|
||||
@@ -461,4 +464,13 @@
|
||||
::v-deep .van-tabs__wrap--scrollable .van-tab {
|
||||
padding: 0 0.1rem;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar {
|
||||
height: 74px !important;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar-item {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -35,24 +35,31 @@
|
||||
v-for="(item,index) in toDoProcessList"
|
||||
:key="index">
|
||||
<div class="content-box-title-to">
|
||||
{{item.serialNumber}}
|
||||
{{ item.serialNumber }}
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
||||
<span class="content-box-text">{{item.flowTypeShow}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('category') }}</span>
|
||||
<span class="content-box-text">{{ item.flowTypeShow }}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('project')}}</span>
|
||||
<span class="content-box-text">{{item.projectName}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('project') }}</span>
|
||||
<span class="content-box-text">{{ item.projectName }}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('node')}}</span>
|
||||
<span class="content-box-text">{{item.taskDefinitionKeyName || '--'}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('node') }}</span>
|
||||
<span class="content-box-text">{{ item.taskDefinitionKeyName || '--' }}</span>
|
||||
</div>
|
||||
<div v-if="item.flowType == '2' || item.flowType == '4' || item.flowType == '21'"></div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('cutoffTime') }}</span>
|
||||
<span class="content-box-text-color" :class="isNew(item.endTime)">{{ item.endTime || '--' }}</span>
|
||||
</div>
|
||||
<div v-if="item.flowType == '2' || item.flowType == '4' || (item.flowType == '21' && item.taskDefinitionKey == 'Task Review') ||
|
||||
(item.flowType == '21' && item.taskDefinitionKey == 'Task handling') || (item.flowType == '21' && item.taskDefinitionKey == 'Task responsibility confirmation')"></div>
|
||||
|
||||
<div class="content-box-right" v-else>
|
||||
<img src="~@/assets/icon_single_screen.svg" alt="">
|
||||
</div>
|
||||
@@ -73,24 +80,28 @@
|
||||
v-for="(item,index) in processDoneList"
|
||||
:key="index">
|
||||
<div class="content-box-title">
|
||||
{{item.serialNumber}}
|
||||
{{ item.serialNumber }}
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
||||
<span class="content-box-text">{{item.flowTypeShow}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('category') }}</span>
|
||||
<span class="content-box-text">{{ item.flowTypeShow }}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('project')}}</span>
|
||||
<span class="content-box-text">{{item.projectName}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('project') }}</span>
|
||||
<span class="content-box-text">{{ item.projectName }}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('node')}}</span>
|
||||
<span class="content-box-text">{{item.taskDefinitionKeyName || '--'}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('node') }}</span>
|
||||
<span class="content-box-text">{{ item.taskDefinitionKeyName || '--' }}</span>
|
||||
</div>
|
||||
|
||||
<!-- <div class="content-box-type">-->
|
||||
<!-- <span class="content-box-left"-->
|
||||
<!-- :class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('cutoffTime')}}</span>-->
|
||||
<!-- <span class="content-box-text-color" :class="isNew(item.endTime)">{{item.endTime || '--'}}</span>-->
|
||||
<!-- </div>-->
|
||||
<div v-if="item.flowType == '2' || item.flowType == '4' || item.flowType == '21'"></div>
|
||||
<div class="content-box-right" v-else>
|
||||
<img src="~@/assets/icon_single_screen.svg" alt="">
|
||||
@@ -114,23 +125,28 @@
|
||||
v-for="(item,index) in sentProcessList"
|
||||
:key="index">
|
||||
<div class="content-box-title">
|
||||
{{item.serialNumber}}
|
||||
{{ item.serialNumber }}
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
||||
<span class="content-box-text">{{item.flowTypeShow}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('category') }}</span>
|
||||
<span class="content-box-text">{{ item.flowTypeShow }}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('project')}}</span>
|
||||
<span class="content-box-text">{{item.projectName}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('project') }}</span>
|
||||
<span class="content-box-text">{{ item.projectName }}</span>
|
||||
</div>
|
||||
<div class="content-box-type">
|
||||
<span class="content-box-left"
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('node')}}</span>
|
||||
<span class="content-box-text">{{item.taskDefinitionKeyName || '--'}}</span>
|
||||
:class="{'content-box-left-one':language == 'en-us' ? true : false}">{{ $t('node') }}</span>
|
||||
<span class="content-box-text">{{ item.taskDefinitionKeyName || '--' }}</span>
|
||||
</div>
|
||||
<!-- <div class="content-box-type">-->
|
||||
<!-- <span class="content-box-left"-->
|
||||
<!-- :class="{'content-box-left-one':language == 'en-us' ? true : false}">{{$t('cutoffTime')}}</span>-->
|
||||
<!-- <span class="content-box-text-color" :class="isNew(item.endTime)">{{item.endTime || '--'}}</span>-->
|
||||
<!-- </div>-->
|
||||
<div v-if="item.flowType == '2' || item.flowType == '4' || item.flowType == '21'"></div>
|
||||
<div class="content-box-right" v-else>
|
||||
<img src="~@/assets/icon_single_screen.svg" alt="">
|
||||
@@ -139,10 +155,10 @@
|
||||
</van-list>
|
||||
</div>
|
||||
<van-tabbar v-model="active" @change="onChange">
|
||||
<van-tabbar-item name="search" icon="search">{{$t('phoneSearch')}}</van-tabbar-item>
|
||||
<van-tabbar-item name="toDoCenter" icon="bell">{{$t('todocenter')}}</van-tabbar-item>
|
||||
<van-tabbar-item name="taskData" icon="underway">{{$t('taskStatistics')}}</van-tabbar-item>
|
||||
<van-tabbar-item name="home" icon="manager">{{$t('mine')}}</van-tabbar-item>
|
||||
<van-tabbar-item name="search" icon="search">{{ $t('phoneSearch') }}</van-tabbar-item>
|
||||
<van-tabbar-item name="toDoCenter" icon="bell">{{ $t('todocenter') }}</van-tabbar-item>
|
||||
<van-tabbar-item name="taskData" icon="underway">{{ $t('taskStatistics') }}</van-tabbar-item>
|
||||
<van-tabbar-item name="home" icon="manager">{{ $t('mine') }}</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
<van-popup
|
||||
@@ -159,21 +175,18 @@
|
||||
<div class="checkboxGroup-text"
|
||||
:class="{'checkboxGroup-text-color':checkboxGroupColor('2')}"
|
||||
@click="processClick('2')">
|
||||
{{$t('designComplianceProcess')}}
|
||||
{{ $t('designComplianceProcess') }}
|
||||
</div>
|
||||
<div class="checkboxGroup-text"
|
||||
:class="{'checkboxGroup-text-color':checkboxGroupColor('4')}"
|
||||
@click="processClick('4')">
|
||||
{{$t('validationComplianceProcess')}}
|
||||
{{ $t('validationComplianceProcess') }}
|
||||
</div>
|
||||
<div class="checkboxGroup-text"
|
||||
:class="{'checkboxGroup-text-color':checkboxGroupColor('21')}"
|
||||
@click="processClick('21')">
|
||||
{{$t('preHomoFlow')}}
|
||||
{{ $t('preHomoFlow') }}
|
||||
</div>
|
||||
<!-- <van-checkbox name="2" shape="square">{{$t('designComplianceProcess')}}</van-checkbox>-->
|
||||
<!-- <van-checkbox name="4" shape="square">{{$t('validationComplianceProcess')}}</van-checkbox>-->
|
||||
<!-- <van-checkbox name="21" shape="square">{{$t('preHomoFlow')}}</van-checkbox>-->
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
@@ -183,9 +196,18 @@
|
||||
:label="$t('cutoffTime')"
|
||||
:placeholder="$t('clickAndSelect')">
|
||||
<template #input>
|
||||
<van-dropdown-menu class="cutoffTimeClass">
|
||||
<van-dropdown-item v-model="form.selectModel" :options="columns"/>
|
||||
</van-dropdown-menu>
|
||||
<div class="checkboxGroup">
|
||||
<div class="checkboxGroup-text"
|
||||
v-for="(item,index) in columns"
|
||||
:key="index"
|
||||
:class="{'checkboxGroup-text-color':selectModelColor(item.value)}"
|
||||
@click="selectModelClick(item.value)">
|
||||
{{ item.text }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <van-dropdown-menu class="cutoffTimeClass">-->
|
||||
<!-- <van-dropdown-item v-model="form.selectModel" :options="columns"/>-->
|
||||
<!-- </van-dropdown-menu>-->
|
||||
</template>
|
||||
</van-field>
|
||||
<!-- <van-popup v-model="showPicker" position="bottom">-->
|
||||
@@ -200,7 +222,7 @@
|
||||
<template #input>
|
||||
<div class="Mode-text">
|
||||
<div class="Mode-text-left">
|
||||
{{$t('onlyMobilePhoneAreDisplayed')}}
|
||||
{{ $t('onlyMobilePhoneAreDisplayed') }}
|
||||
</div>
|
||||
</div>
|
||||
<van-switch v-model="form.checked"/>
|
||||
@@ -208,8 +230,8 @@
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div class="button">
|
||||
<van-button class="reset" type="primary" @click="resetClick">{{$t('phoneReset')}}</van-button>
|
||||
<van-button class="primary" type="primary" @click="queryClick">{{$t('query')}}</van-button>
|
||||
<van-button class="reset" type="primary" @click="resetClick">{{ $t('phoneReset') }}</van-button>
|
||||
<van-button class="primary" type="primary" @click="queryClick">{{ $t('query') }}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
@@ -228,10 +250,6 @@
|
||||
show: false,
|
||||
date: '',
|
||||
columns: [
|
||||
{
|
||||
text: this.$t('pleaseSelect'),
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
text: this.$t('nearlyMonth'),
|
||||
value: '1'
|
||||
@@ -292,7 +310,14 @@
|
||||
this.form.checked = JSON.parse(this.$route.query.checked)
|
||||
this.form.selectModel = this.$route.query.selectModel
|
||||
}
|
||||
if (this.$route.query.id) {
|
||||
this.form.id = this.$route.query.id
|
||||
}
|
||||
if (this.$route.query.keyWord) {
|
||||
this.phoneQueryValue = this.$route.query.keyWord
|
||||
}
|
||||
this.form = { ...this.form }
|
||||
// this.isNew('2023-06-01')
|
||||
// this.toDoProcessPageNo = 1
|
||||
// this.getToDoProcess()
|
||||
},
|
||||
@@ -425,12 +450,13 @@
|
||||
}
|
||||
},
|
||||
activeChange() {
|
||||
this.phoneQueryValue = ''
|
||||
this.form = {
|
||||
checked: false,
|
||||
selectModel: '0',
|
||||
flowType:[],
|
||||
}
|
||||
// this.phoneQueryValue = ''
|
||||
// this.form = {
|
||||
// checked: false,
|
||||
// selectModel: '0',
|
||||
// flowType:[],
|
||||
// }
|
||||
this.form.id = ''
|
||||
if (this.form.checked) {
|
||||
this.form.mobileProcessing = '1'
|
||||
} else {
|
||||
@@ -459,7 +485,7 @@
|
||||
toDoCenterClick(row, isTrue) {
|
||||
let query = {}
|
||||
let flowType = ''
|
||||
if (this.form.flowType && this.form.flowType instanceof Array){
|
||||
if (this.form.flowType && this.form.flowType instanceof Array) {
|
||||
flowType = this.form.flowType.join(',')
|
||||
}
|
||||
row.taskId = row.taskId + ''
|
||||
@@ -476,6 +502,7 @@
|
||||
projectTaskInventoryId: row.projectLawsInventoryId,
|
||||
projectLibraryId: row.projectLibraryId,
|
||||
TaskKey: row.taskDefinitionKey,
|
||||
TaskKeyName: row.taskDefinitionKeyName,
|
||||
isDisplay: isTrue,
|
||||
flowType: 2,
|
||||
Sponsor: 'regulationOwnerName',
|
||||
@@ -502,6 +529,7 @@
|
||||
projectTaskInventoryId: row.projectLawsInventoryId,
|
||||
projectLibraryId: row.projectLibraryId,
|
||||
TaskKey: row.taskDefinitionKey,
|
||||
TaskKeyName: row.taskDefinitionKeyName,
|
||||
isDisplay: isTrue,
|
||||
flowType: 4,
|
||||
Sponsor: 'regulationOwnerName',
|
||||
@@ -530,6 +558,7 @@
|
||||
query: {
|
||||
projectLibraryId: row.projectLibraryId,
|
||||
taskDefinitionKey: row.taskDefinitionKey,
|
||||
TaskKeyName: row.taskDefinitionKeyName,
|
||||
isDisplay: isTrue,
|
||||
projectName: row.projectName,
|
||||
goRouter: '/phoneToDoCenter',
|
||||
@@ -669,7 +698,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
selectModelClick(value) {
|
||||
this.form.selectModel = value
|
||||
},
|
||||
processClick(type) {
|
||||
if (!this.form.flowType) {
|
||||
this.form.flowType = []
|
||||
@@ -701,6 +732,27 @@
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
selectModelColor(value) {
|
||||
if (this.form.selectModel == value) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
isNew(pubTime) {
|
||||
if (pubTime != null && pubTime !== '' && pubTime !== undefined) {
|
||||
pubTime = pubTime.replace(new RegExp(/-/gm), '/')
|
||||
let currentTime = new Date().getTime()
|
||||
let endTime = new Date(pubTime).getTime()
|
||||
let numTime = endTime - currentTime
|
||||
if (numTime < 30 * 24 * 3600 * 1000 && numTime > 0) {
|
||||
return 'yellow'
|
||||
} else if (numTime > 30 * 24 * 3600 * 1000) {
|
||||
return 'green'
|
||||
} else {
|
||||
return 'red'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -815,7 +867,7 @@
|
||||
padding: 0.4rem 0.4rem;
|
||||
box-sizing: border-box;
|
||||
background: #F7F7F8;
|
||||
margin-bottom: 0.8rem;
|
||||
margin-bottom: 1.4rem;
|
||||
}
|
||||
|
||||
.content-box-content {
|
||||
@@ -854,17 +906,24 @@
|
||||
}
|
||||
|
||||
.content-box-left {
|
||||
width: 1rem;
|
||||
width: 1.46rem;
|
||||
display: inline-block;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.content-box-left-one {
|
||||
width: 1.6rem;
|
||||
width: 1.66rem;
|
||||
}
|
||||
|
||||
.content-box-text {
|
||||
margin-left: 0.3rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.content-box-text-color {
|
||||
margin-left: 0.3rem;
|
||||
color: #00B3BE;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.content-box-right {
|
||||
@@ -1089,4 +1148,25 @@
|
||||
background: #00B3BE;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar {
|
||||
height: 74px !important;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
::v-deep .van-tabbar-item {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
color: #FDA71C;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #00B3BE
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user