mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 17:58:17 +08:00
新增待办搜索条件
This commit is contained in:
parent
77bc71a791
commit
fd5080dd1f
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.test;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.resource.ClassPathResource;
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
@ -43,12 +45,14 @@ import com.ruoyi.system.service.impl.BuyHousesServiceImpl;
|
||||
import com.ruoyi.system.service.impl.MaterialModuleServiceImpl;
|
||||
import com.ruoyi.system.service.impl.SysConfigServiceImpl;
|
||||
import com.ruoyi.work.domain.ActProcess;
|
||||
import com.ruoyi.work.domain.AuditLog;
|
||||
import com.ruoyi.work.domain.HisProcess;
|
||||
import com.ruoyi.work.domain.TProcess;
|
||||
import com.ruoyi.work.domain.vo.ActProcessVo;
|
||||
import com.ruoyi.work.domain.vo.ProcessVo;
|
||||
import com.ruoyi.work.dto.HousingConstructionBureauPushDto;
|
||||
import com.ruoyi.work.mapper.ActProcessMapper;
|
||||
import com.ruoyi.work.mapper.AuditLogMapper;
|
||||
import com.ruoyi.work.mapper.HisProcessMapper;
|
||||
import com.ruoyi.work.mapper.ProcessMapper;
|
||||
import com.ruoyi.work.service.impl.ProcessServiceImpl;
|
||||
@ -73,6 +77,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@ -141,6 +146,9 @@ public class DemoUnitTest {
|
||||
@Autowired
|
||||
private HousingConstructionBureauPushDto housingConstructionBureauPushDto;
|
||||
|
||||
@Autowired
|
||||
private AuditLogMapper auditLogMapper;
|
||||
|
||||
/*@Autowired
|
||||
private Produceras providerCustomer;
|
||||
|
||||
@ -228,7 +236,7 @@ public class DemoUnitTest {
|
||||
ProcessVo processVo = new ProcessVo();
|
||||
processVo.setProcessKey("apply_house");
|
||||
processVo.setStep("1");
|
||||
BuyHouses buyHouses = buyHousesMapper.selectById("3136");
|
||||
BuyHouses buyHouses = buyHousesMapper.selectById("3247");
|
||||
buyHouses.setUpdateTime(DateUtils.getNowDate());
|
||||
Map<String, Object> map = BeanUtil.beanToMap(buyHouses);
|
||||
processVo.setParams(map);
|
||||
@ -239,6 +247,8 @@ public class DemoUnitTest {
|
||||
WorkComplyUtils.comply(processVo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void test003(){
|
||||
HisProcess hisProcess = new HisProcess();
|
||||
@ -901,15 +911,88 @@ public class DemoUnitTest {
|
||||
|
||||
@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();
|
||||
int chushi = 0 ;
|
||||
int num =5;
|
||||
String dateStr = "2023-08-13";
|
||||
// 7天为一个节点
|
||||
//7
|
||||
// 星期天是1
|
||||
//查询数据库中大于当前时间的所有节假日时间
|
||||
|
||||
DateTime nowDate = DateUtil.parse(dateStr);//开始时间
|
||||
int i1 = DateTime.of(nowDate).dayOfWeek();
|
||||
if (i1==1 || i1==7){
|
||||
|
||||
}
|
||||
|
||||
|
||||
System.out.println("i1 = " + i1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testtttt(HttpServletResponse response) throws IOException {
|
||||
response.sendRedirect("https://dbxqtalents.cn/111.html");
|
||||
public void testtttt() throws IOException {
|
||||
|
||||
List<AuditLog> auditLogList = auditLogMapper.selectList(new LambdaQueryWrapper<>(AuditLog.class)
|
||||
.isNotNull(AuditLog::getAuditId)
|
||||
.isNull(AuditLog::getStep)
|
||||
.orderByAsc(AuditLog::getOtherId));
|
||||
List<HisProcess> list = new ArrayList<>();
|
||||
auditLogList.forEach(a ->{
|
||||
HisProcess hisProcess = new HisProcess();
|
||||
BuyHouses buyHouses = buyHousesMapper.selectById(a.getOtherId());
|
||||
if (ObjectUtil.isNotNull(buyHouses)) {
|
||||
hisProcess.setStartUser(buyHouses.getUserName());
|
||||
hisProcess.setCompanyName(buyHouses.getCompanyName());
|
||||
hisProcess.setUserId(ObjectUtil.isNull(buyHouses.getUserId()) ? null : buyHouses.getUserId().toString());
|
||||
hisProcess.setCardId(buyHouses.getCardId());
|
||||
if (a.getStatus().equals("5") || a.getStatus().equals("3") || a.getStatus().equals("4")) {
|
||||
hisProcess.setStep("1");
|
||||
hisProcess.setProcessId("2");
|
||||
hisProcess.setType("1");
|
||||
hisProcess.setIsNext(true);
|
||||
hisProcess.setDescription("受理");
|
||||
} else if (a.getStatus().equals("8") || a.getStatus().equals("6") || a.getStatus().equals("7")) {
|
||||
hisProcess.setStep("2");
|
||||
hisProcess.setProcessId("3");
|
||||
hisProcess.setType("2");
|
||||
hisProcess.setIsNext(true);
|
||||
hisProcess.setDescription("初审");
|
||||
} else if (a.getStatus().equals("10") || a.getStatus().equals("11") || a.getStatus().equals("12") || a.getStatus().equals("9")) {
|
||||
hisProcess.setStep("3");
|
||||
hisProcess.setProcessId("4");
|
||||
hisProcess.setType("1");
|
||||
hisProcess.setIsNext(false);
|
||||
hisProcess.setDescription("审定");
|
||||
}
|
||||
if ("5,8,10".indexOf(a.getStatus()) >= 0) {
|
||||
hisProcess.setStatus("2");
|
||||
} else {
|
||||
hisProcess.setStatus("1");
|
||||
}
|
||||
if (a.getAuditId().equals("17")) {
|
||||
hisProcess.setAudit("123");
|
||||
} else if (a.getAuditId().equals("18")) {
|
||||
hisProcess.setAudit("122");
|
||||
} else if (a.getAuditId().equals("19")) {
|
||||
hisProcess.setAudit("124");
|
||||
} else if (a.getAuditId().equals("20")) {
|
||||
hisProcess.setAudit("126");
|
||||
} else if (a.getAuditId().equals("22")) {
|
||||
hisProcess.setAudit("115");
|
||||
} else if (a.getAuditId().equals("39")) {
|
||||
hisProcess.setAudit("125");
|
||||
} else if (a.getAuditId().equals("47")) {
|
||||
hisProcess.setAudit("124");
|
||||
}
|
||||
hisProcess.setBusinessId(a.getOtherId());
|
||||
hisProcess.setCreateTime(a.getCreateTime());
|
||||
hisProcess.setEndTime(a.getCreateTime());
|
||||
hisProcess.setCheckType("2");
|
||||
list.add(hisProcess);
|
||||
}
|
||||
});
|
||||
hisProcessMapper.insertBatch(list);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,8 @@ package com.ruoyi.common.filter;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.ruoyi.common.core.service.ConfigService;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@ -60,7 +62,31 @@ public class RepeatableFilter implements Filter {
|
||||
* @return
|
||||
*/
|
||||
private boolean isSafe(HttpServletRequest request,HttpServletResponse response) {
|
||||
String clientIP = ServletUtils.getClientIP(request);
|
||||
System.out.println("clientIP = " + clientIP);
|
||||
ConfigService sysConfigService = SpringUtils.getBean(ConfigService.class);
|
||||
//黑名单限制
|
||||
String prompt = sysConfigService.getConfigValue("system:black:ip");
|
||||
if (ObjectUtil.isNotNull(prompt) && ObjectUtil.isNotEmpty(prompt)){
|
||||
String trimAllWhitespace = org.springframework.util.StringUtils.trimAllWhitespace(prompt);
|
||||
List<String> blackIp = StringUtils.splitList(trimAllWhitespace);
|
||||
for (String ip : blackIp) {
|
||||
int indexOf = ip.indexOf("/");
|
||||
if (indexOf>0) {
|
||||
String substring = StringUtils.substring(ip, 0, ip.lastIndexOf("."));
|
||||
String substring1 = StringUtils.substring(clientIP, 0, clientIP.lastIndexOf("."));
|
||||
if (substring1.equals(substring)){
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if (ip.equals(clientIP)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//防盗链设置
|
||||
String configValue = sysConfigService.getConfigValue("sys:preventing:hotlinking");
|
||||
List<String> strings = Arrays.asList(configValue.split(","));
|
||||
if (ObjectUtil.isEmpty(configValue)) {
|
||||
@ -71,7 +97,7 @@ public class RepeatableFilter implements Filter {
|
||||
if (referer == null || "".equals(referer)) {
|
||||
// 获取不到防盗链头部信息 -> 拦截
|
||||
System.out.println("referer为空进行拦截");
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
for (String white : strings) {
|
||||
if (white.contains("*.")) {
|
||||
|
||||
@ -35,10 +35,8 @@ 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();
|
||||
|
||||
// 打印请求参数
|
||||
if (isJsonRequest(request)) {
|
||||
String jsonParam = "";
|
||||
|
||||
@ -4,6 +4,7 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.JsonUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.sms.entity.SmsResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -17,7 +18,9 @@ import java.util.HashMap;
|
||||
*/
|
||||
@Service
|
||||
public class TelecomSendMsg{
|
||||
private final String url ="https://msg.cdht.org.cn:8082/apigbk/BatchSend2";
|
||||
|
||||
// private final String url ="https://msg.cdht.org.cn:8082/apigbk/BatchSend2";
|
||||
private final String url ="http://10.31.245.122:8081/apigbk/BatchSend2";
|
||||
private final String CorpID ="jxxc";
|
||||
private final String Pwd ="ULul@2023";
|
||||
|
||||
@ -46,6 +49,8 @@ public class TelecomSendMsg{
|
||||
|
||||
}
|
||||
paramMap.put("Content",gbk);
|
||||
String param = JsonUtils.toJsonString(paramMap);
|
||||
System.out.println("sendParam = " + param);
|
||||
String result = HttpRequest.get(url)
|
||||
.form(paramMap)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
|
||||
@ -3,6 +3,8 @@ package com.ruoyi.system.common;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.domain.BuyHouseCheck;
|
||||
import com.ruoyi.system.domain.HousesReview;
|
||||
@ -15,6 +17,7 @@ import com.ruoyi.system.service.impl.MaterialModuleServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -28,16 +31,32 @@ public class WorkBusinessRule {
|
||||
private static final HousesReviewMapper housesReviewMapper = SpringUtils.getBean(HousesReviewMapper.class);
|
||||
private static final MaterialModuleServiceImpl materialModuleService = SpringUtils.getBean(MaterialModuleServiceImpl.class);
|
||||
|
||||
/**
|
||||
* 购房认定受理获取审核部门
|
||||
* @param district
|
||||
* @param step
|
||||
* @return
|
||||
*/
|
||||
public String getDistrict(String district,String step){
|
||||
//先获取业务数据
|
||||
QueryWrapper<BuyHouseCheck> qw = new QueryWrapper<>();
|
||||
qw.eq("crux_key","buy_house_audit");
|
||||
qw.eq("other_key",district);
|
||||
qw.eq("step",step);
|
||||
BuyHouseCheckVo buyHouseCheckVo = buyHouseCheckMapper.selectVoOne(qw);
|
||||
return buyHouseCheckVo.getPerson();
|
||||
List<BuyHouseCheck> buyHouseCheckList = buyHouseCheckMapper.selectList(qw);
|
||||
if (buyHouseCheckList.size()<0){
|
||||
throw new ServiceException("获取审核人失败");
|
||||
}
|
||||
List<String> collect = buyHouseCheckList.stream().map(BuyHouseCheck::getPerson).collect(Collectors.toList());
|
||||
String join = StringUtils.join(collect, ",");
|
||||
return join;
|
||||
}
|
||||
|
||||
/**
|
||||
* 购房二期获取审核部门
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<String> getCheckDept(Long id){
|
||||
HousesReview housesReview = housesReviewMapper.selectById(id);
|
||||
Map<String, Object> map = BeanUtil.beanToMap(housesReview);
|
||||
|
||||
@ -54,7 +54,6 @@ public class SysConfig extends BaseEntity {
|
||||
*/
|
||||
@ExcelProperty(value = "参数键值")
|
||||
@NotBlank(message = "参数键值不能为空")
|
||||
@Size(min = 0, max = 500, message = "参数键值长度不能超过{max}个字符")
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
|
||||
@ -105,7 +105,7 @@ public class SysLoginService {
|
||||
public String smsLogin(String phonenumber, String smsCode) {
|
||||
// 通过手机号查找用户
|
||||
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 = buildLoginSysUser(user);
|
||||
// 生成token
|
||||
|
||||
@ -193,6 +193,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPictureInformationUrl()), BuyHouses::getPictureInformationUrl, bo.getPictureInformationUrl());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWorkAddress()), BuyHouses::getWorkAddress, bo.getWorkAddress());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProcessStatus()), BuyHouses::getProcessStatus, bo.getProcessStatus());
|
||||
lqw.eq(StringUtils.isNotEmpty(bo.getApiKey()),BuyHouses::getApiKey,bo.getApiKey());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -239,6 +240,7 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
||||
lqw.eq(bo.getPassTime() != null, BuyHouses::getPassTime, bo.getPassTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPictureInformationUrl()), BuyHouses::getPictureInformationUrl, bo.getPictureInformationUrl());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWorkAddress()), BuyHouses::getWorkAddress, bo.getWorkAddress());
|
||||
lqw.eq(StringUtils.isNotEmpty(bo.getApiKey()),BuyHouses::getApiKey,bo.getApiKey());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@ -98,5 +98,8 @@ public class ActProcess {
|
||||
@TableField(exist = false)
|
||||
private String tiger;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String[] stepList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -128,4 +128,6 @@ public class HisProcess{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class HousingConstructionBureauPushDto {
|
||||
//调用接口
|
||||
try {
|
||||
String result2 = HttpRequest.post(url)
|
||||
.timeout(5000)
|
||||
.timeout(10000)
|
||||
.body(JSONUtil.toJsonPrettyStr(httpRequestBody))
|
||||
.execute().body();
|
||||
if (ObjectUtil.isNull(result2) || ObjectUtil.isEmpty(result2)){
|
||||
@ -157,6 +157,7 @@ public class HousingConstructionBureauPushDto {
|
||||
//调用接口
|
||||
try {
|
||||
String result2 = HttpRequest.post(url)
|
||||
.timeout(10000)
|
||||
.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();
|
||||
|
||||
@ -490,6 +490,10 @@ public class WorkComplyUtils {
|
||||
* 获取待办业务
|
||||
*/
|
||||
public static TableDataInfo<ActProcess> getWaitTaskList(ActProcess actProcess,PageQuery pageQuery){
|
||||
if (ObjectUtil.isNotNull(actProcess.getStepList()) && actProcess.getStepList().length>0){
|
||||
actProcess.setProcessKey(actProcess.getStepList()[0]);
|
||||
actProcess.setStep(actProcess.getStepList()[1]);
|
||||
}
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser.getUserId())){
|
||||
throw new ServiceException("请先登录");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user