Преглед на файлове

Merge remote-tracking branch 'origin/V0.0.4' into V0.0.4

jingyuanchao преди 1 година
родител
ревизия
bcc790a4df

+ 8 - 0
project_data/sql/0.0.4/soc/soc.sql

@@ -9,6 +9,8 @@ INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value
 -- 修改教育培训任务状态字典描述
 update sys_dict_data set dict_label='待登记' where dict_type='edu_training_do_status' and dict_label='待培训' and dict_value=0 LIMIT 1;
 update sys_dict_data set dict_label='登记中' where dict_type='edu_training_do_status' and dict_label='待提交' and dict_value=4 LIMIT 1;
+-- 履职状态描述变更
+update sys_dict_data set dict_label='履职中' where dict_type='resumption_status' and dict_label='进行中' and dict_value=2 LIMIT 1;
 
 delete from sys_menu where id in (1729308502301728769);
 INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark)
@@ -20,6 +22,12 @@ INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1729308502301728
 INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1729308502301728769);
 INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1729308502301728769);
 INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1729308502301728769);
+delete  from `sys_menu` where  id=01729407886809481218;
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01729407886809481218, '导出', 2318, 8, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:safetycheck:export', '1', NULL, NULL, '省联社账号', '2023-11-28 15:52:54', '', NULL, '');
+
+update sys_menu set menu_name='履职手册' WHERE menu_name='履职内容库' and platform_type=1 and menu_type='C' ;
+update sys_menu set menu_name='检查手册' WHERE menu_name='检查内容库' and platform_type=1 and menu_type='C' ;
+
 -- 文书档案文件表
 CREATE TABLE if not exists `core_safety_book_book_files` (
                                                `id` bigint NOT NULL,

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafetyTaskController.java

@@ -136,7 +136,7 @@ public class CoreSafetyTaskController extends BaseController {
     /**
      * 导出安全检查数据
      */
-//    @RequiresPermissions("core:task:export")
+//    @RequiresPermissions("core:safetycheck:export")
     @PostMapping("/export")
     public void export( CoreSafetyTask coreSafetyTask, HttpServletResponse response) {
         List<CoreSafetyTaskExport> list = null;

+ 32 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysDeptController.java

@@ -28,6 +28,7 @@ import com.xunmei.system.api.vo.SysOrgVO;
 import com.xunmei.system.service.ISysDeptService;
 import com.xunmei.system.service.ISysOrgService;
 import com.xunmei.system.service.ISysUserService;
+import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 import com.xunmei.system.util.SecurityUserExport;
 import io.swagger.annotations.ApiOperation;
@@ -64,6 +65,37 @@ public class SysDeptController extends BaseController {
     public TableDataInfo<SysOrg> list(SysOrg dept) {
         return orgService.selectPage(dept);
     }
+    @RequiresPermissions("system:dept:exportConstructionDetails")
+    @PostMapping("/exportConstructionDetails")
+    public void exportConstructionDetails(SysOrg dept, HttpServletResponse response) {
+        List<ConstructionDetailExport> constructionDetailExports = orgService.selectConstructionDetail(dept);
+        if (ObjectUtil.isEmpty(constructionDetailExports)) {
+            throw new RuntimeException("导出数据为空!");
+        }
+        AtomicInteger xh = new AtomicInteger();
+        xh.getAndIncrement();
+        constructionDetailExports.forEach(e -> {
+            e.setXh(String.valueOf(xh.getAndIncrement()));
+        });
+        if (constructionDetailExports.size() > 10000) {
+            throw new RuntimeException("导出数据量过大(单次导出限量10000条数据),请填写条件分批导出");
+        }
+        try {
+            // 设置响应头
+            response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("用户数据", "utf-8"));
+            response.setContentType("application/octet-stream;charset=UTF-8");
+            response.setCharacterEncoding("utf-8");
+            // 数据导出
+            EasyExcel.write(response.getOutputStream(), ConstructionDetailExport.class)
+                    .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("用户数据").doWrite(constructionDetailExports);
+        } catch (Exception e) {
+            // 重置response
+            response.reset();
+            response.setContentType("application/json");
+            response.setCharacterEncoding("utf-8");
+        }
+    }
+
     @RequiresPermissions("system:dept:exportConstruction")
     @PostMapping("/exportConstruction")
     public void exportConstruction(SysOrg dept, HttpServletResponse response) {

+ 3 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java

@@ -6,6 +6,7 @@ import com.xunmei.common.core.vo.IdNameVo;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.vo.FindOrgTypes;
 import com.xunmei.system.api.vo.SysOrgVO;
+import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
@@ -108,6 +109,8 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
      */
     OrgPhysicalDefenseConstructionExport complianceStatus(@Param("orgPath") String orgPath);
 
+    List<ConstructionDetailExport> selectConstructionDetail(@Param("orgPath") String orgPath);
+
     /**
      * @param orgPath
      * @param year

+ 13 - 3
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysOrgService.java

@@ -7,6 +7,7 @@ import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.vo.FindOrgTypes;
 import com.xunmei.system.api.vo.SysOrgVO;
+import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 
 import java.util.List;
@@ -31,7 +32,9 @@ public interface ISysOrgService extends IService<SysOrg> {
     List<Long> findListByOrgType(Integer execOrgType);
 
     List<SysOrg> listByTypes(Long topId, List<String> types);
-    List<SysOrg> listByParentIdAndType(Long parentId, Integer type,String path);
+
+    List<SysOrg> listByParentIdAndType(Long parentId, Integer type, String path);
+
     /**
      * 查询【机构管理】列表
      *
@@ -84,11 +87,15 @@ public interface ISysOrgService extends IService<SysOrg> {
 
     /**
      * 物防导出查询
+     *
      * @param dept
      * @return
      */
-    List<OrgPhysicalDefenseConstructionExport>excel(SysOrg dept);
-    List<SysOrg> selectSysOrgByPathAndType(String path,Integer type);
+    List<OrgPhysicalDefenseConstructionExport> excel(SysOrg dept);
+
+    List<SysOrg> selectSysOrgByPathAndType(String path, Integer type);
+
+    List<ConstructionDetailExport> selectConstructionDetail(SysOrg dept);
 
     String selectPathById(Long orgId);
 
@@ -99,9 +106,11 @@ public interface ISysOrgService extends IService<SysOrg> {
     List<SysOrg> selectByOrgPathAndOrgType(String orgPath, Integer orgType);
 
     SysOrg getSysOrgByUserId(Long userId);
+
     List<Long> selectOrgTypeByIdList(List<Long> execOrgIdList);
 
     List<SysOrg> findByOrgTypeAndParent(Integer orgType, String path);
+
     /**
      * 查询机构树结构信息
      *
@@ -149,6 +158,7 @@ public interface ISysOrgService extends IService<SysOrg> {
     OrgTreeResp getOrgTreeReq(OrgTreeReq req);
 
     List<SysOrg> selectOrgTreeListByCurOrgId(Long id);
+
     SysOrg selectByShortName(String shortName);
 
     String selectOrgNameByPath(Long orgId);

+ 43 - 11
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -27,6 +27,7 @@ import com.xunmei.system.api.vo.SysOrgVO;
 import com.xunmei.system.mapper.SysOrgMapper;
 import com.xunmei.system.mapper.SysUserMapper;
 import com.xunmei.system.service.ISysOrgService;
+import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 import io.netty.util.internal.StringUtil;
 import org.springframework.beans.BeanUtils;
@@ -97,24 +98,24 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
 
     @Override
     public List<OrgPhysicalDefenseConstructionExport> excel(SysOrg dept) {
-        if (null==dept.getId()){
+        if (null == dept.getId()) {
             dept.setId(SecurityUtils.getLoginUser().getOrgId());
         }
         SysOrg sysOrg = baseMapper.selectSysOrgById(dept.getId());
         List<SysOrg> sysOrgs;
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
             sysOrgs = this.selectSysOrgByPathAndType(sysOrg.getPath(), 3);
-        }else if (sysOrg.getType() == 3) {
+        } else if (sysOrg.getType() == 3) {
             sysOrgs = this.selectSysOrgByPathAndType(sysOrg.getPath(), 4);
-        }else {
+        } else {
             return Collections.emptyList();
         }
-        List<OrgPhysicalDefenseConstructionExport>orgPhysicalDefenseConstructionExports=new ArrayList<>();
-        sysOrgs.forEach(s->{
-            OrgPhysicalDefenseConstructionExport orgPhysicalDefenseConstructionExport=new OrgPhysicalDefenseConstructionExport();
+        List<OrgPhysicalDefenseConstructionExport> orgPhysicalDefenseConstructionExports = new ArrayList<>();
+        sysOrgs.forEach(s -> {
+            OrgPhysicalDefenseConstructionExport orgPhysicalDefenseConstructionExport = new OrgPhysicalDefenseConstructionExport();
             SysOrg sysOrg1;
             if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-                 sysOrg1 = sysOrgMapper.selectSysOrgById(s.getParentId());
+                sysOrg1 = sysOrgMapper.selectSysOrgById(s.getParentId());
             } else {
                 sysOrg1 = sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(s.getParentId()).getParentId());
                 if (-1 == sysOrg1.getShortName().indexOf("地区行社")) {
@@ -122,8 +123,8 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                 }
             }
             OrgPhysicalDefenseConstructionExport orgPhysicalDefenseConstructionExport1 = baseMapper.complianceStatus(s.getPath());
-            BeanUtils.copyProperties(orgPhysicalDefenseConstructionExport1,orgPhysicalDefenseConstructionExport);
-            orgPhysicalDefenseConstructionExport.setCity(sysOrg1.getShortName().indexOf("地区行社")==-1?sysOrg1.getShortName().substring(0,2):sysOrg1.getShortName().split("地区行社")[0]);
+            BeanUtils.copyProperties(orgPhysicalDefenseConstructionExport1, orgPhysicalDefenseConstructionExport);
+            orgPhysicalDefenseConstructionExport.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
             Integer integer = baseMapper.selectNetworkNumberByPath(s.getPath());
             orgPhysicalDefenseConstructionExport.setNetworkNumber(integer);
             orgPhysicalDefenseConstructionExport.setOrgName(s.getShortName());
@@ -146,12 +147,43 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
     public List<SysOrg> selectSysOrgByPathAndType(String path, Integer type) {
         QueryWrapper queryWrapper = new QueryWrapper();
         queryWrapper.likeRight("path", path);
-        queryWrapper.eq("type",type);
-        queryWrapper.eq("deleted",0);
+        queryWrapper.eq("type", type);
+        queryWrapper.eq("deleted", 0);
         return sysOrgMapper.selectList(queryWrapper);
     }
 
     @Override
+    public List<ConstructionDetailExport> selectConstructionDetail(SysOrg dept) {
+        if (null == dept.getPath()) {
+            dept.setPath(baseMapper.selectSysOrgById(SecurityUtils.getLoginUser().getOrgId()).getPath());
+        }
+        List<ConstructionDetailExport> constructionDetailExports = baseMapper.selectConstructionDetail(dept.getPath());
+        //hang
+        constructionDetailExports.forEach(c->{
+            SysOrg sysOrg = baseMapper.selectSysOrgById(c.getOrgId());
+            c.setAddress(sysOrg.getAddress());
+            c.setNetworkName(sysOrg.getShortName());
+            SysOrg sysOrg1 = baseMapper.selectSysOrgById(sysOrg.getParentId());
+            c.setOrgName(sysOrg1.getShortName());
+            SysOrg sysOrg2;
+//            if (null!=sysOrg1.getType()){
+//                if (sysOrg1.getType() < 3 || sysOrg1.getShortName().endsWith("地区行社") || sysOrg1.getType() == 9) {
+//                    sysOrg2 = sysOrgMapper.selectSysOrgById(sysOrg1.getParentId());
+//                } else {
+//                    sysOrg2 = sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(sysOrg1.getParentId()).getParentId());
+//                    if (-1 == sysOrg1.getShortName().indexOf("地区行社")) {
+//                        sysOrg2 = sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(sysOrg1.getParentId()).getParentId()).getParentId());
+//                    }
+//                }
+//            }else {
+                sysOrg2 = baseMapper.selectSysOrgById(sysOrg1.getParentId());
+           // }
+            c.setCity(sysOrg2.getShortName().indexOf("地区行社") == -1 ? sysOrg2.getShortName().substring(0, 2) : sysOrg2.getShortName().split("地区行社")[0]);
+        });
+        return constructionDetailExports;
+    }
+
+    @Override
     public List<Long> selectCheckSubOrgIdList(Long orgId) {
         return sysOrgMapper.selectCheckSubOrgIdList(orgId);
     }

+ 37 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/ComplianceStatusConverter.java

@@ -0,0 +1,37 @@
+package com.xunmei.system.util;
+
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/11/28
+ */
+public class ComplianceStatusConverter implements Converter<String> {
+    @Override
+    public Class supportJavaTypeKey() {
+        return null;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return null;
+    }
+
+    @Override
+    public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
+        return null;
+    }
+
+    @Override
+    public CellData convertToExcelData(String s, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
+        if ("1".equals(s)) {
+            return new CellData("达标");
+        }else {
+            return new CellData("未达标");
+        }
+    }
+}

+ 51 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/ConstructionDetailExport.java

@@ -0,0 +1,51 @@
+package com.xunmei.system.util;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/11/28
+ */
+@Data
+@ColumnWidth(15) //列宽,最大值为255
+@HeadRowHeight(16) //表头行高
+@ContentRowHeight(16) //数据行高
+public class ConstructionDetailExport {
+    @ExcelIgnore
+    private Long orgId;
+    @ExcelProperty(value = "序号", index = 0)
+    @TableField(exist = false)
+    private String xh;
+    @ExcelProperty(value = "地区", index = 1)
+    private String city;
+    @ExcelProperty(value = "行社", index = 2)
+    private String orgName;
+    @ExcelProperty(value = "网点名称", index = 3)
+    @ApiModelProperty(value = "网点名称")
+    private String networkName;
+    @ExcelProperty(value = "地址", index = 4)
+    @ApiModelProperty(value = "地址")
+    private String address;
+    @ExcelProperty(value = "产权情况", index = 5,converter = OwnershipConverter.class)
+    @ApiModelProperty(value = "产权情况")
+    private Integer ownership;
+    @ExcelProperty(value = "达标情况", index = 6,converter = ComplianceStatusConverter.class)
+    @ApiModelProperty(value = "达标情况1达标0未达标")
+    private String complianceStatus;
+    @ExcelProperty(value = "达标时间", index = 7)
+    @ApiModelProperty(value = "达标时间")
+    private String complianceDate;
+    @ExcelProperty(value = "未达GA38-2021标准的部位或项目", index = 8)
+    @ApiModelProperty(value = "未达GA38-2021标准的部位或项目")
+    private String reason;
+    @ExcelProperty(value = "计划达标(GA38-2021)改造时间", index = 9)
+    @ApiModelProperty(value = "计划达标(GA38-2021)改造时间")
+    private String completeDate;
+}

+ 6 - 7
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OrgPhysicalDefenseConstructionExport.java

@@ -31,27 +31,26 @@ public class OrgPhysicalDefenseConstructionExport {
 
     @ApiModelProperty(value = "营业网点达标率")
     private String reachRate;
-    @ExcelProperty(value = {"符合GA38-2015,GA38-2021网点合计数量","符合GA38-2015,GA38-2021网点合计数量","符合GA38-2015,GA38-2021网点合计数量","符合GA38-2015,GA38-2021网点合计数量"}, index = 5)
+    @ExcelProperty(value = { "达标建设情况","符合GA38-2015,GA38-2021网点合计数量", "符合GA38-2015,GA38-2021网点合计数量", "符合GA38-2015,GA38-2021网点合计数量", "符合GA38-2015,GA38-2021网点合计数量"}, index = 5)
 
     @ApiModelProperty(value = "符合GA38-2015,GA38-2021网点合计数量")
     private Integer reachNumber;
-    @ExcelProperty(value = "其中,符合GA38-2015网点数量", index = 6)
+    @ExcelProperty(value = {"达标建设情况","其中,符合GA38-2015网点数量"}, index = 6)
 
     @ApiModelProperty(value = "其中,符合GA38-2015网点数量")
     private Integer oldReachNumber;
-    @ExcelProperty(value = "其中,符合GA38-2021网点数量", index = 7)
+    @ExcelProperty(value = {"达标建设情况","其中,符合GA38-2021网点数量"}, index = 7)
 
     @ApiModelProperty(value = "其中,符合GA38-2021网点数量")
     private Integer newReachNumber;
-    @ExcelProperty(value = "已完成GA38-2021达标改造网点合计数量", index = 8)
-
+    @ExcelProperty(value = {"年度已完成达标改造网点情况","已完成GA38-2021达标改造网点合计数量"}, index = 8)
     @ApiModelProperty(value = "已完成GA38-2021达标改造网点合计数量")
     private Integer newYearReachNumber;
-    @ExcelProperty(value = "其中,改造原有符合GA38-2015网点数量", index = 9)
+    @ExcelProperty(value = {"年度已完成达标改造网点情况","其中,改造原有符合GA38-2015网点数量"}, index = 9)
 
     @ApiModelProperty(value = "其中,改造原有符合GA38-2015网点数量")
     private Integer newYeaTransformOldReachNumber;
-    @ExcelProperty(value = "其中,改造未符合GA38-2015网点数量", index = 10)
+    @ExcelProperty(value = {"年度已完成达标改造网点情况","其中,改造未符合GA38-2015网点数量"}, index = 10)
 
     @ApiModelProperty(value = "其中,改造未符合GA38-2015网点数量")
     private Integer newYeaTransformInconformityNumber;

+ 40 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OwnershipConverter.java

@@ -0,0 +1,40 @@
+package com.xunmei.system.util;
+
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/11/28
+ */
+public class OwnershipConverter implements Converter<Integer> {
+    @Override
+    public Class supportJavaTypeKey() {
+        return null;
+    }
+
+    @Override
+    public CellDataTypeEnum supportExcelTypeKey() {
+        return null;
+    }
+
+    @Override
+    public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
+        return null;
+    }
+
+    @Override
+    public CellData convertToExcelData(Integer s, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
+        if ("1".equals(s)) {
+            return new CellData("部分自有+部分租赁");
+        }else if ("2".equals(s)){
+            return new CellData("自有");
+        }else {
+            return new CellData("租赁");
+        }
+
+    }
+}

+ 31 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -773,6 +773,37 @@ and
                    AND date_of_compliance LIKE concat(#{year}, '%')
             ) AND b.path LIKE concat(#{orgPath}, '%')
     </select>
+    <select id="selectConstructionDetail" resultType="com.xunmei.system.util.ConstructionDetailExport">
+        SELECT
+            a.org_id AS orgId,
+            IFNULL( b.ownership, 0 ) AS ownership,
+            IF
+                (
+                            IF
+                                ( LOCATE( 1, GROUP_CONCAT( a.standard ))> 0, 1, 0 )+
+                            IF
+                                ( LOCATE( 2, GROUP_CONCAT( a.standard ))> 0, 1, 0 )>= 1,
+                            1,
+                            0
+                ) AS complianceStatus,
+            a.date_of_compliance AS complianceDate,
+            IF
+                (
+                            IF
+                                ( LOCATE( 1, GROUP_CONCAT( a.standard ))> 0, 1, 0 )+
+                            IF
+                                ( LOCATE( 2, GROUP_CONCAT( a.standard ))> 0, 1, 0 )>= 1,
+                            NULL,
+                            a.reason
+                ) AS reason,
+            a.date_of_complete AS completeDate
+        FROM
+            sys_org_physical_defense_construction a
+                LEFT JOIN sys_org_extend b ON a.org_id = b.org_id LEFT JOIN sys_org c ON c.id=b.org_id
+        WHERE c.type=4 and c.path like concat(concat(#{orgPath}),'%')
+        GROUP BY
+            a.org_id
+    </select>
 
 
 </mapper>