Browse Source

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

zhulu 1 year ago
parent
commit
888975eef4

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

@@ -506,4 +506,22 @@ public class SysDeptController extends BaseController {
         List<SysOrg> sysOrgs = orgService.selectOrgList(org);
         return sysOrgs;
     }
+
+    /**
+     * 机构补充信息导出
+     * @param dept
+     * @param response
+     */
+    @RequiresPermissions("system:dept:exportOrgExtend")
+    @PostMapping("/exportOrgExtend")
+    public void exportOrgExtend(SysOrg dept, HttpServletResponse response) {
+        try {
+            orgService.exportOrgExtend(dept,response);
+        }catch (Exception e){
+            // 重置response
+            response.reset();
+            response.setContentType("application/json");
+            response.setCharacterEncoding("utf-8");
+        }
+    }
 }

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

@@ -8,6 +8,7 @@ import com.xunmei.system.api.vo.FindOrgTypes;
 import com.xunmei.system.api.vo.SysOrgVO;
 import com.xunmei.system.dto.SysOrgDto;
 import com.xunmei.system.util.ConstructionDetailExport;
+import com.xunmei.system.util.OrgExtendExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
@@ -196,4 +197,6 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
      * @return
      */
     List<SysOrg> selectOrgs(@Param("org") SysOrgDto org);
+
+    List<OrgExtendExport> exportOrgExtend(@Param("org") SysOrg org,@Param("typeList") List<Integer> typeList);
 }

+ 4 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysOrgService.java

@@ -12,6 +12,8 @@ import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 import com.xunmei.system.util.SecurityWorkExport;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -183,4 +185,6 @@ public interface ISysOrgService extends IService<SysOrg> {
      * @return
      */
     List<SysOrg> selectOrgList(SysOrgDto org);
+
+    void exportOrgExtend(SysOrg dept, HttpServletResponse response) throws IOException;
 }

+ 136 - 3
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -5,6 +5,8 @@ import cn.hutool.core.collection.ListUtil;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -18,6 +20,7 @@ import com.xunmei.common.core.domain.OrgTreeResp;
 import com.xunmei.common.core.enums.OrgTypeEnum;
 import com.xunmei.common.core.exception.ServiceException;
 import com.xunmei.common.core.utils.DateUtils;
+import com.xunmei.common.core.utils.bean.BeanUtils;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.redis.utils.RedisUtils;
 import com.xunmei.common.security.utils.DictUtils;
@@ -30,9 +33,7 @@ import com.xunmei.system.dto.SysOrgDto;
 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 com.xunmei.system.util.SecurityWorkExport;
+import com.xunmei.system.util.*;
 import io.netty.util.internal.StringUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -41,8 +42,12 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
 import java.time.LocalDate;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 
 /**
@@ -1100,4 +1105,132 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         List<SysOrg> sysOrgs = baseMapper.selectOrgs(org);
         return sysOrgs;
     }
+
+    @Override
+    public void exportOrgExtend(SysOrg dept, HttpServletResponse response) throws IOException {
+        List<Integer> typeList = new ArrayList<>();
+        if (dept.getType() != null){
+            typeList.add(dept.getType());
+        }else {
+            typeList.add(4);//营业网点
+            typeList.add(5);//离行式自助银行
+            typeList.add(6);//中心业务库
+            typeList.add(10);//监控中心
+        }
+        Long parentId = dept.getParentId();
+        if (parentId == null) {
+            parentId = SecurityUtils.getLoginUser().getSysUser().getOrgId();
+        }
+        SysOrg sysOrg = sysOrgMapper.selectById(parentId);
+        //查询条件
+        if (sysOrg != null) {
+            //下穿
+            if (dept.getCheckSub()) {
+                dept.setParentId(null);
+                dept.setPath(sysOrg.getPath());
+            } else {
+                dept.setPath(sysOrg.getPath());
+            }
+        }
+        List<OrgExtendExport> orgExtendExports= null;
+        orgExtendExports = baseMapper.exportOrgExtend(dept, typeList);
+
+        if (dept.getType() != null){
+            switch (dept.getType()){
+                case 4:
+                    List<OrgExtendYYWDExport> yywdList = new ArrayList<>();
+                    for (OrgExtendExport export : orgExtendExports) {
+                        OrgExtendYYWDExport yywdExport = new OrgExtendYYWDExport();
+                        BeanUtils.copyProperties(export, yywdExport);
+                        yywdList.add(yywdExport);
+                    }
+                    AtomicInteger yywdxh = new AtomicInteger();
+                    yywdxh.getAndIncrement();
+                    yywdList.forEach(e -> {
+                        e.setXh(String.valueOf(yywdxh.getAndIncrement()));
+                    });
+                    // 设置响应头
+                    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(), OrgExtendYYWDExport.class)
+                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("机构补充信息-营业网点").doWrite(yywdList);
+                    break;
+                case 5:
+                    List<OrgExtendLHSZZExport> lhzzsList = new ArrayList<>();
+                    for (OrgExtendExport export : orgExtendExports) {
+                        OrgExtendLHSZZExport lhszzExport = new OrgExtendLHSZZExport();
+                        BeanUtils.copyProperties(export, lhszzExport);
+                        lhzzsList.add(lhszzExport);
+                    }
+                    AtomicInteger lhzzsxh = new AtomicInteger();
+                    lhzzsxh.getAndIncrement();
+                    lhzzsList.forEach(e -> {
+                        e.setXh(String.valueOf(lhzzsxh.getAndIncrement()));
+                    });
+                    // 设置响应头
+                    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(), OrgExtendLHSZZExport.class)
+                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("机构补充信息-离行式自助银行").doWrite(lhzzsList);
+                    break;
+                case 6:
+                    List<OrgExtendZXYWKExport> zxywkList = new ArrayList<>();
+                    for (OrgExtendExport export : orgExtendExports) {
+                        OrgExtendZXYWKExport zxywkExport = new OrgExtendZXYWKExport();
+                        BeanUtils.copyProperties(export, zxywkExport);
+                        zxywkList.add(zxywkExport);
+                    }
+                    AtomicInteger zxywkxh = new AtomicInteger();
+                    zxywkxh.getAndIncrement();
+                    zxywkList.forEach(e -> {
+                        e.setXh(String.valueOf(zxywkxh.getAndIncrement()));
+                    });
+                    // 设置响应头
+                    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(), OrgExtendZXYWKExport.class)
+                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("机构补充信息-中心业务库").doWrite(zxywkList);
+                    break;
+                case 10:
+                    List<OrgExtendJKZXExport> jkzxList = new ArrayList<>();
+                    for (OrgExtendExport export : orgExtendExports) {
+                        OrgExtendJKZXExport jkzxExport = new OrgExtendJKZXExport();
+                        BeanUtils.copyProperties(export, jkzxExport);
+                        jkzxList.add(jkzxExport);
+                    }
+                    AtomicInteger jkzxxh = new AtomicInteger();
+                    jkzxxh.getAndIncrement();
+                    jkzxList.forEach(e -> {
+                        e.setXh(String.valueOf(jkzxxh.getAndIncrement()));
+                    });
+                    // 设置响应头
+                    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(), OrgExtendJKZXExport.class)
+                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("机构补充信息-监控中心").doWrite(jkzxList);
+                    break;
+            }
+        }else {
+            // 设置响应头
+            response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("机构补充信息", "utf-8"));
+            response.setContentType("application/octet-stream;charset=UTF-8");
+            response.setCharacterEncoding("utf-8");
+            AtomicInteger xh = new AtomicInteger();
+            xh.getAndIncrement();
+            orgExtendExports.forEach(e -> {
+                e.setXh(String.valueOf(xh.getAndIncrement()));
+            });
+            // 数据导出
+            EasyExcel.write(response.getOutputStream(), OrgExtendExport.class)
+                    .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("机构补充信息").doWrite(orgExtendExports);
+        }
+    }
 }

+ 2 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeSetServiceImpl.java

@@ -417,6 +417,7 @@ public class SysWorkTimeSetServiceImpl extends ServiceImpl<SysWorkTimeSetMapper,
             CompletableFuture.runAsync(() -> {
                 List<SysWorkTime> workTimeEditDtoList = new ArrayList<SysWorkTime>();
                 for (DateTime dateTime : dateTimeList) {
+
                     Optional<SysWorkTimeSetDayofweek> sameDayOfWeek = dayofweekList.stream().filter(w -> ObjectUtil.equal(String.valueOf(w.getDayOfWeek()), String.valueOf(dateTime.dayOfWeek()))).findFirst();
                     if (!sameDayOfWeek.isPresent()) {
                         return;
@@ -430,7 +431,7 @@ public class SysWorkTimeSetServiceImpl extends ServiceImpl<SysWorkTimeSetMapper,
                     workTime.setIsEnable(isEnable ? 1L : 0);
                     workTime.setIsDuty(dayOfWeek.getIsDuty());
 
-                    if (ObjectUtil.equal(dayOfWeek.getIsWorkday(), 1L)) {
+                    if (ObjectUtil.notEqual(dayOfWeek.getIsWorkday(), 1L)) {
                         Optional<SysWorkTimeSetDayofweek> firstWorkDay = dayofweekList.stream().filter(f -> ObjectUtil.equal(f.getIsWorkday(), 1)).findFirst();
                         dayOfWeek = firstWorkDay.orElseGet(SysWorkTimeSetDayofweek::new);
                     }

+ 67 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/ImgUrlConverter.java

@@ -0,0 +1,67 @@
+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;
+import com.alibaba.excel.util.IoUtils;
+import com.xunmei.common.core.utils.SpringUtils;
+import com.xunmei.common.core.utils.StringUtils;
+import com.xunmei.system.api.RemoteFileService;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+public class ImgUrlConverter 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 {
+        InputStream inputStream = null;
+        try {
+            if (StringUtils.isEmpty(s)){
+                return new CellData("");
+            }
+            String absolutePath = getAbsolutePath(s);
+            File file = new File(absolutePath);
+            if (!file.exists()){
+                return new CellData("");
+            }
+            inputStream = new FileInputStream(file);
+            byte[] bytes = IoUtils.toByteArray(inputStream);
+
+            return new CellData(bytes);
+        }catch (Exception e){
+            return new CellData("");
+        }finally {
+            if (inputStream != null){
+                inputStream.close();
+            }
+        }
+    }
+
+    private String getAbsolutePath(String relativePath){
+        RemoteFileService fileService = SpringUtils.getBean(RemoteFileService.class);
+        //String localPathPrefix = "D:\\xunmei\\uploadPath";
+        String localPathPrefix = fileService.getLocalPathPrefix().getData();
+        String staticPathPrefix = fileService.getStaticPathPrefix().getData();
+        String realPath = localPathPrefix + relativePath.replace(staticPathPrefix,"");
+        return realPath;
+    }
+}

+ 112 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OrgExtendExport.java

@@ -0,0 +1,112 @@
+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 com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ColumnWidth(15) //列宽,最大值为255
+@HeadRowHeight(32) //表头行高
+@ContentRowHeight(16) //数据行高
+public class OrgExtendExport {
+
+    @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 affiliatedBank;
+
+    @ExcelProperty(value = "机构简称", index = 3)
+    private String shortName;
+
+    @ExcelProperty(value = "机构类型", index = 4)
+    private String typeName;
+
+    @ExcelProperty(value = "地址", index = 5)
+    private String address;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ExcelProperty(value = "建设时间", index = 6)
+    private Date constructionTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ExcelProperty(value = "最近一次改造时间", index = 7)
+    private Date lastUpdateTime;
+
+    @ExcelProperty(value = "系统平台品牌", index = 8)
+    private String platformBrand;
+
+    @ExcelProperty(value = "离行式加钞间出入口数量", index = 9)
+    private Integer cashAddingRoom;
+
+    @ExcelProperty(value = "可远程控制和实时授权出入口数量(离行式)", index = 10)
+    private Integer cashAddingRoomControlCount;
+
+    @ExcelProperty(value = "业务库防控隔离门出入口数量", index = 11)
+    private Integer remoteCount;
+
+    @ExcelProperty(value = "可远程控制和实时授权出入口数量(业务库)", index = 12)
+    private Integer remoteControlCount;
+
+    @ExcelProperty(value= "全辖摄像头总路数", index = 13)
+    private Integer totalCameraCount;
+
+    @ExcelProperty(value = "全辖高清摄像头路数", index = 14)
+    private Integer hdCameraCount;
+
+    @ExcelProperty(value = "产权类型", index = 15)
+    private String ownerShipName;
+
+    @ExcelProperty(value = "所在位置", index = 16)
+    private String outsideArea;
+
+    @ExcelProperty(value = "夜间值守方式", index = 17)
+    private String dutyMode;
+
+    @ExcelProperty(value = "是否设立保管箱库", index = 18)
+    private String safeBox;
+
+    @ExcelProperty(value = "是否设立在行式自助银行", index = 19)
+    private String selfServiceBank;
+
+    @ExcelProperty(value = "穿墙式设备", index = 20)
+    private Integer detachedWallPenetratingEquipment;
+
+    @ExcelProperty(value = "大堂式设备", index = 21)
+    private Integer detachedLobbyEquipment;
+
+    @ExcelProperty(value = "是否设立业务库", index = 22)
+    private String businessLibrary;
+
+    @ExcelProperty(value = "业务库类型", index = 23)
+    private String businessLibraryTypeName;
+
+    @ExcelProperty(value = "是否配备保安人员", index = 24)
+    private String askari;
+
+    @ExcelProperty(value = "内部保安人数", index = 25)
+    private Integer innerCount;
+
+    @ExcelProperty(value = "外聘保安人数", index = 26)
+    private Integer outsideCount;
+
+    @ExcelProperty(value = "是否取得保安证书", index = 27)
+    private String isAskariCertificate;
+
+    @ExcelProperty(value = "保安证", index = 28,converter = ImgUrlConverter.class)
+    private String askariCertificate;
+}

+ 70 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OrgExtendJKZXExport.java

@@ -0,0 +1,70 @@
+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 com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ColumnWidth(15) //列宽,最大值为255
+@HeadRowHeight(32) //表头行高
+@ContentRowHeight(16) //数据行高
+public class OrgExtendJKZXExport {
+
+    @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 affiliatedBank;
+
+    @ExcelProperty(value = "机构简称", index = 3)
+    private String shortName;
+
+    @ExcelProperty(value = "机构类型", index = 4)
+    private String typeName;
+
+    @ExcelProperty(value = "地址", index = 5)
+    private String address;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ExcelProperty(value = "建设时间", index = 6)
+    private Date constructionTime;
+
+    @ExcelProperty(value = "最近一次改造时间", index = 7)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date lastUpdateTime;
+
+    @ExcelProperty(value = "系统平台品牌", index = 8)
+    private String platformBrand;
+
+    @ExcelProperty(value = "离行式加钞间出入口数量", index = 9)
+    private Integer cashAddingRoom;
+
+    @ExcelProperty(value = "可远程控制和实时授权出入口数量(离行式)", index = 10)
+    private Integer cashAddingRoomControlCount;
+
+    @ExcelProperty(value = "业务库防控隔离门出入口数量", index = 11)
+    private Integer remoteCount;
+
+    @ExcelProperty(value = "可远程控制和实时授权出入口数量(业务库)", index = 12)
+    private Integer remoteControlCount;
+
+    @ExcelProperty(value= "全辖摄像头总路数", index = 13)
+    private Integer totalCameraCount;
+
+    @ExcelProperty(value = "全辖高清摄像头路数", index = 14)
+    private Integer hdCameraCount;
+}

+ 47 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OrgExtendLHSZZExport.java

@@ -0,0 +1,47 @@
+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 com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ColumnWidth(15) //列宽,最大值为255
+@HeadRowHeight(32) //表头行高
+@ContentRowHeight(16) //数据行高
+public class OrgExtendLHSZZExport {
+
+    @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 affiliatedBank;
+
+    @ExcelProperty(value = "机构简称", index = 3)
+    private String shortName;
+
+    @ExcelProperty(value = "机构类型", index = 4)
+    private String typeName;
+
+    @ExcelProperty(value = "地址", index = 5)
+    private String address;
+
+    @ExcelProperty(value = "穿墙式设备", index = 6)
+    private Integer detachedWallPenetratingEquipment;
+
+    @ExcelProperty(value = "大堂式设备", index = 7)
+    private Integer detachedLobbyEquipment;
+}

+ 83 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OrgExtendYYWDExport.java

@@ -0,0 +1,83 @@
+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 com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@ColumnWidth(15) //列宽,最大值为255
+@HeadRowHeight(32) //表头行高
+@ContentRowHeight(16) //数据行高
+public class OrgExtendYYWDExport {
+
+    @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 affiliatedBank;
+
+    @ExcelProperty(value = "机构简称", index = 3)
+    private String shortName;
+
+    @ExcelProperty(value = "机构类型", index = 4)
+    private String typeName;
+
+    @ExcelProperty(value = "地址", index = 5)
+    private String address;
+
+    @ExcelProperty(value = "产权类型", index = 6)
+    private String ownerShipName;
+
+    @ExcelProperty(value = "所在位置", index = 7)
+    private String outsideArea;
+
+    @ExcelProperty(value = "夜间值守方式", index = 8)
+    private String dutyMode;
+
+    @ExcelProperty(value = "是否设立保管箱库", index = 9)
+    private String safeBox;
+
+    @ExcelProperty(value = "穿墙式设备", index = 10)
+    private Integer detachedWallPenetratingEquipment;
+
+    @ExcelProperty(value = "大堂式设备", index = 11)
+    private Integer detachedLobbyEquipment;
+
+    @ExcelProperty(value = "是否设立业务库", index = 12)
+    private String businessLibrary;
+
+    @ExcelProperty(value = "是否设立在行式自助银行", index = 13)
+    private String selfServiceBank;
+
+    @ExcelProperty(value = "业务库类型", index = 14)
+    private String businessLibraryTypeName;
+
+    @ExcelProperty(value = "是否配备保安人员", index = 15)
+    private String askari;
+
+    @ExcelProperty(value = "内部保安人数", index = 16)
+    private Integer innerCount;
+
+    @ExcelProperty(value = "外聘保安人数", index = 17)
+    private Integer outsideCount;
+
+    @ExcelProperty(value = "是否取得保安证书", index = 18)
+    private String isAskariCertificate;
+
+    @ExcelProperty(value = "保安证", index = 19,converter = ImgUrlConverter.class)
+    private String askariCertificate;
+}

+ 48 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/util/OrgExtendZXYWKExport.java

@@ -0,0 +1,48 @@
+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 lombok.Data;
+
+@Data
+@ColumnWidth(15) //列宽,最大值为255
+@HeadRowHeight(32) //表头行高
+@ContentRowHeight(16) //数据行高
+public class OrgExtendZXYWKExport {
+
+    @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 affiliatedBank;
+
+    @ExcelProperty(value = "机构简称", index = 3)
+    private String shortName;
+
+    @ExcelProperty(value = "机构类型", index = 4)
+    private String typeName;
+
+    @ExcelProperty(value = "地址", index = 5)
+    private String address;
+
+    @ExcelProperty(value = "是否设立业务库", index = 6)
+    private String businessLibrary;
+
+    @ExcelProperty(value = "业务库类型", index = 7)
+    private String businessLibraryTypeName;
+
+    @ExcelProperty(value = "夜间值守方式", index = 8)
+    private String dutyMode;
+
+}

+ 59 - 1
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -1321,6 +1321,64 @@ and a.org_path LIKE concat(#{orgPath}, '%')
         ORDER BY
         affiliated_area,affiliated_bank,sort
     </select>
-
+    <select id="exportOrgExtend" resultType="com.xunmei.system.util.OrgExtendExport">
+        SELECT
+            b.id AS orgId,
+            b.affiliated_area AS city,
+            b.affiliated_bank AS affiliatedBank,
+            b.short_name AS shortName,
+            ( SELECT dict_label FROM sys_dict_data WHERE dict_type = 'sys_org_type' AND dict_value = b.type ) AS typeName,
+            b.address AS address,
+            a.construction_time AS constructionTime,
+            a.last_update_time AS lastUpdateTime,
+            ( SELECT dict_label FROM sys_dict_data WHERE dict_type = 'org_platform_brand' AND dict_value = a.platform_brand ) AS platformBrand,
+            a.cash_adding_room AS cashAddingRoom,
+            a.cash_adding_room_control_count AS cashAddingRoomControlCount,
+            a.remote_count AS remoteCount,
+            a.remote_control_count AS remoteControlCount,
+            a.total_camera_count AS totalCameraCount,
+            a.hd_camera_count AS hdCameraCount,
+            ( SELECT dict_label FROM sys_dict_data WHERE dict_type = 'property_situation' AND dict_value = a.ownership ) AS ownerShipName,
+            ( CASE a.outside_area WHEN 1 THEN '区域内' WHEN 0 THEN '区域外' ELSE '' END ) AS outsideArea,
+            ( SELECT dict_label FROM sys_dict_data WHERE dict_type = 'duty_options' AND dict_value = a.duty_mode ) AS dutyMode,
+            ( CASE a.safe_box WHEN 1 THEN '是' ELSE '否' END ) AS safeBox,
+            ( CASE a.self_service_bank WHEN 1 THEN '是' ELSE '否' END ) AS selfServiceBank,
+            a.wall_penetrating_equipment AS wallPenetratingEquipment,
+            a.lobby_equipment AS lobbyEquipment,
+            ( CASE a.business_library WHEN 1 THEN '是' ELSE '否' END ) AS businessLibrary,
+            ( SELECT dict_label FROM sys_dict_data WHERE dict_type = 'business_type' AND dict_value = a.business_library_type ) AS businessLibraryTypeName,
+            ( CASE a.askari WHEN 1 THEN '是' ELSE '否' END ) AS askari,
+            a.inner_count AS innerCount,
+            a.outside_count AS outsideCount,
+            ( CASE WHEN a.askari_certificate IS NULL THEN '否' ELSE '是' END ) AS isAskariCertificate,
+            a.askari_certificate AS askariCertificate
+        FROM
+            sys_org b
+            LEFT JOIN sys_org_extend a ON a.org_id = b.id
+            -- LEFT JOIN core_weather_city c on a.weather_area_code = c.AREAID
+        WHERE
+            b.deleted = 0
+<!--            <if test="org.checkSub==true">
+                and b.path like concat(#{org.path},"%")
+            </if>
+            <if test="org.checkSub==false">
+                and b.id = #{org.parentId}
+            </if>-->
+            <if test="  org.checkSub != null and org.checkSub == true">
+                and b.path like concat(concat('%',#{org.path}),'%')
+            </if>
+            <if test="  org.checkSub != null and org.checkSub == false">
+                and b.path like concat('%',#{org.path})
+            </if>
+            <if test="  org.isLock != null ">
+                AND b.is_lock = #{org.isLock}
+            </if>
+            <if test="typeList != null and typeList.size > 0">
+                AND b.type IN
+                <foreach collection="typeList" item="orgType" open="(" separator="," close=")">
+                    #{orgType}
+                </foreach>
+            </if>
+    </select>
 
 </mapper>