Parcourir la source

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

jingyuanchao il y a 1 an
Parent
commit
6e77415bcd

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

+ 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

@@ -523,12 +523,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>