parent
5eb3646c9c
commit
a10c439860
@ -0,0 +1,75 @@
|
|||||||
|
package com.ruoyi.jjh.declaration.regular;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords;
|
||||||
|
import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService;
|
||||||
|
import com.ruoyi.jjh.ent.service.SmsAlertsService;
|
||||||
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送短信定时任务
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/17 10:30
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableScheduling
|
||||||
|
public class SmsEnterChange {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBmsDeclarationRecordsService iBmsDeclarationRecordsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SmsAlertsService smsAlertsService;
|
||||||
|
|
||||||
|
@Value("${isTiming}")
|
||||||
|
private Boolean isTiming;
|
||||||
|
// 每三小时执行一次
|
||||||
|
@Scheduled(cron = "0 0 */3 * * *")
|
||||||
|
private void runTask() {
|
||||||
|
if(isTiming){
|
||||||
|
//查询初审的所有用户
|
||||||
|
SysUser user = new SysUser();
|
||||||
|
user.setDeptId(105L);
|
||||||
|
Long count = iBmsDeclarationRecordsService.lambdaQuery().eq(BmsDeclarationRecords::getStatus, 1).count();
|
||||||
|
if(count>0){
|
||||||
|
List<SysUser> list1 = sysUserMapper.selectUserList(user);
|
||||||
|
list1.removeIf(x-> x.getPhonenumber().isEmpty());
|
||||||
|
for (SysUser items : list1) {
|
||||||
|
smsAlertsService.enterSms("政府人员-"+items.getNickName(),"您有"+count+"个新的申报审核任务[待初审]",items.getPhonenumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//查询复审的所有用户
|
||||||
|
SysUser user1 = new SysUser();
|
||||||
|
user.setDeptId(101L);
|
||||||
|
Long count1 = iBmsDeclarationRecordsService.lambdaQuery().eq(BmsDeclarationRecords::getStatus, 2).count();
|
||||||
|
if(count1>0){
|
||||||
|
List<SysUser> list2 = sysUserMapper.selectUserList(user1);
|
||||||
|
list2.removeIf(x-> x.getPhonenumber().isEmpty());
|
||||||
|
for (SysUser items : list2) {
|
||||||
|
smsAlertsService.enterSms("政府人员-"+items.getNickName(),"您有"+count1+"个新的申报审核任务[待复审]",items.getPhonenumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//查询终审的所有用户
|
||||||
|
SysUser user2 = new SysUser();
|
||||||
|
user.setDeptId(103L);
|
||||||
|
Long count2 = iBmsDeclarationRecordsService.lambdaQuery().eq(BmsDeclarationRecords::getStatus, 3).count();
|
||||||
|
if(count2>0){
|
||||||
|
List<SysUser> list3 = sysUserMapper.selectUserList(user2);
|
||||||
|
list3.removeIf(x-> x.getPhonenumber().isEmpty());
|
||||||
|
for (SysUser items : list3) {
|
||||||
|
smsAlertsService.enterSms("政府人员-"+items.getNickName(),"您有"+count2+"个新的申报审核任务[待终审]",items.getPhonenumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.ruoyi.jjh.ent.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
|
||||||
|
import com.ruoyi.jjh.ent.service.JDataScreenService;
|
||||||
|
import com.ruoyi.jjh.ent.service.SmsAlertsService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据大屏控制层
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/15 14:54
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/jjh/dataScreen")
|
||||||
|
@Api(tags = "数据大屏")
|
||||||
|
public class JDataScreenController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private JDataScreenService jDataScreenService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SmsAlertsService sms;
|
||||||
|
/**
|
||||||
|
* 荣誉情况
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
|
||||||
|
@ApiOperation(value = "荣誉情况")
|
||||||
|
@GetMapping("/honor")
|
||||||
|
public AjaxResult getHonor(HonorResponse a) {
|
||||||
|
return success(jDataScreenService.getHonor());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目追踪情况
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
|
||||||
|
@ApiOperation(value = "项目追踪情况")
|
||||||
|
@GetMapping("/projectTracking")
|
||||||
|
public AjaxResult getProjectTracking(ProjectTrackingResponse a) {
|
||||||
|
return success(jDataScreenService.getProjectTracking());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.ruoyi.jjh.ent.entity.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务和定时提醒关联新增
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/18 17:14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class JAddJobSmart {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时提醒id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private Long smartId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private Long jobId;
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package com.ruoyi.jjh.ent.entity.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 荣誉情况返回体
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/15 15:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("荣誉情况返回体")
|
||||||
|
public class HonorResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目大类名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目大类名字")
|
||||||
|
private String projectBigName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目大类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目大类")
|
||||||
|
private Integer projectBigType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大类数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("大类数量")
|
||||||
|
private Integer count1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目中类名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目中类名字")
|
||||||
|
private String projectMiddleName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目中类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目中类")
|
||||||
|
private Integer projectMiddleType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中类数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("中类数量")
|
||||||
|
private Integer count2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目小类名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目小类名字")
|
||||||
|
private String projectSmallName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目小类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目小类")
|
||||||
|
private Integer projectSmallType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小类数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("小类数量")
|
||||||
|
private Integer count3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前年增加项目数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前年增加项目数量")
|
||||||
|
private Integer currentYearAdd;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.ruoyi.jjh.ent.entity.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目追踪情况返回体
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/16 9:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("项目追踪情况返回体")
|
||||||
|
public class ProjectTrackingResponse {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目大类名字")
|
||||||
|
private String enterpriseDirectory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "填报开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private LocalDate startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "填报结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private LocalDate endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private Integer count;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.ruoyi.jjh.ent.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据大屏数据层
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/15 13:57
|
||||||
|
*/
|
||||||
|
public interface JDataScreenMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 荣誉情况
|
||||||
|
*
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
List<HonorResponse> getHonor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目追踪情况
|
||||||
|
*
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
List<ProjectTrackingResponse> getProjectTracking();
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.jjh.ent.service;
|
||||||
|
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据大屏业务层
|
||||||
|
* @author du
|
||||||
|
* @since 2024/5/13 9:58
|
||||||
|
*/
|
||||||
|
public interface JDataScreenService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 荣誉情况
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
List<HonorResponse> getHonor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目追踪情况
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
List<ProjectTrackingResponse> getProjectTracking();
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.ruoyi.jjh.ent.service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短信提醒业务层
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/16 13:27
|
||||||
|
*/
|
||||||
|
public interface SmsAlertsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成短信接口统一的请求头
|
||||||
|
* @return 请求头
|
||||||
|
*/
|
||||||
|
HashMap<String, String> getMap();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送短信
|
||||||
|
* @param param1
|
||||||
|
* @param param2
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String enterSms(String param1,String param2,String numbers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短信接收人号码新增
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
String addSsmPhone(String nums);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ruoyi.jjh.ent.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.ruoyi.jjh.declaration.entity.BmsFundingDetail;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProject;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
|
||||||
|
import com.ruoyi.jjh.ent.mapper.JDataScreenMapper;
|
||||||
|
import com.ruoyi.jjh.ent.service.JDataScreenService;
|
||||||
|
import com.ruoyi.jjh.ent.service.JProjectService;
|
||||||
|
import com.ruoyi.jjh.ent.service.SmsAlertsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据大屏业务处理层
|
||||||
|
* @author du
|
||||||
|
* @since 2024/5/13 9:58
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class JDataScreenImpl implements JDataScreenService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private JDataScreenMapper jDataScreenMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private JProjectService jProjectService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 荣誉情况
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HonorResponse> getHonor() {
|
||||||
|
int x = 0;
|
||||||
|
for (JProject jp : jProjectService.lambdaQuery().eq(JProject::getProjectMiddleType,4).list()) {
|
||||||
|
if("否".equals(JSONObject.parseObject(jp.getOtherJson()).get("是否通过2022年度“331”评价"))){
|
||||||
|
x+=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<HonorResponse> honor = jDataScreenMapper.getHonor();
|
||||||
|
for (HonorResponse y : honor) {
|
||||||
|
if(y.getProjectBigType()==4){
|
||||||
|
y.setCount1(y.getCount1()-x);
|
||||||
|
}
|
||||||
|
if(y.getProjectMiddleType()==4){
|
||||||
|
y.setCount2(y.getCount2()-x);
|
||||||
|
}
|
||||||
|
if(y.getProjectSmallType()==6){
|
||||||
|
y.setCount3(y.getCount3()-x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return honor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目追踪情况
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectTrackingResponse> getProjectTracking() {
|
||||||
|
return jDataScreenMapper.getProjectTracking();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
package com.ruoyi.jjh.ent.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import cn.hutool.crypto.digest.DigestAlgorithm;
|
||||||
|
import cn.hutool.crypto.digest.Digester;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.ruoyi.jjh.ent.service.SmsAlertsService;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短信提醒业务处理层
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/16 13:26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SmsAlertsServiceImpl implements SmsAlertsService {
|
||||||
|
|
||||||
|
@Value("${smsSend}")
|
||||||
|
private String smsSend;
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${smsPhoneAdd}")
|
||||||
|
private String smsPhoneAdd;
|
||||||
|
|
||||||
|
@Value("${paaSID}")
|
||||||
|
private String paaSID;
|
||||||
|
|
||||||
|
@Value("${smsToken}")
|
||||||
|
private String smsToken;
|
||||||
|
|
||||||
|
@Value("${code}")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Value("${smsV}")
|
||||||
|
private String smsV;
|
||||||
|
|
||||||
|
@Value("${paramType}")
|
||||||
|
private String paramType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成短信统一的请求头
|
||||||
|
* @return 请求头
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HashMap<String, String> getMap() {
|
||||||
|
Digester sha256 = new Digester(DigestAlgorithm.SHA256);
|
||||||
|
String timestamp = String.valueOf(Instant.now().getEpochSecond());
|
||||||
|
String str = RandomUtil.randomString(30);
|
||||||
|
//请求头
|
||||||
|
HashMap<String, String> headers = new HashMap<>();//存放请求头,可以存放多个请求头
|
||||||
|
headers.put("x-tif-paasid", paaSID);
|
||||||
|
headers.put("x-tif-signature", sha256.digestHex(timestamp+smsToken+str+timestamp).toUpperCase());
|
||||||
|
headers.put("x-tif-timestamp", timestamp);
|
||||||
|
headers.put("x-tif-nonce", str);
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送短信
|
||||||
|
* @param param1
|
||||||
|
* @param param2
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String enterSms(String param1,String param2,String numbers) {
|
||||||
|
JSONObject jsonObject = new JSONObject();//存放参数
|
||||||
|
//请求体
|
||||||
|
JSONObject params = new JSONObject();//存放参数
|
||||||
|
params.set("param1",param1);
|
||||||
|
params.set("param2",param2);
|
||||||
|
jsonObject.set("type", paramType);
|
||||||
|
jsonObject.set("empowerCode", smsV);
|
||||||
|
jsonObject.set("numbers", numbers);
|
||||||
|
jsonObject.set("params", params);
|
||||||
|
HttpResponse response = HttpRequest.post(smsSend)
|
||||||
|
.addHeaders(getMap())
|
||||||
|
.body(jsonObject.toString())
|
||||||
|
.execute();
|
||||||
|
JSONObject jsonObj = JSONUtil.parseObj(response.body());
|
||||||
|
return String.valueOf(jsonObj.get("msg"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短信接收人号码新增
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String addSsmPhone(String nums) {
|
||||||
|
Map<String,Object> js1 = new HashMap<>();//存放参数
|
||||||
|
js1.put("orderId", code);
|
||||||
|
js1.put("nums", nums);
|
||||||
|
HttpResponse response = HttpRequest.post(smsPhoneAdd)
|
||||||
|
.addHeaders(getMap())
|
||||||
|
.form(js1)
|
||||||
|
.execute();
|
||||||
|
JSONObject jsonObj = JSONUtil.parseObj(response.body());
|
||||||
|
return String.valueOf(jsonObj.get("msg"));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
<?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.jjh.ent.mapper.JDataScreenMapper">
|
||||||
|
|
||||||
|
<select id="getHonor" resultType="com.ruoyi.jjh.ent.entity.response.HonorResponse">
|
||||||
|
SELECT a.dict_label AS projectBigName,
|
||||||
|
a.dict_value AS projectBigType,
|
||||||
|
IFNULL(rs.count, 0) AS count1,
|
||||||
|
b.dict_label AS projectMiddleName,
|
||||||
|
b.dict_value AS projectMiddleType,
|
||||||
|
IFNULL(ys.count, 0) AS count2,
|
||||||
|
c.dict_label AS projectSmallName,
|
||||||
|
c.dict_value AS projectSmallType,
|
||||||
|
IFNULL(us.count, 0) AS count3,
|
||||||
|
IFNULL(ns.count, 0) AS currentYearAdd
|
||||||
|
FROM sys_dict_data a
|
||||||
|
JOIN sys_dict_data b ON a.remark = b.dict_type
|
||||||
|
JOIN sys_dict_data c ON b.remark = c.dict_type
|
||||||
|
LEFT JOIN (SELECT project_big_type,
|
||||||
|
IF
|
||||||
|
(
|
||||||
|
project_big_type = 1
|
||||||
|
OR project_big_type = 9,
|
||||||
|
COUNT(DISTINCT credit_code),
|
||||||
|
COUNT(*)) AS count
|
||||||
|
FROM j_project
|
||||||
|
GROUP BY project_big_type) AS rs ON a.dict_value = rs.project_big_type
|
||||||
|
LEFT JOIN (SELECT project_middle_type,
|
||||||
|
IF
|
||||||
|
(
|
||||||
|
project_middle_type = 1
|
||||||
|
OR project_middle_type = 9,
|
||||||
|
COUNT(DISTINCT credit_code),
|
||||||
|
COUNT(*)) AS count
|
||||||
|
FROM j_project
|
||||||
|
GROUP BY project_middle_type) AS ys ON b.dict_value = ys.project_middle_type
|
||||||
|
LEFT JOIN (SELECT project_small_type,
|
||||||
|
IF(project_small_type = 14, COUNT(DISTINCT credit_code), COUNT(*)) AS count
|
||||||
|
FROM j_project
|
||||||
|
GROUP BY project_small_type) AS us ON c.dict_value = us.project_small_type
|
||||||
|
LEFT JOIN (SELECT ns.project_small_type,
|
||||||
|
COUNT(*) AS count
|
||||||
|
FROM j_project ns
|
||||||
|
WHERE YEAR(
|
||||||
|
NOW()) = YEAR(ns.project_year)
|
||||||
|
GROUP BY ns.project_small_type) AS ns ON c.dict_value = ns.project_small_type
|
||||||
|
WHERE a.dict_type = 'project_categories'
|
||||||
|
ORDER BY CAST(c.dict_value AS UNSIGNED);
|
||||||
|
</select>
|
||||||
|
<select id="getProjectTracking" resultType="com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse">
|
||||||
|
SELECT
|
||||||
|
b.enterprise_directory,
|
||||||
|
b.start_time,
|
||||||
|
b.end_time,
|
||||||
|
COUNT(*) as count
|
||||||
|
FROM
|
||||||
|
bms_declaration_records a
|
||||||
|
INNER JOIN bms_template_record b ON a.template_record_id = b.id
|
||||||
|
WHERE
|
||||||
|
a.`status` != 0
|
||||||
|
GROUP BY
|
||||||
|
a.template_record_id
|
||||||
|
order by
|
||||||
|
count desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in new issue