62 changed files with 1445 additions and 389 deletions
@ -0,0 +1,9 @@
|
||||
CREATE TABLE `rpc_apply_work` ( |
||||
`id` int NOT NULL AUTO_INCREMENT, |
||||
`rpc_id` varchar(40) |
||||
`handle_id_code` varchar(40) COMMENT '办理人身份证', |
||||
`handle_depart_id` varchar(40) COMMENT '办理单位', |
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间', |
||||
`status` varchar(255) COMMENT '状态', |
||||
PRIMARY KEY (`id`) |
||||
) ENGINE=InnoDB AUTO_INCREMENT=1; |
||||
@ -0,0 +1,37 @@
|
||||
CREATE TABLE `rpc_apply_work` ( |
||||
`id` int NOT NULL AUTO_INCREMENT, |
||||
`rpc_id` varchar(40) , |
||||
`handle_id_code` varchar(40) CHARACTER SET utf8mb4 COMMENT '办理人身份证', |
||||
`handle_depart_id` varchar(40) CHARACTER SET utf8mb4 COMMENT '办理单位', |
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间', |
||||
`status` varchar(255) CHARACTER SET utf8mb4 COMMENT '状态', |
||||
`council` tinyint DEFAULT NULL, |
||||
`step` int DEFAULT NULL, |
||||
`update_time` datetime DEFAULT NULL, |
||||
PRIMARY KEY (`id`) |
||||
) ENGINE=InnoDB AUTO_INCREMENT=1; |
||||
|
||||
update rpc_apply set rpc_status = 'completed'; |
||||
|
||||
|
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, '受到暴力袭击的;', '1', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '受到暴力袭击的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 2, '被车辆冲撞、碾压、拖拽、剐蹭的;', '2', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被车辆冲撞、碾压、拖拽、剐蹭的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '被聚众哄闹、围堵拦截、冲击、阻碍的;', '3', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被聚众哄闹、围堵拦截、冲击、阻碍的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 4, '受到扣押、撕咬、拉扯、推搡等侵害的;', '4', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '受到扣押、撕咬、拉扯、推搡等侵害的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 5, '本人及其亲近家属受到威胁、恐吓、侮辱、诽谤、骚扰的;', '5', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '本人及其亲近家属受到威胁、恐吓、侮辱、诽谤、骚扰的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 6, '本人及其近亲属受到诬告陷害、打击报复的;', '6', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '本人及其近亲属受到诬告陷害、打击报复的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 7, '被恶意投诉、炒作的;', '7', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被恶意投诉、炒作的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 8, '本人及其亲近家属个人隐私被侵犯的;', '8', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '本人及其亲近家属个人隐私被侵犯的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 9, '被错误追究责任或者受到不公正处分、处理的;', '9', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被错误追究责任或者受到不公正处分、处理的;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 10, '执法权威受到侵犯的其他情形;', '10', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '执法权威受到侵犯的其他情形;'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 2, '轻微伤', '3000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '轻微伤'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '轻伤', '5000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '轻伤'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 4, '重伤', '10000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '重伤'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 5, '精神伤害', '0', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, ''); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 7, '一般性损伤', '2000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '一般性损伤'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, '110接处警', '1', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '接处警'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 2, '传唤抓捕', '2', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '传呼抓捕'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '交通执法', '3', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '交通管理执法'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 4, '其他执法活动', '4', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '维稳处突'); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '待审批', 'approval', 'comfortStatus', '', '', '0', '0', '', '2025-02-11 16:10:18', '', '2025-02-11 16:10:18', ''); |
||||
INSERT INTO `negative`.`sup_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '已办结', 'completed', 'comfortStatus', '', '', '0', '0', '', '2025-02-11 16:10:41', '', '2025-02-11 16:10:41', ''); |
||||
@ -0,0 +1,14 @@
|
||||
package com.biutag.supervision.constants.enums; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/11 |
||||
*/ |
||||
public enum ComfortStatus { |
||||
|
||||
approval, |
||||
// 已退回
|
||||
returned, |
||||
completed |
||||
|
||||
} |
||||
@ -0,0 +1,25 @@
|
||||
package com.biutag.supervision.constants.enums; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Getter; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/7 |
||||
*/ |
||||
@AllArgsConstructor |
||||
public enum RpcApplyTypeEnum { |
||||
|
||||
// 维权
|
||||
RIGHTS_PROTECTION("1"), |
||||
|
||||
// 抚慰
|
||||
COMFORT("2"), |
||||
|
||||
// 容错
|
||||
FAULT_TOLERANT("3"); |
||||
|
||||
|
||||
@Getter |
||||
private String value; |
||||
} |
||||
@ -0,0 +1,185 @@
|
||||
package com.biutag.supervision.controller.rightsComfort; |
||||
|
||||
import cn.hutool.core.collection.CollectionUtil; |
||||
import cn.hutool.core.date.DateUtil; |
||||
import cn.hutool.core.util.IdUtil; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.biutag.supervision.common.UserContextHolder; |
||||
import com.biutag.supervision.constants.enums.ComfortStatus; |
||||
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; |
||||
import com.biutag.supervision.constants.enums.WorkStatusEnum; |
||||
import com.biutag.supervision.pojo.Result; |
||||
import com.biutag.supervision.pojo.domain.RpcApplyDetail; |
||||
import com.biutag.supervision.pojo.dto.RpcApplyApproveDto; |
||||
import com.biutag.supervision.pojo.dto.RpcApplyDto; |
||||
import com.biutag.supervision.pojo.entity.RpcApply; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyPerson; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyWork; |
||||
import com.biutag.supervision.pojo.entity.RpcPerson; |
||||
import com.biutag.supervision.pojo.param.RpcApplyQueryParam; |
||||
import com.biutag.supervision.pojo.vo.RpcApplyVo; |
||||
import com.biutag.supervision.service.*; |
||||
import com.biutag.supervision.util.JSON; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.beans.BeanUtils; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/1/20 |
||||
*/ |
||||
@RequiredArgsConstructor |
||||
@RequestMapping("comfort") |
||||
@RestController |
||||
public class ComfortController { |
||||
|
||||
private final RpcApplyService rpcApplyService; |
||||
|
||||
private final RpcPersonService rpcPersonService; |
||||
|
||||
private final RpcApplyPersonService rpcApplyPersonService; |
||||
|
||||
private final RpcApplyWorkService rpcApplyWorkService; |
||||
|
||||
private final RpcApplyApproveService rpcApplyApproveService; |
||||
|
||||
@GetMapping |
||||
public Result<Page<RpcApplyVo>> list(RpcApplyQueryParam queryParam) { |
||||
return Result.success(rpcApplyService.page(queryParam, RpcApplyTypeEnum.COMFORT.getValue())); |
||||
} |
||||
|
||||
// 待办
|
||||
@GetMapping("todo") |
||||
public Result<Page<RpcApplyVo>> todos(RpcApplyQueryParam queryParam) { |
||||
return Result.success(rpcApplyWorkService.pageTodo(queryParam)); |
||||
} |
||||
|
||||
// 已办
|
||||
@GetMapping("done") |
||||
public Result<Page<RpcApplyVo>> done(RpcApplyQueryParam queryParam) { |
||||
return Result.success(rpcApplyWorkService.pageDone(queryParam)); |
||||
} |
||||
|
||||
@GetMapping("{id}") |
||||
public Result<RpcApplyDetail> get(@PathVariable String id) { |
||||
RpcApplyDetail rpcApplyDetail = new RpcApplyDetail(); |
||||
rpcApplyDetail.setApply(rpcApplyService.getById(id)); |
||||
rpcApplyDetail.setPerson(rpcPersonService.getOne(new LambdaUpdateWrapper<RpcPerson>().eq(RpcPerson::getRpcId, id))); |
||||
rpcApplyDetail.setApplyPerson(rpcApplyPersonService.getOne(new LambdaUpdateWrapper<RpcApplyPerson>().eq(RpcApplyPerson::getRpcId, id))); |
||||
rpcApplyDetail.setApproves(rpcApplyApproveService.list(id)); |
||||
return Result.success(rpcApplyDetail); |
||||
} |
||||
|
||||
@Transactional(rollbackFor = Exception.class) |
||||
@PostMapping |
||||
public Result<Void> add(@RequestBody RpcApplyDto applyDto) { |
||||
RpcApply rpcApply = new RpcApply(); |
||||
BeanUtils.copyProperties(applyDto, rpcApply); |
||||
rpcApply.setRpcId(IdUtil.fastSimpleUUID()); |
||||
rpcApply.setCrtTime(LocalDateTime.now()); |
||||
rpcApply.setUptTime(LocalDateTime.now()); |
||||
// 警号
|
||||
rpcApply.setApplicantEmpNo(applyDto.getEmpNo()); |
||||
rpcApply.setType(RpcApplyTypeEnum.COMFORT.getValue()); |
||||
int year = DateUtil.year(applyDto.getApplyDate()); |
||||
rpcApply.setNumberIndex(rpcApplyService.getNewNumberIndex(year)); |
||||
rpcApply.setYear(year); |
||||
rpcApply.setNumber(String.format("长公抚申〔%s〕%s号", year, String.format("%03d", rpcApply.getNumberIndex()))); |
||||
if (CollectionUtil.isNotEmpty(applyDto.getDocumentFile())) { |
||||
rpcApply.setDocumentFile(JSON.toJSONString(applyDto.getDocumentFile())); |
||||
} |
||||
rpcApply.setRpcStatus(ComfortStatus.approval.name()); |
||||
rpcApply.setStep(2); |
||||
rpcApplyService.save(rpcApply); |
||||
// 已办
|
||||
RpcApplyWork done = new RpcApplyWork(); |
||||
done.setRpcId(rpcApply.getRpcId()); |
||||
done.setStatus(WorkStatusEnum.done.name()); |
||||
done.setHandleIdCode(UserContextHolder.getCurrentUser().getUserName()); |
||||
done.setCreateTime(LocalDateTime.now()); |
||||
done.setStep(2); |
||||
rpcApplyWorkService.save(done); |
||||
|
||||
// 待办
|
||||
RpcApplyWork todo = new RpcApplyWork(); |
||||
todo.setRpcId(rpcApply.getRpcId()); |
||||
todo.setStatus(WorkStatusEnum.todo.name()); |
||||
todo.setHandleDepartId(applyDto.getHandleDepartId()); |
||||
todo.setStep(2); |
||||
todo.setCreateTime(LocalDateTime.now()); |
||||
|
||||
rpcApplyWorkService.save(todo); |
||||
|
||||
RpcApplyPerson rpcApplyPerson = new RpcApplyPerson(); |
||||
BeanUtils.copyProperties(applyDto, rpcApplyPerson); |
||||
rpcApplyPerson.setRpcId(rpcApply.getRpcId()); |
||||
rpcApplyPerson.setCreatTime(LocalDateTime.now()); |
||||
rpcApplyPerson.setUdpTime(LocalDateTime.now()); |
||||
rpcApplyPerson.setType(RpcApplyTypeEnum.COMFORT.getValue()); |
||||
rpcApplyPersonService.save(rpcApplyPerson); |
||||
|
||||
RpcPerson rpcPerson = new RpcPerson(); |
||||
BeanUtils.copyProperties(applyDto, rpcPerson); |
||||
rpcPerson.setRpcId(rpcApply.getRpcId()); |
||||
rpcPersonService.save(rpcPerson); |
||||
return Result.success(); |
||||
} |
||||
|
||||
@DeleteMapping("{id}") |
||||
public Result<Void> del(@PathVariable String id) { |
||||
rpcApplyService.removeById(id); |
||||
rpcPersonService.remove(new LambdaQueryWrapper<RpcPerson>().eq(RpcPerson::getRpcId, id)); |
||||
rpcApplyPersonService.remove(new LambdaQueryWrapper<RpcApplyPerson>().eq(RpcApplyPerson::getRpcId, id)); |
||||
rpcApplyWorkService.remove(new LambdaQueryWrapper<RpcApplyWork>().eq(RpcApplyWork::getRpcId, id)); |
||||
return Result.success(); |
||||
} |
||||
|
||||
@Transactional(rollbackFor = Exception.class) |
||||
@PostMapping("approve") |
||||
public Result<Void> approve(@RequestBody RpcApplyApproveDto rpcApplyApproveDto) { |
||||
RpcApply rpcApply = rpcApplyService.getById(rpcApplyApproveDto.getRpcId()); |
||||
rpcApplyWorkService.update(new LambdaUpdateWrapper<RpcApplyWork>().eq(RpcApplyWork::getRpcId, rpcApplyApproveDto.getRpcId()) |
||||
.eq(RpcApplyWork::getStep, rpcApply.getStep()) |
||||
.set(RpcApplyWork::getStatus, WorkStatusEnum.done.name()) |
||||
.set(RpcApplyWork::getUpdateTime, LocalDateTime.now())); |
||||
if (rpcApplyApproveDto.getReturnFlag()) { |
||||
// 退回
|
||||
rpcApplyWorkService.update(new LambdaUpdateWrapper<RpcApplyWork>().eq(RpcApplyWork::getRpcId, rpcApplyApproveDto.getRpcId()) |
||||
.eq(RpcApplyWork::getStep, 1) |
||||
.set(RpcApplyWork::getStatus, WorkStatusEnum.todo.name()) |
||||
.set(RpcApplyWork::getUpdateTime, LocalDateTime.now())); |
||||
rpcApplyService.update(new LambdaUpdateWrapper<RpcApply>().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId()) |
||||
.set(RpcApply::getStep, 1) |
||||
.set(RpcApply::getRpcStatus, ComfortStatus.returned.name()) |
||||
.set(RpcApply::getUptTime, LocalDateTime.now())); |
||||
|
||||
} else { |
||||
if (rpcApply.getStep() == 2) { |
||||
rpcApplyWorkService.remove(new LambdaQueryWrapper<RpcApplyWork>().eq(RpcApplyWork::getRpcId, rpcApply.getRpcId()).eq(RpcApplyWork::getStep, 3)); |
||||
// 待办
|
||||
RpcApplyWork todo = new RpcApplyWork(); |
||||
todo.setRpcId(rpcApply.getRpcId()); |
||||
todo.setStatus(WorkStatusEnum.todo.name()); |
||||
todo.setStep(3); |
||||
todo.setCouncil(true); |
||||
todo.setCreateTime(LocalDateTime.now()); |
||||
rpcApplyWorkService.save(todo); |
||||
rpcApplyService.update(new LambdaUpdateWrapper<RpcApply>().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId()) |
||||
.set(RpcApply::getStep, 3) |
||||
.set(RpcApply::getUptTime, LocalDateTime.now())); |
||||
} else { |
||||
// 办结
|
||||
rpcApplyService.update(new LambdaUpdateWrapper<RpcApply>().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId()) |
||||
.set(RpcApply::getRpcStatus, ComfortStatus.completed.name()) |
||||
.set(RpcApply::getUptTime, LocalDateTime.now())); |
||||
} |
||||
} |
||||
return Result.success(); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,63 @@
|
||||
package com.biutag.supervision.controller.system; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.biutag.supervision.pojo.Result; |
||||
import com.biutag.supervision.pojo.entity.RpcRightPerson; |
||||
import com.biutag.supervision.pojo.param.RpcRightPersonQueryParam; |
||||
import com.biutag.supervision.service.RpcRightPersonService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 维权专干 |
||||
* @author wxc |
||||
* @date 2025/2/8 |
||||
*/ |
||||
@RequiredArgsConstructor |
||||
@RequestMapping("rightPerson") |
||||
@RestController |
||||
public class RightPersonController { |
||||
|
||||
private final RpcRightPersonService rpcRightPersonService; |
||||
|
||||
@GetMapping |
||||
public Result<Page<RpcRightPerson>> list(RpcRightPersonQueryParam queryParam) { |
||||
LambdaQueryWrapper<RpcRightPerson> queryWrapper = new LambdaQueryWrapper<RpcRightPerson>() |
||||
.eq(Objects.nonNull(queryParam.getDepartId()), RpcRightPerson::getDepartId, queryParam.getDepartId()) |
||||
.like(StrUtil.isNotBlank(queryParam.getEmpName()), RpcRightPerson::getEmpName, queryParam.getEmpName()) |
||||
.eq(StrUtil.isNotBlank(queryParam.getEmpNo()), RpcRightPerson::getEmpNo, queryParam.getEmpNo()) |
||||
.orderByDesc(RpcRightPerson::getId); |
||||
return Result.success(rpcRightPersonService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper)); |
||||
} |
||||
|
||||
@GetMapping("depart/{departId}") |
||||
public Result<List<RpcRightPerson>> list(@PathVariable String departId) { |
||||
return Result.success(rpcRightPersonService.list(new LambdaUpdateWrapper<RpcRightPerson>().eq(RpcRightPerson::getDepartId, departId))); |
||||
} |
||||
|
||||
@PostMapping |
||||
public Result<Void> add(@RequestBody RpcRightPerson rpcRightPerson) { |
||||
rpcRightPersonService.save(rpcRightPerson); |
||||
return Result.success(); |
||||
} |
||||
|
||||
@PutMapping |
||||
public Result<Void> update(@RequestBody RpcRightPerson rpcRightPerson) { |
||||
rpcRightPersonService.save(rpcRightPerson); |
||||
return Result.success(); |
||||
} |
||||
|
||||
|
||||
@DeleteMapping("{id}") |
||||
public Result<Void> del(@PathVariable Integer id) { |
||||
rpcRightPersonService.removeById(id); |
||||
return Result.success(); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyApprove; |
||||
|
||||
public interface RpcApplyApproveMapper extends BaseMapper<RpcApplyApprove> { |
||||
|
||||
} |
||||
@ -0,0 +1,16 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.biutag.supervision.pojo.entity.RpcApply; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyWork; |
||||
import com.biutag.supervision.pojo.vo.RpcApplyVo; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
public interface RpcApplyWorkMapper extends BaseMapper<RpcApplyWork> { |
||||
|
||||
Page<RpcApplyVo> queryPage(@Param("page") Page<RpcApply> page, @Param(Constants.WRAPPER) QueryWrapper<RpcApply> queryWrapper); |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.biutag.supervision.pojo.entity.RpcPerson; |
||||
|
||||
public interface RpcPersonMapper extends BaseMapper<RpcPerson> { |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.biutag.supervision.pojo.entity.RpcRightPerson; |
||||
|
||||
public interface RpcRightPersonMapper extends BaseMapper<RpcRightPerson> { |
||||
|
||||
} |
||||
@ -0,0 +1,28 @@
|
||||
package com.biutag.supervision.pojo.domain; |
||||
|
||||
import com.biutag.supervision.pojo.entity.RpcApply; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyApprove; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyPerson; |
||||
import com.biutag.supervision.pojo.entity.RpcPerson; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/12 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyDetail { |
||||
|
||||
private RpcApply apply; |
||||
|
||||
private RpcPerson person; |
||||
|
||||
private RpcApplyPerson applyPerson; |
||||
|
||||
private List<RpcApplyApprove> approves = new ArrayList<>(); |
||||
} |
||||
@ -0,0 +1,20 @@
|
||||
package com.biutag.supervision.pojo.dto; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/13 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyApproveDto { |
||||
|
||||
private String rpcId; |
||||
|
||||
private String comments; |
||||
|
||||
private Boolean returnFlag = false; |
||||
|
||||
} |
||||
@ -0,0 +1,116 @@
|
||||
package com.biutag.supervision.pojo.dto; |
||||
|
||||
import com.biutag.supervision.pojo.vo.FileVo; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/7 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyDto { |
||||
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd") |
||||
private Date applyDate; |
||||
|
||||
// 主办单位
|
||||
private String handleDepartId; |
||||
|
||||
private String handleDepartName; |
||||
|
||||
// 是否为本人申请
|
||||
private String isSelf; |
||||
|
||||
// 关系
|
||||
private String relation; |
||||
|
||||
|
||||
// 申请人姓名
|
||||
private String applicantEmpName; |
||||
|
||||
// 性别 0代表男 1代表女
|
||||
private Integer sex; |
||||
|
||||
private String birthday; |
||||
|
||||
// 文化程度
|
||||
private String levelEducation; |
||||
|
||||
// 政治面貌
|
||||
private String politicCountenance; |
||||
|
||||
// 身份证号
|
||||
private String idCode; |
||||
|
||||
// 联系方式
|
||||
private String mobile; |
||||
|
||||
// 申请人所在单位
|
||||
private String departId; |
||||
|
||||
// 申请人所在单位
|
||||
private String departName; |
||||
|
||||
// 警号
|
||||
private String empNo; |
||||
|
||||
// 职位
|
||||
private String job; |
||||
|
||||
// 警种
|
||||
private String policeTypes; |
||||
|
||||
// 警衔
|
||||
private String policeRank; |
||||
|
||||
// 开户行
|
||||
private String bankCard; |
||||
|
||||
// 支行信息
|
||||
private String bankBranch; |
||||
|
||||
// 银行卡
|
||||
private String bankCardAccount; |
||||
|
||||
// 事发时间
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm") |
||||
private LocalDateTime happenTime; |
||||
|
||||
// 事实及理由
|
||||
private String factReason; |
||||
|
||||
// 案发环节
|
||||
private String incidentLink; |
||||
|
||||
private String incidentLinkName; |
||||
|
||||
// 受伤程度
|
||||
private String injurySeverity; |
||||
private String injurySeverityName; |
||||
|
||||
// 侵权形式
|
||||
private String formsOfTort; |
||||
private String formsOfTortName; |
||||
|
||||
// 侵权人姓名
|
||||
private String infringerName; |
||||
|
||||
// 侵权人处理方式
|
||||
private String infringerHandle; |
||||
|
||||
|
||||
private List<FileVo> documentFile; |
||||
|
||||
private String status; |
||||
|
||||
private String approver; |
||||
|
||||
} |
||||
@ -0,0 +1,43 @@
|
||||
package com.biutag.supervision.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyApprove { |
||||
|
||||
//
|
||||
@TableId(value = "id") |
||||
private Integer id; |
||||
|
||||
//
|
||||
@TableField("rpc_id") |
||||
private String rpcId; |
||||
|
||||
// 审批意见
|
||||
@TableField("comments") |
||||
private String comments; |
||||
|
||||
// 是否退回
|
||||
@TableField("return_flag") |
||||
private Boolean returnFlag; |
||||
|
||||
//
|
||||
@TableField("create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
// 操作人
|
||||
@TableField("handle_name") |
||||
private String handleName; |
||||
|
||||
//
|
||||
@TableField("step") |
||||
private Integer step; |
||||
|
||||
} |
||||
@ -0,0 +1,45 @@
|
||||
package com.biutag.supervision.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyWork { |
||||
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
//
|
||||
@TableField("rpc_id") |
||||
private String rpcId; |
||||
|
||||
//
|
||||
@TableField("handle_id_code") |
||||
private String handleIdCode; |
||||
|
||||
//
|
||||
@TableField("handle_depart_id") |
||||
private String handleDepartId; |
||||
|
||||
//
|
||||
@TableField("create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
private LocalDateTime updateTime; |
||||
|
||||
// 市局维权专干 true=是,false=不是
|
||||
private Boolean council = false; |
||||
|
||||
private String status; |
||||
|
||||
private Integer step; |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,85 @@
|
||||
package com.biutag.supervision.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class RpcPerson { |
||||
|
||||
//
|
||||
@TableId(value = "id") |
||||
private String id; |
||||
|
||||
private String rpcId; |
||||
|
||||
// 警号
|
||||
@TableField("emp_no") |
||||
private String empNo; |
||||
|
||||
// 姓名
|
||||
@TableField("name") |
||||
private String name; |
||||
|
||||
// 性别 0代表男 1代表女
|
||||
@TableField("sex") |
||||
private Integer sex; |
||||
|
||||
//
|
||||
@TableField("birthday") |
||||
private String birthday; |
||||
|
||||
// 文化程度
|
||||
@TableField("level_education") |
||||
private String levelEducation; |
||||
|
||||
// 政治面貌
|
||||
@TableField("politic_countenance") |
||||
private String politicCountenance; |
||||
|
||||
// 身份证号
|
||||
@TableField("id_code") |
||||
private String idCode; |
||||
|
||||
// 联系方式
|
||||
@TableField("mobile") |
||||
private String mobile; |
||||
|
||||
// 部门id
|
||||
@TableField("depart_id") |
||||
private String departId; |
||||
|
||||
// 部门名称
|
||||
@TableField("depart_name") |
||||
private String departName; |
||||
|
||||
// 职位
|
||||
@TableField("job") |
||||
private String job; |
||||
|
||||
// 警种
|
||||
@TableField("police_types") |
||||
private String policeTypes; |
||||
|
||||
// 警衔
|
||||
@TableField("police_rank") |
||||
private String policeRank; |
||||
|
||||
// 开户行
|
||||
@TableField("bank_card") |
||||
private String bankCard; |
||||
|
||||
// 支行信息
|
||||
@TableField("bank_branch") |
||||
private String bankBranch; |
||||
|
||||
// 银行卡
|
||||
@TableField("bank_card_account") |
||||
private String bankCardAccount; |
||||
|
||||
} |
||||
@ -0,0 +1,39 @@
|
||||
package com.biutag.supervision.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class RpcRightPerson { |
||||
|
||||
@TableId(type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
// 维权专干所属二级部门或市局id
|
||||
private String departId; |
||||
|
||||
private String departName; |
||||
|
||||
// 维权专干警号
|
||||
@TableField("emp_no") |
||||
private String empNo; |
||||
|
||||
private String idCode; |
||||
|
||||
// 维权专干名字
|
||||
@TableField("emp_name") |
||||
private String empName; |
||||
|
||||
// 市局维权专干 1=是,0=不是
|
||||
@TableField("council") |
||||
private String council; |
||||
|
||||
// 民警呼声处理人 1=是,0=不是
|
||||
@TableField("is_voice_emp") |
||||
private String isVoiceEmp; |
||||
|
||||
} |
||||
@ -0,0 +1,27 @@
|
||||
package com.biutag.supervision.pojo.param; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/6 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyQueryParam extends BasePage { |
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
private List<Date> applyDate; |
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private List<Date> happenTime; |
||||
|
||||
private String applicantEmpName; |
||||
|
||||
private String departId; |
||||
} |
||||
@ -0,0 +1,20 @@
|
||||
package com.biutag.supervision.pojo.param; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/11 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class RpcRightPersonQueryParam extends BasePage { |
||||
|
||||
private String departId; |
||||
|
||||
private String empName; |
||||
|
||||
private String empNo; |
||||
|
||||
} |
||||
@ -0,0 +1,66 @@
|
||||
package com.biutag.supervision.pojo.vo; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class ExportNegativeBlameVo { |
||||
|
||||
@ExcelProperty({"问题编号"}) |
||||
private String id; |
||||
|
||||
// 简要描述
|
||||
@ExcelProperty({"简要描述"}) |
||||
private String thingDesc; |
||||
|
||||
// 办理单位 二级
|
||||
@ExcelProperty({"办理单位(二级)"}) |
||||
private String handleSecondDepartName; |
||||
|
||||
// 办理单位 三级
|
||||
@ExcelProperty({"办理单位(三级)"}) |
||||
private String handleThreeDepartName; |
||||
|
||||
// 核查情况
|
||||
@ExcelProperty({"核查情况(是否属实)"}) |
||||
private String checkStatusName; |
||||
|
||||
// 是否整改
|
||||
@ExcelProperty({"是否整改"}) |
||||
private String isRectifyName; |
||||
|
||||
// 问题整改情况
|
||||
@ExcelProperty({"整改情况"}) |
||||
private String rectifyDesc; |
||||
|
||||
// 追责对象
|
||||
@ExcelProperty({"追责对象"}) |
||||
private String accountabilityTarget; |
||||
|
||||
@ExcelProperty({"涉及人员姓名"}) |
||||
private String blameName; |
||||
|
||||
// 涉及警号
|
||||
@ExcelProperty({"警号"}) |
||||
private String blameEmpNo; |
||||
|
||||
// 涉及身份证
|
||||
@ExcelProperty({"身份证"}) |
||||
private String blameIdCode; |
||||
|
||||
@ExcelProperty({"人员属性"}) |
||||
private String ivPersonType; |
||||
|
||||
@ExcelProperty({"责任追责"}) |
||||
private String handleResultName; |
||||
|
||||
// 问题类型
|
||||
@ExcelProperty({"问题类型"}) |
||||
private String problemType; |
||||
} |
||||
@ -0,0 +1,48 @@
|
||||
package com.biutag.supervision.pojo.vo; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* @author wxc |
||||
* @date 2025/2/6 |
||||
*/ |
||||
@Setter |
||||
@Getter |
||||
public class RpcApplyVo { |
||||
|
||||
private String rpcId; |
||||
|
||||
private String number; |
||||
|
||||
// 申请时间
|
||||
@JsonFormat(pattern="yyyy-MM-dd") |
||||
private LocalDateTime applyDate; |
||||
|
||||
// 发生时间
|
||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
private LocalDateTime happenTime; |
||||
|
||||
// 部门id
|
||||
private String departId; |
||||
|
||||
// 部门
|
||||
private String departName; |
||||
|
||||
|
||||
private String applicantEmpName; |
||||
|
||||
// 开户行
|
||||
private String bankCard; |
||||
|
||||
// 支行信息
|
||||
private String bankBranch; |
||||
|
||||
private String rpcStatus; |
||||
|
||||
private String approver; |
||||
|
||||
} |
||||
@ -0,0 +1,24 @@
|
||||
package com.biutag.supervision.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyApprove; |
||||
import com.biutag.supervision.mapper.RpcApplyApproveMapper; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Service |
||||
public class RpcApplyApproveService extends ServiceImpl<RpcApplyApproveMapper, RpcApplyApprove> { |
||||
|
||||
|
||||
public List<RpcApplyApprove> list(String rpcId) { |
||||
List<RpcApplyApprove> list = list(new LambdaQueryWrapper<RpcApplyApprove>().eq(RpcApplyApprove::getRpcId, rpcId).orderByDesc(RpcApplyApprove::getCreateTime)); |
||||
List<RpcApplyApprove> result = new ArrayList<>(); |
||||
list.stream().filter(item -> 2 == item.getStep()).findFirst().ifPresent(result::add); |
||||
list.stream().filter(item -> 3 == item.getStep()).findFirst().ifPresent(result::add); |
||||
return result; |
||||
} |
||||
} |
||||
@ -0,0 +1,80 @@
|
||||
package com.biutag.supervision.service; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.biutag.supervision.common.UserContextHolder; |
||||
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; |
||||
import com.biutag.supervision.constants.enums.WorkStatusEnum; |
||||
import com.biutag.supervision.pojo.entity.RpcApply; |
||||
import com.biutag.supervision.pojo.entity.RpcApplyWork; |
||||
import com.biutag.supervision.mapper.RpcApplyWorkMapper; |
||||
import com.biutag.supervision.pojo.entity.RpcRightPerson; |
||||
import com.biutag.supervision.pojo.model.UserAuth; |
||||
import com.biutag.supervision.pojo.param.RpcApplyQueryParam; |
||||
import com.biutag.supervision.pojo.vo.RpcApplyVo; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
@RequiredArgsConstructor |
||||
@Service |
||||
public class RpcApplyWorkService extends ServiceImpl<RpcApplyWorkMapper, RpcApplyWork> { |
||||
|
||||
private final RpcRightPersonService rpcRightPersonService; |
||||
|
||||
public Page<RpcApplyVo> pageTodo(RpcApplyQueryParam queryParam) { |
||||
UserAuth user = UserContextHolder.getCurrentUser(); |
||||
List<RpcRightPerson> rightPeoples = rpcRightPersonService.list(new LambdaUpdateWrapper<RpcRightPerson>().eq(RpcRightPerson::getIdCode, user.getUserName())); |
||||
if (rightPeoples.isEmpty()) { |
||||
return new Page<RpcApplyVo>().setTotal(0).setRecords(new ArrayList<>()); |
||||
} |
||||
QueryWrapper<RpcApply> queryWrapper = new QueryWrapper<>(); |
||||
|
||||
if (rightPeoples.stream().anyMatch(item -> "1".equals(item.getCouncil()))) { |
||||
queryWrapper |
||||
.eq("w.council", true); |
||||
} else { |
||||
queryWrapper |
||||
.in("w.handle_depart_id", rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet())); |
||||
} |
||||
queryWrapper |
||||
.eq("w.status", WorkStatusEnum.todo.name()) |
||||
.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName()) |
||||
.eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId()) |
||||
.eq("a.type", RpcApplyTypeEnum.COMFORT.getValue()) |
||||
.orderByDesc("a.crt_time"); |
||||
if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) { |
||||
queryWrapper.between("a.apply_date", queryParam.getApplyDate().get(0), queryParam.getApplyDate().get(1)); |
||||
} |
||||
if (queryParam.getHappenTime() != null && queryParam.getHappenTime().size() == 2) { |
||||
queryWrapper.between("a.happen_time", queryParam.getHappenTime().get(0), queryParam.getHappenTime().get(1)); |
||||
} |
||||
return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); |
||||
} |
||||
|
||||
public Page<RpcApplyVo> pageDone(RpcApplyQueryParam queryParam) { |
||||
UserAuth user = UserContextHolder.getCurrentUser(); |
||||
QueryWrapper<RpcApply> queryWrapper = new QueryWrapper<>(); |
||||
queryWrapper |
||||
.eq("w.handle_id_code", user.getUserName()) |
||||
.eq("w.status", WorkStatusEnum.done.name()) |
||||
.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName()) |
||||
.eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId()) |
||||
.eq("a.type", RpcApplyTypeEnum.COMFORT.getValue()) |
||||
.orderByDesc("a.crt_time"); |
||||
if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) { |
||||
queryWrapper.between("a.apply_date", queryParam.getApplyDate().get(0), queryParam.getApplyDate().get(1)); |
||||
} |
||||
if (queryParam.getHappenTime() != null && queryParam.getHappenTime().size() == 2) { |
||||
queryWrapper.between("a.happen_time", queryParam.getHappenTime().get(0), queryParam.getHappenTime().get(1)); |
||||
} |
||||
return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,11 @@
|
||||
package com.biutag.supervision.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.biutag.supervision.pojo.entity.RpcPerson; |
||||
import com.biutag.supervision.mapper.RpcPersonMapper; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Service |
||||
public class RpcPersonService extends ServiceImpl<RpcPersonMapper, RpcPerson> { |
||||
|
||||
} |
||||
@ -0,0 +1,11 @@
|
||||
package com.biutag.supervision.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.biutag.supervision.pojo.entity.RpcRightPerson; |
||||
import com.biutag.supervision.mapper.RpcRightPersonMapper; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Service |
||||
public class RpcRightPersonService extends ServiceImpl<RpcRightPersonMapper, RpcRightPerson> { |
||||
|
||||
} |
||||
@ -1,276 +0,0 @@
|
||||
package com.biutag.supervision.util; |
||||
|
||||
import lombok.experimental.UtilityClass; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.apache.http.Header; |
||||
import org.apache.http.NameValuePair; |
||||
import org.apache.http.client.config.CookieSpecs; |
||||
import org.apache.http.client.config.RequestConfig; |
||||
import org.apache.http.client.entity.UrlEncodedFormEntity; |
||||
import org.apache.http.client.methods.CloseableHttpResponse; |
||||
import org.apache.http.client.methods.HttpDelete; |
||||
import org.apache.http.client.methods.HttpGet; |
||||
import org.apache.http.client.methods.HttpPost; |
||||
import org.apache.http.client.utils.URIBuilder; |
||||
import org.apache.http.conn.ssl.NoopHostnameVerifier; |
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
||||
import org.apache.http.conn.ssl.TrustStrategy; |
||||
import org.apache.http.entity.ContentType; |
||||
import org.apache.http.entity.StringEntity; |
||||
import org.apache.http.impl.client.CloseableHttpClient; |
||||
import org.apache.http.impl.client.HttpClients; |
||||
import org.apache.http.message.BasicNameValuePair; |
||||
import org.apache.http.ssl.SSLContextBuilder; |
||||
import org.apache.http.util.EntityUtils; |
||||
import org.springframework.http.HttpHeaders; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import javax.net.ssl.HostnameVerifier; |
||||
import javax.net.ssl.SSLContext; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
import java.security.KeyManagementException; |
||||
import java.security.KeyStoreException; |
||||
import java.security.NoSuchAlgorithmException; |
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author kami |
||||
* @since 21:48 2020/10/19 |
||||
*/ |
||||
@Slf4j |
||||
@UtilityClass |
||||
public class HttpClientUtil { |
||||
|
||||
|
||||
public static String doGet(String url, Map<String, String> param, Map<String, String> header) { |
||||
long time = System.currentTimeMillis(); |
||||
URIBuilder builder; |
||||
HttpGet httpGet; |
||||
RequestConfig requestConfig = RequestConfig.custom() |
||||
.setCookieSpec(CookieSpecs.STANDARD) |
||||
.setConnectionRequestTimeout(120000) |
||||
.setSocketTimeout(120000) |
||||
.setConnectTimeout(120000).build(); |
||||
try { |
||||
builder = new URIBuilder(url); |
||||
for (Map.Entry<String, String> entry : param.entrySet()) { |
||||
builder.addParameter(entry.getKey(), entry.getValue()); |
||||
} |
||||
URI uri = builder.build(); |
||||
httpGet = new HttpGet(uri); |
||||
httpGet.setConfig(requestConfig); |
||||
for (Map.Entry<String, String> entry : header.entrySet()) { |
||||
httpGet.setHeader(entry.getKey(), entry.getValue()); |
||||
} |
||||
|
||||
} catch (URISyntaxException e) { |
||||
e.printStackTrace(); |
||||
return null; |
||||
} |
||||
try { |
||||
SslUtil.ignoreSsl(); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpclient = createSSLClientDefault(); |
||||
CloseableHttpResponse response = httpclient.execute(httpGet)) { |
||||
// 判断返回状态是否为200
|
||||
if (response.getStatusLine().getStatusCode() == 200) { |
||||
log.info("{}ms", System.currentTimeMillis() - time); |
||||
return EntityUtils.toString(response.getEntity(), "UTF-8"); |
||||
} |
||||
log.info("{}", response.getStatusLine().getStatusCode()); |
||||
return null; |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
public static CloseableHttpClient createSSLClientDefault() { |
||||
try { |
||||
//使用 loadTrustMaterial() 方法实现一个信任策略,信任所有证书
|
||||
// 信任所有
|
||||
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (TrustStrategy) (chain, authType) -> true).build(); |
||||
//NoopHostnameVerifier类: 作为主机名验证工具,实质上关闭了主机名验证,它接受任何
|
||||
//有效的SSL会话并匹配到目标主机。
|
||||
HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE; |
||||
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, hostnameVerifier); |
||||
return HttpClients.custom().setSSLSocketFactory(sslsf).build(); |
||||
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
return HttpClients.createDefault(); |
||||
|
||||
} |
||||
|
||||
public static Boolean doDelete(String url, Map<String, String> header) { |
||||
URIBuilder builder; |
||||
HttpDelete httpGet; |
||||
try { |
||||
builder = new URIBuilder(url); |
||||
URI uri = builder.build(); |
||||
httpGet = new HttpDelete(uri); |
||||
for (Map.Entry<String, String> entry : header.entrySet()) { |
||||
httpGet.setHeader(entry.getKey(), entry.getValue()); |
||||
} |
||||
} catch (URISyntaxException e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpclient = HttpClients.createDefault(); |
||||
CloseableHttpResponse response = httpclient.execute(httpGet)) { |
||||
// 判断返回状态是否为200
|
||||
return response.getStatusLine().getStatusCode() == 200; |
||||
} catch (Exception e) { |
||||
log.error("exception message", e); |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
public static String doGetResponseHead(String url,Map<String, String> header,String headKey) { |
||||
URIBuilder builder; |
||||
HttpGet httpGet; |
||||
try { |
||||
builder = new URIBuilder(url); |
||||
URI uri = builder.build(); |
||||
httpGet = new HttpGet(uri); |
||||
for (Map.Entry<String, String> entry : header.entrySet()) { |
||||
httpGet.setHeader(entry.getKey(), entry.getValue()); |
||||
} |
||||
} catch (URISyntaxException e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpclient = HttpClients.createDefault(); |
||||
CloseableHttpResponse response = httpclient.execute(httpGet)) { |
||||
// 判断返回状态是否为200
|
||||
if (response.getStatusLine().getStatusCode() == 200) { |
||||
return response.getFirstHeader(headKey).getValue(); |
||||
} |
||||
return null; |
||||
} catch (Exception e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
public static String doGet(String url, Map<String, String> header) { |
||||
return doGet(url, new HashMap<>(0), header); |
||||
} |
||||
|
||||
public static String doPost(String url, Map<String, String> param, Map<String, String> headers) { |
||||
HttpPost httpPost = new HttpPost(url); |
||||
RequestConfig requestConfig = RequestConfig.custom() |
||||
.setCookieSpec(CookieSpecs.STANDARD) |
||||
.setConnectionRequestTimeout(120000) |
||||
.setSocketTimeout(120000) |
||||
.setConnectTimeout(120000).build(); |
||||
httpPost.setConfig(requestConfig); |
||||
// 创建参数列表
|
||||
List<NameValuePair> paramList = new ArrayList<>(); |
||||
for (Map.Entry<String, String> entry : param.entrySet()) { |
||||
paramList.add(new BasicNameValuePair(entry.getKey(), entry.getValue())); |
||||
} |
||||
if(!paramList.isEmpty()) { |
||||
try { |
||||
httpPost.setEntity(new UrlEncodedFormEntity(paramList)); |
||||
} catch (UnsupportedEncodingException e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
} |
||||
for (Map.Entry<String, String> entry : headers.entrySet()) { |
||||
httpPost.setHeader(entry.getKey(), entry.getValue()); |
||||
} |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpClient = HttpClients.createDefault(); |
||||
CloseableHttpResponse response = httpClient.execute(httpPost)) { |
||||
return EntityUtils.toString(response.getEntity(), "utf-8"); |
||||
} catch (Exception e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
public static String doPostJson(String url, String json, Map<String, String> map) { |
||||
long time = System.currentTimeMillis(); |
||||
HttpPost httpPost = new HttpPost(url); |
||||
RequestConfig requestConfig = RequestConfig.custom() |
||||
.setCookieSpec(CookieSpecs.STANDARD) |
||||
.setConnectionRequestTimeout(120000) |
||||
.setSocketTimeout(120000) |
||||
.setConnectTimeout(120000).build(); |
||||
httpPost.setConfig(requestConfig); |
||||
for (Map.Entry<String, String> entry : map.entrySet()) { |
||||
httpPost.setHeader(entry.getKey(), entry.getValue()); |
||||
} |
||||
log.info("请求body: {}",json); |
||||
httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON)); |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpClient = HttpClients.createDefault(); |
||||
CloseableHttpResponse response = httpClient.execute(httpPost)) { |
||||
log.info("{}ms", System.currentTimeMillis() - time); |
||||
return EntityUtils.toString(response.getEntity(), "utf-8"); |
||||
} catch (Exception e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
public static String doPostJsonCmcc(String url, String json, HttpHeaders headers) { |
||||
long time = System.currentTimeMillis(); |
||||
HttpPost httpPost = new HttpPost(url); |
||||
|
||||
// httpPost.setHeader("Authorization", map.get("Authorization"));
|
||||
// httpPost.setHeader("X-Req-Time", map.get("X-Req-Time"));
|
||||
// httpPost.setHeader("X-Req-Version", map.get("X-Req-Version"));
|
||||
// httpPost.setHeader("X-Req-AppId", map.get("X-Req-AppId"));
|
||||
// httpPost.setHeader("X-Req-ClientIP", map.get("X-Req-ClientIP"));
|
||||
// httpPost.setHeader("X-Req-SignType", map.get("X-Req-SignType"));
|
||||
// httpPost.setHeader("X-Req-Seq", map.get("X-Req-Seq"));
|
||||
// httpPost.setHeader("Content-Type", "application/json");
|
||||
// httpPost.setHeader("X-Req-Hmac", map.get("X-Req-Hmac"));
|
||||
for (Header header : httpPost.getAllHeaders()) { |
||||
System.out.println(header.getName() + ": " + header.getValue()); |
||||
} |
||||
log.info(json); |
||||
httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON)); |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpClient = HttpClients.createDefault(); |
||||
CloseableHttpResponse response = httpClient.execute(httpPost)) { |
||||
|
||||
log.info("{}ms", System.currentTimeMillis() - time); |
||||
return EntityUtils.toString(response.getEntity(), "utf-8"); |
||||
} catch (Exception e) { |
||||
log.error("exception message", e); |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
public static Boolean doPostJsonEmpty(String url, String json, Map<String, String> map) { |
||||
HttpPost httpPost = new HttpPost(url); |
||||
for (Map.Entry<String, String> entry : map.entrySet()) { |
||||
httpPost.setHeader(entry.getKey(), entry.getValue()); |
||||
} |
||||
httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON)); |
||||
// 创建Httpclient对象
|
||||
try (CloseableHttpClient httpClient = HttpClients.createDefault(); |
||||
CloseableHttpResponse response = httpClient.execute(httpPost)) { |
||||
if (response.getStatusLine().getStatusCode() == 200) { |
||||
return true; |
||||
} |
||||
} catch (Exception e) { |
||||
log.error("exception message", e); |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
@ -0,0 +1,17 @@
|
||||
<?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.biutag.supervision.mapper.RpcApplyMapper"> |
||||
|
||||
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo"> |
||||
SELECT |
||||
a.*, p.bank_card, p.bank_branch |
||||
FROM |
||||
rpc_apply a |
||||
LEFT JOIN rpc_person p ON a.rpc_id = p.rpc_id |
||||
${ew.getCustomSqlSegment} |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,17 @@
|
||||
<?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.biutag.supervision.mapper.RpcApplyWorkMapper"> |
||||
|
||||
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo"> |
||||
SELECT |
||||
a.*, p.bank_card, p.bank_branch |
||||
FROM |
||||
rpc_apply_work w left join rpc_apply a on w.rpc_id = a.rpc_id |
||||
LEFT JOIN rpc_person p ON a.rpc_id = p.rpc_id |
||||
${ew.getCustomSqlSegment} |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
||||
Binary file not shown.
Loading…
Reference in new issue