大屏工程管理修改

dev_xds
haha 2023-12-28 23:34:54 +08:00
parent b4e546c58f
commit ec8dab461b
5 changed files with 37 additions and 3 deletions

View File

@ -73,4 +73,6 @@ public interface IFlowBusinessKeyService {
* @return * @return
*/ */
public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity); public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity);
public List<FlowTaskEntity> listByCategory(FlowTaskEntity where);
} }

View File

@ -143,4 +143,9 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity) { public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity) {
return flowBusinessKeyMapper.findSafetyWorkList(flowTaskEntity); return flowBusinessKeyMapper.findSafetyWorkList(flowTaskEntity);
} }
@Override
public List<FlowTaskEntity> listByCategory(FlowTaskEntity where) {
return flowBusinessKeyMapper.listByCategory(where);
}
} }

View File

@ -66,4 +66,5 @@ public interface FlowBusinessKeyMapper {
*/ */
public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity); public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity);
public List<FlowTaskEntity> listByCategory(FlowTaskEntity where);
} }

View File

@ -297,7 +297,20 @@
) a ) a
GROUP BY cat GROUP BY cat
</select> </select>
<select id="listByCategory" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT * FROM vw_flow_all
<where>
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="deptId !=null and deptId>0">and businessDeptId=#{deptId}</if>
<if test="projectId !=null and projectId>0">and businessKey=#{projectId}</if>
<if test="prjIds !=null and prjIds.size()>0">
and businessKey in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
<select id="listByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity"> <select id="listByUnit" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
SELECT * FROM vw_flow_all WHERE finishTime IS NULL SELECT * FROM vw_flow_all WHERE finishTime IS NULL
<if test="taskId!=null"> <if test="taskId!=null">

View File

@ -111,16 +111,29 @@ public class FloweController extends BaseController {
@PostMapping("/listByUnit") @PostMapping("/listByUnit")
public TableDataInfo listByUnit(@RequestBody FlowTaskEntity where){ public TableDataInfo listByUnit(@RequestBody FlowTaskEntity where){
startPage();
List<FlowTaskEntity> list=flowBusinessKeyService.listByUnit(where);
if(where.getDeptId()<=0){ if(where.getDeptId()<=0){
if (SecurityUtils.isUserB()) { if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds()); where.setPrjIds(getProjectIds());
} }
} }
startPage();
List<FlowTaskEntity> list=flowBusinessKeyService.listByUnit(where);
return getDataTable(list); return getDataTable(list);
} }
@PostMapping("/listByCategory")
public TableDataInfo listByCategory(@RequestBody FlowTaskEntity where){
if(where.getDeptId()<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
startPage();
List<FlowTaskEntity> list=flowBusinessKeyService.listByCategory(where);
return getDataTable(list);
}
@PostMapping("/listByState") @PostMapping("/listByState")
public TableDataInfo listByState(@RequestBody FlowTaskEntity where){ public TableDataInfo listByState(@RequestBody FlowTaskEntity where){
startPage(); startPage();