From f2da6eb2a11411e738d4414d75252336a84cb0e1 Mon Sep 17 00:00:00 2001 From: mythxb Date: Sun, 4 Jun 2023 16:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/rzyc/bean/check/StreetCheckMsg.java | 6 +- .../java/com/rzyc/mapper/DutyTreeMapper.java | 4 + .../com/rzyc/model/check/BookEntCheck.java | 9 +- .../java/com/rzyc/model/check/BookEntHT.java | 6 +- .../rzyc/model/check/BookenthtCompany.java | 4 +- .../com/rzyc/model/ent/SysEnterprise.java | 7 +- .../main/resources/mapper/DutyTreeMapper.xml | 5 + .../main/resources/mapper/SysOrgMapper.xml | 6 +- .../mapper/check/BookEntCheckMapper.xml | 18 +- .../mapper/ent/BaseInClassMapper.xml | 2 +- .../mapper/ent/SysEnterpriseMapper.xml | 8 +- .../com/rzyc/controller/BaseController.java | 27 +- .../rzyc/controller/MinWorkController.java | 5 + .../rzyc/controller/PcCompanyController.java | 1 + .../com/rzyc/controller/BaseController.java | 2 +- .../rzyc/controller/DynamicController.java | 5 +- .../com/rzyc/controller/ExportContorller.java | 6 +- .../com/rzyc/controller/ImportController.java | 590 +++++++++++++++++- .../rzyc/controller/MinWorkController.java | 6 + .../rzyc/controller/PcPersonalController.java | 2 +- .../controller/ent/PcCompanyController.java | 110 +++- .../com/rzyc/service/SaveEntListThread.java | 5 +- .../service/SaveEntPostAndUserThread.java | 12 +- .../rzyc/service/SaveIndustryPostThread.java | 6 +- .../src/main/resources/application-yun.yml | 8 +- .../java/com/common/utils/SMS/SendSMS.java | 69 ++ .../com/common/utils/httpClient/WebUtils.java | 55 +- 27 files changed, 921 insertions(+), 63 deletions(-) diff --git a/inventory-dao/src/main/java/com/rzyc/bean/check/StreetCheckMsg.java b/inventory-dao/src/main/java/com/rzyc/bean/check/StreetCheckMsg.java index f0fa88b..aa8eee8 100644 --- a/inventory-dao/src/main/java/com/rzyc/bean/check/StreetCheckMsg.java +++ b/inventory-dao/src/main/java/com/rzyc/bean/check/StreetCheckMsg.java @@ -9,13 +9,13 @@ public class StreetCheckMsg { @ExcelColumn(value = "街道名", col = 1) - @ApiModelProperty("街道名") + @ApiModelProperty("地区名") private String orgName; - @ApiModelProperty("镇街用户数") + @ApiModelProperty("用户数") private Integer streetNum; - @ApiModelProperty("社区用户数") + @ApiModelProperty("用户数") private Integer communityNum; @ExcelColumn(value = "企业总数", col = 2) diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/DutyTreeMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/DutyTreeMapper.java index bbda5d4..1ceee63 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/DutyTreeMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/DutyTreeMapper.java @@ -30,6 +30,10 @@ public interface DutyTreeMapper { Integer delByUserId(@Param("userId") String userId, @Param("targetType") Integer targetType); + /*删除用户责任书*/ + Integer delByTargetId(@Param("userId") String userId, + @Param("targetId") String targetId); + /*责任树*/ DutyTree findTree(@Param("targetType") Integer targetType, @Param("userId") String userId, diff --git a/inventory-dao/src/main/java/com/rzyc/model/check/BookEntCheck.java b/inventory-dao/src/main/java/com/rzyc/model/check/BookEntCheck.java index fb7fb09..da9c91e 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/check/BookEntCheck.java +++ b/inventory-dao/src/main/java/com/rzyc/model/check/BookEntCheck.java @@ -24,9 +24,9 @@ public class BookEntCheck implements Serializable { private String chkbillid; private String checksite; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date begcheckdate; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date endcheckdate; private String checkuniy; @@ -79,11 +79,12 @@ public class BookEntCheck implements Serializable { private Integer bookcheckscores; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createdon; private String createdby; - @JsonFormat(pattern = "yyyy-MM-dd") + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date modifiedon; private String modifiedby; diff --git a/inventory-dao/src/main/java/com/rzyc/model/check/BookEntHT.java b/inventory-dao/src/main/java/com/rzyc/model/check/BookEntHT.java index d40cd78..c51762c 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/check/BookEntHT.java +++ b/inventory-dao/src/main/java/com/rzyc/model/check/BookEntHT.java @@ -53,7 +53,7 @@ public class BookEntHT implements Serializable { @ApiModelProperty("隐患名称") private String hiddenarea; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @ApiModelProperty("登记时间") @ExcelColumn(value = "登记时间",col = 4) private Date confirmtime; @@ -118,11 +118,11 @@ public class BookEntHT implements Serializable { private String apprectifyimgbefore; private String apprectifyimgafter; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createdon; private String createdby; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date modifiedon; private String modifiedby; diff --git a/inventory-dao/src/main/java/com/rzyc/model/check/BookenthtCompany.java b/inventory-dao/src/main/java/com/rzyc/model/check/BookenthtCompany.java index 629586d..47bcece 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/check/BookenthtCompany.java +++ b/inventory-dao/src/main/java/com/rzyc/model/check/BookenthtCompany.java @@ -16,7 +16,7 @@ public class BookenthtCompany implements Serializable { private String bookentcheckid; - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date becheckedtime; private String becheckedperson; @@ -84,10 +84,12 @@ public class BookenthtCompany implements Serializable { private String bookentcheckdetailid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createdon; private String createdby; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date modifiedon; private String modifiedby; diff --git a/inventory-dao/src/main/java/com/rzyc/model/ent/SysEnterprise.java b/inventory-dao/src/main/java/com/rzyc/model/ent/SysEnterprise.java index 5301956..5d60638 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/ent/SysEnterprise.java +++ b/inventory-dao/src/main/java/com/rzyc/model/ent/SysEnterprise.java @@ -201,8 +201,7 @@ public class SysEnterprise implements Serializable { @TableField("EstablishDate") @ApiModelProperty("成立时间") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - private Date establishdate; + private String establishdate; @TableField("RiskLevel") @@ -901,11 +900,11 @@ public class SysEnterprise implements Serializable { this.lrlinktel = lrlinktel; } - public Date getEstablishdate() { + public String getEstablishdate() { return establishdate; } - public void setEstablishdate(Date establishdate) { + public void setEstablishdate(String establishdate) { this.establishdate = establishdate; } diff --git a/inventory-dao/src/main/resources/mapper/DutyTreeMapper.xml b/inventory-dao/src/main/resources/mapper/DutyTreeMapper.xml index f1b54da..a567129 100644 --- a/inventory-dao/src/main/resources/mapper/DutyTreeMapper.xml +++ b/inventory-dao/src/main/resources/mapper/DutyTreeMapper.xml @@ -237,6 +237,11 @@ delete from duty_tree where user_id = #{userId} and target_type = #{targetType} + + + delete from duty_tree where user_id = #{userId} and target_id = #{targetId} + + SELECT so.*, ( - select count(*) from SysEnterprise se where se.State = '启用' and (se.OrgCode = so.OrgCode or se.street_code = so.OrgCode or se.community_code = so.OrgCode) + select count(*) from SysEnterprise se + where se.State = '启用' + and FIND_IN_SET(so.OrgCode,se.area_path) )totalEnt, ( select count(distinct bc.BaseEntId) from BookEntCheck bc left join SysEnterprise se on se.SysEnterpriseId = bc.BaseEntId - where se.State = '启用' and (se.OrgCode = so.OrgCode or se.street_code = so.OrgCode or se.community_code = so.OrgCode) + where se.State = '启用' and FIND_IN_SET(so.OrgCode,se.area_path) and bc.CreatedOn >= #{startTime} diff --git a/inventory-dao/src/main/resources/mapper/check/BookEntCheckMapper.xml b/inventory-dao/src/main/resources/mapper/check/BookEntCheckMapper.xml index ad34e84..f21cf4e 100644 --- a/inventory-dao/src/main/resources/mapper/check/BookEntCheckMapper.xml +++ b/inventory-dao/src/main/resources/mapper/check/BookEntCheckMapper.xml @@ -811,7 +811,7 @@ ( select count(*) from SysEnterprise se - where se.street_code = so.OrgCode + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and se.InherentRisk in @@ -824,7 +824,7 @@ select count(bc.BookEntCheckId) from BookEntCheck bc left join SysEnterprise se on bc.BaseEntId = se.SysEnterpriseId - where se.street_code = so.OrgCode and se.State = '启用' + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and se.InherentRisk in @@ -842,7 +842,7 @@ select count(distinct bc.BaseEntId) from BookEntCheck bc left join SysEnterprise se on bc.BaseEntId = se.SysEnterpriseId - where se.street_code = so.OrgCode and se.State = '启用' + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and se.InherentRisk in @@ -859,7 +859,7 @@ ( select count(be.BookEntHTId) from BookEntHT be left join SysEnterprise se on be.SysEnterpriseId = se.SysEnterpriseId - where se.street_code = so.OrgCode and se.State = '启用' + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and se.InherentRisk in @@ -876,7 +876,7 @@ ( select count(be.BookEntHTId) from BookEntHT be left join SysEnterprise se on be.SysEnterpriseId = se.SysEnterpriseId - where se.street_code = so.OrgCode and se.State = '启用' + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and be.HTState = '未整改' and se.InherentRisk in @@ -894,7 +894,7 @@ ( select count(be.BookEntHTId) from BookEntHT be left join SysEnterprise se on be.SysEnterpriseId = se.SysEnterpriseId - where se.street_code = so.OrgCode and se.State = '启用' + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and be.HTState = '已整改' and se.InherentRisk in @@ -912,7 +912,7 @@ ( select count(be.BookEntHTId) from BookEntHT be left join SysEnterprise se on be.SysEnterpriseId = se.SysEnterpriseId - where se.street_code = so.OrgCode and se.State = '启用' + where FIND_IN_SET(so.OrgCode,se.area_path) and se.State = '启用' and be.HTState = '整改中' and se.InherentRisk in @@ -1359,9 +1359,7 @@ and bc.CreatedOn <= #{endTime} - and (se.OrgCode = #{areaCode} - or se.street_code = #{areaCode} - or se.community_code = #{areaCode}) + AND FIND_IN_SET(#{areaCode},se.area_path) - SELECT * FROM `BaseInClass` bc WHERE bc.`IndustryClassName` = #{industryClassName} AND bc.`in_type` = 2 + SELECT * FROM `BaseInClass` bc WHERE bc.`IndustryClassName` = #{industryClassName} diff --git a/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml b/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml index ccf770f..35cc313 100644 --- a/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml +++ b/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml @@ -627,7 +627,6 @@ safeTelephone = #{safeTelephone,jdbcType=VARCHAR}, safeManager = #{safeManager,jdbcType=VARCHAR}, PostCode = #{postcode,jdbcType=VARCHAR}, - qr_code = #{qrCode,jdbcType=VARCHAR}, EcoType = #{ecotype,jdbcType=VARCHAR}, PersonCount = #{personcount,jdbcType=INTEGER}, EntLogoPic = #{entlogopic,jdbcType=VARCHAR}, @@ -1265,7 +1264,7 @@ ON cp.`BookEntCheckId` = bc.`BookEntCheckId` WHERE cp.`SysUserId` = #{userId} AND bc.`BaseEntId` = dt.target_id - AND DATE_FORMAT(cp.CreatedOn,'%Y-%m')=DATE_FORMAT(NOW(),'%Y-%m') + AND DATE_FORMAT(cp.CreatedOn,'%Y')=DATE_FORMAT(NOW(),'%Y') )checkNum FROM duty_tree dt @@ -2614,7 +2613,10 @@