From 44dad2c6f86317ca3c01ce5d044356f82e492e54 Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Fri, 27 Aug 2021 17:50:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=94=BF=E6=B3=95=E8=90=A5?= =?UTF-8?q?=E5=95=86=E7=8E=AF=E5=A2=83=E7=9B=91=E7=9D=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +- .../CaseReportWechatController.java | 16 + .../ReportTypeWechatController.java | 3 +- .../pojo/vos/casereport/CaseReportVO.java | 6 +- .../casereport/ICaseReportService.java | 9 + .../impl/CaseReportServiceImpl.java | 9 + src/main/resources/application-test.yml | 2 +- .../static/wechatroute/business-report.html | 775 ++++++++++++++++++ .../static/wechatroute/case-detail.html | 4 +- .../static/wechatroute/check-finish.html | 4 +- .../static/wechatroute/law-report.html | 4 + 11 files changed, 824 insertions(+), 12 deletions(-) create mode 100644 src/main/resources/static/wechatroute/business-report.html diff --git a/pom.xml b/pom.xml index 73ac3e8..18279b5 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 5.1.47 2.3.28 1.1.9 - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT @@ -110,7 +110,7 @@ com.cm cloud-central-control-client - 1.0.1-SNAPSHOT + ${cm-cloud.version} diff --git a/src/main/java/com/cm/supervise/controller/wechat/casereport/CaseReportWechatController.java b/src/main/java/com/cm/supervise/controller/wechat/casereport/CaseReportWechatController.java index a5fe65c..f17a768 100644 --- a/src/main/java/com/cm/supervise/controller/wechat/casereport/CaseReportWechatController.java +++ b/src/main/java/com/cm/supervise/controller/wechat/casereport/CaseReportWechatController.java @@ -9,9 +9,11 @@ import com.cm.common.plugin.oauth.service.department.IDepartmentService; import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO; import com.cm.common.plugin.service.datadictionary.IDataDictionaryService; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.ErrorResult; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultList; +import com.cm.common.utils.RegexUtil; import com.cm.manager.sms.manager.VerificationCodeManager; import com.cm.supervise.controller.BaseController; import com.cm.supervise.pojo.dtos.casereport.CaseReportDTO; @@ -55,6 +57,9 @@ public class CaseReportWechatController extends BaseController { @PostMapping("savecasereport") @CheckRequestBodyAnnotation public SuccessResult saveCaseReport(@RequestHeader("token") String token, @RequestBody CaseReportVO caseReportVO) throws Exception { + if (!StringUtils.isBlank(caseReportVO.getIdCard()) && !RegexUtil.isIdentity(caseReportVO.getIdCard())) { + throw new ParamsException("身份证格式错误"); + } caseReportService.checkSensitiveWord(caseReportVO); String verifyCode = VerificationCodeManager.getInstance().getVerificationCode(caseReportVO.getPhone()); if (StringUtils.isBlank(verifyCode)) { @@ -79,6 +84,17 @@ public class CaseReportWechatController extends BaseController { return departmentService.listZTreeDepartment(params); } + @ApiOperation(value = "部门列表", notes = "部门列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "areaId", value = "地区ID", paramType = "string") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-department/{areaId}") + public List listDepartmentByAreaId(@PathVariable("areaId") String areaId) { + return caseReportService.listDepartmentByAreaId(areaId); + } + @ApiOperation(value = "我的上报案件分页列表", notes = "我的上报案件分页列表") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header"), diff --git a/src/main/java/com/cm/supervise/controller/wechat/reporttype/ReportTypeWechatController.java b/src/main/java/com/cm/supervise/controller/wechat/reporttype/ReportTypeWechatController.java index e586ef6..9473677 100644 --- a/src/main/java/com/cm/supervise/controller/wechat/reporttype/ReportTypeWechatController.java +++ b/src/main/java/com/cm/supervise/controller/wechat/reporttype/ReportTypeWechatController.java @@ -7,7 +7,6 @@ import com.cm.supervise.pojo.dtos.reporttype.ReportTypeDTO; import com.cm.supervise.service.reporttype.IReportTypeService; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -55,6 +54,8 @@ public class ReportTypeWechatController { reportTypeId = "efb2e061-0d8a-4d89-ba4e-79d258573622"; } else if (type == 3) { reportTypeId = "df4929ca-089d-485a-af53-afa64f3aeddb"; + } else if (type == 4) { + reportTypeId = "8e1eee4c-9d10-4ca8-a8a8-4fe608215e4a"; } else { throw new ParamsException("类型错误"); } diff --git a/src/main/java/com/cm/supervise/pojo/vos/casereport/CaseReportVO.java b/src/main/java/com/cm/supervise/pojo/vos/casereport/CaseReportVO.java index 534d2f2..11192bc 100644 --- a/src/main/java/com/cm/supervise/pojo/vos/casereport/CaseReportVO.java +++ b/src/main/java/com/cm/supervise/pojo/vos/casereport/CaseReportVO.java @@ -2,7 +2,6 @@ package com.cm.supervise.pojo.vos.casereport; import com.cm.common.annotation.CheckBooleanAnnotation; import com.cm.common.annotation.CheckEmptyAnnotation; -import com.cm.common.annotation.CheckNumberAnnotation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -22,11 +21,10 @@ public class CaseReportVO { @ApiModelProperty(name = "title", value = "标题") @CheckEmptyAnnotation(name = "标题") private String title; - @ApiModelProperty(name = "name", value = "姓名") - @CheckEmptyAnnotation(name = "姓名") + @ApiModelProperty(name = "name", value = "单位或个人名称") + @CheckEmptyAnnotation(name = "单位或个人名称") private String name; @ApiModelProperty(name = "idCard", value = "身份证") - @CheckEmptyAnnotation(name = "身份证", verifyType = "identity") private String idCard; @ApiModelProperty(name = "phone", value = "手机号") @CheckEmptyAnnotation(name = "手机号", verifyType = "phone") diff --git a/src/main/java/com/cm/supervise/service/casereport/ICaseReportService.java b/src/main/java/com/cm/supervise/service/casereport/ICaseReportService.java index 501a998..2ff4b04 100644 --- a/src/main/java/com/cm/supervise/service/casereport/ICaseReportService.java +++ b/src/main/java/com/cm/supervise/service/casereport/ICaseReportService.java @@ -4,6 +4,7 @@ import com.cm.common.exception.RemoveException; import com.cm.common.exception.SearchException; import com.cm.common.exception.UpdateException; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; @@ -209,4 +210,12 @@ public interface ICaseReportService { * @throws SearchException */ Integer countCaseReportReturnInteger(Map params) throws SearchException; + + /** + * 部门列表 + * + * @param areaId 地区ID + * @return + */ + List listDepartmentByAreaId(String areaId); } diff --git a/src/main/java/com/cm/supervise/service/casereport/impl/CaseReportServiceImpl.java b/src/main/java/com/cm/supervise/service/casereport/impl/CaseReportServiceImpl.java index 97bbb06..83b8d6e 100644 --- a/src/main/java/com/cm/supervise/service/casereport/impl/CaseReportServiceImpl.java +++ b/src/main/java/com/cm/supervise/service/casereport/impl/CaseReportServiceImpl.java @@ -4,7 +4,9 @@ import com.cm.common.constants.ISystemConstant; import com.cm.common.exception.ParamsException; import com.cm.common.exception.RemoveException; import com.cm.common.exception.SearchException; +import com.cm.common.plugin.oauth.service.department.IDepartmentService; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; @@ -69,6 +71,8 @@ public class CaseReportServiceImpl extends BaseService implements ICaseReportSer private ISmsTemplateService smsTemplateService; @Autowired private IUserAdminConfigService userAdminConfigService; + @Autowired + private IDepartmentService departmentService; @Override public SuccessResult saveCaseReport(CaseReportVO caseReportVO) throws Exception { @@ -347,6 +351,11 @@ public class CaseReportServiceImpl extends BaseService implements ICaseReportSer return count == null ? 0 : count; } + @Override + public List listDepartmentByAreaId(String areaId) { + return departmentService.listSortByParentId(areaId); + } + /** * 设置脱敏信息 * diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 927ab0b..cd02b26 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -146,7 +146,7 @@ open-platform: state: wechatRedirectUrl grant-type: authorization_code access-token-url: https://api.weixin.qq.com/cgi-bin/token - bind-user-url: http://192.168.0.113:7001/usercenter/wechat/sign/login + bind-user-url: http://192.168.0.103:7001/usercenter/wechat/sign/login app-id: wx583634d14c596fd7 app-secret: 1158dcddd267c6f42b99bda62f842893 grant-type: client_credential diff --git a/src/main/resources/static/wechatroute/business-report.html b/src/main/resources/static/wechatroute/business-report.html new file mode 100644 index 0000000..68afff1 --- /dev/null +++ b/src/main/resources/static/wechatroute/business-report.html @@ -0,0 +1,775 @@ + + + + + + 法制营商环境监督 + + + + + + +
+
+ + 法制营商环境监督 + 办结查询 +
+
+
+
+
*标题
+ +
+
+ + + + + + + + + + + + + +
+
*单位或个人名称
+ +
+
+
+
*电话
+
+ +
获取验证码
+
{{verifyCodeTime}}秒后失效
+
+
+ +
+
+
+
*区域
+
+ + + +
+ +
+
+
+
*单位
+
+ +
+
+
+
+
*内容
+
+
+ + +
+
+ +
+
+
+
+
+
图片附件
+

附件最多上传9张照片

+
+
    +
  • + + + +
  • +
+ +
+ +
+
+
+
视频附件
+

附件最多上传1个视频,时长不超过{{mediaDuration.videoDuration}}秒

+
+ + + +
+ + 删除 +
+
+
+
+
+
音频附件
+

附件最多上传1个音频,时长不超过{{mediaDuration.voiceDuration}}s

+
+ + + +
+ + 删除 +
+
+
+
+
+
文件附件
+

附件最多上传9个文件附件

+
+
    +
  • +

    {{file.fileName}}

    + 删除 +
  • +
+ + +
+
+
+
+ +
+
+
+

下一步

+
+
+
+ + +
+

提交

+
+
+

取消

+
+
+ +
+
+
+
+
+ ({{mustKnowTime}}) + 已读须知 +
+
+
+ + + + + + + + diff --git a/src/main/resources/static/wechatroute/case-detail.html b/src/main/resources/static/wechatroute/case-detail.html index dcf9fd7..91aab68 100644 --- a/src/main/resources/static/wechatroute/case-detail.html +++ b/src/main/resources/static/wechatroute/case-detail.html @@ -70,8 +70,7 @@
内容
-

{{detailBean.content}}

- +

@@ -168,6 +167,7 @@ token: self.token } }, function (code, data) { + data.content = data.content.replace(/[\r\n]/g, '
'); self.detailBean = data; self.getImgs(self.detailBean.photos); self.getVideo(self.detailBean.video); diff --git a/src/main/resources/static/wechatroute/check-finish.html b/src/main/resources/static/wechatroute/check-finish.html index 8c80c82..6b628db 100644 --- a/src/main/resources/static/wechatroute/check-finish.html +++ b/src/main/resources/static/wechatroute/check-finish.html @@ -98,8 +98,8 @@ typeStr = '干警监督' } else if (type == 3) { typeStr = '信访受理' - } else { - typeStr = '舆情反馈' + } else if (type == 4) { + typeStr = '法制营商环境监督' } return typeStr }, diff --git a/src/main/resources/static/wechatroute/law-report.html b/src/main/resources/static/wechatroute/law-report.html index 2634748..2a7cb1f 100644 --- a/src/main/resources/static/wechatroute/law-report.html +++ b/src/main/resources/static/wechatroute/law-report.html @@ -25,6 +25,8 @@ 干警监督 执法、司法监督
(涉法涉诉讼信访案件受理)
+ 法制营商环境监督
@@ -285,6 +287,8 @@ this.type = type; if (type == 2) { this.parentId = '9d6b07dd-fdf1-4282-95f2-ebadb8feba67' + } else if (type == 4) { + window.location.href = 'business-report.html'; } else { this.parentId = '0ae62de6-2ae2-4e2e-8733-848f75961704' }