任务清单增加筛选条件 - 根据当前项目状态过滤。
This commit is contained in:
+5
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@@ -310,4 +311,8 @@ public class ProjectTaskInventoryEO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "文档库id/标准id")
|
||||
private String standId;
|
||||
|
||||
/**法规清单id数组 查询使用**/
|
||||
@TableField(exist = false)
|
||||
private List<String> projectLawsInventoryIdList;
|
||||
}
|
||||
|
||||
+7
@@ -76,4 +76,11 @@ public interface ProjectTaskInventoryEOMapper extends BaseMapper<ProjectTaskInve
|
||||
*/
|
||||
List<Map<String, Object>> getCertificationProgressStatisticsGroupByTerritory(@Param("projectLawsInventoryIdList") List<String> projectLawsInventoryIdList,
|
||||
@Param("certificationProgress") String certificationProgress);
|
||||
|
||||
/**
|
||||
* 查询任务清单列表
|
||||
* @param projectTaskInventoryEO
|
||||
* @return
|
||||
*/
|
||||
List<ProjectTaskInventoryEO> selectProjectTaskInventoryList(@Param("projectTaskInventoryEO") ProjectTaskInventoryEO projectTaskInventoryEO);
|
||||
}
|
||||
|
||||
+30
@@ -19,6 +19,13 @@
|
||||
<result column="project_status_assess" property="projectStatusAssess" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
pti.id, pti.create_by,pti.create_time,pti.update_by,pti.update_time,pti.sys_org_code,pti.project_laws_inventory_id,pti.design_status,pti.design_flow_task_status,pti.design_p_id,pti.prehomo_status,
|
||||
pti.prehomo_flow_task_status,pti.prehomo_p_id,pti.verify_status,pti.verify_flow_task_status,pti.verify_p_id,pti.certification_progress,pti.certification_progress_remark,pti.project_status_assess,
|
||||
pti.design_send_msg_flag,pti.design_send_msg_current_flag,pti.prehomo_send_msg_flag,pti.prehomo_send_msg_current_flag,pti.verify_send_msg_flag,pti.verify_send_msg_current_flag,
|
||||
pti.design_person_charge_feedback,pti.prehomo_person_charge_feedback,pti.verify_person_charge_feedback,pti.process_end_time
|
||||
</sql>
|
||||
|
||||
<select id="getCertificationProgressStatistics" resultType="hashmap">
|
||||
select
|
||||
count(certification_progress) as "certificationProgressCount",
|
||||
@@ -150,4 +157,27 @@
|
||||
and pti.certification_progress = #{certificationProgress}
|
||||
group by pli.duty_territory;
|
||||
</select>
|
||||
|
||||
<select id="selectProjectTaskInventoryList" resultMap="ProjectTaskInventoryEOResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
project_task_inventory pti
|
||||
left join
|
||||
project_task_inventory_condition_assessment ptica on pti.id = ptica.project_laws_inventory_id
|
||||
<where>
|
||||
<if test="projectTaskInventoryEO.certificationProgress != null and projectTaskInventoryEO.certificationProgress != '' ">
|
||||
pti.certification_progress = #{projectTaskInventoryEO.certificationProgress}
|
||||
</if>
|
||||
<if test="projectTaskInventoryEO.projectLawsInventoryIdList != null ">
|
||||
and pti.project_laws_inventory_id in
|
||||
<foreach collection="projectTaskInventoryEO.projectLawsInventoryIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectTaskInventoryEO.projectStatusAssess != null and projectTaskInventoryEO.projectStatusAssess != '' ">
|
||||
ptica.condition_assessment = #{projectTaskInventoryEO.projectStatusAssess}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+12
-1
@@ -185,7 +185,8 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getCertificationProgress())){
|
||||
taskInventoryQueryWrapper.lambda().in(ProjectTaskInventoryEO::getCertificationProgress,projectTaskInventoryEO.getCertificationProgress());
|
||||
}
|
||||
|
||||
/*projectTaskInventoryEO.setProjectLawsInventoryIdList(projectLawsInventoryIdList);
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = this.baseMapper.selectProjectTaskInventoryList(projectTaskInventoryEO);*/
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = this.baseMapper.selectList(taskInventoryQueryWrapper);
|
||||
|
||||
//验证当前用户在该项目中是什么角色
|
||||
@@ -627,6 +628,16 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
|
||||
if(CollectionUtils.isNotEmpty(result)){
|
||||
result = result.stream().filter(e -> (StringUtils.equals(e.getShowFlag(),TaskStatusEnum.SHOW_FLAG.getValue()))).collect(Collectors.toList());
|
||||
//根据当前项目状态筛选一次。
|
||||
if(StringUtils.isNotEmpty(projectTaskInventory.getProjectStatusAssess())){
|
||||
result = result.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(e.getProjectStatusAssess(),projectTaskInventory.getProjectStatusAssess())){
|
||||
flag = true;
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user