update code
parent
624707bd1e
commit
c1159de712
|
@ -66,6 +66,19 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
return getDataTable(surProjectDeptWroksService.selectBgscreenDeptWroksList(surProjectDeptWroks));
|
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
|
* @param deptId
|
||||||
|
|
|
@ -50,7 +50,17 @@ public class SurProjectDeptWroks extends BaseEntity
|
||||||
private Integer oldSupervisorPersonnel;
|
private Integer oldSupervisorPersonnel;
|
||||||
private Integer oldContractorPersonnel;
|
private Integer oldContractorPersonnel;
|
||||||
|
|
||||||
public void setId(Long id)
|
private String projectName;
|
||||||
|
|
||||||
|
public String getProjectName() {
|
||||||
|
return projectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectName(String projectName) {
|
||||||
|
this.projectName = projectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,4 +109,6 @@ public interface SurProjectDeptWroksMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public Map<String,Object> findSumByProjectId(Long projectId);
|
public Map<String,Object> findSumByProjectId(Long projectId);
|
||||||
|
|
||||||
|
List<SurProjectDeptWroks> selectList(SurProjectDeptWroks where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,4 +92,6 @@ public interface ISurProjectDeptWroksService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public Map<String,Object> findSumByProjectId(Long projectId);
|
public Map<String,Object> findSumByProjectId(Long projectId);
|
||||||
|
|
||||||
|
public List<SurProjectDeptWroks> selectList(SurProjectDeptWroks where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,4 +160,9 @@ public class SurProjectDeptWroksServiceImpl implements ISurProjectDeptWroksServi
|
||||||
public Map<String,Object> findSumByProjectId(Long projectId) {
|
public Map<String,Object> findSumByProjectId(Long projectId) {
|
||||||
return surProjectDeptWroksMapper.findSumByProjectId(projectId);
|
return surProjectDeptWroksMapper.findSumByProjectId(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectDeptWroks> selectList(SurProjectDeptWroks where) {
|
||||||
|
return surProjectDeptWroksMapper.selectList(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="projectName" column="projectName"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectDeptWroksVo">
|
<sql id="selectSurProjectDeptWroksVo">
|
||||||
|
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectSurProjectDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
|
<select id="selectSurProjectDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
|
||||||
<include refid="selectSurProjectDeptWroksVo"/>
|
<include refid="selectSurProjectDeptWroksVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="projectId != null "> and dw.project_id = #{projectId}</if>
|
<if test="projectId != null "> and dw.project_id = #{projectId}</if>
|
||||||
<if test="deptId != null "> and dw.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and dw.dept_id = #{deptId}</if>
|
||||||
</where>
|
</where>
|
||||||
|
@ -180,4 +181,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
id = #{projectId}
|
id = #{projectId}
|
||||||
</update>
|
</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>
|
</mapper>
|
Loading…
Reference in New Issue