update code
parent
190e6b8bc5
commit
10c34adf17
|
@ -30,6 +30,19 @@ public class ProjectScheduleController extends BaseController {
|
||||||
return AjaxResult.success(surProjectSchedule);
|
return AjaxResult.success(surProjectSchedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/constructionProgressByDept")
|
||||||
|
public AjaxResult getConstructionProgressByDept(Long deptId){
|
||||||
|
SurProjectSchedule where=new SurProjectSchedule();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
where.setDeptId(deptId);
|
||||||
|
}
|
||||||
|
List<SurProjectSchedule> list=isurProjectScheduleService.getConstructionProgressByDept(where);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 按项目类型查询形象进度数据
|
* 按项目类型查询形象进度数据
|
||||||
* @param type
|
* @param type
|
||||||
|
|
|
@ -89,6 +89,15 @@ public class SurProjectSchedule extends BaseEntity
|
||||||
//数据模板
|
//数据模板
|
||||||
private String dataTemplate;
|
private String dataTemplate;
|
||||||
|
|
||||||
|
public Long getDeptId() {
|
||||||
|
return DeptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptId(Long deptId) {
|
||||||
|
DeptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long DeptId;
|
||||||
public SurProject getSurProject() {
|
public SurProject getSurProject() {
|
||||||
return surProject;
|
return surProject;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.yanzhu.jh.project.domain.vo;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectSchedule;
|
import com.yanzhu.jh.project.domain.SurProjectSchedule;
|
||||||
|
|
||||||
public class SurProjectScheduleWhere extends SurProjectSchedule {
|
public class SurProjectScheduleWhere extends SurProjectSchedule {
|
||||||
private long deptId;
|
|
||||||
private long prjType;
|
private long prjType;
|
||||||
|
|
||||||
public long getPrjType() {
|
public long getPrjType() {
|
||||||
|
@ -14,13 +14,6 @@ public class SurProjectScheduleWhere extends SurProjectSchedule {
|
||||||
this.prjType = prjType;
|
this.prjType = prjType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDeptId() {
|
|
||||||
return deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptId(long deptId) {
|
|
||||||
this.deptId = deptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,4 +68,6 @@ public interface SurProjectScheduleMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
||||||
|
|
||||||
|
public List<SurProjectSchedule> getConstructionProgressByDept(SurProjectSchedule where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,4 +67,6 @@ public interface ISurProjectScheduleService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where);
|
||||||
|
|
||||||
|
public List<SurProjectSchedule> getConstructionProgressByDept(com.yanzhu.jh.project.domain.SurProjectSchedule where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,4 +122,9 @@ public class SurProjectScheduleServiceImpl implements ISurProjectScheduleService
|
||||||
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where) {
|
public List<SurProjectSchedule> selectByProjectType(SurProjectScheduleWhere where) {
|
||||||
return surProjectScheduleMapper.selectByProjectType(where);
|
return surProjectScheduleMapper.selectByProjectType(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectSchedule> getConstructionProgressByDept(SurProjectSchedule where) {
|
||||||
|
return surProjectScheduleMapper.getConstructionProgressByDept(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,4 +193,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
order by projectSort
|
order by projectSort
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getConstructionProgressByDept" parameterType="SurProjectScheduleWhere" resultMap="SurProjectScheduleResult">
|
||||||
|
select s.*,p.projectName from (
|
||||||
|
select * from sur_project_schedule where id in (
|
||||||
|
select max(id)
|
||||||
|
from sur_project_schedule where
|
||||||
|
IF(is_del IS NULL ,0,is_del)=0
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and project_id in (SELECT id FROM sur_project WHERE deptid= #{deptId})
|
||||||
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
and ( (existing_problem is not null and existing_problem not like '暂无%' and existing_problem not like '无%' and length(trim(existing_problem))>0 )
|
||||||
|
or (problem_progress IS NOT NULL AND problem_progress NOT LIKE '暂无%' AND problem_progress NOT LIKE '无%' AND LENGTH(TRIM(problem_progress))>0 ))
|
||||||
|
group by project_id
|
||||||
|
)
|
||||||
|
) s LEFT JOIN sur_project AS p ON s.project_id=p.id order by p.projectSort
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue