update code
parent
fd1ea49ae0
commit
7e62fc42fc
|
@ -8,9 +8,7 @@ import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目验收Conller
|
* 项目验收Conller
|
||||||
|
@ -110,4 +108,24 @@ public class ProjectCheckingController extends BaseController {
|
||||||
}
|
}
|
||||||
return success(surProjectCheckingService.groupCheckingByProjectId(surProjectChecking));
|
return success(surProjectCheckingService.groupCheckingByProjectId(surProjectChecking));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/queryProjectCheckingList")
|
||||||
|
public TableDataInfo queryProjectCheckingList(@RequestBody SurProjectChecking where){
|
||||||
|
Long deptId=where.getDeptId();
|
||||||
|
Long projectId=where.getProjectId();
|
||||||
|
if(deptId!=null && deptId.equals(0)){
|
||||||
|
where.setProjectDeptId(""+deptId);
|
||||||
|
where.setDeptId(null);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(projectId!=null && projectId.equals(0)){
|
||||||
|
where.setProjectId(Convert.toLong(projectId));
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
return getDataTable(surProjectCheckingService.selectBgscreenProjectCheckingListByPage(where));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,11 +32,15 @@ public interface SurProjectCheckingMapper
|
||||||
/**
|
/**
|
||||||
* 查询项目验收列表
|
* 查询项目验收列表
|
||||||
*
|
*
|
||||||
* @param surProjectChecking 项目验收
|
|
||||||
* @return 项目验收集合
|
* @return 项目验收集合
|
||||||
*/
|
*/
|
||||||
public List<SurProjectChecking> selectBgscreenProjectCheckingList(SurProjectChecking surProjectChecking);
|
public List<SurProjectChecking> selectBgscreenProjectCheckingList(SurProjectChecking surProjectChecking);
|
||||||
|
/**
|
||||||
|
* 查询项目验收列表(分页)
|
||||||
|
*
|
||||||
|
* @return 项目验收集合
|
||||||
|
*/
|
||||||
|
public List<SurProjectChecking> selectBgscreenProjectCheckingListByPage(SurProjectChecking where);
|
||||||
/**
|
/**
|
||||||
* 查询项目验收统计
|
* 查询项目验收统计
|
||||||
*
|
*
|
||||||
|
|
|
@ -106,4 +106,6 @@ public interface ISurProjectCheckingService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking surProjectChecking);
|
public List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking surProjectChecking);
|
||||||
|
|
||||||
|
public List<SurProjectChecking> selectBgscreenProjectCheckingListByPage(SurProjectChecking where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,4 +239,9 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
|
||||||
public List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking where) {
|
public List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking where) {
|
||||||
return surProjectCheckingMapper.groupCheckingByProjectId(where);
|
return surProjectCheckingMapper.groupCheckingByProjectId(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectChecking> selectBgscreenProjectCheckingListByPage(SurProjectChecking where) {
|
||||||
|
return surProjectCheckingMapper.selectBgscreenProjectCheckingListByPage(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBgscreenProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
<select id="selectBgscreenProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, sp.projectName, sd.dept_name from sur_project_checking spc
|
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, sp.projectName, sd.dept_name
|
||||||
|
from sur_project_checking spc
|
||||||
left join sur_project sp on spc.project_id = sp.id
|
left join sur_project sp on spc.project_id = sp.id
|
||||||
left join sys_dept sd on sd.dept_id = spc.dept_id
|
left join sys_dept sd on sd.dept_id = spc.dept_id
|
||||||
<!--监理单位/总包公司/分包单位-->
|
<!--监理单位/总包公司/分包单位-->
|
||||||
|
@ -103,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataTypeLvl2 != null "> and spc.data_type_lvl2 = #{dataTypeLvl2}</if>
|
||||||
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
||||||
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
|
@ -132,6 +134,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
limit 0,10
|
limit 0,10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectBgscreenProjectCheckingListByPage" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||||
|
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, sp.projectName, sd.dept_name
|
||||||
|
from sur_project_checking spc
|
||||||
|
left join sur_project sp on spc.project_id = sp.id
|
||||||
|
left join sys_dept sd on sd.dept_id = spc.dept_id
|
||||||
|
<!--监理单位/总包公司/分包单位-->
|
||||||
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||||
|
<where>
|
||||||
|
and spc.is_del=0
|
||||||
|
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and spc.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="dataTypeLvl2 != null "> and spc.data_type_lvl2 = #{dataTypeLvl2}</if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||||
|
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
||||||
|
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
|
<if test="groupDeptId != null "> and spc.group_dept_id = #{groupDeptId}</if>
|
||||||
|
<if test="checkType != null and checkType != ''"> and spc.check_type = #{checkType}</if>
|
||||||
|
<if test="workingPositionType != null and workingPositionType != ''"> and spc.working_position_type = #{workingPositionType}</if>
|
||||||
|
<if test="checkWorkingPosition != null and checkWorkingPosition != ''"> and spc.check_working_position like concat('%', #{checkWorkingPosition}, '%')</if>
|
||||||
|
<if test="checkResult != null and checkResult != ''"> and spc.check_result = #{checkResult}</if>
|
||||||
|
<if test="qualityUser != null and qualityUser != ''"> and (spc.quality_user like concat('%', #{qualityUser}, '%') or spc.quality_user_name like concat('%', #{qualityUser}, '%'))</if>
|
||||||
|
<if test="qualityUserName != null and qualityUserName != ''"> and spc.quality_user_name like concat('%', #{qualityUserName}, '%')</if>
|
||||||
|
<if test="superviseUser != null and superviseUser != ''"> and (spc.supervise_user like concat('%', #{superviseUser}, '%') or spc.supervise_user_name like concat('%', #{superviseUser}, '%'))</if>
|
||||||
|
<if test="superviseUserName != null and superviseUserName != ''"> and spc.supervise_user_name like concat('%', #{superviseUserName}, '%')</if>
|
||||||
|
<if test="groupDeptUser != null and groupDeptUser != ''"> and spc.group_dept_user like concat('%', #{groupDeptUser}, '%')</if>
|
||||||
|
<if test="groupDeptUserName != null and groupDeptUserName != ''"> and spc.group_dept_user_name like concat('%', #{groupDeptUserName}, '%')</if>
|
||||||
|
<if test="params.beginCheckingDate != null and params.beginCheckingDate != '' and params.endCheckingDate != null and params.endCheckingDate != ''"> and spc.checking_date between #{params.beginCheckingDate} and #{params.endCheckingDate}</if>
|
||||||
|
<if test="isDel != null "> and spc.is_del = #{isDel}</if>
|
||||||
|
<!-- 查询条件-项目部门 -->
|
||||||
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
|
<!--子部门数据-->
|
||||||
|
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||||
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||||
|
<!--普通用户查询项目人员-->
|
||||||
|
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spc.create_by = #{nowUserName}</if>
|
||||||
|
</where>
|
||||||
|
order by checking_date desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectBgscreenProjectCheckingView" parameterType="SurProjectChecking" resultType="map">
|
<select id="selectBgscreenProjectCheckingView" parameterType="SurProjectChecking" resultType="map">
|
||||||
select spc.check_result, count(spc.id) as total from sur_project_checking spc
|
select spc.check_result, count(spc.id) as total from sur_project_checking spc
|
||||||
left join sur_project sp on spc.project_id = sp.id
|
left join sur_project sp on spc.project_id = sp.id
|
||||||
|
|
Loading…
Reference in New Issue