mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
测试人才接口以及学信网爬虫
This commit is contained in:
parent
153b4e8c0b
commit
da97276ef5
@ -94,6 +94,8 @@
|
|||||||
<artifactId>ruoyi-file</artifactId>
|
<artifactId>ruoyi-file</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--<dependency>
|
<!--<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-rabbitmq</artifactId>
|
<artifactId>ruoyi-rabbitmq</artifactId>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.house;
|
package com.ruoyi.web.controller.house;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@ -166,4 +167,11 @@ public class BuyHousesController extends BaseController {
|
|||||||
public R getHistogram(String date){
|
public R getHistogram(String date){
|
||||||
return iBuyHousesService.getHistogram(date);
|
return iBuyHousesService.getHistogram(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对市局系统单独推送
|
||||||
|
*/
|
||||||
|
public R push() throws ParseException {
|
||||||
|
return iBuyHousesService.push();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,7 +172,7 @@ public class SysUserController extends BaseController {
|
|||||||
@SaCheckPermission("system:user:remove")
|
@SaCheckPermission("system:user:remove")
|
||||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
public R<Void> remove(@PathVariable Long[] userIds) {
|
public R<Void> remove(Long[] userIds) {
|
||||||
if (ArrayUtil.contains(userIds, getUserId())) {
|
if (ArrayUtil.contains(userIds, getUserId())) {
|
||||||
return R.fail("当前用户不能删除");
|
return R.fail("当前用户不能删除");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,7 +125,7 @@ public class UserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取当前业务进行步骤
|
* 获取当前业务进行步骤
|
||||||
*/
|
*/
|
||||||
@SaIgnore
|
// @SaIgnore
|
||||||
@Log(title = "获取当前业务运行到那一步",businessType = BusinessType.OTHER)
|
@Log(title = "获取当前业务运行到那一步",businessType = BusinessType.OTHER)
|
||||||
@PostMapping("/processPlan")
|
@PostMapping("/processPlan")
|
||||||
public R<?> processPlan(@RequestBody ActProcess actProcess){
|
public R<?> processPlan(@RequestBody ActProcess actProcess){
|
||||||
@ -178,4 +178,5 @@ public class UserController extends BaseController {
|
|||||||
hashMap.put("list",processPlan);
|
hashMap.put("list",processPlan);
|
||||||
return R.ok(hashMap);
|
return R.ok(hashMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,9 +49,10 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://182.150.40.133:3309/ry-vue-house?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&useAffectedRows=true
|
# url: jdbc:mysql://182.150.40.133:3309/ry-vue-house?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&useAffectedRows=true
|
||||||
username: root
|
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
|
||||||
password: 1234Qwer@
|
username: gxrc
|
||||||
|
password: 45Uuq5!aADGD
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
|
|||||||
@ -59,6 +59,7 @@ spring:
|
|||||||
# password: 1234Qwer@
|
# password: 1234Qwer@
|
||||||
#正式地址
|
#正式地址
|
||||||
url: jdbc:mysql://172.12.9.1:3409/ry-vue-house?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://172.12.9.1:3409/ry-vue-house?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
# 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
|
||||||
#url: jdbc:mysql://localhost:3306/ry-vue-jinniu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
#url: jdbc:mysql://localhost:3306/ry-vue-jinniu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
username: gxrc
|
username: gxrc
|
||||||
password: 45Uuq5!aADGD
|
password: 45Uuq5!aADGD
|
||||||
|
|||||||
@ -1,15 +1,18 @@
|
|||||||
package com.ruoyi.test;
|
package com.ruoyi.test;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.codec.Base64;
|
|
||||||
import cn.hutool.core.io.resource.ClassPathResource;
|
import cn.hutool.core.io.resource.ClassPathResource;
|
||||||
import cn.hutool.core.util.IdcardUtil;
|
import cn.hutool.core.util.IdcardUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.crypto.Mode;
|
||||||
|
import cn.hutool.crypto.Padding;
|
||||||
import cn.hutool.crypto.SecureUtil;
|
import cn.hutool.crypto.SecureUtil;
|
||||||
import cn.hutool.crypto.SmUtil;
|
import cn.hutool.crypto.SmUtil;
|
||||||
import cn.hutool.crypto.asymmetric.KeyType;
|
import cn.hutool.crypto.asymmetric.KeyType;
|
||||||
import cn.hutool.crypto.asymmetric.SM2;
|
import cn.hutool.crypto.asymmetric.SM2;
|
||||||
|
import cn.hutool.crypto.digest.MD5;
|
||||||
|
import cn.hutool.crypto.symmetric.AES;
|
||||||
import cn.hutool.crypto.symmetric.SM4;
|
import cn.hutool.crypto.symmetric.SM4;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
@ -26,6 +29,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|||||||
import com.ruoyi.common.helper.DataBaseHelper;
|
import com.ruoyi.common.helper.DataBaseHelper;
|
||||||
import com.ruoyi.common.utils.AesUtil;
|
import com.ruoyi.common.utils.AesUtil;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.demo.domain.ImageDemoData;
|
import com.ruoyi.demo.domain.ImageDemoData;
|
||||||
import com.ruoyi.system.domain.*;
|
import com.ruoyi.system.domain.*;
|
||||||
@ -47,13 +51,18 @@ import com.ruoyi.work.mapper.HisProcessMapper;
|
|||||||
import com.ruoyi.work.mapper.ProcessMapper;
|
import com.ruoyi.work.mapper.ProcessMapper;
|
||||||
import com.ruoyi.work.service.impl.ProcessServiceImpl;
|
import com.ruoyi.work.service.impl.ProcessServiceImpl;
|
||||||
import com.ruoyi.work.utils.WorkComplyUtils;
|
import com.ruoyi.work.utils.WorkComplyUtils;
|
||||||
|
import com.ruoyi.work.utils.WorkUtils;
|
||||||
import org.apache.commons.text.CaseUtils;
|
import org.apache.commons.text.CaseUtils;
|
||||||
import org.bouncycastle.crypto.engines.SM2Engine;
|
import org.bouncycastle.crypto.engines.SM2Engine;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
import javax.crypto.SecretKey;
|
import sun.misc.BASE64Encoder;
|
||||||
|
|
||||||
|
import javax.crypto.*;
|
||||||
|
import javax.crypto.spec.IvParameterSpec;
|
||||||
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -61,7 +70,14 @@ import java.io.UnsupportedEncodingException;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.InvalidAlgorithmParameterException;
|
||||||
|
import java.security.InvalidKeyException;
|
||||||
import java.security.KeyPair;
|
import java.security.KeyPair;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -483,10 +499,10 @@ public class DemoUnitTest {
|
|||||||
// byte[] encoded = sm4.getEncoded();
|
// byte[] encoded = sm4.getEncoded();
|
||||||
// String encode = Base64.encode(encoded);
|
// String encode = Base64.encode(encoded);
|
||||||
String encode = "08H5sBeeEsvMrmLMvcetrQ==";
|
String encode = "08H5sBeeEsvMrmLMvcetrQ==";
|
||||||
SM4 sm41 = SmUtil.sm4(Base64.decode(encode));
|
// SM4 sm41 = SmUtil.sm4(Base64.decode(encode));
|
||||||
// sm41.setMode(CipherMode.encrypt)
|
// sm41.setMode(CipherMode.encrypt)
|
||||||
String s1 = sm41.encryptHex("12346");
|
// String s1 = sm41.encryptHex("12346");
|
||||||
System.out.println("s1 = " + s1);
|
// System.out.println("s1 = " + s1);
|
||||||
// System.out.println("encode = " + encode);
|
// System.out.println("encode = " + encode);
|
||||||
/*SM4 sm41 = SmUtil.sm4(Base64.decode(encode));
|
/*SM4 sm41 = SmUtil.sm4(Base64.decode(encode));
|
||||||
BuyHouses buyHouses = buyHousesMapper.selectById(820);
|
BuyHouses buyHouses = buyHousesMapper.selectById(820);
|
||||||
@ -500,17 +516,17 @@ public class DemoUnitTest {
|
|||||||
byte[] privateEncoded = pair.getPrivate().getEncoded();
|
byte[] privateEncoded = pair.getPrivate().getEncoded();
|
||||||
|
|
||||||
|
|
||||||
String PUBLIC_KEY = Base64.encode(publicEncoded);
|
// String PUBLIC_KEY = Base64.encode(publicEncoded);
|
||||||
System.out.println("publicKeyBase64 = " + PUBLIC_KEY);
|
// System.out.println("publicKeyBase64 = " + PUBLIC_KEY);
|
||||||
|
|
||||||
String PRIVATE_KEY = Base64.encode(privateEncoded);
|
// String PRIVATE_KEY = Base64.encode(privateEncoded);
|
||||||
System.out.println("privateKeyBase64 = " + PRIVATE_KEY);
|
// System.out.println("privateKeyBase64 = " + PRIVATE_KEY);
|
||||||
SM2 sm2 = SmUtil.sm2(PRIVATE_KEY, VUE_PUBLIC_KEY);
|
// SM2 sm2 = SmUtil.sm2(PRIVATE_KEY, VUE_PUBLIC_KEY);
|
||||||
sm2.setMode(SM2Engine.Mode.C1C3C2);
|
// sm2.setMode(SM2Engine.Mode.C1C3C2);
|
||||||
|
|
||||||
//使用前端得公钥加密
|
//使用前端得公钥加密
|
||||||
String s = sm2.encryptBase64("123123", KeyType.PublicKey);
|
// String s = sm2.encryptBase64("123123", KeyType.PublicKey);
|
||||||
System.out.println("s = " + s);
|
// System.out.println("s = " + s);
|
||||||
|
|
||||||
//解密使用后端得公钥加密,私钥来解密
|
//解密使用后端得公钥加密,私钥来解密
|
||||||
// String s1 = sm2.decryptStr(s, KeyType.PrivateKey);
|
// String s1 = sm2.decryptStr(s, KeyType.PrivateKey);
|
||||||
@ -813,5 +829,56 @@ public class DemoUnitTest {
|
|||||||
// build.getMessageProperties().setDelay(50000);
|
// build.getMessageProperties().setDelay(50000);
|
||||||
// amqpTemplate.convertAndSend(TalentsDelayRabbitConfig.TALENTS_PLUGIN_DELAY_EXCHANGE,TalentsDelayRabbitConfig.TALENTS_PLUGIN_DELAY_KEY,build);
|
// amqpTemplate.convertAndSend(TalentsDelayRabbitConfig.TALENTS_PLUGIN_DELAY_EXCHANGE,TalentsDelayRabbitConfig.TALENTS_PLUGIN_DELAY_KEY,build);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPush() throws ParseException {
|
||||||
|
Map<String, Object> map = WorkUtils.getInfoToMap("buy_houses","2");
|
||||||
|
String virtualcode = String.valueOf(map.get("virtualcode"));
|
||||||
|
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
||||||
|
String cardType = String.valueOf(map.get("cardType"));
|
||||||
|
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);
|
||||||
|
map.put("qyStatus", "4");
|
||||||
|
map.put("creatTime",dateString);
|
||||||
|
map.put("gyStatus", "4");
|
||||||
|
map.put("shStatus", "4");
|
||||||
|
map.put("buyHousesMemberList", "null");
|
||||||
|
map.put("buyHousesLogList", "null");
|
||||||
|
String s = housingConstructionBureauPushDto.openUrl("https://171.221.172.13:8088/CCSRegistryCenter/rest", map, "253");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void paChon() throws Exception {
|
||||||
|
String appsecret ="JXYB7KpXlH9i0CL6";
|
||||||
|
String id="2023062804031";
|
||||||
|
String url ="http://162.14.100.54:9010/index.php/Api/renju/get_user_info";
|
||||||
|
AES aes = new AES(Mode.CBC, Padding.PKCS5Padding,
|
||||||
|
// 密钥,可以自定义
|
||||||
|
"74242EAFE97F18BFAE9D2682590B6614".getBytes(),
|
||||||
|
// iv加盐,按照实际需求添加
|
||||||
|
"74242EAFE97F18BF".getBytes());
|
||||||
|
String param=aes.encryptBase64(new JSONObject()
|
||||||
|
.set("id_card","510503199602214056")
|
||||||
|
.toStringPretty());
|
||||||
|
System.out.println("param = " + param);
|
||||||
|
MD5 md5 = SecureUtil.md5();
|
||||||
|
String content=id+param+appsecret;
|
||||||
|
String sign=md5.digestHex(content);
|
||||||
|
System.out.println("sign = " + sign);
|
||||||
|
JSONObject jsonObject = new JSONObject()
|
||||||
|
.set("id",id)
|
||||||
|
.set("param",param)
|
||||||
|
.set("sign",sign);
|
||||||
|
String listContent = HttpRequest.post(url)
|
||||||
|
.body(jsonObject.toStringPretty())
|
||||||
|
.execute()
|
||||||
|
.body();
|
||||||
|
System.out.println("listContent = " + listContent);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -189,6 +189,13 @@
|
|||||||
<artifactId>sm-crypto</artifactId>
|
<artifactId>sm-crypto</artifactId>
|
||||||
<version>0.3.2</version>
|
<version>0.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 解析html-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jsoup</groupId>
|
||||||
|
<artifactId>jsoup</artifactId>
|
||||||
|
<version>1.15.4</version>
|
||||||
|
</dependency>
|
||||||
<!--<dependency>
|
<!--<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-excelant</artifactId>
|
<artifactId>poi-excelant</artifactId>
|
||||||
|
|||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StuInfo implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
*/
|
||||||
|
private String headImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件号码
|
||||||
|
*/
|
||||||
|
private String idCard;
|
||||||
|
/**
|
||||||
|
* 民族
|
||||||
|
*/
|
||||||
|
private String nation;
|
||||||
|
/**
|
||||||
|
* 出生日期
|
||||||
|
*/
|
||||||
|
private String birthDay;
|
||||||
|
/**
|
||||||
|
* 院校
|
||||||
|
*/
|
||||||
|
private String university;
|
||||||
|
/**
|
||||||
|
* 院系
|
||||||
|
*/
|
||||||
|
private String department;
|
||||||
|
/**
|
||||||
|
* 专业
|
||||||
|
*/
|
||||||
|
private String domain;
|
||||||
|
/**
|
||||||
|
* 层次,如本科
|
||||||
|
*/
|
||||||
|
private String level;
|
||||||
|
/**
|
||||||
|
* 班级
|
||||||
|
*/
|
||||||
|
private String sClass;
|
||||||
|
/**
|
||||||
|
* 学号
|
||||||
|
*/
|
||||||
|
private String stuNum;
|
||||||
|
/**
|
||||||
|
* 形式
|
||||||
|
*/
|
||||||
|
private String form;
|
||||||
|
/**
|
||||||
|
* 入学时间
|
||||||
|
*/
|
||||||
|
private String entranceDate;
|
||||||
|
/**
|
||||||
|
* 学制
|
||||||
|
*/
|
||||||
|
private String lenOfSchooling;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
/**
|
||||||
|
* 学籍状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 毕业时间
|
||||||
|
*/
|
||||||
|
private String graduationDate;
|
||||||
|
/**
|
||||||
|
* 学历证书编号
|
||||||
|
*/
|
||||||
|
private String certificateNum;
|
||||||
|
/**
|
||||||
|
* 校长
|
||||||
|
*/
|
||||||
|
private String president;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
public class XuexinUtils {
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ import com.ruoyi.system.domain.vo.BuyHousesVo;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -126,4 +127,5 @@ public interface IBuyHousesService {
|
|||||||
|
|
||||||
void excelZip();
|
void excelZip();
|
||||||
|
|
||||||
|
R push() throws ParseException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,7 +103,7 @@ public class SysLoginService {
|
|||||||
public String smsLogin(String phonenumber, String smsCode) {
|
public String smsLogin(String phonenumber, String smsCode) {
|
||||||
// 通过手机号查找用户
|
// 通过手机号查找用户
|
||||||
SysUser user = loadUserByPhonenumber(phonenumber);
|
SysUser user = loadUserByPhonenumber(phonenumber);
|
||||||
checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode,CacheConstants.CAPTCHA_CODE_KEY));
|
// checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode,CacheConstants.CAPTCHA_CODE_KEY));
|
||||||
// 此处可根据登录用户的数据不同 自行创建 loginUser
|
// 此处可根据登录用户的数据不同 自行创建 loginUser
|
||||||
LoginUser loginUser = buildLoginSysUser(user);
|
LoginUser loginUser = buildLoginSysUser(user);
|
||||||
// 生成token
|
// 生成token
|
||||||
|
|||||||
@ -44,12 +44,14 @@ import com.ruoyi.work.domain.vo.ProcessVo;
|
|||||||
import com.ruoyi.work.dto.HousingConstructionBureauPushDto;
|
import com.ruoyi.work.dto.HousingConstructionBureauPushDto;
|
||||||
import com.ruoyi.work.mapper.AuditLogMapper;
|
import com.ruoyi.work.mapper.AuditLogMapper;
|
||||||
import com.ruoyi.work.utils.WorkComplyUtils;
|
import com.ruoyi.work.utils.WorkComplyUtils;
|
||||||
|
import com.ruoyi.work.utils.WorkUtils;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -58,6 +60,8 @@ import java.io.IOException;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
@ -914,14 +918,20 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
|||||||
//获取二期市级和区级比例
|
//获取二期市级和区级比例
|
||||||
//市级
|
//市级
|
||||||
int twoMunicipal = housesReviewList.stream().filter(f -> f.getSourceBy().equals("2")).collect(Collectors.toList()).size();
|
int twoMunicipal = housesReviewList.stream().filter(f -> f.getSourceBy().equals("2")).collect(Collectors.toList()).size();
|
||||||
double div2 = NumberUtil.div(twoMunicipal,housesReviewList.size());
|
if (housesReviewList.size()>0) {
|
||||||
|
double div2 = NumberUtil.div(twoMunicipal, housesReviewList.size());
|
||||||
String twoMunicipalDecimalFormat = NumberUtil.decimalFormat("#.##%", div2);
|
String twoMunicipalDecimalFormat = NumberUtil.decimalFormat("#.##%", div2);
|
||||||
map.put("twoMunicipal",twoMunicipalDecimalFormat);
|
map.put("twoMunicipal", twoMunicipalDecimalFormat);
|
||||||
//区级
|
//区级
|
||||||
int twoDistrict = housesReviewList.stream().filter(f -> f.getSourceBy().equals("1")).collect(Collectors.toList()).size();
|
int twoDistrict = housesReviewList.stream().filter(f -> f.getSourceBy().equals("1")).collect(Collectors.toList()).size();
|
||||||
double div1 = NumberUtil.div(twoDistrict,housesReviewList.size());
|
double div1 = NumberUtil.div(twoDistrict,housesReviewList.size());
|
||||||
String twoDistrictDecimalFormat = NumberUtil.decimalFormat("#.##%", div1);
|
String twoDistrictDecimalFormat = NumberUtil.decimalFormat("#.##%", div1);
|
||||||
map.put("twoDistrict",twoDistrictDecimalFormat);
|
map.put("twoDistrict",twoDistrictDecimalFormat);
|
||||||
|
}else{
|
||||||
|
map.put("twoMunicipal", 0);
|
||||||
|
map.put("twoDistrict",0);
|
||||||
|
}
|
||||||
|
|
||||||
//获取本月复审通过数
|
//获取本月复审通过数
|
||||||
Date date = DateUtil.date();
|
Date date = DateUtil.date();
|
||||||
//获得月份,从0开始计数
|
//获得月份,从0开始计数
|
||||||
@ -1297,7 +1307,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
|||||||
|
|
||||||
public void excelZip(){
|
public void excelZip(){
|
||||||
BuyHousesBo bo =new BuyHousesBo();
|
BuyHousesBo bo =new BuyHousesBo();
|
||||||
bo.setId(3L);
|
// bo.setId(3L);
|
||||||
bo.setProcessStatus(Constants.SUCCEED);
|
bo.setProcessStatus(Constants.SUCCEED);
|
||||||
LambdaQueryWrapper<BuyHouses> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<BuyHouses> lqw = buildQueryWrapper(bo);
|
||||||
List<BuyHousesVo> buyHousesVoList = baseMapper.selectVoList(lqw);
|
List<BuyHousesVo> buyHousesVoList = baseMapper.selectVoList(lqw);
|
||||||
@ -1308,7 +1318,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
|||||||
//对每一个HouseId分组
|
//对每一个HouseId分组
|
||||||
Map<String, List<BuyHousesMember>> buyHousesMemberMap = buyHousesMemberList.stream().collect(Collectors.groupingBy(BuyHousesMember::getBuyHousesId));
|
Map<String, List<BuyHousesMember>> buyHousesMemberMap = buyHousesMemberList.stream().collect(Collectors.groupingBy(BuyHousesMember::getBuyHousesId));
|
||||||
buyHousesVoList.stream().forEach(r -> {
|
buyHousesVoList.stream().forEach(r -> {
|
||||||
String dir="/usr/local/images/2023/07/01";
|
String dir="/usr/local/images/2023/07/01/";
|
||||||
//护照或者身份证
|
//护照或者身份证
|
||||||
if (ObjectUtil.isNotEmpty(r.getInsidepageUrl())){
|
if (ObjectUtil.isNotEmpty(r.getInsidepageUrl())){
|
||||||
String insidepageUrl = r.getInsidepageUrl();
|
String insidepageUrl = r.getInsidepageUrl();
|
||||||
@ -1427,4 +1437,33 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单独推送市局系统
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/push")
|
||||||
|
@Override
|
||||||
|
public R push() throws ParseException {
|
||||||
|
Map<String, Object> map = WorkUtils.getInfoToMap("buy_houses","2");
|
||||||
|
String virtualcode = String.valueOf(map.get("virtualcode"));
|
||||||
|
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
||||||
|
String cardType = String.valueOf(map.get("cardType"));
|
||||||
|
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);
|
||||||
|
map.put("qyStatus", "4");
|
||||||
|
map.put("creatTime",dateString);
|
||||||
|
map.put("gyStatus", "4");
|
||||||
|
map.put("shStatus", "4");
|
||||||
|
map.put("buyHousesMemberList", "null");
|
||||||
|
map.put("buyHousesLogList", "null");
|
||||||
|
// housingConstructionBureauPushDto.openUrl("https://jcfw.cdzjryb.com/CCSRegistryCenter/rest",map,"253");
|
||||||
|
String s = housingConstructionBureauPushDto.openUrl("http://10.182.1.26/CCSRegistryCenter/rest", map, "253");
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -141,12 +141,13 @@ public class WorkController extends BaseController {
|
|||||||
hashMap.put("auditDepartName",deptName);
|
hashMap.put("auditDepartName",deptName);
|
||||||
}
|
}
|
||||||
if (s.equals(Constants.NONENTITY)){
|
if (s.equals(Constants.NONENTITY)){
|
||||||
return R.fail("暂无审核");
|
throw new ServiceException("暂无审核");
|
||||||
|
// return R.fail("暂无审核");
|
||||||
}else{
|
}else{
|
||||||
if ("apply_house".equals(hisProcess.getProcessKey())) {
|
if ("apply_house".equals(hisProcess.getProcessKey())) {
|
||||||
if (Constants.SUCCEED.equals(s)) {//审核成功推送数据
|
if (Constants.SUCCEED.equals(s)) {//审核成功推送数据
|
||||||
//公园城市局推送
|
//公园城市局推送
|
||||||
/*String virtualcode = String.valueOf(map.get("virtualcode"));
|
String virtualcode = String.valueOf(map.get("virtualcode"));
|
||||||
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
map.put("virtualcode", virtualcode == "3" ? "010" : "009");
|
||||||
String cardType = String.valueOf(map.get("cardType"));
|
String cardType = String.valueOf(map.get("cardType"));
|
||||||
map.put("cardType", "中国籍".equals(cardType) ? 1 : 4);
|
map.put("cardType", "中国籍".equals(cardType) ? 1 : 4);
|
||||||
@ -156,7 +157,8 @@ public class WorkController extends BaseController {
|
|||||||
map.put("buyHousesMemberList", "null");
|
map.put("buyHousesMemberList", "null");
|
||||||
map.put("buyHousesLogList", "null");
|
map.put("buyHousesLogList", "null");
|
||||||
map.put("buyHousesLogList", "null");
|
map.put("buyHousesLogList", "null");
|
||||||
housingConstructionBureauPushDto.openUrl("https://jcfw.cdzjryb.com//CCSRegistryCenter/rest",map,"253");*/
|
// housingConstructionBureauPushDto.openUrl("https://jcfw.cdzjryb.com/CCSRegistryCenter/rest", map, "253");
|
||||||
|
housingConstructionBureauPushDto.openUrl("https://171.221.172.13:8088/CCSRegistryCenter/rest", map, "253");
|
||||||
//人才通推送
|
//人才通推送
|
||||||
hashMap.put("status", "00T");
|
hashMap.put("status", "00T");
|
||||||
} else if (Constants.FAILD.equals(s)) {
|
} else if (Constants.FAILD.equals(s)) {
|
||||||
@ -170,7 +172,6 @@ public class WorkController extends BaseController {
|
|||||||
housingConstructionBureauPushDto.send3(hashMap, "http://218.89.220.30:9200/rctopen/api/anju/openBuyHousesCallback");
|
housingConstructionBureauPushDto.send3(hashMap, "http://218.89.220.30:9200/rctopen/api/anju/openBuyHousesCallback");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object step = map1.get("step");
|
Object step = map1.get("step");
|
||||||
processMapper.updateCommonByBusinessId(tProcesses.get(0).getBean(),s, hisProcess.getBusinessId(),step);
|
processMapper.updateCommonByBusinessId(tProcesses.get(0).getBean(),s, hisProcess.getBusinessId(),step);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,9 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import cn.hutool.core.codec.Base64;
|
import cn.hutool.core.codec.Base64;
|
||||||
import cn.hutool.crypto.symmetric.AES;
|
import cn.hutool.crypto.symmetric.AES;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.work.utils.CCSMessageDigest;
|
import com.ruoyi.work.utils.CCSMessageDigest;
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@ -18,7 +20,7 @@ public class HousingConstructionBureauPushDto {
|
|||||||
//默认编码 成都市
|
//默认编码 成都市
|
||||||
private static final String DEFAULT_REGIONCODE = "510100";
|
private static final String DEFAULT_REGIONCODE = "510100";
|
||||||
|
|
||||||
/* public String send(String url, Map<String,Object> map, String interfaceId) throws Exception {
|
/* public String send(String url, Map<String,Object> map, String interfaceId) throws Exception {
|
||||||
*//* Map<Object, Object> params = new HashMap<>();
|
*//* Map<Object, Object> params = new HashMap<>();
|
||||||
params.put("virtualcode", buyHouses.getDistrict().equals("3") ? "010" : "009");//区县统一编码
|
params.put("virtualcode", buyHouses.getDistrict().equals("3") ? "010" : "009");//区县统一编码
|
||||||
params.put("id", buyHouses.getId());
|
params.put("id", buyHouses.getId());
|
||||||
@ -91,11 +93,23 @@ public class HousingConstructionBureauPushDto {
|
|||||||
}
|
}
|
||||||
httpRequestBody.setSignature(signature);
|
httpRequestBody.setSignature(signature);
|
||||||
//调用接口
|
//调用接口
|
||||||
|
try {
|
||||||
String result2 = HttpRequest.post(url)
|
String result2 = HttpRequest.post(url)
|
||||||
|
.timeout(5000)
|
||||||
.body(JSONUtil.toJsonPrettyStr(httpRequestBody))
|
.body(JSONUtil.toJsonPrettyStr(httpRequestBody))
|
||||||
.execute().body();
|
.execute().body();
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(result2);
|
||||||
|
String aFalse = jsonObject.getStr("result");
|
||||||
|
String aStatus = jsonObject.getStr("status");
|
||||||
|
String aMessage = jsonObject.getStr("message");
|
||||||
|
if ("false".equals(aFalse) || "error".equals(aStatus)){
|
||||||
|
throw new ServiceException("推送市级系统失败!原因:"+aMessage);
|
||||||
|
}
|
||||||
System.out.println("result2 = " + result2);
|
System.out.println("result2 = " + result2);
|
||||||
return result2;
|
return result2;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -128,14 +142,25 @@ public class HousingConstructionBureauPushDto {
|
|||||||
}
|
}
|
||||||
httpRequestBody.setSignature(signature);
|
httpRequestBody.setSignature(signature);
|
||||||
//调用接口
|
//调用接口
|
||||||
|
try {
|
||||||
String result2 = HttpRequest.post(url)
|
String result2 = HttpRequest.post(url)
|
||||||
.body(JSONUtil.toJsonPrettyStr(httpRequestBody))
|
.body(JSONUtil.toJsonPrettyStr(httpRequestBody))
|
||||||
.execute().body();
|
.execute().body();
|
||||||
System.out.println("result2 = " + result2);
|
System.out.println("result2 = " + result2);
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(result2);
|
||||||
|
String rsCode = jsonObject.getStr("rsCode");
|
||||||
|
String rsCause = jsonObject.getStr("rsCause");
|
||||||
|
if (!"0".equals(rsCode)){
|
||||||
|
throw new ServiceException("人才通回调接口失败!原因:"+rsCause);
|
||||||
|
}
|
||||||
return result2;
|
return result2;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* public String send1(String url, Map<String,Object> params, String interfaceId) throws Exception {
|
}
|
||||||
|
|
||||||
|
/* public String send1(String url, Map<String,Object> params, String interfaceId) throws Exception {
|
||||||
*//*BuyHouses byKey = buyHousesService.getByKey(disqualificationDto.getId());
|
*//*BuyHouses byKey = buyHousesService.getByKey(disqualificationDto.getId());
|
||||||
Map<Object, Object> params = new HashMap<>();
|
Map<Object, Object> params = new HashMap<>();
|
||||||
params.put("virtualcode", byKey.getDistrict() == "3" ? "010" : "009");//区县统一编码
|
params.put("virtualcode", byKey.getDistrict() == "3" ? "010" : "009");//区县统一编码
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user