浏览代码

新增我的工作台-获取延期/违规待办接口

wangliang 1 年之前
父节点
当前提交
58c897d451

+ 1 - 0
sop-business/src/main/java/com/qmth/sop/business/service/TBDelayWarnService.java

@@ -56,5 +56,6 @@ public interface TBDelayWarnService extends IService<TBDelayWarn> {
      * @return
      */
     public IPage<WorkWarnResult> getWarnTaskList(IPage<Map> iPage, Long userId, WarnTypeEnum type, Long serviceId, String customName);
+
     TBDelayWarnResult get(long id);
 }

+ 5 - 1
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -741,4 +741,8 @@ SET org_id=NULL, config_key='sms.flow.project.exchange.finish.code', config_name
 WHERE id=28;
 UPDATE sys_config
 SET org_id=NULL, config_key='sms.violation.remind.code', config_name='违规提醒通知', config_value='SMS_462805303', remark=NULL, enable=1, sort=1, create_id=1, create_time=NULL, update_id=NULL, update_time=NULL
-WHERE id=31;
+WHERE id=31;
+
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(3023, '获取违规延期预警待办接口', '/api/admin/my/work_bench/warn/list', 'URL', 64, 25, 'SYS', NULL, 1, 1, 0);

+ 14 - 0
sop-business/src/main/resources/mapper/TBDelayWarnMapper.xml

@@ -97,5 +97,19 @@
                                left join t_b_service tbs on tbs.id = tbc.service_id
                                left join sys_custom sc on sc.id = tbc.custom_id
                                left join sys_user su ON tbv.create_id = su.id) t
+            <where>
+                <if test="userId != null and userId != ''">
+                    and t.createId = #{userId}
+                </if>
+                <if test="type != null and type != ''">
+                    and t.warnType = #{type}
+                </if>
+                <if test="serviceId != null and serviceId != ''">
+                    and t.serviceId = #{serviceId}
+                </if>
+                <if test="customName != null and customName != ''">
+                    and t.customName like concat('%', #{customName}, '%')
+                </if>
+            </where>
     </select>
 </mapper>

+ 7 - 2
sop-server/src/main/java/com/qmth/sop/server/api/MyWorkBenchController.java

@@ -1,8 +1,10 @@
 package com.qmth.sop.server.api;
 
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.sop.business.bean.result.WorkTaskResult;
+import com.qmth.sop.business.service.TBDelayWarnService;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.WarnTypeEnum;
 import com.qmth.sop.common.util.Result;
@@ -33,15 +35,18 @@ import javax.validation.constraints.Min;
 public class MyWorkBenchController {
     private final static Logger log = LoggerFactory.getLogger(MyWorkBenchController.class);
 
+    @Resource
+    TBDelayWarnService tbDelayWarnService;
+
     @ApiOperation(value = "获取违规/延期预警待办接口")
     @RequestMapping(value = "/warn/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = WorkTaskResult.class)})
-    public Result getFlowTaskList(@ApiParam(value = "用户id") @RequestParam(required = false) Long userId,
+    public Result getWarnTaskList(@ApiParam(value = "用户id") @RequestParam(required = false) Long userId,
                                   @ApiParam(value = "预警类型") @RequestParam(required = false) WarnTypeEnum type,
                                   @ApiParam(value = "服务单元id") @RequestParam(required = false) Long serviceId,
                                   @ApiParam(value = "客户名称") @RequestParam(required = false) String customName,
                                   @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                   @ApiParam(value = "页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        return ResultUtil.ok();
+        return ResultUtil.ok(tbDelayWarnService.getWarnTaskList(new Page<>(pageNumber, pageSize), userId, type, serviceId, customName));
     }
 }