Browse Source

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

jiawuxian 1 year ago
parent
commit
031234059e

+ 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());

+ 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();

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

@@ -519,12 +519,11 @@ 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);
     }

+ 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>