update code
parent
56be8f69c9
commit
672638af84
|
@ -56,4 +56,8 @@ public interface IFlowBusinessKeyService {
|
|||
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> listByUnit(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> listByState(FlowTaskEntity where);
|
||||
}
|
||||
|
|
|
@ -108,4 +108,14 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
|
|||
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where) {
|
||||
return flowBusinessKeyMapper.groupByUnit(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowTaskEntity> listByUnit(FlowTaskEntity where) {
|
||||
return flowBusinessKeyMapper.listByUnit(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowTaskEntity> listByState(FlowTaskEntity where) {
|
||||
return flowBusinessKeyMapper.listByState(where);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,6 +99,25 @@ public class FlowTaskEntity extends BaseEntity{
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date finishTime;
|
||||
|
||||
private long deptId;
|
||||
private long projectId;
|
||||
|
||||
public long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
private List<Long> roleIds;
|
||||
|
||||
public String getBusinessKeyName() {
|
||||
|
|
|
@ -48,4 +48,8 @@ public interface FlowBusinessKeyMapper {
|
|||
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> listByUnit(FlowTaskEntity where);
|
||||
|
||||
public List<FlowTaskEntity> listByState(FlowTaskEntity where);
|
||||
}
|
||||
|
|
|
@ -144,5 +144,28 @@
|
|||
) a
|
||||
GROUP BY cat
|
||||
</select>
|
||||
|
||||
<select id="listByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
||||
SELECT * FROM vw_flow_all WHERE finishTime IS NULL
|
||||
<if test="taskId!=null">
|
||||
<if test="taskId==1"> AND taskName LIKE '总包%' </if>
|
||||
<if test="taskId==2"> AND taskName LIKE '监理%' </if>
|
||||
<if test="taskId==3"> AND taskName LIKE '设计%' </if>
|
||||
<if test="taskId==4"> AND taskName LIKE '甲方%' </if>
|
||||
<if test="taskId==5"> AND taskName LIKE '工程%' </if>
|
||||
</if>
|
||||
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
|
||||
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
|
||||
</select>
|
||||
<select id="listByState" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
||||
SELECT * FROM vw_flow_all
|
||||
<where>
|
||||
<if test="taskId!=null">
|
||||
<if test="taskId==1"> AND taskName!='提交申请' </if>
|
||||
<if test="taskId==2"> AND finishTime IS NULL AND taskName!='提交申请' </if>
|
||||
<if test="taskId==3"> AND finishTime IS NOT NULL </if>
|
||||
</if>
|
||||
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
|
||||
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,21 +1,21 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
|
||||
import com.ruoyi.system.domain.FlowTaskEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bgscreen/flow")
|
||||
public class FloweController {
|
||||
public class FloweController extends BaseController {
|
||||
@Autowired
|
||||
IFlowBusinessKeyService flowBusinessKeyService;
|
||||
|
||||
|
@ -53,4 +53,19 @@ public class FloweController {
|
|||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/listByUnit")
|
||||
public TableDataInfo listByUnit(@RequestBody FlowTaskEntity where){
|
||||
startPage();
|
||||
List<FlowTaskEntity> list=flowBusinessKeyService.listByUnit(where);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/listByState")
|
||||
public TableDataInfo listByState(@RequestBody FlowTaskEntity where){
|
||||
startPage();
|
||||
List<FlowTaskEntity> list=flowBusinessKeyService.listByState(where);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue