Эх сурвалжийг харах

Merge branch 'V0.1.0' into V0.1.1

jingyuanchao 1 жил өмнө
parent
commit
8bfd2d50ea

+ 3 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java

@@ -870,7 +870,8 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
 
     private Map<String, Object> getFtlEdu(CoreEduTrainingTaskDetailVo task) {
         Map<String, Object> data = new HashMap<>();
-        String time = DateUtil.format(task.getTrainingStartDateTime(), "yyyy年MM月dd日HH时mm分");
+        String startTime = DateUtil.format(task.getTrainingStartDateTime(), "yyyy年MM月dd日HH时mm分");
+        String endTime = DateUtil.format(task.getTrainingEndDateTime(), "yyyy年MM月dd日HH时mm分");
         String address = task.getOrgName();
         String hostName = task.getHostName() == null ? StringUtil.EMPTY_STRING : task.getHostName();
         String recorderName = task.getRecorderName() == null ? StringUtil.EMPTY_STRING : task.getRecorderName();
@@ -878,7 +879,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         String note = task.getNote();
         String prefixPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getLocalPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
         String staticsPath = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.getStaticPathPrefix(), ErrorMsgConstants.QUERY_FILE_PATH_ERROR).getData();
-        data.put("time", StringUtils.isNotEmpty(time) ? time : StringUtil.EMPTY_STRING);
+        data.put("time", startTime + " - " + endTime);
         data.put("address", StringUtils.isNotEmpty(address) ? address : StringUtil.EMPTY_STRING);
         data.put("hostName", StringUtils.isNotEmpty(hostName) ? hostName : StringUtil.EMPTY_STRING);
         data.put("recorderName", StringUtils.isNotEmpty(recorderName) ? recorderName : StringUtil.EMPTY_STRING);

+ 6 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/ProtectionServiceImpl.java

@@ -258,6 +258,9 @@ public class ProtectionServiceImpl extends ServiceImpl<ProtectionMapper, IotAlar
             } else {
                 r.setStatusText("未上报");
             }
+            if (r.getStatusUpdateTime() != null && ObjectUtil.isEmpty(r.getStatusUpdatorName())) {
+                r.setStatusUpdatorName("自动获取");
+            }
         }
 
         response.setContentType("application/vnd.ms-excel");
@@ -270,12 +273,12 @@ public class ProtectionServiceImpl extends ServiceImpl<ProtectionMapper, IotAlar
     public SubsystemSimpleVo getSubsystemSimpleVo(Long id) {
         IotAlarmSubsystem subsystem = get(id);
         SubsystemSimpleVo simpleVo = new SubsystemSimpleVo();
-        if (ObjectUtil.isEmpty(subsystem)){
+        if (ObjectUtil.isEmpty(subsystem)) {
             return simpleVo;
         }
-        BeanHelper.copyProperties(simpleVo,subsystem);
+        BeanHelper.copyProperties(simpleVo, subsystem);
         String orgName = orgService.concatOrgName(subsystem.getOrgId(), SecurityConstants.INNER);
-        if (ObjectUtil.isNotEmpty(orgName)){
+        if (ObjectUtil.isNotEmpty(orgName)) {
             simpleVo.setOrgName(orgName);
         }
         return simpleVo;

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/protection/ProtectionPageVo.java

@@ -92,6 +92,7 @@ public class ProtectionPageVo {
     @ColumnWidth(20)
     private Date statusChangeTime;
 
+    @ExcelIgnore
     private Integer inBook;
 }
 

+ 4 - 4
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/ResumptionReportMapper.xml

@@ -182,10 +182,10 @@
       /*  COUNT( c.id ) AS realityRectificationNumber,*/
         IF
         (
-        COUNT( a.exception_reform_count )= 0
+        SUM( a.exception_reform_count )= 0
         OR IFNULL( a.exception_count, 0 )= 0,
         '0%',
-        CONCAT(ROUND(COUNT( a.exception_reform_count )/ IFNULL( a.exception_count, 0 )* 100,2) , '%' )) AS realityRectificationRate
+        CONCAT(ROUND(SUM( a.exception_reform_count )/ IFNULL( a.exception_count, 0 )* 100,2) , '%' )) AS realityRectificationRate
         FROM
         (
             SELECT
@@ -241,10 +241,10 @@
         IFNULL(SUM( a.exception_reform_count ),0) AS realityRectificationNumber,
         IF
         (
-        COUNT( a.exception_reform_count )= 0
+        SUM( a.exception_reform_count )= 0
         OR IFNULL( a.exception_count, 0 )= 0,
         '0%',
-        CONCAT(ROUND(COUNT( a.exception_reform_count )/ IFNULL( a.exception_count, 0 )* 100,2) , '%' )) AS realityRectificationRate
+        CONCAT(ROUND(SUM( a.exception_reform_count )/ IFNULL( a.exception_count, 0 )* 100,2) , '%' )) AS realityRectificationRate
         FROM
         (
             SELECT

+ 29 - 5
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -101,6 +101,29 @@ public class PdfUtil {
         }
         return cell;
     }
+    private static PdfPCell cell(Font tableFont, String content, int align, Integer colspan, Integer rowspan, Integer paddingLeft, Integer paddingRight) {
+        PdfPCell cell = new PdfPCell(new Phrase(content, tableFont));
+        if (colspan != null && colspan > 0) {
+            cell.setColspan(colspan);
+        }
+        if (rowspan != null && rowspan > 0) {
+            cell.setRowspan(rowspan);
+        }
+        // cell.setPaddingTop(8f);
+        cell.setPaddingLeft(paddingLeft);
+        cell.setPaddingRight(paddingRight);
+        cell.setPaddingBottom(8f);
+        cell.setLeading(1F, 1.5F);
+        if (PdfPCell.ALIGN_MIDDLE != align) {
+            cell.setHorizontalAlignment(align);
+        } else {
+            //设置单元格的垂直方向对齐方式
+            cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);
+            //设置单元格的水平方向对齐方式
+            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        }
+        return cell;
+    }
 
     private static PdfPCell cell(Font tableFont, String content, int align, Integer colspan, Integer rowspan, Integer lineSpacing) {
         PdfPCell cell = new PdfPCell(new Phrase(content, tableFont));
@@ -161,9 +184,9 @@ public class PdfUtil {
     public static void dealEduBody(Document document, PdfPTable table, Font tableFont, Map<String, Object> data) throws Exception {
         //第一行
         createPDFCell(tableFont, table, "时间", Element.ALIGN_MIDDLE, 1, 1);
-        createPDFCell(tableFont, table, data.get("time").toString(), Element.ALIGN_MIDDLE, 2, 1);
+        createPDFCell(tableFont, table, data.get("time").toString(), Element.ALIGN_LEFT, 5, 1);
         createPDFCell(tableFont, table, "地点", Element.ALIGN_MIDDLE, 1, 1);
-        createPDFCell(tableFont, table, data.get("address").toString(), Element.ALIGN_MIDDLE, 2, 1);
+        createPDFCell(tableFont, table, data.get("address").toString(), Element.ALIGN_MIDDLE, 5, 1);
         //第二行
         createPDFCell(tableFont, table, "主持人", Element.ALIGN_MIDDLE, 1, 1);
         createPDFCell(tableFont, table, data.get("hostName").toString(), Element.ALIGN_MIDDLE, 2, 1);
@@ -665,10 +688,11 @@ public class PdfUtil {
         PdfUtil.createPDFCell(tableFont, table, data.getCheckTypeText(), Element.ALIGN_MIDDLE, 11, 1);
 
         PdfUtil.createPDFCell(tableFont, table, "检查开始时间", Element.ALIGN_MIDDLE, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getStartTimeStr(), Element.ALIGN_MIDDLE, 4, 1);
+        //PdfUtil.createPDFCell(tableFont, table, data.getStartTimeStr(), Element.ALIGN_MIDDLE, 4, 1);
+        table.addCell( cell(tableFont, data.getStartTimeStr(), Element.ALIGN_MIDDLE, 4, 1,2,2));
         PdfUtil.createPDFCell(tableFont, table, "检查结束时间", Element.ALIGN_MIDDLE, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getEndTimeStr(), Element.ALIGN_MIDDLE, 4, 1);
-
+        //PdfUtil.createPDFCell(tableFont, table, data.getEndTimeStr(), Element.ALIGN_MIDDLE, 4, 1);
+        table.addCell( cell(tableFont, data.getEndTimeStr(), Element.ALIGN_MIDDLE, 4, 1,2,2));
         PdfUtil.createPDFCell(tableFont, table, "检查单位", Element.ALIGN_MIDDLE, 3, 1);
         PdfUtil.createPDFCell(tableFont, table, data.getCheckOrgName(), Element.ALIGN_MIDDLE, 4, 1);
         PdfUtil.createPDFCell(tableFont, table, "检查组成员", Element.ALIGN_MIDDLE, 3, 1);

+ 3 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysDeptController.java

@@ -25,6 +25,7 @@ import com.xunmei.system.api.domain.SysUser;
 import com.xunmei.system.api.vo.FindOrgTypes;
 import com.xunmei.system.api.vo.SysOrgVO;
 import com.xunmei.system.dto.SysOrgDto;
+import com.xunmei.system.dto.SysSelectOrgComponentDto;
 import com.xunmei.system.service.ISysDeptService;
 import com.xunmei.system.service.ISysOrgService;
 import com.xunmei.system.service.ISysUserService;
@@ -507,8 +508,8 @@ public class SysDeptController extends BaseController {
 
     @ApiOperation(value = "根据查询条件获取机构列表")
     @PostMapping("/selectOrgList")
-    public List<SysOrg> selectOrgList(@RequestBody SysOrgDto org){
-        List<SysOrg> sysOrgs = orgService.selectOrgList(org);
+    public List<SysSelectOrgComponentDto> selectOrgList(@RequestBody SysOrgDto org){
+        List<SysSelectOrgComponentDto> sysOrgs = orgService.selectOrgList(org);
         return sysOrgs;
     }
 

+ 49 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/dto/SysSelectOrgComponentDto.java

@@ -0,0 +1,49 @@
+package com.xunmei.system.dto;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @description:
+ * 机构查询实体
+ */
+@Data
+public class SysSelectOrgComponentDto {
+
+    /**
+     * 机构id
+     */
+    private Long id;
+
+    /**
+     * 机构类型
+     */
+    private String type;
+
+    /**
+     * 网点层级
+     */
+    private String yewdLevel;
+
+    /**
+     * 简称
+     */
+    private String shortName;
+
+    /**
+     * 机构路径
+     */
+    private String path;
+
+    /**
+     * 地区
+     */
+    private String affiliatedArea;
+
+    /**
+     * 行社
+     */
+    private String affiliatedBank;
+}

+ 2 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java

@@ -7,6 +7,7 @@ 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.dto.SysOrgDto;
+import com.xunmei.system.dto.SysSelectOrgComponentDto;
 import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgExtendExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionDetailExport;
@@ -197,7 +198,7 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
      * @param org
      * @return
      */
-    List<SysOrg> selectOrgs(@Param("org") SysOrgDto org);
+    List<SysSelectOrgComponentDto> selectOrgs(@Param("org") SysOrgDto org);
 
     List<OrgExtendExport> exportOrgExtend(@Param("org") SysOrg org,@Param("typeList") List<Integer> typeList);
 

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

@@ -8,6 +8,7 @@ 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.dto.SysOrgDto;
+import com.xunmei.system.dto.SysSelectOrgComponentDto;
 import com.xunmei.system.util.ConstructionDetailExport;
 import com.xunmei.system.util.OrgPhysicalDefenseConstructionExport;
 import com.xunmei.system.util.SecurityWorkExport;
@@ -183,7 +184,7 @@ public interface ISysOrgService extends IService<SysOrg> {
      * @param org
      * @return
      */
-    List<SysOrg> selectOrgList(SysOrgDto org);
+    List<SysSelectOrgComponentDto> selectOrgList(SysOrgDto org);
 
     void exportOrgExtend(SysOrg dept, HttpServletResponse response) throws Exception;
 

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

@@ -33,6 +33,7 @@ import com.xunmei.system.api.vo.SysOrgVO;
 import com.xunmei.system.domain.SysPhysicalDefenseConstruction;
 import com.xunmei.system.dto.SysOrgDto;
 import com.xunmei.system.dto.SysPhysicalDefenseConstructionDTO;
+import com.xunmei.system.dto.SysSelectOrgComponentDto;
 import com.xunmei.system.mapper.SysOrgExtendMapper;
 import com.xunmei.system.mapper.SysOrgMapper;
 import com.xunmei.system.mapper.SysPhysicalDefenseConstructionMapper;
@@ -1220,7 +1221,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
     }
 
     @Override
-    public List<SysOrg> selectOrgList(SysOrgDto org) {
+    public List<SysSelectOrgComponentDto> selectOrgList(SysOrgDto org) {
         if(ObjectUtil.isNotEmpty(org.getOrgId())){
             SysOrg sysOrg = getById(org.getOrgId());
 
@@ -1228,7 +1229,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
                 org.setOrgPath(sysOrg.getPath());
             }
         }
-        List<SysOrg> sysOrgs = baseMapper.selectOrgs(org);
+        List<SysSelectOrgComponentDto> sysOrgs = baseMapper.selectOrgs(org);
         return sysOrgs;
     }
 

+ 8 - 2
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -1354,9 +1354,15 @@ and
         sort
     </select>
 
-    <select id="selectOrgs" resultType="com.xunmei.system.api.domain.SysOrg">
+    <select id="selectOrgs" resultType="com.xunmei.system.dto.SysSelectOrgComponentDto">
         SELECT
-        *
+        id,
+        type,
+        yewd_level,
+        short_name,
+        path,
+        affiliated_area,
+        affiliated_bank
         FROM
         sys_org
         WHERE 1=1