Переглянути джерело

Merge remote-tracking branch 'origin/dev_v1.0.0' into dev_v1.0.0

wangliang 1 рік тому
батько
коміт
6ecf945004

+ 9 - 0
sop-api/src/main/java/com/qmth/sop/server/api/TBSopInfoController.java

@@ -7,6 +7,7 @@ import com.qmth.sop.business.bean.params.SopApplyParam;
 import com.qmth.sop.business.bean.params.SopInfoListParam;
 import com.qmth.sop.business.bean.params.SopSaveParam;
 import com.qmth.sop.business.bean.result.FlowResult;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.entity.TDFormWidgetMetadata;
 import com.qmth.sop.business.service.TBSopInfoService;
 import com.qmth.sop.business.service.TDFormWidgetMetadataService;
@@ -129,4 +130,12 @@ public class TBSopInfoController {
         }
         return ResultUtil.ok(tbSopInfoService.sopSave(sopSaveParam));
     }
+
+    @ApiOperation(value = "sopUsers")
+    @RequestMapping(value = "/user/list", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = SysUser.class)})
+    public Result userList(@ApiParam(value = "sopId", required = true) @RequestParam Long sop_info_id) {
+
+        return ResultUtil.ok(tbSopInfoService.userList(sop_info_id));
+    }
 }

+ 3 - 0
sop-business/src/main/java/com/qmth/sop/business/mapper/TBSopInfoMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.sop.business.bean.dto.DataPermissionDto;
 import com.qmth.sop.business.bean.result.SopInfoResult;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.entity.TBSopInfo;
 import org.apache.ibatis.annotations.Param;
 
@@ -100,4 +101,6 @@ public interface TBSopInfoMapper extends BaseMapper<TBSopInfo> {
      * @return
      */
     List<SopInfoResult> findFlowByServiceId(@Param("serviceId") Long serviceId, @Param("userId") Long userId);
+
+    List<SysUser> userList(@Param("id")  Long id);
 }

+ 2 - 0
sop-business/src/main/java/com/qmth/sop/business/service/TBSopInfoService.java

@@ -146,4 +146,6 @@ public interface TBSopInfoService extends IService<TBSopInfo> {
      * @return
      */
     public Boolean sopSave(SopSaveParam sopSaveParam);
+
+    List<SysUser> userList(Long id);
 }

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -852,6 +852,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         return tfCustomFlowEntityService.updateById(tfCustomFlowEntity);
     }
 
+    @Override
+    public List<SysUser> userList(Long id) {
+        return this.baseMapper.userList(id);
+    }
+
     /**
      * 获取表单内容
      *

+ 2 - 0
sop-business/src/main/java/com/qmth/sop/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -291,7 +291,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                 dto.setStatus(e.getStatus() ? "已阅" : "未阅");
                 dto.setSupplier(e.getSupplier());
                 //时间戳转化为日期字符串
+                if(Objects.nonNull(e.getReceiveTime()))
                 dto.setTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(e.getReceiveTime()));
+                if(Objects.nonNull(e.getType()))
                 dto.setType(e.getType().getTitle());
                 return dto;
             }).collect(Collectors.toList());

+ 4 - 1
sop-business/src/main/resources/db/log/shudonghui_update_log.sql

@@ -299,4 +299,7 @@ CREATE TABLE `sys_custom_addr` (
 ---2023.9.20
 UPDATE `sys_privilege` SET `name` = '启用', `url` = 'enable', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 4, `property` = 'AUTH', `related` = '1045', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1048;
 UPDATE `sys_privilege` SET `name` = '禁用', `url` = 'disable', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 5, `property` = 'AUTH', `related` = '272', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1049;
-UPDATE `sys_privilege` SET `name` = '导入', `url` = 'import', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 6, `property` = 'AUTH', `related` = '1046', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1050;
+UPDATE `sys_privilege` SET `name` = '导入', `url` = 'import', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 6, `property` = 'AUTH', `related` = '1046', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1050;
+
+
+INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1051, '获取SOP用户', '/api/admin/sop/user/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);

+ 2 - 1
sop-business/src/main/resources/mapper/SysMessageMapper.xml

@@ -13,7 +13,8 @@
         s.NAME supplier,
         bs.NAME service,
         c.NAME custom,
-        c.type
+        c.type,
+        m.status
         FROM
         sys_message m
         LEFT JOIN sys_user u ON u.id = m.receive_user_id

+ 11 - 0
sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

@@ -207,4 +207,15 @@
                 and tbsi.status = 'START'
         </where>
     </select>
+
+    <select id="userList" resultType="com.qmth.sop.business.entity.SysUser">
+        SELECT *  FROM sys_user  WHERE
+        id IN (
+        SELECT a.lead_id  FROM t_b_sop_info_detail a  WHERE a.sop_info_id = #{id}
+        UNION ALL
+        SELECT a.region_user_id  FROM t_b_sop_info_detail a  WHERE a.sop_info_id = #{id}
+        UNION ALL
+        SELECT a.engineer_user_id  FROM t_b_sop_info_detail a  WHERE a.sop_info_id = #{id}
+        )
+    </select>
 </mapper>