Browse Source

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

zhulu 1 năm trước cách đây
mục cha
commit
2668ef37c1
14 tập tin đã thay đổi với 131 bổ sung142 xóa
  1. 3 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SafeCheckTaskRegisterBookVo.java
  2. 1 1
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/Constants.java
  3. 3 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluatePlanController.java
  4. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/ICoreEvaluatePlanService.java
  5. 6 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluatePlanServiceImpl.java
  6. 4 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/panel/service/impl/PanelServiceImpl.java
  7. 7 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/service/impl/QuestionServiceImpl.java
  8. 9 9
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppRuleItemServiceImpl.java
  9. 7 14
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/CoreSafecheckPlanServiceImpl.java
  10. 6 55
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/LocalSysFileServiceImpl.java
  11. 48 44
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java
  12. 2 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysOrgMapper.java
  13. 1 5
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java
  14. 33 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

+ 3 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SafeCheckTaskRegisterBookVo.java

@@ -33,6 +33,9 @@ public class SafeCheckTaskRegisterBookVo {
   @ApiModelProperty("受检机构名称")
   private String orgName;
 
+  @ApiModelProperty(value = "受检机构")
+  private String orgPath;
+
   @ApiModelProperty("受检日期 eg: 2000年1月2日")
   private String dateStr;
 

+ 1 - 1
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/Constants.java

@@ -158,5 +158,5 @@ public class Constants {
 
     public static final String HMS_FORMAT = "yyyy-MM-dd HH:mm:ss";
 
-    public static final String HM_FORMAT = "yyyyMMddHHmm";
+    public static final String HM_FORMAT = "yyyyMMddHHmmss";
 }

+ 3 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluatePlanController.java

@@ -122,9 +122,9 @@ public class CoreEvaluatePlanController extends BaseController {
      */
     @ApiOperation(value = "下发")
     @RequiresPermissions("core:evaluatePlan:distribute")
-    @GetMapping(value = "/distribute/{id}")
-    public AjaxResult distribute(@PathVariable(value = "id", required = false) Long id) {
-        return toAjax(coreEvaluatePlanService.distribute(id));
+    @GetMapping(value = "/distribute/{id}/{immediateEffect}")
+    public AjaxResult distribute(@PathVariable(value = "id", required = false) Long id ,@PathVariable Boolean immediateEffect) {
+        return toAjax(coreEvaluatePlanService.distribute(id,immediateEffect));
     }
 
     @ApiOperation(value = "取消下发")

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/ICoreEvaluatePlanService.java

@@ -60,7 +60,7 @@ public interface ICoreEvaluatePlanService extends IService<CoreEvaluatePlan> {
      * @param id
      * @return
      */
-    int distribute(Long id);
+    int distribute(Long id,Boolean immediateEffect);
 
     int withdraw(Long id);
 

+ 6 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluatePlanServiceImpl.java

@@ -112,9 +112,9 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
      */
     @Override
     public int insertCoreEvaluatePlan(CoreEvaluatePlanDTO coreEvaluatePlanDTO) {
-        if (!check(SecurityUtils.getUserId())) {
+  /*      if (!check(SecurityUtils.getUserId())) {
             throw new RuntimeException("该角色没有新增权限");
-        }
+        }*/
         List<CoreEvaluateContent> coreEvaluateContentList = coreEvaluatePlanDTO.getCoreEvaluateContentList();
         List<Long> collect = coreEvaluateContentList.stream().map(CoreEvaluateContent::getCode).collect(Collectors.toList());
         Set<Long> set = new HashSet<>(collect);
@@ -194,9 +194,9 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
      */
     @Override
     public int updateCoreEvaluatePlan(CoreEvaluatePlanDTO coreEvaluatePlanDTO) {
-        if (!check(SecurityUtils.getUserId())) {
+/*        if (!check(SecurityUtils.getUserId())) {
             throw new RuntimeException("该角色没有修改权限");
-        }
+        }*/
         CoreEvaluatePlan coreEvaluatePlan = coreEvaluatePlanMapper.selectCoreEvaluatePlanById(coreEvaluatePlanDTO.getId());
         QueryWrapper queryWrapper = new QueryWrapper();
         queryWrapper.eq("org_id", coreEvaluatePlan.getOrgId());
@@ -244,9 +244,10 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
     }
 
     @Override
-    public int distribute(Long id) {
+    public int distribute(Long id,Boolean immediateEffect) {
         CoreEvaluatePlanVO coreEvaluatePlanVO = this.selectCoreEvaluatePlanById(id);
         CoreEvaluatePlan coreEvaluatePlan = baseMapper.selectById(id);
+        coreEvaluatePlan.setBuildTaskNow(immediateEffect);
         SysOrg org = new SysOrg();
         org.setType(Integer.valueOf(coreEvaluatePlanVO.getOrgType()));
         org.setPath(coreEvaluatePlanVO.getOrgPath());

+ 4 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/panel/service/impl/PanelServiceImpl.java

@@ -99,12 +99,13 @@ public class PanelServiceImpl implements PanelService {
 
     @Override
     public List<PanelResultVo> selectPage() throws ExecutionException, InterruptedException, TimeoutException {
+        Long userId=SecurityUtils.getUserId();
         List<Long> roles = RemoteCallHandlerExecutor.executeRemoteCall(
-                () -> roleService.getUserRoleId(SecurityUtils.getUserId(), SecurityConstants.FROM_SOURCE),
+                () -> roleService.getUserRoleId(userId, SecurityConstants.FROM_SOURCE),
                 ErrorMsgConstants.QUERY_USER_ROLE_ERROR);
 
         PanelListDto panelListDto = PanelAdapter.getMapperSelectParam(SecurityUtils.getLoginUser().getOrgId(),
-                roles, SecurityUtils.getUserId());
+                roles, userId);
 
 
         //履职任务
@@ -184,6 +185,7 @@ public class PanelServiceImpl implements PanelService {
             vo.setDataList(data);
             list.add(vo);
         }
+
         return list;
 
     }

+ 7 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/question/service/impl/QuestionServiceImpl.java

@@ -385,7 +385,11 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
             throw new ServiceException("至少需要一个按钮权限");
         }
 
-        List<Long> ownPermission = remoteUserService.checkUserPermission(btns, SecurityUtils.getUserId(), SecurityConstants.INNER);
+//        if (!ObjectUtil.equal(userId, SecurityUtils.getUserId())) {
+//            log.error("用户id不一致:" + userId + "-" + SecurityUtils.getUserId());
+//        }
+
+        List<Long> ownPermission = remoteUserService.checkUserPermission(btns, panelListDto.getUserId(), SecurityConstants.INNER);
         if (ownPermission.contains(reformButton)) {
             wrapper.or(w -> w.eq(Question::getOrgId, panelListDto.getOrgId()).eq(Question::getReformStatus, QuestionReformEnum.Unreform.getValue()));
         }
@@ -395,10 +399,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         }
 
         if (ownPermission.contains(dissentButton)) {
-            wrapper.or(w -> w.eq(Question::getSubmitorId, SecurityUtils.getUserId())
+            wrapper.or(w -> w.eq(Question::getSubmitorId, panelListDto.getUserId())
                     .eq(Question::getConfirmStatus, QuestionConfirmEnum.Dissent.getValue()));
         }
-
+       
         return wrapper;
     }
 

+ 9 - 9
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppRuleItemServiceImpl.java

@@ -99,13 +99,13 @@ public class AppRuleItemServiceImpl extends ServiceImpl<AppRuleItemMapper, AppRu
         List<Long> pointIds = appRulePointMapper.selectPointIds(item.getId());
         if (pointIds.size() > 0) {
             List<Long> idList2 = pointDtoList.stream().map(AppRulePointDto::getId).collect(Collectors.toList());
-            pointIds= pointIds.stream().filter(p->!idList2.contains(p))
+            pointIds = pointIds.stream().filter(p -> !idList2.contains(p))
                     .collect(Collectors.toList());
-            if(CollectionUtil.isNotEmpty(pointIds)){
-                Integer isUsed= appRulePointMapper.checkIsJoinResumptionPlan(pointIds);
-                if(ObjectUtil.isNotNull(isUsed)){
+            if (CollectionUtil.isNotEmpty(pointIds)) {
+                Integer isUsed = appRulePointMapper.checkIsJoinResumptionPlan(pointIds);
+                if (ObjectUtil.isNotNull(isUsed)) {
                     throw new RuntimeException("履职内容已被履职计划使用,不能删除!");
-                }else{
+                } else {
                     appRulePointMapper.deleteBatchIds(pointIds);
                 }
             }
@@ -144,12 +144,12 @@ public class AppRuleItemServiceImpl extends ServiceImpl<AppRuleItemMapper, AppRu
     @Override
     public TableDataInfo pageQuery(AppRuleItemPageDto itemPageDto) {
         Page<AppRuleItemPageVo> page;
-
+        String pointName = itemPageDto.getPointName();
         page = appRuleItemMapper.pageQuery(itemPageDto.getPageDto(), itemPageDto);
 //        int order = itemPageDto() * itemPageDto.getSize();
         for (AppRuleItemPageVo vo : page.getRecords()) {
 //            vo.setOrder(++order);
-            final List<AppRulePointDetailDto> pointList = appRulePointMapper.selectDataListByItemId(vo.getId(),itemPageDto.getPointName());
+            final List<AppRulePointDetailDto> pointList = appRulePointMapper.selectDataListByItemId(vo.getId(), pointName);
             vo.setPointDtoList(pointList);
         }
 
@@ -165,7 +165,7 @@ public class AppRuleItemServiceImpl extends ServiceImpl<AppRuleItemMapper, AppRu
         AppRuleItemDetailDto appRuleItemDto = new AppRuleItemDetailDto();
         BeanUtils.copyProperties(appRuleItem, appRuleItemDto);
 
-        List<AppRulePointDetailDto> list = appRulePointMapper.selectDataListByItemId(id,null);
+        List<AppRulePointDetailDto> list = appRulePointMapper.selectDataListByItemId(id, null);
         appRuleItemDto.setPointDtoList(list);
         return appRuleItemDto;
     }
@@ -189,7 +189,7 @@ public class AppRuleItemServiceImpl extends ServiceImpl<AppRuleItemMapper, AppRu
     @Override
     public List<RuleTreeItem> getRuleTree(Long orgId) {
         List<RuleTreeItem> tree = new ArrayList<>();
-        R<List<SysOrgVO>> r = remoteOrgService.hangsheWholePathTree(orgId,SecurityConstants.INNER);
+        R<List<SysOrgVO>> r = remoteOrgService.hangsheWholePathTree(orgId, SecurityConstants.INNER);
         if (ObjectUtil.isNull(r) || ObjectUtil.isNull(r.getData())) {
             return tree;
         }

+ 7 - 14
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/service/impl/CoreSafecheckPlanServiceImpl.java

@@ -934,12 +934,9 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
         registerBookPdf.setId(appSafetyCheckTask.getId());
         registerBookPdf.setRegisterBookType(RegisterBookType.SAFE_CHECK_REPORT.getNum());
         registerBookPdf.setDate(new Date());
-        SysOrg org = orgService.selectSysOrgById(registerBookVo.getOrgId(), SecurityConstants.INNER);
-        registerBookPdf.setOrgId(org.getId());
-        registerBookPdf.setOrgPath(org.getPath());
+        registerBookPdf.setOrgId(registerBookVo.getOrgId());
+        registerBookPdf.setOrgPath(registerBookVo.getOrgPath());
         registerBookPdf.setFileUrl(url);
-        //registerBookPdf.setFileName(StringUtils.substringAfterLast(url, "\\"));
-        //registerBookPdf.setFileName(StringUtils.substringAfterLast(url, File.separator));
         registerBookPdf.setFileName(registerBookVo.getDest());
         registerBookPdf.setOrgName(registerBookVo.getOrgName());
         if (StringUtils.isEmpty(url) || StringUtils.isEmpty(registerBookPdf.getFileName())) {
@@ -1005,7 +1002,7 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
 
     public SafeCheckTaskRegisterBookVo buildSafetyCheckRegisterBookData(CoreSafetyTask appSafetyCheckTask) {
         SafeCheckTaskRegisterBookVo registerBookVo = new SafeCheckTaskRegisterBookVo();
-        registerBookVo.setTaskTitle(appSafetyCheckTask.getTitle() + getRegisterBookCycleText(Math.toIntExact(appSafetyCheckTask.getCheckCycle()), appSafetyCheckTask.getSubmitTime()));
+        registerBookVo.setTaskTitle(appSafetyCheckTask.getTitle() /*+ getRegisterBookCycleText(Math.toIntExact(appSafetyCheckTask.getCheckCycle()), appSafetyCheckTask.getSubmitTime())*/);
         final SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日");
         String dateStr = format.format(appSafetyCheckTask.getSubmitTime());
         registerBookVo.setDateStr(dateStr);
@@ -1013,17 +1010,13 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
         registerBookVo.setCheckOrgName(appSafetyCheckTask.getCheckOrgName());
         registerBookVo.setOrgId(appSafetyCheckTask.getOrgId());
         registerBookVo.setOrgName(appSafetyCheckTask.getOrgName());
+        registerBookVo.setOrgPath(appSafetyCheckTask.getOrgPath());
         String checkUserInfo = appSafetyCheckTask.getSubmitBy();
         registerBookVo.setCheckUserInfo(checkUserInfo);
         registerBookVo.setCheckTeam(appSafetyCheckTask.getCheckTeam());
-        if (ObjectUtil.isNull(appSafetyCheckTask.getCheckType())) {
-            registerBookVo.setCheckTypeText(StringUtil.EMPTY_STRING);
-        } else {
-            registerBookVo.setCheckTypeText(DictUtils.getDictLabel(DictConstants.CHECK_TYPE, appSafetyCheckTask.getCheckType().intValue()));
-
-        }
+        final CoreSafecheckPlan plan = coreSafecheckPlanMapper.get(appSafetyCheckTask.getPlanId());
+        registerBookVo.setCheckTypeText(DictUtils.getDictLabel(DictConstants.CHECK_TYPE, plan.getCheckType().intValue()));
         List<CheckDataVo> pointCheckDataList = new ArrayList<>();
-
         List<AppTaskRegisterPointVo> appTaskRegisterPointVos = coreSafetyTaskMapper.selectPointByTask(appSafetyCheckTask.getId());
         for (AppTaskRegisterPointVo vo :
                 appTaskRegisterPointVos) {
@@ -1037,7 +1030,7 @@ public class CoreSafecheckPlanServiceImpl extends ServiceImpl<CoreSafecheckPlanM
 
         registerBookVo.setCheckDatas(pointCheckDataList);
 
-        String fileName = registerBookPdfService.getPdfFileName(RegisterBookType.SAFE_CHECK_REPORT,registerBookVo.getOrgName());
+        String fileName = registerBookPdfService.getPdfFileName(RegisterBookType.SAFE_CHECK_REPORT, registerBookVo.getOrgName());
         registerBookVo.setDest(fileName);
         return registerBookVo;
     }

+ 6 - 55
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/LocalSysFileServiceImpl.java

@@ -314,67 +314,18 @@ public class LocalSysFileServiceImpl implements ISysFileService {
         final PdfPTable table = pdfTableVo.getTable();
         final BaseFont fs = pdfTableVo.getFs();
         final Font tableFont = pdfTableVo.getTableFont();
-        Font font = new Font(fs, 9, Font.NORMAL);
-        PdfUtil.dealHeader(document, fs, "监控阅情况登记簿", 14);
+
+        PdfUtil.dealHeader(document, fs, "监控阅情况登记簿", 14);
         String checkTime = data.getTaskStartTime();
         String checkUser = data.getCheckUser();
 
-        PdfPCell orgCell = new PdfPCell(new Phrase("调阅单位", font));
-        orgCell.setColspan(8);
-        orgCell.setRowspan(1);
-        orgCell.setBorder(Rectangle.NO_BORDER);
-        orgCell.setHorizontalAlignment(Element.ALIGN_CENTER);
-
-        PdfPCell orgNameCell = new PdfPCell(new Phrase(data.getOrgName(), font));
-        orgNameCell.setColspan(15);
-        orgNameCell.setRowspan(1);
-        orgNameCell.setBorder(Rectangle.NO_BORDER);
-        orgNameCell.setHorizontalAlignment(Element.ALIGN_CENTER);
-
-        PdfPCell userCell = new PdfPCell(new Phrase("调阅人", font));
-        userCell.setColspan(8);
-        userCell.setRowspan(1);
-        userCell.setBorder(Rectangle.NO_BORDER);
-        userCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-
-        PdfPCell userNameCell = new PdfPCell(new Phrase(checkUser, font));
-        userNameCell.setColspan(15);
-        userNameCell.setRowspan(1);
-        userNameCell.setBorder(Rectangle.NO_BORDER);
-        userNameCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-
-        PdfPCell timeNameCell = new PdfPCell(new Phrase("调阅时间", font));
-        timeNameCell.setColspan(9);
-        timeNameCell.setRowspan(1);
-        timeNameCell.setBorder(Rectangle.NO_BORDER);
-        timeNameCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-
-        PdfPCell timeCell = new PdfPCell(new Phrase(checkTime, font));
-        timeCell.setColspan(37);
-        timeCell.setRowspan(1);
-        timeCell.setBorder(Rectangle.NO_BORDER);
-        timeCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-
-      /*  PdfPCell findCell = new PdfPCell(new Phrase("发现问题情况", font));
-        findCell.setColspan(46);
-        findCell.setRowspan(1);
-        findCell.setBorder(Rectangle.NO_BORDER);
-        findCell.setHorizontalAlignment(Element.ALIGN_RIGHT);*/
-
-/*        table.addCell(orgCell);
-        table.addCell(orgNameCell);
-        table.addCell(userCell);
-        table.addCell(userNameCell);
-        table.addCell(timeNameCell);
-        table.addCell(timeCell);*/
-        //    table.addCell(findCell);
         Font titleFont = new Font(fs, 8, Font.NORMAL);
-        PdfUtil.createPDFCell(titleFont, table, "调阅单位", Element.ALIGN_MIDDLE, 8, 0);
-        PdfUtil.createPDFCell(titleFont, table, data.getOrgName(), Element.ALIGN_MIDDLE, 15, 0);
+        PdfUtil.createPDFCell(titleFont, table, "调阅单位", Element.ALIGN_MIDDLE, 10, 0);
+        PdfUtil.createPDFCell(titleFont, table, data.getOrgName(), Element.ALIGN_MIDDLE, 13, 0);
         PdfUtil.createPDFCell(titleFont, table, "调阅人", Element.ALIGN_MIDDLE, 8, 0);
         PdfUtil.createPDFCell(titleFont, table, checkUser, Element.ALIGN_MIDDLE, 15, 0);
-        PdfUtil.createPDFCell(titleFont, table, "调阅时间", Element.ALIGN_MIDDLE, 9, 0);
-        PdfUtil.createPDFCell(titleFont, table, checkTime, Element.ALIGN_MIDDLE, 37, 0);
+        PdfUtil.createPDFCell(titleFont, table, "调阅时间", Element.ALIGN_MIDDLE, 10, 0);
+        PdfUtil.createPDFCell(titleFont, table, checkTime, Element.ALIGN_MIDDLE, 36, 0);
         PdfUtil.createPDFCell(titleFont, table, "发现问题情况", Element.ALIGN_MIDDLE, 46, 0);
         PdfUtil.dealAccessPBody(document, table, tableFont, titleFont, data.getDataVos());
         document.close();

+ 48 - 44
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -81,14 +81,17 @@ public class PdfUtil {
         if (rowspan != null && rowspan > 0) {
             cell.setRowspan(rowspan);
         }
-        cell.setPaddingTop(8f);
+       // cell.setPaddingTop(8f);
         cell.setPaddingLeft(8f);
         cell.setPaddingRight(8f);
         cell.setPaddingBottom(8f);
+        cell.setLeading(1F,1.5F);
         if (PdfPCell.ALIGN_MIDDLE != align) {
             cell.setHorizontalAlignment(align);
         } else {
-            cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);//设置单元格的垂直对齐方式
+            //设置单元格的垂直方向对齐方式
+            cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);
+            //设置单元格的水平方向对齐方式
             cell.setHorizontalAlignment(Element.ALIGN_CENTER);
         }
         return cell;
@@ -102,6 +105,7 @@ public class PdfUtil {
         if (rowspan != null && rowspan > 0) {
             cell.setRowspan(rowspan);
         }
+        cell.setNoWrap(false);
         cell.setLeading(lineSpacing, 0);
         if (PdfPCell.ALIGN_MIDDLE != align) {
             cell.setHorizontalAlignment(align);
@@ -175,11 +179,11 @@ public class PdfUtil {
         createPDFCell(tableFont, table, data.get("recorderName").toString(), Element.ALIGN_MIDDLE, 2, 1);
 
         //内容
-        createPDFCell(tableFont, table, "内容", Element.ALIGN_MIDDLE, 1, 140);
-        createPDFCell(tableFont, table, data.get("content").toString(), Element.ALIGN_LEFT, 5, 140);
-        createPDFCell(tableFont, table, "总结", Element.ALIGN_MIDDLE, 1, 140);
-        createPDFCell(tableFont, table, data.get("note").toString(), Element.ALIGN_LEFT, 5, 140);
-        createPDFCell(tableFont, table, "参会人员签字", Element.ALIGN_MIDDLE, 1, 140);
+        createPDFCell(tableFont, table, "内容", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("content").toString(), Element.ALIGN_LEFT, 5, 1);
+        createPDFCell(tableFont, table, "总结", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("note").toString(), Element.ALIGN_LEFT, 5, 1);
+        createPDFCell(tableFont, table, "参会人员签字", Element.ALIGN_MIDDLE, 1, 1);
         dealEduImageCell((List<String>) data.get("signImage"), table, 5, 30, 30);
         document.add(table);
 
@@ -189,7 +193,6 @@ public class PdfUtil {
         for (List<String> stringList : listList) {
             PdfPTable innerTable = new PdfPTable(6);
             createPDFCell(tableFont, innerTable, "图片附件", Element.ALIGN_MIDDLE, 1, 1);
-            innerTable.setSpacingBefore(10f);
             //一行展示一张图片
             dealEduImageCell(new ArrayList<>(stringList), innerTable, 2, 150, 200);
             document.newPage();
@@ -340,19 +343,19 @@ public class PdfUtil {
 
     public static void dealDrillBody(Document document, PdfPTable table, Font tableFont, Map<String, Object> data) throws Exception {
         //第一行
-        createPDFCell(tableFont, table, "演练单位", Element.ALIGN_CENTER, 1, 1);
-        createPDFCell(tableFont, table, data.get("orgName").toString(), Element.ALIGN_CENTER, 2, 1);
-        createPDFCell(tableFont, table, "地点", Element.ALIGN_CENTER, 1, 1);
-        createPDFCell(tableFont, table, data.get("drillSite").toString(), Element.ALIGN_CENTER, 2, 1);
+        createPDFCell(tableFont, table, "演练单位", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("orgName").toString(), Element.ALIGN_MIDDLE, 2, 1);
+        createPDFCell(tableFont, table, "地点", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("drillSite").toString(), Element.ALIGN_MIDDLE, 2, 1);
         //第二行
-        createPDFCell(tableFont, table, "指挥人", Element.ALIGN_CENTER, 1, 1);
-        createPDFCell(tableFont, table, data.get("hostName").toString(), Element.ALIGN_CENTER, 2, 1);
-        createPDFCell(tableFont, table, "记录人", Element.ALIGN_CENTER, 1, 1);
-        createPDFCell(tableFont, table, data.get("recorderName").toString(), Element.ALIGN_CENTER, 2, 1);
+        createPDFCell(tableFont, table, "指挥人", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("hostName").toString(), Element.ALIGN_MIDDLE, 2, 1);
+        createPDFCell(tableFont, table, "记录人", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("recorderName").toString(), Element.ALIGN_MIDDLE, 2, 1);
         //第三行
-        createPDFCell(tableFont, table, "演练时间", Element.ALIGN_CENTER, 1, 1);
+        createPDFCell(tableFont, table, "演练时间", Element.ALIGN_MIDDLE, 1, 1);
         createPDFCell(tableFont, table, data.get("drillTime").toString(), Element.ALIGN_LEFT, 5, 1);
-        createPDFCell(tableFont, table, "演练项目", Element.ALIGN_CENTER, 1, 1);
+        createPDFCell(tableFont, table, "演练项目", Element.ALIGN_MIDDLE, 1, 1);
         createPDFCell(tableFont, table, data.get("typeText").toString(), Element.ALIGN_LEFT, 5, 1);
         //预设案由
         createPDFCell(tableFont, table, "预设案由", Element.ALIGN_MIDDLE, 1, 1);
@@ -424,6 +427,7 @@ public class PdfUtil {
         PdfPTable imageInnerTable = new PdfPTable(imageNumsOfRow);
         imageInnerTable.setSplitRows(true);
         imageInnerTable.setSplitLate(false);
+        imageInnerTable.setWidthPercentage(100F);
         for (String image : imageList) {
             Image imageData = convertFileToByteArray(new File(image));
             if (imageData != null) {
@@ -431,10 +435,11 @@ public class PdfUtil {
             }
             PdfPCell innerCell = new PdfPCell(imageData);
             innerCell.setNoWrap(false);
-            innerCell.setPaddingTop(8f);
+          /*  innerCell.setPaddingTop(8f);
             innerCell.setPaddingLeft(8f);
             innerCell.setPaddingRight(8f);
-            innerCell.setPaddingBottom(8f);
+            innerCell.setPaddingBottom(8f);*/
+
             innerCell.setBorder(Rectangle.NO_BORDER);
             innerCell.setHorizontalAlignment(Element.ALIGN_CENTER);
             innerCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
@@ -525,40 +530,39 @@ public class PdfUtil {
         PdfUtil.createPDFCell(tableTitleFont, table, "检查项目", Element.ALIGN_MIDDLE, 9, 0);
         PdfUtil.createPDFCell(tableTitleFont, table, "存在问题", Element.ALIGN_MIDDLE, 9, 0);
         for (int i = 1; i <= data.size(); i++) {
-            PdfUtil.createPDFCell(tableFont, table, String.valueOf(i), Element.ALIGN_MIDDLE, 3, 0, 10);
-            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getHostName(), Element.ALIGN_MIDDLE, 16, 0, 10);
-            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getVideoChannelName(), Element.ALIGN_MIDDLE, 9, 0, 10);
-            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getProject(), Element.ALIGN_MIDDLE, 9, 0, 10);
-            //   PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getSituation().equals("0") ? "正常" : "异常", Element.ALIGN_MIDDLE, 2, 0, 10);
-            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getAbnormalIllustrate(), Element.ALIGN_MIDDLE, 9, 0, 10);
+            PdfUtil.createPDFCell(tableFont, table, String.valueOf(i), Element.ALIGN_MIDDLE, 3, 0);
+            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getHostName(), Element.ALIGN_MIDDLE, 16, 0);
+            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getVideoChannelName(), Element.ALIGN_MIDDLE, 9, 0);
+            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getProject(), Element.ALIGN_MIDDLE, 9, 0);
+            PdfUtil.createPDFCell(tableFont, table, data.get(i - 1).getAbnormalIllustrate(), Element.ALIGN_MIDDLE, 9, 0);
         }
         document.add(table);
     }
 
     public static void dealSafeCheckPBody(Document document, PdfPTable table, Font tableFont, SafeCheckTaskRegisterBookVo data) throws DocumentException {
-        PdfUtil.createPDFCell(tableFont, table, "被查单位", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getOrgName(), Element.ALIGN_CENTER, 4, 1);
-        PdfUtil.createPDFCell(tableFont, table, "被查日期", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getDateStr(), Element.ALIGN_CENTER, 4, 1);
+        PdfUtil.createPDFCell(tableFont, table, "被查单位", Element.ALIGN_MIDDLE, 3, 1);
+        PdfUtil.createPDFCell(tableFont, table, data.getOrgName(), Element.ALIGN_MIDDLE, 4, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查日期", Element.ALIGN_MIDDLE, 3, 1);
+        PdfUtil.createPDFCell(tableFont, table, data.getDateStr(), Element.ALIGN_MIDDLE, 4, 1);
 
-        PdfUtil.createPDFCell(tableFont, table, "检查类型", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getCheckTypeText(), Element.ALIGN_CENTER, 4, 1);
-        PdfUtil.createPDFCell(tableFont, table, "检查名称", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getTaskTitle(), Element.ALIGN_CENTER, 4, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查类型", Element.ALIGN_MIDDLE, 3, 1);
+        PdfUtil.createPDFCell(tableFont, table, data.getCheckTypeText(), Element.ALIGN_MIDDLE, 4, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查名称", Element.ALIGN_MIDDLE, 3, 1);
+        PdfUtil.createPDFCell(tableFont, table, data.getTaskTitle(), Element.ALIGN_MIDDLE, 4, 1);
 
-        PdfUtil.createPDFCell(tableFont, table, "检查单位", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getCheckOrgName(), Element.ALIGN_CENTER, 4, 1);
-        PdfUtil.createPDFCell(tableFont, table, "检查人", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getCheckUserInfo(), Element.ALIGN_CENTER, 4, 1);
+        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);
+        PdfUtil.createPDFCell(tableFont, table, data.getCheckUserInfo(), Element.ALIGN_MIDDLE, 4, 1);
 
-        PdfUtil.createPDFCell(tableFont, table, "检查组成员", Element.ALIGN_CENTER, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, data.getCheckTeam(), Element.ALIGN_CENTER, 11, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查组成员", Element.ALIGN_MIDDLE, 3, 1);
+        PdfUtil.createPDFCell(tableFont, table, data.getCheckTeam(), Element.ALIGN_MIDDLE, 11, 1);
 
-        PdfUtil.createPDFCell(tableFont, table, "发现问题情况", Element.ALIGN_CENTER, 14, 1);
+        PdfUtil.createPDFCell(tableFont, table, "发现问题情况", Element.ALIGN_MIDDLE, 14, 1);
 
-        PdfUtil.createPDFCell(tableFont, table, "序号", Element.ALIGN_CENTER, 2, 1);
-        PdfUtil.createPDFCell(tableFont, table, "检查项目", Element.ALIGN_CENTER, 6, 1);
-        PdfUtil.createPDFCell(tableFont, table, "存在问题", Element.ALIGN_CENTER, 6, 1);
+        PdfUtil.createPDFCell(tableFont, table, "序号", Element.ALIGN_MIDDLE, 2, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查项目", Element.ALIGN_MIDDLE, 6, 1);
+        PdfUtil.createPDFCell(tableFont, table, "存在问题", Element.ALIGN_MIDDLE, 6, 1);
         final Optional<CheckDataVo> optional = data.getCheckDatas().stream().filter(res -> ObjectUtil.isNotEmpty(res.getResRemark())).findAny();
         if (!optional.isPresent()) {
             PdfUtil.createPDFCell(tableFont, table, "1", Element.ALIGN_MIDDLE, 2, 1);

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

@@ -175,6 +175,8 @@ public interface SysOrgMapper extends BaseMapper<SysOrg> {
 
     List<ConstructionDetailExport> selectConstructionDetail(@Param("orgPath") String orgPath);
 
+    List<SysOrg> selectSysOrgByPathAndType(@Param("path") String path, @Param("type") Integer type);
+
     /**
      * @param orgPath
      * @param year

+ 1 - 5
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -334,11 +334,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
 
     @Override
     public List<SysOrg> selectSysOrgByPathAndType(String path, Integer type) {
-        QueryWrapper queryWrapper = new QueryWrapper();
-        queryWrapper.likeRight("path", path);
-        queryWrapper.eq("type", type);
-        queryWrapper.eq("deleted", 0);
-        return sysOrgMapper.selectList(queryWrapper);
+        return sysOrgMapper.selectSysOrgByPathAndType(path,type);
     }
 
     @Override

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

@@ -1155,6 +1155,39 @@ and a.org_path LIKE concat(#{orgPath}, '%')
           AND c.check_type = 1
           AND b.org_path LIKE concat(#{orgPath}, '%')
     </select>
+    <select id="selectSysOrgByPathAndType" resultType="com.xunmei.system.api.domain.SysOrg">
+        SELECT
+            *
+        FROM
+            sys_org
+        WHERE
+            type = #{type}
+          AND deleted = 0
+          AND path LIKE concat(#{path}, '%')
+        ORDER BY
+            FIELD( `name`, '福州', '厦门', '漳州', '泉州', '莆田', '三明', '南平', '龙岩', '宁德' ),
+            FIELD(
+                    short_name,
+                    '福州农商行',
+                    '闽侯联社',
+                    '闽清联社',
+                    '永泰联社',
+                    '长乐农商银行',
+                    '福清汇通农商行',
+                    '平潭农商银行',
+                    '连江农商行',
+                    '罗源联社',
+                    '厦门农商行',
+                    '漳州农商银行',
+                    '龙梅农商银行',
+                    '云霄联社',
+                    '漳浦农商银行',
+                    '诏安联社',
+                    '长泰联社',
+                    '东山联社',
+                    '南靖联社'
+                )
+    </select>
 
 
 </mapper>