update code
parent
a6735b2f79
commit
398bf1f8c8
|
@ -69,6 +69,22 @@ public class ProjectMaterialSealController extends BaseController {
|
|||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 质量管理-材料封样
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/groupByApprove")
|
||||
public AjaxResult groupByApprove(@RequestBody SurProjectMaterialSeal where){
|
||||
Long deptId=where.getDeptId();
|
||||
if(deptId==null || deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(materialSealService.groupByApprove(where));
|
||||
}
|
||||
@PostMapping("/selectTop12Month")
|
||||
public TableDataInfo selectTop12Month(@RequestBody SurProjectMaterialSeal where){
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
|
|
|
@ -74,4 +74,10 @@ public interface SurProjectMaterialSealMapper
|
|||
public List<SurProjectMaterialSeal> groupTop12Month(SurProjectMaterialSeal where);
|
||||
|
||||
public List<SurProjectMaterialSeal> selectTop12Month(SurProjectMaterialSeal where);
|
||||
/**
|
||||
* 质量管理-材料封样
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where);
|
||||
}
|
||||
|
|
|
@ -82,4 +82,10 @@ public interface ISurProjectMaterialSealService
|
|||
public List<SurProjectMaterialSeal> groupTop12Month(SurProjectMaterialSeal where);
|
||||
|
||||
public List<SurProjectMaterialSeal> selectTop12Month(SurProjectMaterialSeal where);
|
||||
/**
|
||||
* 质量管理-材料封样
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where);
|
||||
}
|
||||
|
|
|
@ -213,4 +213,13 @@ public class SurProjectMaterialSealServiceImpl extends WeChatMessageServiceImpl
|
|||
public List<SurProjectMaterialSeal> selectTop12Month(SurProjectMaterialSeal where) {
|
||||
return surProjectMaterialSealMapper.selectTop12Month(where);
|
||||
}
|
||||
/**
|
||||
* 质量管理-材料封样
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where) {
|
||||
return surProjectMaterialSealMapper.groupByApprove(where);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,6 +220,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
group by year(spms.seal_date),month(spms.seal_date)
|
||||
order by year(spms.seal_date) desc,month(spms.seal_date) desc
|
||||
</select>
|
||||
|
||||
<select id="groupByApprove" parameterType="SurProjectMaterialSeal" resultMap="SurProjectMaterialSealResult">
|
||||
SELECT x.dict_value project_id,x.dict_label material_name,y.cnt id FROM (
|
||||
SELECT dict_value,dict_label
|
||||
FROM sys_dict_data WHERE dict_type='project_check_status' ) X LEFT JOIN (
|
||||
SELECT a.approve_status,COUNT(1) cnt FROM sur_project_material_seal a, sys_dict_data b, sur_project sp
|
||||
WHERE a.approve_status=b.dict_value AND b.dict_type='project_check_status'
|
||||
and a.project_id=sp.id and sp.isDel=0 and sp.progressVisible=0
|
||||
<if test="deptId != null and deptId > 0"> and sp.deptId= #{deptId} </if>
|
||||
<if test='proType != null and proType != "" and proType != "0" '> and sp.projectType = #{proType}</if>
|
||||
<if test="projectId != null and projectId > 0">and a.project_id = #{projectId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and a.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY a.approve_status ) Y ON x.dict_value=y.approve_status
|
||||
</select>
|
||||
<select id="selectTop12Month" parameterType="SurProjectMaterialSeal" resultMap="SurProjectMaterialSealResult">
|
||||
select *
|
||||
from (
|
||||
|
|
Loading…
Reference in New Issue