Forráskód Böngészése

Merge branch 'V0.0.6' of http://10.87.21.221:8000/jzyd_yyds/soc into V0.0.6

 Conflicts:
	project_data/sql/0.0.6/soc/soc.sql
zhulu 1 éve
szülő
commit
1bd18956ba

+ 0 - 0
project_data/sql/0.0.6/quartz/quartz.sql


+ 5 - 5
project_data/sql/0.0.6/soc/soc.sql

@@ -1,10 +1,10 @@
 DELIMITER ??
-DROP PROCEDURE IF EXISTS schema_change ?? 
+DROP PROCEDURE IF EXISTS schema_change ??
 CREATE PROCEDURE schema_change () BEGIN
-    IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () 
-		AND TABLE_NAME = 'sys_org' AND COLUMN_NAME = 'affiliated_area' ) 
+    IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE ()
+		AND TABLE_NAME = 'sys_org' AND COLUMN_NAME = 'affiliated_area' )
 	THEN
-    ALTER TABLE `sys_org` 
+    ALTER TABLE `sys_org`
 	ADD COLUMN `affiliated_area` varchar(100) NULL COMMENT '机构所属地区' AFTER `tree_parent_code`,
 	ADD COLUMN `affiliated_bank` varchar(100) NULL COMMENT '机构所属行社' AFTER `affiliated_area`;
 
@@ -13,7 +13,7 @@ CREATE PROCEDURE schema_change () BEGIN
 	 IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () 
 		AND TABLE_NAME = 'sync_fjnx_org' AND COLUMN_NAME = 'affiliated_area' )
 	THEN
-		ALTER TABLE `sync_fjnx_org` 
+		ALTER TABLE `sync_fjnx_org`
 		ADD COLUMN `affiliated_area` varchar(100) NULL COMMENT '机构所属地区',
 		ADD COLUMN `affiliated_bank` varchar(100) NULL COMMENT '机构所属行社' AFTER `affiliated_area`;
 

+ 90 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/video/MediatorVideoDaysCheck.java

@@ -0,0 +1,90 @@
+package com.xunmei.common.core.domain.video;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.time.LocalDateTime;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+
+import java.io.Serializable;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 录像机天数检查
+ * </p>
+ *
+ * @author oygj
+ * @since 2024-01-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("mediator_video_days_check")
+@ApiModel(value = "VideoDaysCheck对象", description = "录像机天数检查")
+public class MediatorVideoDaysCheck extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("id")
+    private Long id;
+
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_id")
+    private Long orgId;
+
+    @ApiModelProperty(value = "机构名称")
+    @TableField("org_name")
+    private String orgName;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_path")
+    private String orgPath;
+
+    @ApiModelProperty(value = "通道序号")
+    @TableField("channel_code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "通道的名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty(value = "计划存储天数起止日期")
+    @TableField("check_date")
+    private String checkDate;
+
+    @ApiModelProperty(value = "录像机唯一标识")
+    @TableField("equipment_code")
+    private String equipmentCode;
+
+    @ApiModelProperty(value = "计划存储天数起止日期")
+    @TableField("lose_date")
+    private String loseDate;
+
+    @ApiModelProperty(value = "计划存储总天数")
+    @TableField("plan_days")
+    private Integer planDays;
+
+    @ApiModelProperty(value = "计划日期内实际存储总天数")
+    @TableField("real_days")
+    private Integer realDays;
+
+    @TableField("equipment_name")
+    private String equipmentName;
+
+    @ApiModelProperty(value = "是否报警 0:未报警,1:报警")
+    @TableField("status")
+    private Integer status;
+
+    @ApiModelProperty(value = "最早录像日期")
+    @TableField("earliest_video_time")
+    private LocalDateTime earliestVideoTime;
+
+
+}

+ 93 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/video/MediatorVideoDaysCheckLog.java

@@ -0,0 +1,93 @@
+package com.xunmei.common.core.domain.video;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.time.LocalDateTime;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+
+import java.io.Serializable;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 录像机天数检查日志
+ * </p>
+ *
+ * @author oygj
+ * @since 2024-01-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("mediator_video_days_check_log")
+@ApiModel(value = "VideoDaysCheckLog对象", description = "录像机天数检查日志")
+public class MediatorVideoDaysCheckLog extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("id")
+    private Long id;
+
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_id")
+    private Long orgId;
+
+    @ApiModelProperty(value = "机构名称")
+    @TableField("org_name")
+    private String orgName;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_path")
+    private String orgPath;
+
+    @ApiModelProperty(value = "通道序号")
+    @TableField("channel_code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "通道的名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty(value = "计划存储天数起止日期")
+    @TableField("check_date")
+    private String checkDate;
+
+    @ApiModelProperty(value = "录像机唯一标识")
+    @TableField("equipment_code")
+    private String equipmentCode;
+
+    @ApiModelProperty(value = "计划存储天数起止日期")
+    @TableField("lose_date")
+    private String loseDate;
+
+    @ApiModelProperty(value = "计划存储总天数")
+    @TableField("plan_days")
+    private Integer planDays;
+
+    @ApiModelProperty(value = "计划日期内实际存储总天数")
+    @TableField("real_days")
+    private Integer realDays;
+
+    @ApiModelProperty(value = "录像机天数检查ID")
+    @TableField("video_days_check_id")
+    private Long videoDaysCheckId;
+
+    @TableField("status")
+    private Integer status;
+
+    @ApiModelProperty(value = "最早录像日期")
+    @TableField("earliest_video_time")
+    private LocalDateTime earliestVideoTime;
+
+    @TableField("equipment_name")
+    private String equipmentName;
+
+
+}

+ 75 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/video/MediatorVideoDiagnosis.java

@@ -0,0 +1,75 @@
+package com.xunmei.common.core.domain.video;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 视频质量诊断结果
+ * </p>
+ *
+ * @author oygj
+ * @since 2024-01-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("mediator_video_diagnosis")
+@ApiModel(value="VideoDiagnosis对象", description="视频质量诊断结果")
+public class MediatorVideoDiagnosis extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+      @TableId("id")
+    private Long id;
+
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_id")
+    private Long orgId;
+
+    @ApiModelProperty(value = "机构名称")
+    @TableField("org_name")
+    private String orgName;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_path")
+    private String orgPath;
+
+    @ApiModelProperty(value = "报警/恢复时间")
+    @TableField("alarm_time")
+    private String alarmTime;
+
+    @ApiModelProperty(value = "通道序号")
+    @TableField("channel_code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "通道的名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty(value = "质量当前状态详情")
+    @TableField("detail_info")
+    private String detailInfo;
+
+    @ApiModelProperty(value = "录像机唯一标识")
+    @TableField("equipment_code")
+    private String equipmentCode;
+
+    @ApiModelProperty(value = "报警状态标识")
+    @TableField("is_alarm")
+    private Integer isAlarm;
+
+    @TableField("equipment_name")
+    private String equipmentName;
+
+
+}

+ 81 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/video/MediatorVideoDiagnosisLog.java

@@ -0,0 +1,81 @@
+package com.xunmei.common.core.domain.video;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.time.LocalDateTime;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+
+import java.io.Serializable;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 视频质量诊断结果
+ * </p>
+ *
+ * @author oygj
+ * @since 2024-01-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("mediator_video_diagnosis_log")
+@ApiModel(value = "VideoDiagnosisLog对象", description = "视频质量诊断结果")
+public class MediatorVideoDiagnosisLog extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("id")
+    private Long id;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_id")
+    private Long orgId;
+
+    @ApiModelProperty(value = "机构名称")
+    @TableField("org_name")
+    private String orgName;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_path")
+    private String orgPath;
+
+    @ApiModelProperty(value = "报警/恢复时间")
+    @TableField("alarm_time")
+    private String alarmTime;
+
+    @ApiModelProperty(value = "通道序号")
+    @TableField("channel_code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "通道的名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty(value = "质量当前状态详情")
+    @TableField("detail_info")
+    private String detailInfo;
+
+    @ApiModelProperty(value = "录像机唯一标识")
+    @TableField("equipment_code")
+    private String equipmentCode;
+
+    @ApiModelProperty(value = "报警状态标识")
+    @TableField("is_alarm")
+    private Integer isAlarm;
+
+    @ApiModelProperty(value = "视频质量诊断结果ID")
+    @TableField("video_diagnosis_id")
+    private Long videoDiagnosisId;
+
+    @TableField("equipment_name")
+    private String equipmentName;
+
+
+}

+ 118 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/video/MediatorVideoDiagnosisRecord.java

@@ -0,0 +1,118 @@
+package com.xunmei.common.core.domain.video;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author oygj
+ * @since 2024-01-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("mediator_video_diagnosis_record")
+@ApiModel(value="VideoDiagnosisRecord对象", description="")
+public class MediatorVideoDiagnosisRecord extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+      @TableId("id")
+    private Long id;
+
+    @ApiModelProperty(value = "机构id")
+    @TableField("org_id")
+    private Long orgId;
+
+    @ApiModelProperty(value = "机构名称")
+    @TableField("org_name")
+    private String orgName;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_path")
+    private String orgPath;
+
+    @ApiModelProperty(value = "视频质量诊断id")
+    @TableField("video_diagnosis_id")
+    private Long videoDiagnosisId;
+
+    @ApiModelProperty(value = "设备id")
+    @TableField("equipment_code")
+    private String equipmentCode;
+
+    @ApiModelProperty(value = "通道名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty(value = "通道序号")
+    @TableField("channel_code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "设备名称")
+    @TableField("device_name")
+    private String deviceName;
+
+    @ApiModelProperty(value = "设备id")
+    @TableField("device_id")
+    private String deviceId;
+
+    @ApiModelProperty(value = "信号丢失  0: 正常 | 1:异常")
+    @TableField("signal_lost")
+    private Integer signalLost;
+
+    @ApiModelProperty(value = "遮挡  0: 正常 | 1:异常")
+    @TableField("occlude")
+    private Integer occlude;
+
+    @ApiModelProperty(value = "亮度  0: 正常 | 1:异常")
+    @TableField("brightness")
+    private Integer brightness;
+
+    @ApiModelProperty(value = "偏色  0: 正常 | 1:异常")
+    @TableField("color_cast")
+    private Integer colorCast;
+
+    @ApiModelProperty(value = "雪花  0: 正常 | 1:异常")
+    @TableField("snowflake")
+    private Integer snowflake;
+
+    @ApiModelProperty(value = "条纹  0: 正常 | 1:异常")
+    @TableField("stripe")
+    private Integer stripe;
+
+    @ApiModelProperty(value = "对比度  0: 正常 | 1:异常")
+    @TableField("contrast")
+    private Integer contrast;
+
+    @ApiModelProperty(value = "模糊  0: 正常 | 1:异常")
+    @TableField("blurry")
+    private Integer blurry;
+
+    @TableField("equipment_name")
+    private String equipmentName;
+
+    @ApiModelProperty(value = "报警/恢复时间")
+    @TableField("alarm_time")
+    private String alarmTime;
+
+    @ApiModelProperty(value = "报警状态标识")
+    @TableField("is_alarm")
+    private Integer isAlarm;
+
+    @ApiModelProperty(value = "质量当前状态详情")
+    @TableField("detail_info")
+    private String detailInfo;
+
+
+}

+ 96 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/video/MediatorVideoIntegrityCheck.java

@@ -0,0 +1,96 @@
+package com.xunmei.common.core.domain.video;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.time.LocalDate;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.time.LocalDateTime;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+
+import java.io.Serializable;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 录像机完整性检查表
+ * </p>
+ *
+ * @author oygj
+ * @since 2024-01-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("mediator_video_integrity_check")
+@ApiModel(value = "VideoIntegrityCheck对象", description = "录像机完整性检查表")
+public class MediatorVideoIntegrityCheck extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("id")
+    private Long id;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_id")
+    private Long orgId;
+
+    @ApiModelProperty(value = "机构名称")
+    @TableField("org_name")
+    private String orgName;
+
+    @ApiModelProperty(value = "机构")
+    @TableField("org_path")
+    private String orgPath;
+
+    @ApiModelProperty(value = "通道序号")
+    @TableField("channel_code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "通道的名称")
+    @TableField("channel_name")
+    private String channelName;
+
+    @ApiModelProperty(value = "检查日期录像计划规则集合")
+    @TableField("check_span")
+    private String checkSpan;
+
+    @ApiModelProperty(value = "录像机唯一标识")
+    @TableField("equipment_code")
+    private String equipmentCode;
+
+    @ApiModelProperty(value = "检查日期录像丢失情况集合")
+    @TableField("lose_span")
+    private String loseSpan;
+
+    @ApiModelProperty(value = "录像情况检查日期")
+    @TableField("record_date")
+    private LocalDate recordDate;
+
+    @ApiModelProperty(value = "设备名称")
+    @TableField("device_name")
+    private String deviceName;
+
+    @ApiModelProperty(value = "0:正常 1:部分丢失 2:全部丢失")
+    @TableField("status")
+    private Integer status;
+
+    @TableField("equipment_name")
+    private String equipmentName;
+
+    @ApiModelProperty(value = "录像计划存储多少天")
+    @TableField("plan_days")
+    private Integer planDays;
+
+    @ApiModelProperty(value = "录像机唯一标识")
+    @TableField("lose_span_old")
+    private String loseSpanOld;
+
+
+}

+ 6 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/gx/service/ResumptionServiceImpl.java

@@ -294,7 +294,9 @@ public class ResumptionServiceImpl implements ResumptionService {
         }
 
         if(ResumptionStatus.NO_START.getCode().equals(resumption.getStatus()) ||
-                ResumptionStatus.OUT_DATE.getCode().equals(resumption.getStatus())){
+                ResumptionStatus.OUT_DATE.getCode().equals(resumption.getStatus()) ||
+                ResumptionStatus.PROGRESS.getCode().equals(resumption.getStatus())
+        ){
             //待履职时,需要对所有标签进行筛选
             List<ResumptionNFCVo> news = new ArrayList<>();
             Set<String> areaIds = new HashSet<>();
@@ -318,7 +320,9 @@ public class ResumptionServiceImpl implements ResumptionService {
             }
 
             for (ResumptionNFCVo nfc : nfcs) {
-                nfc.setStatus(0);
+                if( !ResumptionStatus.PROGRESS.getCode().equals(resumption.getStatus())){
+                    nfc.setStatus(0);
+                }
                 if(areaIds.contains(nfc.getAreaId().toString())){
                     Integer scan = scans.get(nfc.getAreaId().toString());
                     nfc.setPointScan(scan);

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

@@ -236,7 +236,7 @@
             and t.title like concat('%', #{task.title}, '%')
         </if>
         <if test="task.roleId != null  and task.roleId != ''">
-            and csptr.role_id =#{task.roleId}
+            and (csptr.role_id =#{task.roleId} or t.role_id = #{task.roleId})
         </if>
         <if test="task.planStartTime != null ">
             and DATE_FORMAT(t.plan_start_time, '%Y-%m-%d') = DATE_FORMAT(#{task.planStartTime}, '%Y-%m-%d')

+ 37 - 39
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -40,6 +40,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.PostConstruct;
+import java.time.LocalDate;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -155,11 +156,13 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
             orgPhysicalDefenseConstructionExport.setOrgName(s.getShortName());
 
             //年度完成
-            Integer s1 = baseMapper.rectificationStatus(s.getPath(), "2023");
+            LocalDate currentDate = LocalDate.now();
+            String year = String.valueOf(currentDate.getYear());
+            Integer s1 = baseMapper.rectificationStatus(s.getPath(), year);
             //2015改造
-            Integer s2 = baseMapper.oldRectificationStatus(s.getPath(), "2023");
+            Integer s2 = baseMapper.oldRectificationStatus(s.getPath(), year);
             //未完成改造
-            Integer s3 = baseMapper.noRectificationStatus(s.getPath(), "2023");
+            Integer s3 = baseMapper.noRectificationStatus(s.getPath(), year);
             orgPhysicalDefenseConstructionExport.setNewYearReachNumber(s1);
             orgPhysicalDefenseConstructionExport.setNewYeaTransformOldReachNumber(s2);
             orgPhysicalDefenseConstructionExport.setNewYeaTransformInconformityNumber(s3);
@@ -626,44 +629,39 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
     }
 
     // 获取机构所属行社、地区的名称
-    private List<String> getHsAndDqOrgName(String path)
-    {
-        List<String> list=new ArrayList<>();
-        final List<Long> orgIdList =  Arrays.stream(path.split("-")).map(Arrays::asList)
-            .flatMap(Collection::stream)
-            .map(Long::valueOf)
-            .distinct().
-            collect(Collectors.toList());
+    private List<String> getHsAndDqOrgName(String path) {
+        List<String> list = new ArrayList<>();
+        final List<Long> orgIdList = Arrays.stream(path.split("-")).map(Arrays::asList)
+                .flatMap(Collection::stream)
+                .map(Long::valueOf)
+                .distinct().
+                collect(Collectors.toList());
 
         final List<SysOrg> sysOrgs = sysOrgMapper.selectList(new LambdaQueryWrapper<SysOrg>()
                 .in(SysOrg::getId, orgIdList));
 
-        if(sysOrgs.size()<=0)
-        {
-            list.add( StringUtil.EMPTY_STRING);
-            list.add( StringUtil.EMPTY_STRING);
+        if (sysOrgs.size() <= 0) {
+            list.add(StringUtil.EMPTY_STRING);
+            list.add(StringUtil.EMPTY_STRING);
             return list;
         }
 
-        final Optional<SysOrg> hsOrg = sysOrgs.stream().filter(x -> ObjectUtil.equal(x.getType(),3)).findFirst();
+        final Optional<SysOrg> hsOrg = sysOrgs.stream().filter(x -> ObjectUtil.equal(x.getType(), 3)).findFirst();
 
 
         // 行社名称
-        if(hsOrg.isPresent()){
+        if (hsOrg.isPresent()) {
             list.add(hsOrg.get().getShortName());
 
             final Optional<SysOrg> dqOrg = sysOrgs.stream().filter(x -> x.getId().equals(hsOrg.get().getParentId())).findFirst();
-            if(dqOrg.isPresent())
-            {
-                list.add(dqOrg.get().getShortName().replace("地区行社",""));
-            }
-            else {
-                list.add( StringUtil.EMPTY_STRING);
+            if (dqOrg.isPresent()) {
+                list.add(dqOrg.get().getShortName().replace("地区行社", ""));
+            } else {
+                list.add(StringUtil.EMPTY_STRING);
             }
-        }
-        else {
-            list.add( StringUtil.EMPTY_STRING);
-            list.add( StringUtil.EMPTY_STRING);
+        } else {
+            list.add(StringUtil.EMPTY_STRING);
+            list.add(StringUtil.EMPTY_STRING);
         }
         // 地区名称
 
@@ -826,7 +824,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         if (ObjectUtil.hasEmpty(org, org.getType())) {
             throw new ServiceException(ErrorMsgConstants.CUR_USER_ORT_TYPE_ERROR);
         }
-        List<SysOrg> sysOrgList =baseMapper.selectList(new LambdaQueryWrapper<>());
+        List<SysOrg> sysOrgList = baseMapper.selectList(new LambdaQueryWrapper<>());
         sysOrgList.forEach(sysOrg -> {
             if (ObjectUtil.isNull(sysOrg.getSort())) {
                 sysOrg.setSort(0);
@@ -843,7 +841,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                 result = sysOrgList.stream()
                         .filter(sysOrg -> ObjectUtil.equal(sysOrg.getType(), OrgTypeEnum.DIQU_HANG_SHE.getCode()))
                         .filter(sysOrg -> sysOrg.getName().contains("地区行社"))
-                        .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(),0) && ObjectUtil.equal(sysOrg.getDeleted(),0))
+                        .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(), 0) && ObjectUtil.equal(sysOrg.getDeleted(), 0))
                         .sorted(Comparator.comparing(SysOrg::getSort))
                         .collect(Collectors.toList());
                 break;
@@ -851,7 +849,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                 result = sysOrgList.stream()
                         .filter(sysOrg -> sysOrg.getPath().startsWith(org.getPath()))
                         .filter(sysOrg -> ObjectUtil.equal(sysOrg.getType(), OrgTypeEnum.HANG_SHE.getCode()))
-                        .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(),0) && ObjectUtil.equal(sysOrg.getDeleted(),0))
+                        .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(), 0) && ObjectUtil.equal(sysOrg.getDeleted(), 0))
                         .sorted(Comparator.comparing(SysOrg::getSort))
                         .collect(Collectors.toList());
                 break;
@@ -861,14 +859,14 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                             .filter(sysOrg -> sysOrg.getPath().startsWith(org.getPath()))
                             .filter(sysOrg -> ObjectUtil.equal(sysOrg.getType(), OrgTypeEnum.HANG_SHE.getCode()))
                             .sorted(Comparator.comparing(SysOrg::getSort))
-                            .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(),0) && ObjectUtil.equal(sysOrg.getDeleted(),0))
+                            .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(), 0) && ObjectUtil.equal(sysOrg.getDeleted(), 0))
                             .collect(Collectors.toList());
                 } else {
                     result = sysOrgList.stream()
                             .filter(sysOrg -> ObjectUtil.equal(sysOrg.getParentId(), org.getId()))
                             //.filter(sysOrg -> sysOrg.getPath().startsWith(org.getPath()))
                             .sorted(Comparator.comparing(SysOrg::getSort))
-                            .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(),0) && ObjectUtil.equal(sysOrg.getDeleted(),0))
+                            .filter(sysOrg -> ObjectUtil.equal(sysOrg.getIsLock(), 0) && ObjectUtil.equal(sysOrg.getDeleted(), 0))
                             .collect(Collectors.toList());
                 }
         }
@@ -891,7 +889,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         OrgTypeEnum orgTypeEnum = OrgTypeEnum.getOrgTypeEnum(org.getType());
         LambdaQueryWrapper<SysOrg> wrapper = new LambdaQueryWrapper<SysOrg>();
         wrapper.notLike(SysOrg::getName, "各部门").notLike(SysOrg::getShortName, "各部门").isNotNull(SysOrg::getPath);
-        wrapper.eq(SysOrg::getIsLock, 0).eq(SysOrg::getDeleted,0);
+        wrapper.eq(SysOrg::getIsLock, 0).eq(SysOrg::getDeleted, 0);
 
         switch (orgTypeEnum) {
             case SHEGN_LIAN_SHE:
@@ -966,13 +964,13 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
     }
 
     @Override
-    public List<SysOrg> selectDqAndHs(){
+    public List<SysOrg> selectDqAndHs() {
         LambdaQueryWrapper<SysOrg> wrapper = new LambdaQueryWrapper<>();
-        wrapper.and(w->w.eq(SysOrg::getType,OrgTypeEnum.HANG_SHE.getCode()).or().likeRight(SysOrg::getShortName,"地区行社"))
-                .eq(SysOrg::getDeleted,0)
-                .eq(SysOrg::getIsLock,0)
-                .select(SysOrg::getType,SysOrg::getShortName,SysOrg::getId);
+        wrapper.and(w -> w.eq(SysOrg::getType, OrgTypeEnum.HANG_SHE.getCode()).or().likeRight(SysOrg::getShortName, "地区行社"))
+                .eq(SysOrg::getDeleted, 0)
+                .eq(SysOrg::getIsLock, 0)
+                .select(SysOrg::getType, SysOrg::getShortName, SysOrg::getId);
 
-        return  sysOrgMapper.selectList(wrapper);
+        return sysOrgMapper.selectList(wrapper);
     }
 }

+ 3 - 7
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysRoleServiceImpl.java

@@ -483,19 +483,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
             {
                 continue;
             }
-            // 停用的角色
-//            if(sysRole.getStatus()==1)
-//            {
-//                continue;
-//            }
+
             list.add(sysRole);
         }
-        list=  list.stream().sorted(new Comparator<SysRole>() {//使用List接口的方法排序
+    /*    list=  list.stream().sorted(new Comparator<SysRole>() {//使用List接口的方法排序
             @Override
             public int compare(SysRole o1, SysRole o2) {
                 return o1.getRoleSort().compareTo(o2.getRoleSort());
             }
-        }).collect(Collectors.toList());
+        }).collect(Collectors.toList());*/
         clearRoleCache();
         RedisUtils.setCacheList(CacheConstants.ROLE_CACHE_LIST_KEY, list);
     }

+ 3 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysNfcBindMapper.xml

@@ -89,7 +89,7 @@
         a.org_id,
         a.org_name,
         a.org_path,
-        a.collection_area_name,
+        c.check_name as  collection_area_name,
         a.check_id,
         a.create_by,
         a.create_time,
@@ -98,8 +98,9 @@
         FROM
         sys_nfc_bind a
         LEFT JOIN sys_org b on a.org_id = b.id
+        LEFT JOIN sys_area_check c on a.check_id = c.id
         WHERE
-        del_flag = 0
+        a.del_flag = 0
         <choose>
             <when test="info.checkSub">
                 AND b.path like concat('%', #{info.orgPath}, '%')

+ 4 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -36,6 +36,7 @@
                  left join sys_user_role ur on ur.role_id = r.id
                  left join sys_user u on u.id = ur.user_id
                  left join sys_dept d on u.dept_id = d.dept_id
+
     </sql>
 
     <select id="selectRoleList" parameterType="com.xunmei.system.api.domain.SysRole" resultMap="SysRoleResult">
@@ -69,6 +70,7 @@
     <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
         <include refid="selectRoleVo"/>
         WHERE r.del_flag = '0' and ur.user_id = #{userId}
+        order by r.role_sort
     </select>
 
     <select id="selectRoleAll" resultMap="SysRoleResult">
@@ -86,6 +88,7 @@
     <select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
         <include refid="selectRoleVo"/>
         where r.id = #{roleId}
+        order by r.role_sort
     </select>
 
     <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
@@ -119,6 +122,7 @@
         SELECT *
         FROM sys_role
         WHERE role_name !='超级管理员' and  del_flag=0
+        order by role_sort
     </select>
 
     <insert id="insertRole" parameterType="com.xunmei.system.api.domain.SysRole" useGeneratedKeys="true"