浏览代码

Merge remote-tracking branch 'origin/master' into master

yangll 3 年之前
父节点
当前提交
ea06579fa6

+ 2 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/controller/SmsCheckCustomerDataController.java

@@ -77,6 +77,7 @@ public class SmsCheckCustomerDataController extends JeecgController<SmsCheckCust
         if (StringUtils.isEmpty(smsCheckCustomerData.getInfoId())){
             return Result.error("用户编码不能为空");
         }
+
         LambdaQueryWrapper<SmsCheckCustomerData> queryWrapperData = new LambdaQueryWrapper<>();
         queryWrapperData.eq(SmsCheckCustomerData::getInfoId,smsCheckCustomerData.getInfoId());
         Page<SmsCheckCustomerData> page = new Page<>(1, 100);
@@ -234,6 +235,7 @@ public class SmsCheckCustomerDataController extends JeecgController<SmsCheckCust
         String orgName = file.getOriginalFilename();
         orgName = CommonUtils.getFileName(orgName);
         String file_url = MinioUtil.upload(file, bizPath);
+
         if (oConvertUtils.isEmpty(file_url)) {
             return Result.error("上传失败,请检查配置信息是否正确!");
         }

+ 361 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/controller/SpecialExaminationContrller.java

@@ -0,0 +1,361 @@
+package org.jeecg.modules.smscheck.controller;
+
+
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.MinioUtil;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.config.shiro.ShiroRealm;
+import org.jeecg.modules.smscheck.entity.SmsCheckCustomerData;
+import org.jeecg.modules.smscheck.entity.SmsCheckWorkLog;
+import org.jeecg.modules.smscheck.entity.SpecialExamination;
+import org.jeecg.modules.smscheck.service.ISmsCheckTaskService;
+import org.jeecg.modules.smscheck.service.SpecialExaminationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+@Api(tags = "特审复开审批")
+@RestController
+@RequestMapping("/special/examination")
+@Slf4j
+public class SpecialExaminationContrller {
+
+    @Resource
+    private SpecialExaminationService specialExaminationService;
+
+    @Autowired
+    private ShiroRealm shiroRealm;
+
+
+    @ApiOperation(value = "客户资料-信息查询查询", notes = "客户资料-个人列表查询")
+    @PostMapping(value = "/find/user/id")
+    public  Result<?> findUserId(@RequestBody SpecialExamination specialExamination) {
+        String id = specialExamination.getId();
+        if(StrUtil.isBlank(id)){
+            return Result.error("查询失败");
+        }
+        LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
+        SpecialExamination byId = specialExaminationService.getById(id);
+        String staffNo = byId.getStaffNo();
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String workNo = sysUser.getWorkNo();
+        if (StrUtil.isNotBlank(staffNo) && workNo.equals(staffNo)){
+            SpecialExamination byId1 = specialExaminationService.getById(byId.getId());
+            return Result.ok(byId1);
+        }else {
+            return Result.error("查询失败");
+        }
+    }
+
+    @PostMapping(value = "/find/id")
+    public  Result<?> findId(@RequestBody SpecialExamination specialExamination) {
+        String id = specialExamination.getId();
+        if(StrUtil.isBlank(id)){
+            return Result.error("查询失败");
+        }
+        LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
+        SpecialExamination byId = specialExaminationService.getById(id);
+        return Result.ok(byId);
+    }
+
+
+
+
+    @ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
+    @PostMapping(value = "/remove/user/id")
+    public  Result<?> removeId(@RequestBody SpecialExamination specialExamination) {
+        String id = specialExamination.getId();
+        if(StrUtil.isBlank(id)){
+            return Result.error("删除失败");
+        }
+        LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
+        SpecialExamination byId = specialExaminationService.getById(id);
+        String staffNo = byId.getStaffNo();
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String workNo = sysUser.getWorkNo();
+        if (StrUtil.isNotBlank(staffNo) && workNo.equals(staffNo)){
+            specialExaminationService.removeById(byId.getId());
+            return Result.ok("删除成功");
+        }else {
+            return Result.error("删除失败");
+        }
+    }
+
+
+    @ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
+    @PostMapping(value = "/remove")
+    public  Result<?> remove(@RequestBody SpecialExamination specialExamination) {
+        String id = specialExamination.getId();
+        if(StrUtil.isBlank(id)){
+            return Result.error("删除失败");
+        }
+        specialExaminationService.removeById(id);
+        return Result.ok("删除成功");
+    }
+
+    @ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
+    @GetMapping(value = "/list/page")
+    public Result<IPage<SpecialExamination>> queryList(SpecialExamination specialExamination,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize
+    ) {
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
+        queryWrapperData.eq(specialExamination.getStatus() != null,SpecialExamination::getStatus, specialExamination.getStatus());
+        queryWrapperData.like(StrUtil.isNotBlank(specialExamination.getCustomerName()),SpecialExamination::getCustomerName, specialExamination.getCustomerName());
+        queryWrapperData.eq(SpecialExamination::getStaffNo,sysUser.getWorkNo());
+        queryWrapperData.orderByDesc(SpecialExamination::getCreateTime);
+        Page<SpecialExamination> page = new Page<>(pageNo, pageSize);
+        IPage<SpecialExamination> pageList = specialExaminationService.page(page, queryWrapperData);
+        return Result.OK(pageList);
+    }
+
+
+    @ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
+    @GetMapping(value = "/all/list/page")
+    public Result<IPage<SpecialExamination>> adminList(SpecialExamination specialExamination,
+                                                       @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                       @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize
+    ) {
+        LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
+        queryWrapperData.eq(specialExamination.getStatus() != null,SpecialExamination::getStatus, specialExamination.getStatus());
+        queryWrapperData.like(StrUtil.isNotBlank(specialExamination.getCustomerName()),SpecialExamination::getCustomerName, specialExamination.getCustomerName());
+        queryWrapperData.orderByDesc(SpecialExamination::getCreateTime);
+        Page<SpecialExamination> page = new Page<>(pageNo, pageSize);
+        IPage<SpecialExamination> pageList = specialExaminationService.page(page, queryWrapperData);
+        return Result.OK(pageList);
+    }
+
+
+    @AutoLog(value = "特审复开审批号-添加")
+    @ApiOperation(value = "特审复开审批号-添加", notes = "特审复开审批号-添加")
+    @PostMapping(value = "/upload/files")
+    public Result<?> uploadFiles(HttpServletRequest request) {
+
+        Result<?> result = new Result<>();
+        String bizPath = request.getParameter("biz");
+        //LOWCOD-2580 sys/common/upload接口存在任意文件上传漏洞
+        if (oConvertUtils.isNotEmpty(bizPath) && (bizPath.contains("../") || bizPath.contains("..\\"))) {
+            throw new JeecgBootException("上传目录bizPath,格式非法!");
+        }
+        if (oConvertUtils.isEmpty(bizPath)) {
+            bizPath = "";
+        }
+
+        //关停标签
+        String shutdownLabel = request.getParameter("shutdownLabel");
+        //材料标签
+        String materialLabel = request.getParameter("materialLabel");
+        //用户标签
+        String userLable = request.getParameter("userLable");
+        //客户名称/使用人名称
+        String customerName = request.getParameter("customerName");
+        //复开号码
+        String openingNumber = request.getParameter("openingNumber");
+
+        if (StrUtil.isBlank(shutdownLabel) && StrUtil.isBlank(materialLabel)
+                || StrUtil.isBlank(userLable) || StrUtil.isBlank(customerName)
+                || StrUtil.isBlank(openingNumber)) {
+            return Result.error("参数不全");
+        }
+
+        Integer shutdownLabelInt = Integer.valueOf(shutdownLabel);
+        Integer materialLabelInt = Integer.valueOf(materialLabel);
+        Integer userLableInt = Integer.valueOf(userLable);
+
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+
+        //单位名称
+        String unitName = request.getParameter("unitName");
+        //关停时间
+        String shutdownTime = request.getParameter("shutdownTime");
+        //申请复开原因
+        String reasonReopening = request.getParameter("reasonReopening");
+
+        String filePathIdCard = null;
+        List<MultipartFile> fileListIdCard = multipartRequest.getFiles("fileListIdCard");
+        for (MultipartFile file : fileListIdCard) {
+            String file_url = MinioUtil.upload(file, bizPath);
+            if (oConvertUtils.isEmpty(file_url)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+            if (filePathIdCard == null) {
+                filePathIdCard = file_url;
+            } else {
+                filePathIdCard = filePathIdCard + "," + file_url;
+            }
+        }
+
+        String filePathUserCertificate = null;
+        List<MultipartFile> fileListUserCertificate = multipartRequest.getFiles("fileListUserCertificate");
+        for (MultipartFile file : fileListUserCertificate) {
+            String file_url = MinioUtil.upload(file, bizPath);
+            if (oConvertUtils.isEmpty(file_url)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+            if (filePathUserCertificate == null) {
+                filePathUserCertificate = file_url;
+            } else {
+                filePathUserCertificate = filePathUserCertificate + "," + file_url;
+            }
+        }
+
+
+        MultipartFile fileListHandCertificate = multipartRequest.getFile("fileListHandCertificate");
+        String filePathHandCertificate = null;
+        if (fileListHandCertificate != null) {
+            filePathHandCertificate = MinioUtil.upload(fileListHandCertificate, bizPath);
+            if (oConvertUtils.isEmpty(filePathHandCertificate)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        MultipartFile fileListNumberCard = multipartRequest.getFile("fileListNumberCard");
+        String filePathNumberCard = null;
+        if (fileListNumberCard != null) {
+            filePathNumberCard = MinioUtil.upload(fileListNumberCard, bizPath);
+            if (oConvertUtils.isEmpty(filePathNumberCard)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        MultipartFile fileListLetter = multipartRequest.getFile("fileListLetter");
+        String filePathLetter = null;
+        if (fileListLetter != null) {
+            filePathLetter = MinioUtil.upload(fileListLetter, bizPath);
+            if (oConvertUtils.isEmpty(filePathLetter)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        MultipartFile fileListBusiness = multipartRequest.getFile("fileListBusiness");
+        String filePathBusiness = null;
+        if (fileListBusiness != null) {
+            filePathBusiness = MinioUtil.upload(fileListBusiness, bizPath);
+            if (oConvertUtils.isEmpty(filePathBusiness)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        MultipartFile fileListIntroduction = multipartRequest.getFile("fileListIntroduction");
+        String filePathIntroduction = null;
+        if (fileListIntroduction != null) {
+            filePathIntroduction = MinioUtil.upload(fileListIntroduction, bizPath);
+            if (oConvertUtils.isEmpty(filePathIntroduction)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        MultipartFile fileListVoucher = multipartRequest.getFile("fileListVoucher");
+        String filePathVoucher = null;
+        if (fileListVoucher != null) {
+            filePathVoucher = MinioUtil.upload(fileListVoucher, bizPath);
+            if (oConvertUtils.isEmpty(filePathVoucher)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        MultipartFile fileListVideo = multipartRequest.getFile("fileListVideo");
+        String filePathVideo = null;
+        if (fileListVideo != null) {
+            filePathVideo = MinioUtil.upload(fileListVideo, bizPath);
+            if (oConvertUtils.isEmpty(filePathVideo)) {
+                return Result.error("上传失败,请检查配置信息是否正确!");
+            }
+        }
+
+        SpecialExamination specialExamination = new SpecialExamination();
+        specialExamination.setShutdownLabel(shutdownLabelInt);
+        specialExamination.setMaterialLabel(materialLabelInt);
+        specialExamination.setUserLable(userLableInt);
+        specialExamination.setOpeningNumber(openingNumber);
+        specialExamination.setCustomerName(customerName);
+        specialExamination.setUnitName(unitName);
+        specialExamination.setShutdownTime(shutdownTime);
+        specialExamination.setReasonReopening(reasonReopening);
+        specialExamination.setIdCard(filePathIdCard);
+        specialExamination.setHandCertificate(filePathHandCertificate);
+        specialExamination.setNumberCard(filePathNumberCard);
+        specialExamination.setLetterCommitment(filePathLetter);
+        specialExamination.setBusinessLicense(filePathBusiness);
+        specialExamination.setLetterIntroduction(filePathIntroduction);
+        specialExamination.setUserCertificate(filePathUserCertificate);
+        specialExamination.setConsumptionVoucher(filePathVoucher);
+        specialExamination.setCommitmentVideo(filePathVideo);
+
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        specialExamination.setCreateUser(sysUser.getUsername());
+        specialExamination.setStaffNo(sysUser.getWorkNo());
+
+        specialExamination.setStatus(0);
+        boolean save = specialExaminationService.save(specialExamination);
+
+        if (!save) {
+            Result.error("申请失败");
+        }
+        return Result.OK("已成功提交申请");
+    }
+
+
+    @AutoLog(value = "特审复开审批号-添加")
+    @ApiOperation(value = "特审复开审批号-添加", notes = "特审复开审批号-添加")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody SpecialExamination specialExamination) {
+        //关停标签
+        Integer shutdownLabel = specialExamination.getShutdownLabel();
+        //材料标签
+        Integer materialLabel = specialExamination.getMaterialLabel();
+        //用户标签
+        Integer userLable = specialExamination.getUserLable();
+
+
+        if (shutdownLabel == null || materialLabel == null || userLable == null) {
+            return Result.error("参数不全");
+        }
+        specialExaminationService.save(specialExamination);
+        return Result.OK("添加成功!");
+    }
+
+
+    @PostMapping(value = "/status/adopt")
+    public  Result<?> adopt(@RequestBody SpecialExamination specialExamination) {
+        String id = specialExamination.getId();
+        if(StrUtil.isBlank(id)){
+            return Result.error("修改失败");
+        }
+        specialExamination.setStatus(1);
+        specialExaminationService.updateById(specialExamination);
+        return Result.ok("审核通过");
+    }
+
+    @PostMapping(value = "/status/refuse")
+    public  Result<?> refuse(@RequestBody SpecialExamination specialExamination) {
+        String id = specialExamination.getId();
+        if(StrUtil.isBlank(id)){
+            return Result.error("修改失败");
+        }
+        specialExamination.setStatus(2);
+        specialExaminationService.updateById(specialExamination);
+        return Result.ok("驳回成功");
+    }
+
+
+}

+ 104 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/entity/SpecialExamination.java

@@ -0,0 +1,104 @@
+package org.jeecg.modules.smscheck.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.models.auth.In;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+@TableName("special_examination")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="special_examination对象", description="特审复开审批")
+public class SpecialExamination {
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+
+    @ApiModelProperty(value = "创建用户")
+    private String createUser;
+
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+
+    /** 更新日期 */
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "员工编号")
+    private String staffNo;
+
+    @ApiModelProperty(value = "关停标签")
+    private Integer shutdownLabel;
+
+    @ApiModelProperty(value = "材料标签")
+    private Integer materialLabel;
+
+    @ApiModelProperty(value = "用户标签")
+    private Integer userLable;
+
+    @ApiModelProperty(value = "身份证照片/经办人证件")
+    private String idCard;
+
+    @ApiModelProperty(value = "手持身份证//经办人手持身份证")
+    private String handCertificate;
+
+    @ApiModelProperty(value = "号卡")
+    private String numberCard;
+
+    @ApiModelProperty(value = "防诈骗承诺涵")
+    private String letterCommitment;
+
+    @ApiModelProperty(value = "营业执照副本")
+    private String businessLicense;
+
+    @ApiModelProperty(value = "介绍信")
+    private String letterIntroduction;
+
+    @ApiModelProperty(value = "使用人证件照")
+    private String userCertificate;
+
+    @ApiModelProperty(value = "防诈骗承诺涵")
+    private String fraudPrevention;
+
+    @ApiModelProperty(value = "消费凭证")
+    private String consumptionVoucher;
+
+    @ApiModelProperty(value = "承诺视频")
+    private String commitmentVideo;
+
+    @ApiModelProperty(value = "复开号码")
+    private String openingNumber;
+
+    @ApiModelProperty(value = "客户名称/使用人名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "单位名称")
+    private String unitName;
+
+    @ApiModelProperty(value = "关停时间")
+    private String shutdownTime;
+
+    @ApiModelProperty(value = "申请复开原因")
+    private String reasonReopening;
+
+    @ApiModelProperty(value = "审核状态")
+    private Integer status;
+
+
+
+
+}

+ 8 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/mapper/SpecialExaminationMapper.java

@@ -0,0 +1,8 @@
+package org.jeecg.modules.smscheck.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.smscheck.entity.SmsCheckWorkLog;
+import org.jeecg.modules.smscheck.entity.SpecialExamination;
+
+public interface SpecialExaminationMapper extends BaseMapper<SpecialExamination> {
+}

+ 12 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/service/SpecialExaminationService.java

@@ -0,0 +1,12 @@
+package org.jeecg.modules.smscheck.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.smscheck.entity.SmsCheckWorkLog;
+import org.jeecg.modules.smscheck.entity.SpecialExamination;
+
+import java.util.List;
+import java.util.Map;
+
+public interface SpecialExaminationService extends IService<SpecialExamination> {
+
+}

+ 12 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/service/impl/SpecialExaminationServiceImpl.java

@@ -0,0 +1,12 @@
+package org.jeecg.modules.smscheck.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.smscheck.entity.SpecialExamination;
+import org.jeecg.modules.smscheck.mapper.SpecialExaminationMapper;
+import org.jeecg.modules.smscheck.service.SpecialExaminationService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SpecialExaminationServiceImpl extends ServiceImpl<SpecialExaminationMapper, SpecialExamination> implements SpecialExaminationService {
+
+}