mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 17:58:17 +08:00
新增推送日志,以及修改bug
This commit is contained in:
parent
1ca35f5d85
commit
77bc71a791
5
pom.xml
5
pom.xml
@ -400,6 +400,11 @@
|
||||
<artifactId>forest-spring-boot-starter</artifactId>
|
||||
<version>1.5.26</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-core</artifactId>
|
||||
<version>4.2.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@ -112,6 +112,11 @@
|
||||
<!-- <artifactId>apm-toolkit-trace</artifactId>-->
|
||||
<!-- <version>${与你的agent探针版本保持一致}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-core</artifactId>
|
||||
<version>4.2.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ public class RuoYiApplication {
|
||||
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||
application.run(args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ RuoYi-Vue-Plus启动成功 ლ(´ڡ`ლ)゙");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -23,18 +23,12 @@ import com.ruoyi.common.utils.reflect.ReflectUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.framework.config.properties.CaptchaProperties;
|
||||
import com.ruoyi.framework.config.properties.MailProperties;
|
||||
import com.ruoyi.sms.config.properties.SmsProperties;
|
||||
import com.ruoyi.sms.core.SmsTemplate;
|
||||
import com.ruoyi.sms.core.TelecomSendMsg;
|
||||
import com.ruoyi.sms.entity.SmsResult;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sms4j.api.SmsBlend;
|
||||
import org.dromara.sms4j.api.entity.SmsResponse;
|
||||
import org.dromara.sms4j.core.factory.SmsFactory;
|
||||
import org.dromara.sms4j.provider.enumerate.SupplierType;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
@ -70,14 +64,7 @@ public class CaptchaController {
|
||||
* @param username 用户手机号
|
||||
*/
|
||||
@GetMapping("/captchaSms")
|
||||
public R<Void> smsCaptcha(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) {
|
||||
String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber;
|
||||
String code = RandomUtil.randomNumbers(4);
|
||||
|
||||
public R<Void> smsCaptcha(@NotBlank(message = "{user.phonenumber.not.blank}") String username) {
|
||||
if (!smsProperties.getEnabled()) {
|
||||
return R.fail("当前系统没有开启短信功能!");
|
||||
}
|
||||
//判断系统中是否存在该人才
|
||||
SysUser user = sysUserMapper.selectOne(new LambdaQueryWrapper<SysUser>()
|
||||
.select(SysUser::getPhonenumber, SysUser::getStatus)
|
||||
|
||||
@ -43,6 +43,7 @@ public class BuyHousesController extends BaseController {
|
||||
* 一期后台接口查询列表
|
||||
*/
|
||||
@SaCheckPermission("system:houses:list")
|
||||
@Log(title = "获取数据库一期数据", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BuyHousesVo> list(BuyHousesBo bo, PageQuery pageQuery) {
|
||||
return iBuyHousesService.queryPageList(bo, pageQuery);
|
||||
|
||||
@ -179,7 +179,7 @@ public class HousesReviewController extends BaseController {
|
||||
@SaCheckPermission("system:review:import")
|
||||
@PostMapping(value = "/review/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file) throws Exception {
|
||||
ExcelResult<HousesReviewVo> result = ExcelUtil.importExcel(file.getInputStream(), HousesReviewVo.class, true);
|
||||
ExcelResult<HousesReviewVo> result = ExcelUtil.importExcel(file.getInputStream(), HousesReviewVo.class, true,3);
|
||||
List<HousesReviewVo> volist = result.getList();
|
||||
//判断时间格式是否正确
|
||||
volist.stream().forEach(v ->{
|
||||
@ -197,11 +197,19 @@ public class HousesReviewController extends BaseController {
|
||||
List<HousesReview> list = BeanUtil.copyToList(volist, HousesReview.class);
|
||||
//先获取到导入数据的身份证去购房一期数据库去查
|
||||
//过滤出导入表中的身份证号码
|
||||
List<String> collect = list.stream().filter( e ->ObjectUtil.isNotEmpty(e.getCard())).map(HousesReview::getCard).collect(Collectors.toList());
|
||||
List<String> collect = list.stream()
|
||||
.filter( e ->ObjectUtil.isNotEmpty(e.getCard()))
|
||||
.map(HousesReview::getCard)
|
||||
.collect(Collectors.toList());
|
||||
if (collect.size()>0 && list.size()>0) {
|
||||
LambdaQueryWrapper<BuyHouses> queryWrapper = new LambdaQueryWrapper<BuyHouses>().in(BuyHouses::getCardId, collect);
|
||||
LambdaQueryWrapper<BuyHouses> queryWrapper = new LambdaQueryWrapper<BuyHouses>()
|
||||
.in(BuyHouses::getCardId, collect)
|
||||
.eq(BuyHouses::getProcessStatus,Constants.SUCCEED);
|
||||
//查询出导入数据中的身份证有那些是属于区级人才的
|
||||
List<String> collect1 = buyHousesMapper.selectList(queryWrapper).stream().map(BuyHouses::getCardId).collect(Collectors.toList());
|
||||
List<String> collect1 = buyHousesMapper.selectList(queryWrapper)
|
||||
.stream()
|
||||
.map(BuyHouses::getCardId)
|
||||
.collect(Collectors.toList());
|
||||
for (HousesReview housesReview : list) {
|
||||
housesReview.setProcessKey("house_review");
|
||||
housesReview.setProcessStatus(Constants.SUBMIT);
|
||||
|
||||
@ -15,7 +15,6 @@ import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.StrUtils;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.sms.core.SmsTemplate;
|
||||
import com.ruoyi.sms.core.TelecomSendMsg;
|
||||
import com.ruoyi.sms.entity.SmsResult;
|
||||
import com.ruoyi.system.domain.vo.RouterVo;
|
||||
@ -162,7 +161,7 @@ public class SysLoginController {
|
||||
@RateLimiter(count = 2, time = 10)
|
||||
@PostMapping("/userLogin")
|
||||
public R userLogin(
|
||||
// @Validated({LoginBody.passwordLogin.class})
|
||||
@Validated({LoginBody.passwordLogin.class})
|
||||
@RequestBody LoginBody loginBody) {
|
||||
// 生成令牌
|
||||
return R.ok("登录成功",loginService.userLogin(loginBody.getUsername(), loginBody.getPassword()));
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.web.controller.user;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
@ -114,14 +115,6 @@ public class UserController extends BaseController {
|
||||
return toAjax(iUserService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断这个人是否具备申请购房资格
|
||||
*/
|
||||
@GetMapping("cardId/{cardId}")
|
||||
public R<?>getUserCandidateInfo(@PathVariable(value = "cardId") String cardId) throws Exception {
|
||||
return iUserService.getUserCandidateInfo(cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前业务进行步骤
|
||||
*/
|
||||
@ -178,5 +171,9 @@ public class UserController extends BaseController {
|
||||
hashMap.put("list",processPlan);
|
||||
return R.ok(hashMap);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@GetMapping("/model")
|
||||
public void module(HttpServletResponse response) throws IOException {
|
||||
response.sendRedirect("https://dbxqtalents.cn/");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ spring.boot.admin.client:
|
||||
url: http://localhost:9090/admin
|
||||
instance:
|
||||
service-host-type: IP
|
||||
username: ruoyi
|
||||
password: 123456
|
||||
username: gaoxin
|
||||
password: 1234Qwer@
|
||||
|
||||
--- # xxl-job 配置
|
||||
xxl.job:
|
||||
@ -55,6 +55,9 @@ spring:
|
||||
url: jdbc:mysql://182.138.107.22:3409/ry-vue-house?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||
username: gxrc
|
||||
password: 45Uuq5!aADGD
|
||||
# url: jdbc:mysql://localhost:3306/ry-vue-house?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: 123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
|
||||
@ -27,7 +27,7 @@ captcha:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8084
|
||||
port: 8085
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
|
||||
@ -5,7 +5,7 @@ user.jcaptcha.not.blank=验证码不可为空
|
||||
user.jcaptcha.expire=验证码已失效
|
||||
user.not.exists=对不起, 您的账号:{0} 不存在.
|
||||
user.password.not.match=用户不存在/密码错误
|
||||
user.password.retry.limit.count=密码输入错误{0}次
|
||||
user.password.retry.limit.count=密码输入错误{0}次,剩余{1}次
|
||||
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
|
||||
user.password.delete=对不起,您的账号:{0} 已被删除
|
||||
user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
|
||||
@ -42,10 +42,10 @@ no.view.permission=您没有查看数据的权限,请联系管理员添加权
|
||||
repeat.submit.message=不允许重复提交,请稍候再试
|
||||
rate.limiter.message=访问过于频繁,请稍候再试
|
||||
sms.code.not.blank=短信验证码不能为空
|
||||
sms.code.retry.limit.count=短信验证码输入错误{0}次
|
||||
sms.code.retry.limit.count=短信验证码输入错误{0}次,剩余{1}次
|
||||
sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
|
||||
email.code.not.blank=邮箱验证码不能为空
|
||||
email.code.retry.limit.count=邮箱验证码输入错误{0}次
|
||||
email.code.retry.limit.count=邮箱验证码输入错误{0}次,剩余{1}次
|
||||
email.code.retry.limit.exceed=邮箱验证码输入错误{0}次,帐户锁定{1}分钟
|
||||
xcx.code.not.blank=小程序code不能为空
|
||||
user.password.expired=对不起,您的账号:{0},密码已过期,请修改密码
|
||||
|
||||
@ -5,7 +5,7 @@ user.jcaptcha.expire=验证码已失效
|
||||
user.jcaptcha.not.blank=验证码不可为空
|
||||
user.not.exists=对不起, 您的账号:{0} 不存在.
|
||||
user.password.not.match=用户不存在/密码错误
|
||||
user.password.retry.limit.count=密码输入错误{0}次
|
||||
user.password.retry.limit.count=密码输入错误{0}次,剩余{1}次
|
||||
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
|
||||
user.password.delete=对不起,您的账号:{0} 已被删除
|
||||
user.blocked=对不起,您的账号:{0} 已禁用,请联系管理员
|
||||
@ -42,7 +42,7 @@ no.view.permission=您没有查看数据的权限,请联系管理员添加权
|
||||
repeat.submit.message=不允许重复提交,请稍候再试
|
||||
rate.limiter.message=访问过于频繁,请稍候再试
|
||||
sms.code.not.blank=短信验证码不能为空
|
||||
sms.code.retry.limit.count=短信验证码输入错误{0}次
|
||||
sms.code.retry.limit.count=短信验证码输入错误{0}次,剩余{1}次
|
||||
sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟
|
||||
email.code.not.blank=邮箱验证码不能为空
|
||||
email.code.retry.limit.count=邮箱验证码输入错误{0}次
|
||||
|
||||
14
ruoyi-admin/src/main/resources/templates/111.html
Normal file
14
ruoyi-admin/src/main/resources/templates/111.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<title>Page Title</title>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
|
||||
<script src='main.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
重定向来了
|
||||
</body>
|
||||
</html>
|
||||
@ -16,6 +16,8 @@ import cn.hutool.crypto.symmetric.AES;
|
||||
import cn.hutool.crypto.symmetric.SM4;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.http.useragent.UserAgent;
|
||||
import cn.hutool.http.useragent.UserAgentUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
@ -29,10 +31,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.domain.entity.GaoXinCardInfo;
|
||||
import com.ruoyi.common.helper.DataBaseHelper;
|
||||
import com.ruoyi.common.utils.AesUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.JsonUtils;
|
||||
import com.ruoyi.common.utils.OpenUtils;
|
||||
import com.ruoyi.common.utils.*;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.demo.domain.ImageDemoData;
|
||||
import com.ruoyi.system.domain.*;
|
||||
@ -67,6 +66,8 @@ import sun.misc.BASE64Encoder;
|
||||
import javax.crypto.*;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -227,7 +228,7 @@ public class DemoUnitTest {
|
||||
ProcessVo processVo = new ProcessVo();
|
||||
processVo.setProcessKey("apply_house");
|
||||
processVo.setStep("1");
|
||||
BuyHouses buyHouses = buyHousesMapper.selectById("3181");
|
||||
BuyHouses buyHouses = buyHousesMapper.selectById("3136");
|
||||
buyHouses.setUpdateTime(DateUtils.getNowDate());
|
||||
Map<String, Object> map = BeanUtil.beanToMap(buyHouses);
|
||||
processVo.setParams(map);
|
||||
@ -425,21 +426,9 @@ public class DemoUnitTest {
|
||||
.header("Cookie","security.session.id=e1eee749-70da-48a5-8390-b99c7e1749e0")
|
||||
.execute()
|
||||
.body();*/
|
||||
String s = AesUtil.encryptBASE64("18716148446");
|
||||
System.out.println("s = " + s);
|
||||
LinkedHashMap<String, Object> hashMap = new LinkedHashMap<>();
|
||||
JSONObject json1 = JSONUtil.createObj()
|
||||
.set("loginName", AesUtil.encryptBASE64("15881326343"))
|
||||
.set("password",AesUtil.encryptBASE64("Feng19891217"));
|
||||
// hashMap.put("loginName", AesUtil.encryptBASE64("18716148446"));
|
||||
// hashMap.put("password",AesUtil.encryptBASE64("1234Qwer"));
|
||||
|
||||
String http = HttpRequest.post("https://gx.chengdutalent.cn:8010/user/login")
|
||||
.header("Content-Type","application/json;charset=UTF-8")
|
||||
.body(String.valueOf(json1))
|
||||
.execute().body();
|
||||
String backURL = String.valueOf(JSONUtil.parseObj(http).get("backURL"));
|
||||
System.out.println("http = " + http);
|
||||
/* BuyHouses buyHouses = buyHousesMapper.selectById(1011L);
|
||||
Map<String, Object> map = BeanUtil.beanToMap(buyHouses);
|
||||
List<MaterialModuleVo> materialInfo = materialModuleService.getMaterialInfo(map);
|
||||
@ -614,7 +603,7 @@ public class DemoUnitTest {
|
||||
public void test0212311123123(){
|
||||
String publicKey="0435661bb2d13bba88f47af0bbe243fcded8f27ac298932661787f88ea283c2b31fe427e1aa8410826a963e9114fe5ffab4ad278aeeb7f1f161e735d1f50570e78";
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("username","15808234569");
|
||||
map.put("username","o6Jx05A8ze3Icr6KC59n8I0DBp14");
|
||||
map.put("apiKey","gaoxingongyuanchengshiju");
|
||||
String s = JSONUtil.toJsonPrettyStr(map);
|
||||
String doEncrypt = Sm2.doEncrypt(s, publicKey);
|
||||
@ -761,10 +750,11 @@ public class DemoUnitTest {
|
||||
@Test
|
||||
public void test0121123(){
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("id","1");
|
||||
hashMap.put("status","00T");
|
||||
hashMap.put("id","3212");
|
||||
hashMap.put("status","00D");
|
||||
hashMap.put("description","测试");
|
||||
housingConstructionBureauPushDto.send3(hashMap,"http://218.89.220.30:9200/rctopen/api/anju/openBuyHousesCallback");
|
||||
hashMap.put("auditDepartName","数字经济局功能区建设推进处");
|
||||
housingConstructionBureauPushDto.send3(hashMap,"https://www.cdhtrct.com/route/open/api/anju/openBuyHousesCallback");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -841,10 +831,10 @@ public class DemoUnitTest {
|
||||
|
||||
@Test
|
||||
public void testPush() throws ParseException {
|
||||
Map<String, Object> map = WorkUtils.getInfoToMap("buy_houses","2");
|
||||
Map<String, Object> map = WorkUtils.getInfoToMap("buy_houses","3218");
|
||||
String virtualcode = String.valueOf(map.get("virtualcode"));
|
||||
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
||||
String cardType = String.valueOf(map.get("cardType"));
|
||||
String cardType = String.valueOf(map.get("nationality"));
|
||||
map.put("cardType", "中国籍".equals(cardType) ? 1 : 4);
|
||||
Object createTime = map.get("createTime");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
|
||||
@ -859,13 +849,27 @@ public class DemoUnitTest {
|
||||
map.put("buyHousesLogList", "null");
|
||||
String s = housingConstructionBureauPushDto.openUrl("https://171.221.172.13:8088/CCSRegistryCenter/rest", map, "253");
|
||||
}
|
||||
@Test
|
||||
public void testOut(){
|
||||
BuyHouses buyHouses = buyHousesMapper.selectById(3218);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id",buyHouses.getId());
|
||||
map.put("reason","人才主动提交");//原因
|
||||
map.put("userName",buyHouses.getUserName());
|
||||
map.put("cardId",buyHouses.getCardId());
|
||||
map.put("cancelTime", DateUtils.dateTime("yyyy-MM-dd HH:mm:ss"));
|
||||
map.put("note","人才主动撤销");//备注
|
||||
map.put("status", "00N");
|
||||
System.out.println("JSONUtil.toJsonPrettyStr(map) = " + JSONUtil.toJsonPrettyStr(map));
|
||||
housingConstructionBureauPushDto.openUrl("https://jcfw.cdzjryb.com/CCSRegistryCenter/rest",map,"254");//正式
|
||||
}
|
||||
|
||||
@Test
|
||||
public void paChon() throws Exception {
|
||||
String str ="C2型人才国家级技能大师工作室领衔人";
|
||||
String substring = str.substring(0,1);
|
||||
System.out.println("substring = " + substring);
|
||||
|
||||
// R rInfo = OpenUtils.getGaoXinCardInfo("510503199602214055");
|
||||
// System.out.println("rInfo = " + rInfo);
|
||||
String s = com.ruoyi.common.utils.StringUtils.toUpperCase("510503199602214055l");
|
||||
System.out.println("s = " + s);
|
||||
// buyHousesService.logout("3184");
|
||||
|
||||
// R gaoXinCardInfo = OpenUtils.getGaoXinCardInfo("510503199602214055");
|
||||
@ -894,5 +898,19 @@ public class DemoUnitTest {
|
||||
System.out.println("listContent = " + listContent);*/
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test45656() {
|
||||
HttpRequest.get("https://rcaj.cdhtgycs.cn/gx-api/user/house/excelZip?id=3136")
|
||||
.header("Referer", "https://rcaj.cdhtgycs.cn")
|
||||
.execute()
|
||||
.body();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testtttt(HttpServletResponse response) throws IOException {
|
||||
response.sendRedirect("https://dbxqtalents.cn/111.html");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,10 +2,14 @@ package com.ruoyi.common.advice;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.useragent.Platform;
|
||||
import cn.hutool.http.useragent.UserAgent;
|
||||
import cn.hutool.http.useragent.UserAgentUtil;
|
||||
import com.ruoyi.common.core.domain.RsaSecurity;
|
||||
import com.ruoyi.common.core.service.ConfigService;
|
||||
import com.ruoyi.common.core.service.IRsaSecurityService2;
|
||||
import com.ruoyi.common.utils.RSAUtil;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
@ -47,10 +51,6 @@ public class DecodeRequestBodyAdvice implements RequestBodyAdvice {
|
||||
@Override
|
||||
public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) throws IOException {
|
||||
try {
|
||||
//判断系统是否在维护中
|
||||
ConfigService sysConfigService = SpringUtils.getBean(ConfigService.class);
|
||||
//系统升级提示
|
||||
sysConfigService.selectConfigByConfigKey("system:maintenance:prompt");
|
||||
String path = inputMessage.getHeaders().getFirst("path");
|
||||
String method = inputMessage.getHeaders().getFirst("method");
|
||||
if (ObjectUtil.isNotNull(path)) {
|
||||
@ -123,12 +123,13 @@ public class DecodeRequestBodyAdvice implements RequestBodyAdvice {
|
||||
String content = null;
|
||||
try {
|
||||
logger.info("解密密文:"+requestData);
|
||||
if ("weixin".equals(targe)){
|
||||
content = RSAUtil.privateKeyDecryptStr(requestData,privateKey);
|
||||
}else {
|
||||
String substring1 = StringUtils.substring(requestData, 0, 1);
|
||||
if ("\"".equals(substring1)){
|
||||
String data1 = requestData.substring(1);
|
||||
String substring = requestData.substring(1, data1.length());
|
||||
content = RSAUtil.privateKeyDecryptStr(substring,privateKey);
|
||||
}else {
|
||||
content = RSAUtil.privateKeyDecryptStr(requestData,privateKey);
|
||||
}
|
||||
logger.info("解密明文:"+content);
|
||||
} catch (Exception e) {
|
||||
|
||||
@ -21,7 +21,6 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
||||
* @date 2018/10/25 20:17
|
||||
*/
|
||||
@ControllerAdvice
|
||||
//@RsaSecurityParameter()
|
||||
public class EncodeResponseBodyAdvice implements ResponseBodyAdvice {
|
||||
private final static Logger logger = LoggerFactory.getLogger(EncodeResponseBodyAdvice.class);
|
||||
private static final IRsaSecurityService2 rsaSecurityService=SpringUtils.getBean(IRsaSecurityService2.class);
|
||||
@ -36,17 +35,17 @@ public class EncodeResponseBodyAdvice implements ResponseBodyAdvice {
|
||||
public Object beforeBodyWrite(Object body, MethodParameter methodParameter, MediaType mediaType, Class aClass, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
|
||||
// 此处要用反射将字段中的注解解析出来
|
||||
String method = serverHttpRequest.getMethod().name();
|
||||
String path = serverHttpRequest.getURI().getPath();
|
||||
RsaSecurity info = rsaSecurityService.getInfo(path,method);
|
||||
if (ObjectUtil.isNotNull(info)) {
|
||||
if ("1".equals(info.getRestricted())){
|
||||
return R.fail("接口已限制请求");
|
||||
}
|
||||
if ("1".equals(info.getOutEncode())) {
|
||||
serverHttpResponse.getHeaders().add("isRsaencrypt","true");
|
||||
return encodeRsa(methodParameter, body, info.getPublicKey());
|
||||
}
|
||||
String path = serverHttpRequest.getURI().getPath();
|
||||
RsaSecurity info = rsaSecurityService.getInfo(path,method);
|
||||
if (ObjectUtil.isNotNull(info)) {
|
||||
if ("1".equals(info.getRestricted())){
|
||||
return R.fail("接口已限制请求");
|
||||
}
|
||||
if ("1".equals(info.getOutEncode())) {
|
||||
serverHttpResponse.getHeaders().add("isRsaencrypt","true");
|
||||
return encodeRsa(methodParameter, body, info.getPublicKey());
|
||||
}
|
||||
}
|
||||
serverHttpResponse.getHeaders().add("isRsaencrypt","false");
|
||||
return body;
|
||||
/*if (methodParameter.getMethod().isAnnotationPresent(RsaSecurityParameter.class)) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@ -10,6 +11,7 @@ import java.io.Serializable;
|
||||
* @author Administrator
|
||||
* 高新人才接口返回所需
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class GaoXinCardInfo implements Serializable {
|
||||
|
||||
@ -50,6 +52,7 @@ public class GaoXinCardInfo implements Serializable {
|
||||
*/
|
||||
private String education;
|
||||
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
@ -64,4 +67,19 @@ public class GaoXinCardInfo implements Serializable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public void setNationality(String nationality) {
|
||||
if (ObjectUtil.isNotNull(nationality) && ObjectUtil.isNotEmpty(nationality)) {
|
||||
nationality = StringUtils.trimAllWhitespace(nationality);
|
||||
if ("中国".equals(nationality)) {
|
||||
this.nationality = nationality + "籍";
|
||||
}else {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.common.core.domain.event;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 推送日志对象 push_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("push_log")
|
||||
public class PushLogEvent extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 推送数据
|
||||
*/
|
||||
private String pushData;
|
||||
/**
|
||||
* 返回结果
|
||||
*/
|
||||
private String resultData;
|
||||
|
||||
}
|
||||
@ -1,5 +1,8 @@
|
||||
package com.ruoyi.common.core.service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 通用 参数配置服务
|
||||
*
|
||||
|
||||
@ -41,4 +41,5 @@ public enum LoginType {
|
||||
* 登录重试限制计数提示
|
||||
*/
|
||||
final String retryLimitCount;
|
||||
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class RepeatableFilter implements Filter {
|
||||
&& StringUtils.startsWithIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE) ) {
|
||||
requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response);
|
||||
}
|
||||
if (!isSafe((HttpServletRequest) request)) {
|
||||
if (!isSafe((HttpServletRequest) request,(HttpServletResponse) response)) {
|
||||
((HttpServletResponse) response).setStatus(403);
|
||||
return;
|
||||
}
|
||||
@ -59,7 +59,7 @@ public class RepeatableFilter implements Filter {
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
private boolean isSafe(HttpServletRequest request) {
|
||||
private boolean isSafe(HttpServletRequest request,HttpServletResponse response) {
|
||||
ConfigService sysConfigService = SpringUtils.getBean(ConfigService.class);
|
||||
String configValue = sysConfigService.getConfigValue("sys:preventing:hotlinking");
|
||||
List<String> strings = Arrays.asList(configValue.split(","));
|
||||
@ -71,7 +71,7 @@ public class RepeatableFilter implements Filter {
|
||||
if (referer == null || "".equals(referer)) {
|
||||
// 获取不到防盗链头部信息 -> 拦截
|
||||
System.out.println("referer为空进行拦截");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
for (String white : strings) {
|
||||
if (white.contains("*.")) {
|
||||
|
||||
@ -1,115 +0,0 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.util.StringUtils;
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class AesUtil {
|
||||
//密钥 (需要前端和后端保持一致)
|
||||
private static final String KEY = "FFff123456.!-12s";
|
||||
private static final String IV = "FFff123456.!-12s";
|
||||
|
||||
/**
|
||||
* 加密方法
|
||||
* @param data 要加密的数据
|
||||
* @param key 加密key
|
||||
* @param iv 加密iv
|
||||
* @return 加密的结果
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String encrypt(String data, String key, String iv) throws Exception {
|
||||
try {
|
||||
|
||||
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
|
||||
int blockSize = cipher.getBlockSize();
|
||||
byte[] dataBytes = data.getBytes();
|
||||
int plaintextLength = dataBytes.length;
|
||||
if (plaintextLength % blockSize != 0) {
|
||||
plaintextLength = plaintextLength + (blockSize - (plaintextLength % blockSize));
|
||||
}
|
||||
byte[] plaintext = new byte[plaintextLength];
|
||||
System.arraycopy(dataBytes, 0, plaintext, 0, dataBytes.length);
|
||||
SecretKeySpec keyspec = new SecretKeySpec(key.getBytes(), "AES");
|
||||
IvParameterSpec ivspec = new IvParameterSpec(iv.getBytes());
|
||||
cipher.init(Cipher.ENCRYPT_MODE, keyspec, ivspec);
|
||||
byte[] encrypted = cipher.doFinal(plaintext);
|
||||
return new Base64().encodeToString(encrypted);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密方法
|
||||
* @param data 要解密的数据
|
||||
* @param key 解密key
|
||||
* @param iv 解密iv
|
||||
* @return 解密的结果
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String desEncrypt(String data, String key, String iv) throws Exception {
|
||||
try {
|
||||
byte[] encrypted1 = new Base64().decode(data);
|
||||
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
|
||||
SecretKeySpec keyspec = new SecretKeySpec(key.getBytes(), "AES");
|
||||
IvParameterSpec ivspec = new IvParameterSpec(iv.getBytes());
|
||||
cipher.init(Cipher.DECRYPT_MODE, keyspec, ivspec);
|
||||
byte[] original = cipher.doFinal(encrypted1);
|
||||
String originalString = new String(original);
|
||||
return originalString;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用默认的key和iv加密
|
||||
* @param data
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String encrypt(String data) throws Exception {
|
||||
return encrypt(data, KEY, IV);
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用默认的key和iv解密
|
||||
* @param data
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String desEncrypt(String data) throws Exception {
|
||||
return desEncrypt(data, KEY, IV);
|
||||
}
|
||||
|
||||
/**
|
||||
* BASE64解密
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String decryptBASE64(String key) throws Exception {
|
||||
if (!StringUtils.isEmpty(key)){
|
||||
return new String(new BASE64Decoder().decodeBuffer(key), StandardCharsets.UTF_8);
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* BASE64加密
|
||||
*/
|
||||
public static String encryptBASE64(String key) throws Exception {
|
||||
if (!StringUtils.isEmpty(key)) {
|
||||
return (new BASE64Encoder()).encodeBuffer(key.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.Mode;
|
||||
import cn.hutool.crypto.Padding;
|
||||
@ -51,14 +52,36 @@ public class OpenUtils {
|
||||
Object data = jsonObject1.get("data");
|
||||
String message = jsonObject1.getStr("message");
|
||||
if (code==200){
|
||||
if (ObjectUtil.isNull(data)){
|
||||
return R.fail("暂未获取到当前"+cardId+"人才认定信息");
|
||||
if (ObjectUtil.isNull(data) || ObjectUtil.isEmpty(data)){
|
||||
return R.fail("暂未获取到当前"+cardId+"人才认定信息,如有疑问请联系客服人员! 电话:19940594954");
|
||||
}else {
|
||||
GaoXinCardInfo gaoXinCardInfo = JsonUtils.parseObject(JSONUtil.toJsonPrettyStr(data), GaoXinCardInfo.class);
|
||||
//判断值是否为空
|
||||
if (ObjectUtil.isEmpty(gaoXinCardInfo.getName())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:姓名为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getCard_id())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:身份证为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getSex())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:性别为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getNationality())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:国籍为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getEducation())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:学历为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getDistrict())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:单位区域为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getPhone())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:手机号为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getCompany_name())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:公司名称为空!请联系客服人员! 电话:19940594954");
|
||||
}else if (ObjectUtil.isEmpty(gaoXinCardInfo.getType())){
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:人才类型为空!请联系客服人员! 电话:19940594954");
|
||||
}
|
||||
gaoXinCardInfo.setType(gaoXinCardInfo.getType());
|
||||
gaoXinCardInfo.setNationality(gaoXinCardInfo.getNationality());
|
||||
return R.ok(gaoXinCardInfo);
|
||||
}
|
||||
}else if (code==400){
|
||||
return R.fail(message);
|
||||
return R.fail("获取人才认定数据接口返回异常,异常信息:"+message+"请联系客服人员! 电话:19940594954");
|
||||
}else {
|
||||
return R.fail("人才认定接口请求未知异常");
|
||||
}
|
||||
|
||||
@ -171,6 +171,15 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
return StrUtil.toUnderlineCase(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字母转大写
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static String toUpperCase(String str) {
|
||||
return str.toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否包含字符串
|
||||
*
|
||||
|
||||
@ -100,6 +100,7 @@ public class MyFileUtils extends FileUtils
|
||||
conn.setRequestMethod("GET");//POST
|
||||
//防止屏蔽程序抓取而返回403错误
|
||||
conn.setRequestProperty("User-Agent", "Mozilla/5.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
|
||||
conn.setRequestProperty("Referer","https://rcaj.cdhtgycs.cn");
|
||||
conn.setConnectTimeout(5000);
|
||||
conn.setReadTimeout(5000);
|
||||
int responseCode = conn.getResponseCode();
|
||||
|
||||
@ -54,9 +54,9 @@ public class ExcelUtil {
|
||||
* @param isValidate 是否 Validator 检验 默认为是
|
||||
* @return 转换后集合
|
||||
*/
|
||||
public static <T> ExcelResult<T> importExcel(InputStream is, Class<T> clazz, boolean isValidate) {
|
||||
public static <T> ExcelResult<T> importExcel(InputStream is, Class<T> clazz, boolean isValidate,Integer num) {
|
||||
DefaultExcelListener<T> listener = new DefaultExcelListener<>(isValidate);
|
||||
EasyExcel.read(is, clazz, listener).sheet().doRead();
|
||||
EasyExcel.read(is, clazz, listener).sheet().headRowNumber(num).doRead();
|
||||
return listener.getExcelResult();
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ public class TestDemoController extends BaseController {
|
||||
@SaCheckPermission("demo:demo:import")
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file) throws Exception {
|
||||
ExcelResult<TestDemoImportVo> excelResult = ExcelUtil.importExcel(file.getInputStream(), TestDemoImportVo.class, true);
|
||||
ExcelResult<TestDemoImportVo> excelResult = ExcelUtil.importExcel(file.getInputStream(), TestDemoImportVo.class, true,0);
|
||||
List<TestDemoImportVo> volist = excelResult.getList();
|
||||
List<TestDemo> list = BeanUtil.copyToList(volist, TestDemo.class);
|
||||
iTestDemoService.saveBatch(list);
|
||||
|
||||
@ -41,5 +41,5 @@ spring.boot.admin.client:
|
||||
url: http://localhost:9090/admin
|
||||
instance:
|
||||
service-host-type: IP
|
||||
username: ruoyi
|
||||
password: 123456
|
||||
username: gaoxin
|
||||
password: 1234Qwer@
|
||||
|
||||
@ -25,4 +25,4 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
registry.addInterceptor(cookieInterceptor).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.0</version>
|
||||
<version>4.8.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -39,9 +39,6 @@ public class ResourcesConfig implements WebMvcConfigurer {
|
||||
registry.addInterceptor(new PlusWebInvokeTimeInterceptor());
|
||||
}
|
||||
|
||||
/* @Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 跨域配置
|
||||
@ -83,8 +80,9 @@ public class ResourcesConfig implements WebMvcConfigurer {
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
// 设置允许跨域的路由
|
||||
registry.addMapping(localFilePrefix + "/**")
|
||||
// 设置允许跨域请求的域名
|
||||
.allowedOrigins("*")
|
||||
.allowCredentials(true)
|
||||
.maxAge(3000)
|
||||
// 设置允许的方法
|
||||
.allowedMethods("GET");
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.ruoyi.framework.interceptor;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||
import com.ruoyi.common.core.service.ConfigService;
|
||||
import com.ruoyi.common.filter.RepeatedlyRequestWrapper;
|
||||
import com.ruoyi.common.utils.JsonUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
@ -34,6 +35,7 @@ public class PlusWebInvokeTimeInterceptor implements HandlerInterceptor {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
// response.sendRedirect("https://dbxqtalents.cn/");
|
||||
if (!prodProfile.equals(SpringUtils.getActiveProfile())) {
|
||||
String url = request.getMethod() + " " + request.getRequestURI();
|
||||
|
||||
@ -59,6 +61,10 @@ public class PlusWebInvokeTimeInterceptor implements HandlerInterceptor {
|
||||
invokeTimeTL.set(stopWatch);
|
||||
stopWatch.start();
|
||||
}
|
||||
//判断系统是否在维护中
|
||||
ConfigService sysConfigService = SpringUtils.getBean(ConfigService.class);
|
||||
//系统升级提示
|
||||
sysConfigService.selectConfigByConfigKey("system:maintenance:prompt");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.0</version>
|
||||
<version>4.8.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
31
ruoyi-sms/src/main/java/com/ruoyi/sms/entity/SmsResult.java
Normal file
31
ruoyi-sms/src/main/java/com/ruoyi/sms/entity/SmsResult.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.ruoyi.sms.entity;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 上传返回体
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class SmsResult {
|
||||
|
||||
/**
|
||||
* 是否成功
|
||||
*/
|
||||
private boolean isSuccess;
|
||||
|
||||
/**
|
||||
* 响应消息
|
||||
*/
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 实际响应体
|
||||
* <p>
|
||||
* 可自行转换为 SDK 对应的 SendSmsResponse
|
||||
*/
|
||||
private String response;
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 推送日志对象 push_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("push_log")
|
||||
public class PushLog extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 推送数据
|
||||
*/
|
||||
private String pushData;
|
||||
/**
|
||||
* 返回结果
|
||||
*/
|
||||
private String resultData;
|
||||
|
||||
}
|
||||
@ -99,7 +99,7 @@ public class HousesReviewBo extends BaseEntity {
|
||||
/**
|
||||
* 资格预申请时间
|
||||
*/
|
||||
@NotBlank(message = "资格预申请时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotBlank(message = "资格预申请时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String qualificationPreApplyTime;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
package com.ruoyi.system.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 推送日志业务对象 push_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PushLogBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 推送数据
|
||||
*/
|
||||
@NotBlank(message = "推送数据不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String pushData;
|
||||
|
||||
/**
|
||||
* 返回结果
|
||||
*/
|
||||
@NotBlank(message = "返回结果不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String resultData;
|
||||
|
||||
|
||||
}
|
||||
@ -38,6 +38,9 @@ public class HousesReviewVo implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private String step;
|
||||
|
||||
@ExcelProperty(value = "序号")
|
||||
private String number;
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 推送日志视图对象 push_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PushLogVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 推送数据
|
||||
*/
|
||||
@ExcelProperty(value = "推送数据")
|
||||
private String pushData;
|
||||
|
||||
/**
|
||||
* 返回结果
|
||||
*/
|
||||
@ExcelProperty(value = "返回结果")
|
||||
private String resultData;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.PushLog;
|
||||
import com.ruoyi.system.domain.vo.PushLogVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 推送日志Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface PushLogMapper extends BaseMapperPlus<PushLogMapper, PushLog, PushLogVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.event.PushLogEvent;
|
||||
import com.ruoyi.system.domain.vo.PushLogVo;
|
||||
import com.ruoyi.system.domain.bo.PushLogBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 推送日志Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface IPushLogService {
|
||||
|
||||
/**
|
||||
* 查询推送日志
|
||||
*/
|
||||
PushLogVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询推送日志列表
|
||||
*/
|
||||
TableDataInfo<PushLogVo> queryPageList(PushLogBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询推送日志列表
|
||||
*/
|
||||
List<PushLogVo> queryList(PushLogBo bo);
|
||||
|
||||
|
||||
/**
|
||||
* 修改推送日志
|
||||
*/
|
||||
Boolean updateByBo(PushLogBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除推送日志信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -57,5 +57,4 @@ public interface IUserService {
|
||||
*/
|
||||
int resetUserPwd(String userName, String password);
|
||||
|
||||
R<?> getUserCandidateInfo(String cardId) throws Exception;
|
||||
}
|
||||
|
||||
@ -93,8 +93,6 @@ public class SysLoginService {
|
||||
SysUser user = loadSysUserByUsername(username);
|
||||
checkLogin(LoginType.PASSWORD, username, () -> !BCrypt.checkpw(password, user.getPassword()));
|
||||
// 此处可根据登录用户的数据不同 自行创建 loginUser 属性不够用继承扩展就行了
|
||||
LoginUser loginUser = buildLoginUser(user);
|
||||
// 此处可根据登录用户的数据不同 自行创建 loginUser
|
||||
LoginUser loginUser = buildLoginSysUser(user);
|
||||
// 生成token
|
||||
LoginHelper.loginByDevice(loginUser, DeviceType.PC);
|
||||
@ -110,10 +108,6 @@ public class SysLoginService {
|
||||
checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode,CacheConstants.CAPTCHA_CODE_KEY));
|
||||
// 此处可根据登录用户的数据不同 自行创建 loginUser
|
||||
LoginUser loginUser = buildLoginSysUser(user);
|
||||
|
||||
checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode));
|
||||
// 此处可根据登录用户的数据不同 自行创建 loginUser 属性不够用继承扩展就行了
|
||||
LoginUser loginUser = buildLoginUser(user);
|
||||
// 生成token
|
||||
LoginHelper.loginByDevice(loginUser, DeviceType.APP);
|
||||
|
||||
@ -358,7 +352,7 @@ public class SysLoginService {
|
||||
} else {
|
||||
// 未达到规定错误次数
|
||||
recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber));
|
||||
throw new UserException(loginType.getRetryLimitCount(), errorNumber);
|
||||
throw new UserException(loginType.getRetryLimitCount(), errorNumber,maxRetryCount-errorNumber);
|
||||
}
|
||||
}
|
||||
// 登录成功 清空错误次数
|
||||
|
||||
@ -156,7 +156,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
private LambdaQueryWrapper<BuyHouses> buildQueryWrapper(BuyHousesBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BuyHouses> lqw = Wrappers.lambdaQuery();
|
||||
if (ObjectUtil.isNotNull(bo.getIds())){
|
||||
if (ObjectUtil.isNotNull(bo.getIds()) && bo.getIds().length>0){
|
||||
lqw.in(BuyHouses::getId,bo.getIds());
|
||||
}
|
||||
lqw.eq(ObjectUtil.isNotNull(bo.getId()), BuyHouses::getId, bo.getId());
|
||||
@ -227,12 +227,12 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSocialSecurityUrl()), BuyHouses::getSocialSecurityUrl, bo.getSocialSecurityUrl());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BuyHouses::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getUserId() != null, BuyHouses::getUserId, bo.getUserId());
|
||||
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProcessStatus()),BuyHouses::getProcessStatus,bo.getProcessStatus());
|
||||
lqw.ge(StringUtils.isBlank(bo.getProcessStatus()),BuyHouses::getProcessStatus,Constants.SUCCEED);
|
||||
lqw.and(StringUtils.isNotBlank(bo.getUserName()),t ->t.like(BuyHouses::getUserName,bo.getUserName())
|
||||
.or().like(BuyHouses::getPhone,bo.getUserName())
|
||||
.or().like(BuyHouses::getCardId,bo.getUserName()));
|
||||
lqw.and(StringUtils.isNotBlank(bo.getUserName()),t ->
|
||||
t.like(BuyHouses::getUserName,bo.getUserName())
|
||||
.or().like(BuyHouses::getPhone,bo.getUserName())
|
||||
.or().like(BuyHouses::getCardId,bo.getUserName()));
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDistrict()),BuyHouses::getDistrict,bo.getDistrict());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getType()),BuyHouses::getType,bo.getType());
|
||||
|
||||
@ -489,7 +489,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
R rInfo = OpenUtils.getGaoXinCardInfo(buyHouses.getCardId());
|
||||
GaoXinCardInfo gaoXinCardInfo = JsonUtils.parseObject(JSONUtil.toJsonPrettyStr(rInfo.getData()), GaoXinCardInfo.class);
|
||||
BuyHouses buyHousesDto = new BuyHouses();
|
||||
buyHousesDto.setCardId(gaoXinCardInfo.getCard_id());
|
||||
buyHousesDto.setCardId(StringUtils.toUpperCase(gaoXinCardInfo.getCard_id()));
|
||||
String nationality = gaoXinCardInfo.getNationality();
|
||||
if ("中国".contains(nationality)){
|
||||
buyHousesDto.setNationality("中国籍");
|
||||
@ -532,33 +532,6 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
hashMap.put("processKey","apply_house");
|
||||
hashMap.put("businessId",null);
|
||||
return R.ok("获取成功",hashMap);
|
||||
|
||||
|
||||
/* HttpResponse execute = HttpRequest.get(URL)
|
||||
.form("cardId",cardId)
|
||||
.timeout(5000)
|
||||
.execute();
|
||||
JSONObject entries = JSONUtil.parseObj(execute.body());
|
||||
String code = String.valueOf(entries.get("code"));
|
||||
if (ObjectUtil.isNull(code)){
|
||||
return R.fail("获取人才信息失败");
|
||||
}else {
|
||||
if ("666666".equals(code)){
|
||||
BuyHouses buyHouses = baseMapper.selectOne(new LambdaQueryWrapper<>(BuyHouses.class).eq(BuyHouses::getCardId, cardId));
|
||||
if (ObjectUtil.isNotNull(buyHouses)){
|
||||
hashMap.put("status",buyHouses.getProcessStatus());
|
||||
hashMap.put("processKey",buyHouses.getProcessKey());
|
||||
hashMap.put("businessId",buyHouses.getId());
|
||||
return R.ok("获取成功",hashMap);
|
||||
}
|
||||
hashMap.put("status",Constants.SUBMIT);
|
||||
hashMap.put("processKey","apply_house");
|
||||
hashMap.put("businessId",null);
|
||||
return R.ok("获取成功",hashMap);
|
||||
}else {
|
||||
return R.fail("暂无资格");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1325,7 +1298,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
public void excelZip(String id){
|
||||
BuyHousesBo bo =new BuyHousesBo();
|
||||
if (ObjectUtil.isNotNull(id)){
|
||||
bo.setId(Long.valueOf(id));
|
||||
bo.setId(Long.valueOf(id));
|
||||
}
|
||||
LambdaQueryWrapper<BuyHouses> lqw = buildQueryWrapper(bo);
|
||||
List<BuyHousesVo> buyHousesVoList = baseMapper.selectVoList(lqw);
|
||||
@ -1467,9 +1440,9 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
Map<String, Object> map = WorkUtils.getInfoToMap("buy_houses",id);
|
||||
String virtualcode = String.valueOf(map.get("virtualcode"));
|
||||
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
||||
String cardType = String.valueOf(map.get("cardType"));
|
||||
String cardType = String.valueOf(map.get("nationality"));
|
||||
map.put("cardType", "中国籍".equals(cardType) ? 1 : 4);
|
||||
Object createTime = map.get("createTime");
|
||||
Object createTime = map.get("passTime");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
|
||||
DateFormat cst = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date format = sdf.parse(createTime.toString());
|
||||
@ -1495,7 +1468,6 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
map.put("cardId",buyHouses.getCardId());
|
||||
map.put("cancelTime", DateUtils.dateTime("yyyy-MM-dd HH:mm:ss"));
|
||||
map.put("note","人才主动撤销");//备注
|
||||
map.put("status", "00N");
|
||||
System.out.println("JSONUtil.toJsonPrettyStr(map) = " + JSONUtil.toJsonPrettyStr(map));
|
||||
housingConstructionBureauPushDto.openUrl("https://jcfw.cdzjryb.com/CCSRegistryCenter/rest",map,"254");//正式
|
||||
return null;
|
||||
|
||||
@ -117,7 +117,7 @@ public class HousesReviewServiceImpl implements IHousesReviewService {
|
||||
private LambdaQueryWrapper<HousesReview> buildQueryWrapper3(HousesReviewBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<HousesReview> lqw = Wrappers.lambdaQuery();
|
||||
if (ObjectUtil.isNotNull(bo.getIds())){
|
||||
if (ObjectUtil.isNotNull(bo.getIds()) && bo.getIds().length>0){
|
||||
lqw.in(HousesReview::getId,bo.getIds());
|
||||
}
|
||||
lqw.and(StringUtils.isNotBlank(bo.getName()),t ->
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.core.domain.event.PushLogEvent;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.domain.bo.PushLogBo;
|
||||
import com.ruoyi.system.domain.vo.PushLogVo;
|
||||
import com.ruoyi.system.domain.PushLog;
|
||||
import com.ruoyi.system.mapper.PushLogMapper;
|
||||
import com.ruoyi.system.service.IPushLogService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 推送日志Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PushLogServiceImpl implements IPushLogService {
|
||||
|
||||
private final PushLogMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询推送日志
|
||||
*/
|
||||
@Override
|
||||
public PushLogVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询推送日志列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PushLogVo> queryPageList(PushLogBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PushLog> lqw = buildQueryWrapper(bo);
|
||||
Page<PushLogVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询推送日志列表
|
||||
*/
|
||||
@Override
|
||||
public List<PushLogVo> queryList(PushLogBo bo) {
|
||||
LambdaQueryWrapper<PushLog> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PushLog> buildQueryWrapper(PushLogBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<PushLog> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPushData()), PushLog::getPushData, bo.getPushData());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getResultData()), PushLog::getResultData, bo.getResultData());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增推送日志
|
||||
*/
|
||||
@Async
|
||||
@EventListener
|
||||
public void insertByBo(PushLogEvent event) {
|
||||
PushLog add = BeanUtil.toBean(event, PushLog.class);
|
||||
baseMapper.insert(add);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改推送日志
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PushLogBo bo) {
|
||||
PushLog update = BeanUtil.toBean(bo, PushLog.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PushLog entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除推送日志
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -57,7 +57,9 @@ public class SubscribeExportServiceImpl implements ISubscribeExportService {
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<SubscribeExportVo> queryPageList(SubscribeExportBo bo, PageQuery pageQuery) {
|
||||
bo.setUserId(LoginHelper.getUserId().toString());
|
||||
if (!LoginHelper.isAdmin()){
|
||||
bo.setUserId(LoginHelper.getUserId().toString());
|
||||
}
|
||||
bo.setExportStatus("1");
|
||||
LambdaQueryWrapper<SubscribeExport> lqw = buildQueryWrapper(bo);
|
||||
lqw.orderByDesc(SubscribeExport::getCreateTime);
|
||||
@ -78,6 +80,7 @@ public class SubscribeExportServiceImpl implements ISubscribeExportService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SubscribeExport> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPath()), SubscribeExport::getPath, bo.getPath());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getExportStatus()), SubscribeExport::getExportStatus, bo.getExportStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUserId()), SubscribeExport::getUserId, bo.getUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProcessKey()), SubscribeExport::getProcessKey, bo.getProcessKey());
|
||||
return lqw;
|
||||
|
||||
@ -6,11 +6,13 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.constant.CacheNames;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.service.ConfigService;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.redis.CacheUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
@ -21,7 +23,10 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.cache.annotation.CachePut;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
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;
|
||||
@ -69,12 +74,11 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
|
||||
*/
|
||||
@Override
|
||||
public void selectConfigByConfigKey(String key) {
|
||||
SysConfig aTrue = baseMapper.selectOne(new LambdaQueryWrapper<>(SysConfig.class)
|
||||
.eq(SysConfig::getConfigKey, key)
|
||||
.eq(SysConfig::getConfigValue, "true"));
|
||||
if (ObjectUtil.isNotNull(aTrue)){
|
||||
throw new ServiceException(aTrue.getRemark());
|
||||
String s = selectConfigByKey(key);
|
||||
if ("true".equals(s)){
|
||||
throw new ServiceException("系统升级维护中!感谢您的等待!");
|
||||
}
|
||||
System.out.println("s = " + s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -23,7 +23,6 @@ import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.work.service.IWorkSysDeptService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
@ -40,7 +39,7 @@ import java.util.List;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SysDeptServiceImpl implements ISysDeptService, DeptService, IWorkSysDeptService {
|
||||
public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||
|
||||
private final SysDeptMapper baseMapper;
|
||||
private final SysRoleMapper roleMapper;
|
||||
|
||||
@ -26,7 +26,6 @@ import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
|
||||
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.work.service.IWorkSysRoleService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -40,7 +39,7 @@ import java.util.*;
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SysRoleServiceImpl implements ISysRoleService, IWorkSysRoleService {
|
||||
public class SysRoleServiceImpl implements ISysRoleService{
|
||||
|
||||
private final SysRoleMapper baseMapper;
|
||||
private final SysRoleMenuMapper roleMenuMapper;
|
||||
|
||||
@ -27,7 +27,6 @@ import com.ruoyi.system.domain.SysUserPost;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.mapper.*;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.work.service.IWorkSysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
@ -46,7 +45,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SysUserServiceImpl implements ISysUserService, UserService, IWorkSysUserService {
|
||||
public class SysUserServiceImpl implements ISysUserService, UserService{
|
||||
|
||||
private final SysUserMapper baseMapper;
|
||||
private final SysDeptMapper deptMapper;
|
||||
|
||||
@ -4,8 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.AesUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
@ -144,22 +142,4 @@ public class UserServiceImpl implements IUserService {
|
||||
.set(User::getPassword, password)
|
||||
.eq(User::getLoginName, userName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getUserCandidateInfo(String cardId) throws Exception {
|
||||
LinkedHashMap<String, Object> hashMap = new LinkedHashMap<>();
|
||||
hashMap.put("loginName",AesUtil.decryptBASE64("18716148446"));
|
||||
hashMap.put("password",AesUtil.decryptBASE64("1234Qwer"));
|
||||
try {
|
||||
HttpRequest.post("https://gx.chengdutalent.cn:8010/user/login")
|
||||
.form(hashMap)
|
||||
.timeout(20000)
|
||||
.execute().body();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("调用接口超时");
|
||||
}
|
||||
//调用高新的接口
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.PushLogMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.system.domain.PushLog" id="PushLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="pushData" column="push_data"/>
|
||||
<result property="resultData" column="result_data"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -4,7 +4,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
@ -24,6 +24,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="properties" column="properties"/>
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||
</resultMap>
|
||||
@ -65,6 +66,7 @@
|
||||
u.create_by,
|
||||
u.create_time,
|
||||
u.remark,
|
||||
u.properties,
|
||||
d.dept_id,
|
||||
d.parent_id,
|
||||
d.ancestors,
|
||||
@ -85,7 +87,7 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectPageUserList" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.properties,u.email, u.avatar, u.phonenumber, u.sex,
|
||||
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
@ -93,7 +95,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectUserList" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.properties, u.email, u.avatar, u.phonenumber, u.sex,
|
||||
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
@ -101,7 +103,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email,u.properties, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role sur on u.user_id = sur.user_id
|
||||
@ -110,7 +112,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.properties, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role sur on u.user_id = sur.user_id
|
||||
|
||||
@ -35,7 +35,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:8084`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.0</version>
|
||||
<version>4.8.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-sms</artifactId>
|
||||
|
||||
@ -2,8 +2,6 @@ package com.ruoyi.work.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.work.domain.bo.ProcessBo;
|
||||
import com.ruoyi.work.domain.vo.ProcessVo;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.work.controller;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -8,10 +9,12 @@ import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.domain.event.PushLogEvent;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.work.domain.ActProcess;
|
||||
import com.ruoyi.work.domain.HisProcess;
|
||||
import com.ruoyi.work.domain.RollBackLog;
|
||||
@ -119,7 +122,7 @@ public class WorkController extends BaseController {
|
||||
@Log(title = "流程办理",businessType = BusinessType.OTHER)
|
||||
// @SaCheckPermission("work:task:batchDeleted")
|
||||
@PostMapping("/batchDeleted")
|
||||
public R<?> batchDeleted(@RequestBody HisProcess hisProcess) throws ParseException {
|
||||
public R<?> batchDeleted(@RequestBody HisProcess hisProcess){
|
||||
if (ObjectUtil.isNull(hisProcess.getStatus())){
|
||||
return R.fail("状态不可为空");
|
||||
}
|
||||
@ -129,12 +132,22 @@ public class WorkController extends BaseController {
|
||||
if (ObjectUtil.isNull(hisProcess.getBusinessId())){
|
||||
return R.fail("业务id不可为空");
|
||||
}
|
||||
return batchDeletedCommon(hisProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程办理公共方法
|
||||
* @param hisProcess
|
||||
* @return
|
||||
*/
|
||||
private R batchDeletedCommon(HisProcess hisProcess){
|
||||
System.out.println("hisProcess.getBusinessId() = " + hisProcess.getBusinessId());
|
||||
List<TProcess> tProcesses = processMapper.selectList(new LambdaQueryWrapper<TProcess>()
|
||||
.eq(TProcess::getProcessKey, hisProcess.getProcessKey()));
|
||||
if (tProcesses.size()==0){
|
||||
throw new ServiceException("当前流程不存在");
|
||||
}
|
||||
Map<String, Object> map = WorkUtils.getInfoToMap(tProcesses.get(0).getBean(),hisProcess.getBusinessId());
|
||||
Map<String, Object> map = WorkUtils.getInfoToMap(tProcesses.get(0).getBean(), hisProcess.getBusinessId());
|
||||
hisProcess.setParams(map);
|
||||
Map map1 = WorkComplyUtils.batchDeleted(hisProcess,tProcesses.stream().map(TProcess::getId).collect(Collectors.toList()));
|
||||
String s = String.valueOf(map1.get("status"));
|
||||
@ -152,13 +165,9 @@ public class WorkController extends BaseController {
|
||||
//公园城市局推送
|
||||
String virtualcode = String.valueOf(map.get("virtualcode"));
|
||||
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
||||
String cardType = String.valueOf(map.get("cardType"));
|
||||
String cardType = String.valueOf(map.get("nationality"));
|
||||
map.put("cardType", "中国籍".equals(cardType) ? 1 : 4);
|
||||
Object createTime = map.get("createTime");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
|
||||
DateFormat cst = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date format = sdf.parse(createTime.toString());
|
||||
String dateString = cst.format(format);
|
||||
String dateString = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||
map.put("creatTime",dateString);
|
||||
map.put("qyStatus", "4");
|
||||
map.put("gyStatus", "4");
|
||||
@ -193,6 +202,26 @@ public class WorkController extends BaseController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程批量办理
|
||||
*/
|
||||
@Log(title = "流程批量办理",businessType = BusinessType.OTHER)
|
||||
@SaCheckPermission("work:task:batchReviewPassed")
|
||||
@PostMapping("/batchReviewPassed")
|
||||
public R<?> batchReviewPassed(@RequestBody HisProcess hisProcess){
|
||||
hisProcess.setStatus("2");
|
||||
hisProcess.setProcessKey("house_review");
|
||||
if (ObjectUtil.isNull(hisProcess.getIds()) || hisProcess.getIds().length==0){
|
||||
return R.fail("业务id不可为空");
|
||||
}
|
||||
for (String id : hisProcess.getIds()) {
|
||||
//调用方法
|
||||
hisProcess.setBusinessId(id);
|
||||
batchDeletedCommon(hisProcess);
|
||||
}
|
||||
return R.ok("批量办理失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务id详情数据
|
||||
* @param actProcess
|
||||
@ -240,5 +269,6 @@ public class WorkController extends BaseController {
|
||||
rollBackLog.setParams(map);
|
||||
return toAjax(WorkComplyUtils.rollBack(rollBackLog)>1?1:0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ public class ActProcess {
|
||||
*/
|
||||
private String audit;
|
||||
/**
|
||||
* 审核类型(1,人员,2.部门,3角色)
|
||||
* 审核类型(1,人员,2.部门,3角色,4公司)
|
||||
*/
|
||||
private String checkType;
|
||||
/**
|
||||
@ -92,5 +92,11 @@ public class ActProcess {
|
||||
@TableField(exist = false)
|
||||
private String apiKey;
|
||||
|
||||
/**
|
||||
* 特定标识
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String tiger;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -114,6 +114,16 @@ public class HisProcess{
|
||||
*/
|
||||
private String cardId;
|
||||
|
||||
/**
|
||||
* 特定标识
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String tiger;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String[] ids;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -130,6 +130,9 @@ public class ProcessVo {
|
||||
|
||||
private String cardId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,9 @@ import cn.hutool.crypto.symmetric.AES;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.common.core.domain.event.PushLogEvent;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.work.utils.CCSMessageDigest;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -72,6 +74,8 @@ public class HousingConstructionBureauPushDto {
|
||||
}*/
|
||||
|
||||
public String openUrl(String url,Map<String, Object> param, String interfaceId) {
|
||||
PushLogEvent pushLogEvent = new PushLogEvent();
|
||||
pushLogEvent.setPushData(JSONUtil.toJsonPrettyStr(param));
|
||||
final HttpRequestBody httpRequestBody = new HttpRequestBody();
|
||||
httpRequestBody.setRegioncode(DEFAULT_REGIONCODE);
|
||||
httpRequestBody.setData(param);
|
||||
@ -102,6 +106,8 @@ public class HousingConstructionBureauPushDto {
|
||||
if (ObjectUtil.isNull(result2) || ObjectUtil.isEmpty(result2)){
|
||||
throw new ServiceException("推送市级系统失败!原因:返回值为空");
|
||||
}
|
||||
pushLogEvent.setResultData(result2);
|
||||
SpringUtils.context().publishEvent(pushLogEvent);
|
||||
JSONObject jsonObject = JSONUtil.parseObj(result2);
|
||||
String aFalse = jsonObject.getStr("result");
|
||||
String aStatus = jsonObject.getStr("status");
|
||||
@ -118,6 +124,8 @@ public class HousingConstructionBureauPushDto {
|
||||
|
||||
|
||||
public String send3(Map<String,Object> params,String url){
|
||||
PushLogEvent pushLogEvent = new PushLogEvent();
|
||||
pushLogEvent.setPushData(JSONUtil.toJsonPrettyStr(params));
|
||||
//基本信息数据
|
||||
HttpRequestBody httpRequestBody = new HttpRequestBody();
|
||||
httpRequestBody.setApiKey("001");
|
||||
@ -145,11 +153,15 @@ public class HousingConstructionBureauPushDto {
|
||||
e.printStackTrace();
|
||||
}
|
||||
httpRequestBody.setSignature(signature);
|
||||
|
||||
//调用接口
|
||||
try {
|
||||
String result2 = HttpRequest.post(url)
|
||||
.header("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0")
|
||||
.body(JSONUtil.toJsonPrettyStr(httpRequestBody))
|
||||
.execute().body();
|
||||
pushLogEvent.setResultData(result2);
|
||||
SpringUtils.context().publishEvent(pushLogEvent);
|
||||
System.out.println("result2 = " + result2);
|
||||
JSONObject jsonObject = JSONUtil.parseObj(result2);
|
||||
String rsCode = jsonObject.getStr("rsCode");
|
||||
|
||||
@ -20,5 +20,7 @@ public interface ActProcessMapper extends BaseMapperPlus<ActProcessMapper, ActPr
|
||||
|
||||
Page<ActProcess> selectCCList(@Param("page") Page<ActProcess> page, @Param("actProcess") ActProcess actProcess);
|
||||
|
||||
Page<ActProcess> selectSpecificList(@Param("page") Page<ActProcess> page, @Param("actProcess") ActProcess actProcess);
|
||||
|
||||
ActProcess selectByIdResultBean2BusinessId(@Param("id") Long id);
|
||||
}
|
||||
|
||||
@ -25,4 +25,5 @@ public interface HisProcessMapper extends BaseMapperPlus<HisProcessMapper, HisPr
|
||||
List<HisProcess> selectVoHisList( @Param(Constants.WRAPPER) Wrapper<HisProcess> queryWrapper);
|
||||
|
||||
Page<HisProcess> selectListPageByCC(@Param("page") Page<HisProcess> page, @Param("hisProcess") HisProcess hisProcess);
|
||||
Page<HisProcess> selectListPageBySpecific(@Param("page") Page<HisProcess> page, @Param("hisProcess") HisProcess hisProcess);
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.ruoyi.work.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.work.domain.TProcess;
|
||||
import com.ruoyi.work.domain.vo.ProcessVo;
|
||||
@ -14,5 +17,26 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface ProcessMapper extends BaseMapperPlus<ProcessMapper, TProcess, ProcessVo> {
|
||||
|
||||
boolean updateCommonByBusinessId(@Param("bean") String bean, @Param("processStatus") String processStatus, @Param("businessId") String businessId, @Param("step") Object step);
|
||||
/**
|
||||
* 通过角色ID查询角色
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
SysRole selectRoleById(@Param("roleId") Long roleId);
|
||||
|
||||
/**
|
||||
* 根据部门ID查询信息
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 部门信息
|
||||
*/
|
||||
SysDept selectDeptById(@Param("deptId") Long deptId);
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
SysUser selectUserById(@Param("userId") Long userId);
|
||||
}
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
package com.ruoyi.work.service;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门管理 服务层
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface IWorkSysDeptService {
|
||||
/**
|
||||
* 查询部门管理数据
|
||||
*
|
||||
* @param dept 部门信息
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
List<SysDept> selectDeptList(SysDept dept);
|
||||
|
||||
/**
|
||||
* 查询部门树结构信息
|
||||
*
|
||||
* @param dept 部门信息
|
||||
* @return 部门树信息集合
|
||||
*/
|
||||
List<Tree<Long>> selectDeptTreeList(SysDept dept);
|
||||
|
||||
/**
|
||||
* 构建前端所需要下拉树结构
|
||||
*
|
||||
* @param depts 部门列表
|
||||
* @return 下拉树结构列表
|
||||
*/
|
||||
List<Tree<Long>> buildDeptTreeSelect(List<SysDept> depts);
|
||||
|
||||
/**
|
||||
* 根据角色ID查询部门树信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 选中部门列表
|
||||
*/
|
||||
List<Long> selectDeptListByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 根据部门ID查询信息
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 部门信息
|
||||
*/
|
||||
SysDept selectDeptById(Long deptId);
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门数(正常状态)
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
long selectNormalChildrenDeptById(Long deptId);
|
||||
|
||||
}
|
||||
@ -1,63 +0,0 @@
|
||||
package com.ruoyi.work.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 角色业务层
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface IWorkSysRoleService {
|
||||
|
||||
/**
|
||||
* 根据条件分页查询角色数据
|
||||
*
|
||||
* @param role 角色信息
|
||||
* @return 角色数据集合信息
|
||||
*/
|
||||
List<SysRole> selectRoleList(SysRole role);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询角色列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 角色列表
|
||||
*/
|
||||
List<SysRole> selectRolesByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询角色权限
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 权限列表
|
||||
*/
|
||||
Set<String> selectRolePermissionByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询所有角色
|
||||
*
|
||||
* @return 角色列表
|
||||
*/
|
||||
List<SysRole> selectRoleAll();
|
||||
|
||||
/**
|
||||
* 根据用户ID获取角色选择框列表
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 选中角色ID列表
|
||||
*/
|
||||
List<Long> selectRoleListByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 通过角色ID查询角色
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
SysRole selectRoleById(Long roleId);
|
||||
|
||||
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.ruoyi.work.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户 业务层
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface IWorkSysUserService {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
List<SysUser> selectUserList(SysUser user);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
SysUser selectUserByUserName(String userName);
|
||||
|
||||
/**
|
||||
* 通过手机号查询用户
|
||||
*
|
||||
* @param phonenumber 手机号
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
SysUser selectUserByPhonenumber(String phonenumber);
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
SysUser selectUserById(Long userId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,16 +1,12 @@
|
||||
package com.ruoyi.work.utils;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.BetweenFormatter;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
@ -31,14 +27,9 @@ import com.ruoyi.work.dto.BusinessDTO;
|
||||
import com.ruoyi.work.dto.HisProcessVoResultDto;
|
||||
import com.ruoyi.work.dto.ProcessVoResultDto;
|
||||
import com.ruoyi.work.mapper.*;
|
||||
import com.ruoyi.work.service.IWorkSysDeptService;
|
||||
import com.ruoyi.work.service.IWorkSysRoleService;
|
||||
import com.ruoyi.work.service.IWorkSysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.swing.text.AbstractDocument;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -49,19 +40,10 @@ import java.util.stream.Collectors;
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class WorkComplyUtils {
|
||||
|
||||
private static final ProcessMapper processMapper = SpringUtils.getBean(ProcessMapper.class);
|
||||
private static final ActProcessMapper actProcessMapper = SpringUtils.getBean(ActProcessMapper.class);
|
||||
private static final HisProcessMapper hisProcessMapper = SpringUtils.getBean(HisProcessMapper.class);
|
||||
|
||||
private static final IWorkSysRoleService sysRoleMapper= SpringUtils.getBean(IWorkSysRoleService.class);
|
||||
|
||||
private static final RollBackLogMapper rollBackLogMapper= SpringUtils.getBean(RollBackLogMapper.class);
|
||||
|
||||
private static final IWorkSysUserService sysUserMapper = SpringUtils.getBean(IWorkSysUserService.class);
|
||||
|
||||
private static final IWorkSysDeptService sysDeptMapper = SpringUtils.getBean(IWorkSysDeptService.class);
|
||||
|
||||
private static final AuditLogMapper auditLogMapper =SpringUtils.getBean(AuditLogMapper.class);
|
||||
|
||||
|
||||
@ -71,13 +53,12 @@ public class WorkComplyUtils {
|
||||
*/
|
||||
public static void comply(ProcessVo processVo){
|
||||
ActProcess actProcessVo = new ActProcess();
|
||||
LambdaQueryWrapper<TProcess> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq( TProcess::getProcessKey, processVo.getProcessKey());
|
||||
lqw.eq(TProcess::getStep, processVo.getStep());
|
||||
List<ProcessVo> processVoList = processMapper.selectVoList(new LambdaQueryWrapper<>(TProcess.class)
|
||||
.eq(TProcess::getProcessKey, processVo.getProcessKey()));
|
||||
//判断这条业务是否在进行中
|
||||
LambdaQueryWrapper<ActProcess> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ActProcess::getBusinessId,processVo.getBusinessId());
|
||||
List<ActProcessVo> actProcessVos = actProcessMapper.selectVoList(queryWrapper);
|
||||
List<ActProcessVo> actProcessVos = actProcessMapper.selectVoList(new LambdaQueryWrapper<>(ActProcess.class)
|
||||
.eq(ActProcess::getBusinessId,processVo.getBusinessId())
|
||||
.in(ActProcess::getProcessId,processVoList.stream().map(ProcessVo::getId).collect(Collectors.toList())));
|
||||
if (actProcessVos.size()>0){
|
||||
throw new ServiceException("当前业务正在审核中,请耐心等待");
|
||||
}
|
||||
@ -85,7 +66,7 @@ public class WorkComplyUtils {
|
||||
if (ObjectUtil.isNull(params)){
|
||||
throw new ServiceException("params不可为空");
|
||||
}
|
||||
ProcessVo tProcessByKey = processMapper.selectVoOne(lqw);
|
||||
ProcessVo tProcessByKey =processVoList.stream().filter(p ->p.getStep().equals(processVo.getStep())).collect(Collectors.toList()).get(0);
|
||||
params.put("step",tProcessByKey.getStep());
|
||||
Object companyName = params.get("companyName");
|
||||
if (ObjectUtil.isNotNull(companyName)){
|
||||
@ -100,7 +81,11 @@ public class WorkComplyUtils {
|
||||
if (ObjectUtil.isNotNull(card)){
|
||||
actProcessVo.setCardId(String.valueOf(card));
|
||||
}
|
||||
actProcessVo.setUserId(String.valueOf(LoginHelper.getUserId()));
|
||||
if (ObjectUtil.isNotNull(processVo.getUserId())){
|
||||
actProcessVo.setUserId(processVo.getUserId());
|
||||
}else {
|
||||
actProcessVo.setUserId(String.valueOf(LoginHelper.getUserId()));
|
||||
}
|
||||
actProcessVo.setCardId(processVo.getCardId());
|
||||
actProcessVo.setCompanyName(processVo.getCompanyName());
|
||||
actProcessVo.setCreateTime(DateUtils.getNowDate());
|
||||
@ -242,6 +227,7 @@ public class WorkComplyUtils {
|
||||
hisProcess.setCompanyName(hisProcess.getParams().get("companyName").toString());
|
||||
hisProcess.setAudit(actProcessVo.getAudit());
|
||||
}
|
||||
hisProcess.setId(null);
|
||||
//先添加一个属于当前用户的记录
|
||||
hisProcessMapper.insert(hisProcess);
|
||||
//todo 保存一条审核日志
|
||||
@ -436,13 +422,13 @@ public class WorkComplyUtils {
|
||||
hisProcessVo.setAudit1(hisProcessVo.getCompanyName());
|
||||
} else if ("1".equals(hisProcessVo.getCheckType())) {
|
||||
//根据id获取人员信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(new Long(hisProcessVo.getAudit()));
|
||||
SysUser sysUser = processMapper.selectUserById(new Long(hisProcessVo.getAudit()));
|
||||
hisProcessVo.setAudit1(sysUser.getUserName());
|
||||
} else if ("2".equals(hisProcessVo.getCheckType())) {
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(new Long(hisProcessVo.getAudit()));
|
||||
SysDept sysDept = processMapper.selectDeptById(new Long(hisProcessVo.getAudit()));
|
||||
hisProcessVo.setAudit1(sysDept.getDeptName());
|
||||
} else if ("3".equals(hisProcessVo.getCheckType())) {
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(new Long(hisProcessVo.getAudit()));
|
||||
SysRole sysRole = processMapper.selectRoleById(new Long(hisProcessVo.getAudit()));
|
||||
hisProcessVo.setAudit1(sysRole.getRoleName());
|
||||
}
|
||||
}
|
||||
@ -473,9 +459,13 @@ public class WorkComplyUtils {
|
||||
hisProcess.setCompanyUserId(ObjectUtil.isNotNull(loginUser.getUserId())?loginUser.getUserId().toString():"");
|
||||
}
|
||||
Page<HisProcess> hisProcessPage = new Page<>();
|
||||
hisProcessPage = hisProcessMapper.selectVoListPage(pageQuery.build(), hisProcess);
|
||||
if (hisProcessPage.getRecords().size()==0){
|
||||
hisProcessPage = hisProcessMapper.selectListPageByCC(pageQuery.build(),hisProcess);
|
||||
if ("specific".equals(hisProcess.getTiger())){
|
||||
hisProcessPage = hisProcessMapper.selectListPageBySpecific(pageQuery.build(), hisProcess);
|
||||
}else {
|
||||
hisProcessPage = hisProcessMapper.selectVoListPage(pageQuery.build(), hisProcess);
|
||||
if (hisProcessPage.getRecords().size() == 0) {
|
||||
hisProcessPage = hisProcessMapper.selectListPageByCC(pageQuery.build(), hisProcess);
|
||||
}
|
||||
}
|
||||
List<HisProcess> records = hisProcessPage.getRecords();
|
||||
for (HisProcess record : records) {
|
||||
@ -483,13 +473,13 @@ public class WorkComplyUtils {
|
||||
record.setAudit(record.getCompanyName());
|
||||
}else if("1".equals(record.getCheckType())) {
|
||||
//根据id获取人员信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(new Long( record.getAudit()));
|
||||
SysUser sysUser = processMapper.selectUserById(new Long( record.getAudit()));
|
||||
record.setAudit(sysUser.getUserName());
|
||||
}else if ("2".equals(record.getCheckType())){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(new Long(record.getAudit()));
|
||||
SysDept sysDept = processMapper.selectDeptById(new Long(record.getAudit()));
|
||||
record.setAudit(sysDept.getDeptName());
|
||||
}else if ("3".equals(record.getCheckType())){
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(new Long(record.getAudit()));
|
||||
SysRole sysRole = processMapper.selectRoleById(new Long(record.getAudit()));
|
||||
record.setAudit(sysRole.getRoleName());
|
||||
}
|
||||
}
|
||||
@ -507,27 +497,32 @@ public class WorkComplyUtils {
|
||||
actProcess.setUserId(loginUser.getUserId().toString());
|
||||
//获取所有流程中的抄送人员
|
||||
//后台查看待审核页面
|
||||
if (!"4".equals(actProcess)) {
|
||||
Page<ActProcess> actProcessVoCCList = actProcessMapper.selectCCList(pageQuery.build(), actProcess);
|
||||
if (!"4".equals(actProcess.getCheckType())){
|
||||
Page<ActProcess> actProcessVoCCList =new Page<>();
|
||||
if ("specific".equals(actProcess.getTiger())){
|
||||
actProcessVoCCList = actProcessMapper.selectSpecificList(pageQuery.build(), actProcess);
|
||||
}else {
|
||||
actProcessVoCCList = actProcessMapper.selectCCList(pageQuery.build(), actProcess);
|
||||
}
|
||||
if (actProcessVoCCList.getRecords().size() > 0) {
|
||||
for (ActProcess record : actProcessVoCCList.getRecords()) {
|
||||
if ("4".equals(record.getCheckType())){//公司
|
||||
record.setAudit(record.getCompanyName());
|
||||
}else if("1".equals(record.getCheckType())) {
|
||||
//根据id获取人员信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(new Long( record.getAudit()));
|
||||
SysUser sysUser = processMapper.selectUserById(new Long( record.getAudit()));
|
||||
if (ObjectUtil.isNull(sysUser)){
|
||||
throw new ServiceException("用户获取失败");
|
||||
}
|
||||
record.setAudit(sysUser.getUserName());
|
||||
}else if ("2".equals(record.getCheckType())){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(new Long(record.getAudit()));
|
||||
SysDept sysDept = processMapper.selectDeptById(new Long(record.getAudit()));
|
||||
if (ObjectUtil.isNull(sysDept)){
|
||||
throw new ServiceException("部门获取失败");
|
||||
}
|
||||
record.setAudit(sysDept.getDeptName());
|
||||
}else if ("3".equals(record.getCheckType())){
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(new Long(record.getAudit()));
|
||||
SysRole sysRole = processMapper.selectRoleById(new Long(record.getAudit()));
|
||||
if (ObjectUtil.isNull(sysRole)){
|
||||
throw new ServiceException("角色获取失败");
|
||||
}
|
||||
@ -579,13 +574,13 @@ public class WorkComplyUtils {
|
||||
for (ActProcess record : records) {
|
||||
if("1".equals(record.getCheckType())) {
|
||||
//根据id获取人员信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(new Long( record.getAudit()));
|
||||
SysUser sysUser = processMapper.selectUserById(new Long( record.getAudit()));
|
||||
record.setAudit(sysUser.getUserName());
|
||||
}else if ("2".equals(record.getCheckType())){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(new Long(record.getAudit()));
|
||||
SysDept sysDept = processMapper.selectDeptById(new Long(record.getAudit()));
|
||||
record.setAudit(sysDept.getDeptName());
|
||||
}else if ("3".equals(record.getCheckType())){
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(new Long(record.getAudit()));
|
||||
SysRole sysRole = processMapper.selectRoleById(new Long(record.getAudit()));
|
||||
record.setAudit(sysRole.getRoleName());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(record.getTimeout())&& ObjectUtil.isNotNull(record.getTimeout())){
|
||||
@ -788,21 +783,21 @@ public class WorkComplyUtils {
|
||||
e.setAudit(o);
|
||||
}else if("1".equals(e.getCheckType()) || "5".equals(e.getChecked())) {
|
||||
//根据id获取人员信息
|
||||
SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(e.getAudit()));
|
||||
SysUser sysUser = processMapper.selectUserById(Long.valueOf(e.getAudit()));
|
||||
if(ObjectUtil.isNull(sysUser)){
|
||||
throw new ServiceException("根据id获取人员信息失败");
|
||||
}
|
||||
e.setAudit1(e.getAudit());
|
||||
e.setAudit(sysUser.getNickName());
|
||||
}else if ("2".equals(e.getCheckType())){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(Long.valueOf(e.getAudit()));
|
||||
SysDept sysDept = processMapper.selectDeptById(Long.valueOf(e.getAudit()));
|
||||
if(ObjectUtil.isNull(sysDept)){
|
||||
throw new ServiceException("根据id获取部门信息失败");
|
||||
}
|
||||
e.setAudit1(e.getAudit());
|
||||
e.setAudit(sysDept.getDeptName());
|
||||
}else if ("3".equals(e.getCheckType())){
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(Long.valueOf(e.getAudit()));
|
||||
SysRole sysRole = processMapper.selectRoleById(Long.valueOf(e.getAudit()));
|
||||
if(ObjectUtil.isNull(sysRole)){
|
||||
throw new ServiceException("根据id获取角色信息失败");
|
||||
}
|
||||
@ -953,5 +948,4 @@ public class WorkComplyUtils {
|
||||
List<AuditLog> auditLogs = auditLogMapper.selectList(wrapper);
|
||||
return R.ok(auditLogs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
<if test="actProcess.cardId != null and actProcess.cardId != ''"> and a.card_id like concat('%', #{actProcess.cardId}, '%')</if>
|
||||
<if test="actProcess.companyName != null and actProcess.companyName != ''"> and a.company_name like concat('%', #{actProcess.companyName}, '%')</if>
|
||||
<if test="actProcess.step != null and actProcess.step != ''"> and p.step =#{actProcess.step}</if>
|
||||
<if test="actProcess.description != null and actProcess.description != ''"> and a.description like concat('%', #{actProcess.description}, '%')</if>
|
||||
and
|
||||
(
|
||||
(a.check_type= 1 AND a.audit = #{actProcess.userId} )
|
||||
@ -47,14 +48,14 @@
|
||||
(a.check_type = 4 AND a.audit = #{actProcess.companyUserId})
|
||||
)
|
||||
</where>
|
||||
ORDER BY a.create_time desc
|
||||
ORDER BY a.create_time
|
||||
</select>
|
||||
<select id="selectCCList" resultType="com.ruoyi.work.domain.ActProcess">
|
||||
SELECT a.create_time AS createTime,a.business_id AS businessId,a.process_id AS processId,a.audit,a.company_name AS companyName
|
||||
,a.step,a.start_user AS startUser,p.description,p.bean,p.`name`,p.timeout,a.check_type AS checkType,a.type,a.id,p.process_key AS processKey,
|
||||
a.card_id AS cardId
|
||||
FROM
|
||||
( SELECT DISTINCT(id),process_id,company_name,create_time,business_id,audit,step,start_user,check_type,type,card_id
|
||||
( SELECT DISTINCT(id),process_id,company_name,create_time,business_id,description,audit,step,start_user,check_type,type,card_id
|
||||
FROM act_process
|
||||
WHERE process_id IN
|
||||
(SELECT id FROM `process` WHERE FIND_IN_SET(#{actProcess.userId},cc))
|
||||
@ -66,9 +67,31 @@
|
||||
<if test="actProcess.cardId != null and actProcess.cardId != ''"> and a.card_id like concat('%', #{actProcess.cardId}, '%')</if>
|
||||
<if test="actProcess.companyName != null and actProcess.companyName != ''"> and a.company_name like concat('%', #{actProcess.companyName}, '%')</if>
|
||||
<if test="actProcess.step != null and actProcess.step != ''"> and p.step =#{actProcess.step}</if>
|
||||
<if test="actProcess.description != null and actProcess.description != ''"> and a.description like concat('%', #{actProcess.description}, '%')</if>
|
||||
</where>
|
||||
ORDER BY a.create_time
|
||||
</select>
|
||||
|
||||
<select id="selectSpecificList" resultType="com.ruoyi.work.domain.ActProcess">
|
||||
SELECT a.create_time AS createTime,a.business_id AS businessId,a.process_id AS processId,a.audit,a.company_name AS companyName
|
||||
,a.step,a.start_user AS startUser,p.description,p.bean,p.`name`,p.timeout,a.check_type AS checkType,a.type,a.id,p.process_key AS processKey,
|
||||
a.card_id AS cardId
|
||||
FROM
|
||||
( SELECT DISTINCT(id),process_id,company_name,create_time,business_id,description,audit,step,start_user,check_type,type,card_id
|
||||
FROM act_process
|
||||
GROUP BY business_id,process_id ) AS a
|
||||
INNER JOIN process p ON p.id = a.process_id
|
||||
<where>
|
||||
<if test="actProcess.processKey != null and actProcess.processKey != ''"> and p.process_key =#{actProcess.processKey}</if>
|
||||
<if test="actProcess.startUser != null and actProcess.startUser != ''"> and a.start_user like concat('%', #{actProcess.startUser}, '%')</if>
|
||||
<if test="actProcess.cardId != null and actProcess.cardId != ''"> and a.card_id like concat('%', #{actProcess.cardId}, '%')</if>
|
||||
<if test="actProcess.companyName != null and actProcess.companyName != ''"> and a.company_name like concat('%', #{actProcess.companyName}, '%')</if>
|
||||
<if test="actProcess.step != null and actProcess.step != ''"> and p.step =#{actProcess.step}</if>
|
||||
<if test="actProcess.description != null and actProcess.description != ''"> and a.description like concat('%', #{actProcess.description}, '%')</if>
|
||||
</where>
|
||||
ORDER BY a.create_time
|
||||
</select>
|
||||
|
||||
<select id="selectByIdResultBean2BusinessId" resultType="com.ruoyi.work.domain.ActProcess"
|
||||
parameterType="java.lang.Long">
|
||||
SELECT p.bean,a.business_id AS businessId ,p.process_key processKey ,a.start_user startUser FROM process p INNER JOIN act_process a ON a.process_id = p.id WHERE a.id = #{id}
|
||||
|
||||
@ -79,5 +79,25 @@
|
||||
d.end_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectListPageBySpecific" resultType="com.ruoyi.work.domain.HisProcess">
|
||||
SELECT p.`name` ,process_key AS processKey,d.audit,d.check_type AS checkType ,d.type,p.bean,d.`status`,d.create_time AS createTime,
|
||||
d.end_time AS endTime,d.business_id AS businessId,d.start_user AS startUser,p.cc,p.description,d.step,d.time_between,
|
||||
d.card_id AS cardId,d.company_name AS companyName
|
||||
FROM
|
||||
(SELECT process_id,h.create_time,business_id,h.audit,h.check_type,h.`status`,end_time,h.step,h.type,h.start_user,h.time_between,h.card_id,h.company_name
|
||||
FROM
|
||||
`his_process` h
|
||||
WHERE h.id IN (SELECT MAX(id) FROM his_process GROUP BY business_id) ) d
|
||||
INNER JOIN process p ON p.id = d.process_id
|
||||
<where>
|
||||
<if test="hisProcess.cardId !='' and hisProcess.cardId !=null"> and d.card_id like concat('%', #{hisProcess.cardId}, '%')</if>
|
||||
<if test="hisProcess.companyName !='' and hisProcess.companyName !=null"> and d.company_name like concat('%', #{hisProcess.companyName}, '%')</if>
|
||||
<if test="hisProcess.processKey !='' and hisProcess.processKey !=null">and p.process_key = #{hisProcess.processKey}</if>
|
||||
<if test="hisProcess.startUser !='' and hisProcess.startUser !=null"> and d.start_user like concat('%', #{hisProcess.startUser}, '%')</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
d.end_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -21,7 +21,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="timeout" column="timeout"/>
|
||||
<result property="paramName" column="param_name"/>
|
||||
<result property="description" column="description"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SysRole" id="SysRoleResult">
|
||||
<id property="roleId" column="role_id"/>
|
||||
<result property="roleName" column="role_name"/>
|
||||
<result property="roleKey" column="role_key"/>
|
||||
<result property="roleSort" column="role_sort"/>
|
||||
<result property="dataScope" column="data_scope"/>
|
||||
<result property="menuCheckStrictly" column="menu_check_strictly"/>
|
||||
<result property="deptCheckStrictly" column="dept_check_strictly"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SysDept" id="SysDeptResult">
|
||||
<id property="deptId" column="dept_id"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="ancestors" column="ancestors"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="leader" column="leader"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="parentName" column="parent_name"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="nickName" column="nick_name"/>
|
||||
<result property="userType" column="user_type"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="phonenumber" column="phonenumber"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="loginIp" column="login_ip"/>
|
||||
<result property="loginDate" column="login_date"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
<update id="updateCommonByBusinessId">
|
||||
update ${bean}
|
||||
@ -32,6 +88,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</set>
|
||||
where id = #{businessId}
|
||||
</update>
|
||||
<select id="selectRoleById" resultMap="SysRoleResult" parameterType="java.lang.Long">
|
||||
SELECT * FROM sys_role WHERE role_id =#{roleId}
|
||||
</select>
|
||||
<select id="selectDeptById" resultMap="SysDeptResult" parameterType="java.lang.Long">
|
||||
SELECT * FROM sys_dept WHERE dept_id =#{deptId}
|
||||
</select>
|
||||
<select id="selectUserById" resultMap="SysUserResult" parameterType="java.lang.Long">
|
||||
SELECT * FROM sys_user WHERE user_id =#{userId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user