update code
parent
71bca5dfed
commit
547ddde5c5
|
@ -101,4 +101,20 @@ public class ProjectMaterialSealController extends BaseController {
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/selectByApprove")
|
||||||
|
public TableDataInfo selectByApprove(@RequestBody SurProjectMaterialSeal where){
|
||||||
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
|
Integer pageNum = pageDomain.getPageNum();
|
||||||
|
Integer pageSize = pageDomain.getPageSize();
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
List<SurProjectMaterialSeal> list=materialSealService.selectByApprove(where);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,4 +80,6 @@ public interface SurProjectMaterialSealMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where);
|
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where);
|
||||||
|
|
||||||
|
public List<SurProjectMaterialSeal> selectByApprove(SurProjectMaterialSeal where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,4 +88,6 @@ public interface ISurProjectMaterialSealService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where);
|
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where);
|
||||||
|
|
||||||
|
public List<SurProjectMaterialSeal> selectByApprove(SurProjectMaterialSeal where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,4 +222,9 @@ public class SurProjectMaterialSealServiceImpl extends WeChatMessageServiceImpl
|
||||||
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where) {
|
public List<SurProjectMaterialSeal> groupByApprove(SurProjectMaterialSeal where) {
|
||||||
return surProjectMaterialSealMapper.groupByApprove(where);
|
return surProjectMaterialSealMapper.groupByApprove(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectMaterialSeal> selectByApprove(SurProjectMaterialSeal where) {
|
||||||
|
return surProjectMaterialSealMapper.selectByApprove(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,4 +259,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by spme.seal_date desc
|
order by spme.seal_date desc
|
||||||
) spme
|
) spme
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByApprove" parameterType="SurProjectMaterialSeal" resultMap="SurProjectMaterialSealResult">
|
||||||
|
select *
|
||||||
|
from (
|
||||||
|
select spme.*,sp.projectName, sd.dept_name from sur_project_material_seal spme
|
||||||
|
left join sur_project sp on spme.project_id = sp.id
|
||||||
|
left join sys_dept sd on sd.dept_id = spme.dept_id
|
||||||
|
where spme.is_del=0 and sp.isDel=0 and sp.progressVisible=0
|
||||||
|
<if test="approveStatus==4">and spme.approve_status = 4</if>
|
||||||
|
<if test="approveStatus==0">and spme.approve_status <> 4</if>
|
||||||
|
<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 sp.id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and sp.id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
order by spme.seal_date desc
|
||||||
|
) spme
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue