update code

dev_xds
haha 2024-04-07 00:07:56 +08:00
parent da63db6425
commit d4e38dc40f
6 changed files with 16 additions and 25 deletions

View File

@ -27,13 +27,13 @@ public class ProjectQuarterlyAssessController extends BaseController {
@GetMapping("/currentListByDept")
public TableDataInfo currentListByDept(Long deptId,String proType){
String key="bgscreen_asscess_currentListByDept"+deptId+"_"+proType;
public TableDataInfo currentListByDept(Long deptId){
SmzProjectQuarterlyAssess smzProjectQuarterlyAssess=new SmzProjectQuarterlyAssess();
String key="bgscreen_asscess_currentListByDept"+deptId+"_"+smzProjectQuarterlyAssess.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return getDataTable((List<?>) obj);
}
SmzProjectQuarterlyAssess smzProjectQuarterlyAssess=new SmzProjectQuarterlyAssess();
smzProjectQuarterlyAssess.setDeptId(deptId);
if(deptId==null || deptId<=0){
if (SecurityUtils.isUserB()) {
@ -45,9 +45,6 @@ public class ProjectQuarterlyAssessController extends BaseController {
int month=calendar.get(Calendar.MONTH)+1;
smzProjectQuarterlyAssess.setQuarterly((long)(month+2)/3);
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
smzProjectQuarterlyAssess.setProType(proType);
}
List list= smzProjectQuarterlyAssessService.currentListByDept(smzProjectQuarterlyAssess);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return getDataTable(list);

View File

@ -34,7 +34,7 @@ public class ProjectScheduleController extends BaseController {
}
@GetMapping("/constructionProgressByDept")
public AjaxResult getConstructionProgressByDept(Long deptId,String proType){
public AjaxResult getConstructionProgressByDept(Long deptId){
SurProjectSchedule where=new SurProjectSchedule();
if(deptId==null || deptId<=0){
if (SecurityUtils.isUserB()) {
@ -43,9 +43,6 @@ public class ProjectScheduleController extends BaseController {
}else{
where.setDeptId(deptId);
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<SurProjectSchedule> list=isurProjectScheduleService.getConstructionProgressByDept(where);
return AjaxResult.success(list);
}
@ -55,13 +52,13 @@ public class ProjectScheduleController extends BaseController {
* @return
*/
@GetMapping("/selectByProjectType")
public AjaxResult selectByProjectType(Long type,Long deptId,String proType){
String key="bgscreen_schedule_selectByProjectType_"+type+"_"+deptId+"_"+proType;
public AjaxResult selectByProjectType(Long type,Long deptId){
SurProjectScheduleWhere where =new SurProjectScheduleWhere();
String key="bgscreen_schedule_selectByProjectType_"+type+"_"+deptId+"_"+where.getProType();
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
SurProjectScheduleWhere where =new SurProjectScheduleWhere();
where.setPrjType(type);
where.setDeptId(deptId);
if(deptId==null || deptId<=0){
@ -69,9 +66,6 @@ public class ProjectScheduleController extends BaseController {
where.setPrjIds(getProjectIds());
}
}
if(StringUtils.isNotNull(proType) && !"0".equals(proType)){
where.setProType(proType);
}
List<SurProjectSchedule> list=isurProjectScheduleService.selectByProjectType(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);

View File

@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
</where>
) AND a.project_id=p.id and plan_target is not null AND p.deptId=d.dept_id
) AND a.project_id=p.id and plan_target is not null AND p.deptId=d.dept_id and p.isDel=0 and p.progressVisible=0
<if test="year != null "> and year = #{year}</if>
<if test="quarterly != null "> and quarterly = #{quarterly}</if>
@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="queryByProjectType" parameterType="SmzProjectQuarterlyAssess" resultMap="SmzProjectQuarterlyAssessResultToProject">
SELECT p.id, p.projectName,p.projectSchedule,a.plan_target
FROM sur_project p LEFT JOIN smz_project_quarterly_assess a ON a.project_id=p.id
WHERE p.projecttype=#{id} AND a.year=#{year} AND a.quarterly=#{quarterly} AND p.isdel=0
WHERE p.projecttype=#{id} AND a.year=#{year} AND a.quarterly=#{quarterly} AND p.isdel=0 and p.progressVisible=0
<if test="deptId>0">and p.deptId=#{deptId}</if>
<if test='proType != null and proType != "" and proType != "0"'> and p.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0">

View File

@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
@ -192,7 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT * FROM vw_sur_project_build_node_data_current WHERE id IN (
SELECT MAX(vbn.id) FROM vw_sur_project_build_node_data_current vbn
left join sur_project sp on sp.id = vbn.project_id
WHERE LENGTH(vbn.node_lvl)=2
WHERE LENGTH(vbn.node_lvl)=2 and sp.isDel=0 and sp.progressVisible=0
<if test="projectId !=null and projectId !=0">and vbn.project_id=#{projectId}</if>
<if test="id!=null and id!=0">and sp.deptId=#{id}</if>
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>

View File

@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE c.id IN (
SELECT MAX(spc.id) FROM sur_project_schedule spc
left join sur_project sp on spc.project_id = sp.id
where spc.is_del=0 and sp.projectType=#{prjType}
where spc.is_del=0 and sp.projectType=#{prjType} and sp.isDel=0 and sp.progressVisible=0
<if test="deptId>0">and sp.deptId=#{deptId}</if>
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
<if test="prjIds !=null and prjIds.size()>0">
@ -199,7 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select max(spc.id)
from sur_project_schedule spc
left join sur_project sp on sp.id=spc.project_id
where spc.is_del=0
where spc.is_del=0 and sp.isDel=0 and sp.progressVisible=0
<if test="deptId!=null and deptId>0">
and sp.deptId= #{deptId}
</if>

View File

@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sur_project_video_passage b on b.video_id = a.id
left join sur_project p on a.project_id=p.id
left join dev_ai_project_config_passage dacp on dacp.video_passage_id = b.id
where dacp.is_del=0 and dacp.channel_id is NOT NULL and dacp.channel_id!='' and p.progressVisible = 0
where dacp.is_del=0 and dacp.channel_id is NOT NULL and dacp.channel_id!='' and p.progressVisible = 0 and p.isDel=0
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="proType != null and proType != ''"> and p.projectType = #{proType}</if>
<if test="deptId != null "> and p.deptId = #{deptId}</if>