update code

dev_xds
haha 2023-10-15 00:26:07 +08:00
parent 624707bd1e
commit c1159de712
6 changed files with 51 additions and 2 deletions

View File

@ -66,6 +66,19 @@ public class ProjectAttendanceController extends BaseController {
return getDataTable(surProjectDeptWroksService.selectBgscreenDeptWroksList(surProjectDeptWroks));
}
@PostMapping("selectList")
public TableDataInfo selectList(@RequestBody SurProjectDeptWroks where){
startPage();
Long deptId= where.getDeptId();
if(deptId==null || deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
List<SurProjectDeptWroks> list=surProjectDeptWroksService.selectList(where);
return getDataTable(list);
}
/**
*
* @param deptId

View File

@ -50,6 +50,16 @@ public class SurProjectDeptWroks extends BaseEntity
private Integer oldSupervisorPersonnel;
private Integer oldContractorPersonnel;
private String projectName;
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public void setId(Long id)
{
this.id = id;

View File

@ -109,4 +109,6 @@ public interface SurProjectDeptWroksMapper
* @return
*/
public Map<String,Object> findSumByProjectId(Long projectId);
List<SurProjectDeptWroks> selectList(SurProjectDeptWroks where);
}

View File

@ -92,4 +92,6 @@ public interface ISurProjectDeptWroksService
* @return
*/
public Map<String,Object> findSumByProjectId(Long projectId);
public List<SurProjectDeptWroks> selectList(SurProjectDeptWroks where);
}

View File

@ -160,4 +160,9 @@ public class SurProjectDeptWroksServiceImpl implements ISurProjectDeptWroksServi
public Map<String,Object> findSumByProjectId(Long projectId) {
return surProjectDeptWroksMapper.findSumByProjectId(projectId);
}
@Override
public List<SurProjectDeptWroks> selectList(SurProjectDeptWroks where) {
return surProjectDeptWroksMapper.selectList(where);
}
}

View File

@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="projectName" column="projectName"/>
</resultMap>
<sql id="selectSurProjectDeptWroksVo">
@ -180,4 +181,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
id = #{projectId}
</update>
<select id="selectList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
SELECT spdw.*,prj.projectName,dept.dept_name FROM
sur_project_dept_wroks spdw
LEFT JOIN sur_project prj ON spdw.project_id=prj.id
LEFT JOIN sys_dept dept ON spdw.dept_id=dept.dept_id
WHERE spdw.is_del=0
<if test="projectId != null and projectId>0"> and spdw.project_id = #{projectId}</if>
<if test="deptId != null and deptId>0"> and spdw.dept_id = #{deptId}</if>
<if test="prjIds !=null and prjIds.size()>0">
and spdw.project_id in
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
ORDER BY prj.projectSort
</select>
</mapper>