修改bug
This commit is contained in:
parent
dec4de7dd4
commit
818838f008
@ -9,18 +9,19 @@ import com.zhgd.xmgl.modules.realnamestatistics.entity.vo.WorkerMonthAttendanceS
|
||||
import com.zhgd.xmgl.modules.realnamestatistics.service.IProjectOperationsAnalysisService;
|
||||
import com.zhgd.xmgl.modules.worker.entity.TeamInfo;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerType;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author ys
|
||||
@ -33,11 +34,11 @@ public class ProjectOperationsAnalysisController {
|
||||
@Autowired
|
||||
IProjectOperationsAnalysisService projectOperationsAnalysisService;
|
||||
|
||||
@ApiOperation(value = " 列表查询项目实名制信息", notes = "列表查询项目实名制信息", httpMethod="GET")
|
||||
@ApiOperation(value = " 列表查询项目实名制信息", notes = "列表查询项目实名制信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/selectProjectOperationsAnalysisList")
|
||||
public Map<String,Object> queryByCondition(
|
||||
@RequestParam(name="projectName",required = false) String projectName) {
|
||||
return projectOperationsAnalysisService.selectProjectOperationsAnalysisList( projectName);
|
||||
public Map<String, Object> queryByCondition(
|
||||
@RequestParam(name = "projectName", required = false) String projectName) {
|
||||
return projectOperationsAnalysisService.selectProjectOperationsAnalysisList(projectName);
|
||||
}
|
||||
|
||||
@ApiOperation(notes = "查询所有工种列表", value = "查询所有工种列表", httpMethod = "GET")
|
||||
@ -57,7 +58,7 @@ public class ProjectOperationsAnalysisController {
|
||||
|
||||
@ApiOperation(notes = "查询所有班组", value = "查询所有班组", httpMethod = "GET")
|
||||
@GetMapping(value = "/getAllTeamInfo")
|
||||
public Result<List<TeamInfo>> getAllTeamInfo(@RequestParam("projectSn")String projectSn) {
|
||||
public Result<List<TeamInfo>> getAllTeamInfo(@RequestParam("projectSn") String projectSn) {
|
||||
Result<List<TeamInfo>> result = new Result<>();
|
||||
try {
|
||||
List<TeamInfo> allDepartment = projectOperationsAnalysisService.getAllTeamInfo(projectSn);
|
||||
@ -71,35 +72,35 @@ public class ProjectOperationsAnalysisController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = " 查询考勤统计列表", notes = "查询考勤统计列表", httpMethod = "GET")
|
||||
@GetMapping(value = "/selectAttendanceDetailByPage")
|
||||
public Result<Page<WorkerMonthAttendanceStatisticsVo>> selectAttendanceDetailByPage(@RequestParam(name = "workerName", required = false) String workerName,
|
||||
@RequestParam(name = "projectSn", required = false) String projectSn,
|
||||
@RequestParam(name = "personType", required = false) String personType,
|
||||
@RequestParam(name = "groupId", required = false) Long groupId,
|
||||
@RequestParam(name = "workerTypeId", required = false) Long workerTypeId,
|
||||
@RequestParam(name = "time", required = false) String time,
|
||||
@RequestParam(name = "queryTime", required = false) String queryTime,
|
||||
@RequestParam(name = "personSn", required = false) String personSn,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "query", required = false, dataType = "String")
|
||||
@RequestMapping(value = "/selectAttendanceDetailByPage", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
public Result<Page<WorkerMonthAttendanceStatisticsVo>> selectAttendanceDetailByPage(@RequestBody(required = false) HashMap<String, Object> map, @RequestParam(name = "workerName", required = false) String workerName,
|
||||
@RequestParam(name = "projectSn", required = false) String projectSn,
|
||||
@RequestParam(name = "personType", required = false) String personType,
|
||||
@RequestParam(name = "groupId", required = false) Long groupId,
|
||||
@RequestParam(name = "workerTypeId", required = false) Long workerTypeId,
|
||||
@RequestParam(name = "time", required = false) String time,
|
||||
@RequestParam(name = "queryTime", required = false) String queryTime,
|
||||
@RequestParam(name = "personSn", required = false) String personSn,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Result<Page<WorkerMonthAttendanceStatisticsVo>> result = new Result<>();
|
||||
Page<WorkerMonthAttendanceStatisticsVo> list = projectOperationsAnalysisService.selectAttendanceDetailByPage(workerName, projectSn, groupId, workerTypeId, time, queryTime, personSn, pageNo, pageSize, personType);
|
||||
Page<WorkerMonthAttendanceStatisticsVo> list = projectOperationsAnalysisService.selectAttendanceDetailByPage(map, workerName, projectSn, groupId, workerTypeId, time, queryTime, personSn, pageNo, pageSize, personType);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
result.setCode(200);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = " 查询今日出勤考勤统计列表", notes = "查询今日出勤考勤统计列表", httpMethod = "GET")
|
||||
@GetMapping(value = "/selectWorkerTodayAttendancePageList")
|
||||
public Result<Page<TodayAttendance>> selectWorkerTodayAttendancePageList(
|
||||
@RequestParam(name = "projectSn", required = true) String projectSn,
|
||||
@RequestParam(name = "personType", required = true) String personType,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
public Result<Page<TodayAttendance>> selectWorkerTodayAttendancePageList(
|
||||
@RequestParam(name = "projectSn", required = true) String projectSn,
|
||||
@RequestParam(name = "personType", required = true) String personType,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Result<Page<TodayAttendance>> result = new Result<>();
|
||||
Page<TodayAttendance> list= projectOperationsAnalysisService.selectWorkerTodayAttendancePageList(projectSn,pageNo,pageSize,personType);
|
||||
Page<TodayAttendance> list = projectOperationsAnalysisService.selectWorkerTodayAttendancePageList(projectSn, pageNo, pageSize, personType);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
result.setCode(200);
|
||||
@ -108,13 +109,13 @@ public class ProjectOperationsAnalysisController {
|
||||
|
||||
@ApiOperation(value = " 查询具体人员任一天考勤信息", notes = "查询具体人员任一天考勤信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/getWorkerAttendanceByDay")
|
||||
public Result<Page<WorkerAttendanceVo>> getWorkerAttendanceByDay(
|
||||
public Result<Page<WorkerAttendanceVo>> getWorkerAttendanceByDay(
|
||||
@RequestParam(name = "personSn", required = true) String personSn,
|
||||
@RequestParam(name = "time", required = true) String time,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Result<Page<WorkerAttendanceVo>> result = new Result<>();
|
||||
Page<WorkerAttendanceVo> list= projectOperationsAnalysisService.getWorkerAttendanceByDay(pageNo,pageSize,personSn,time);
|
||||
Page<WorkerAttendanceVo> list = projectOperationsAnalysisService.getWorkerAttendanceByDay(pageNo, pageSize, personSn, time);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
result.setCode(200);
|
||||
@ -123,12 +124,12 @@ public class ProjectOperationsAnalysisController {
|
||||
|
||||
@ApiOperation(value = " 查询具体人员考勤信息", notes = "查询具体人员考勤信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/getWorkerAttendanceDetail")
|
||||
public Result<Page<WorkerAttendanceVo>> getWorkerAttendanceDetail(
|
||||
public Result<Page<WorkerAttendanceVo>> getWorkerAttendanceDetail(
|
||||
@RequestParam(name = "personSn", required = true) String personSn,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Result<Page<WorkerAttendanceVo>> result = new Result<>();
|
||||
Page<WorkerAttendanceVo> list= projectOperationsAnalysisService.getWorkerAttendanceDetail(pageNo,pageSize,personSn);
|
||||
Page<WorkerAttendanceVo> list = projectOperationsAnalysisService.getWorkerAttendanceDetail(pageNo, pageSize, personSn);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
result.setCode(200);
|
||||
@ -137,7 +138,7 @@ public class ProjectOperationsAnalysisController {
|
||||
|
||||
@ApiOperation(value = " 查询各类型核酸统计列表", notes = "查询今日各类型核酸统计列表", httpMethod = "GET")
|
||||
@GetMapping(value = "/selectWorkerTodayAcidList")
|
||||
public Result<Page<TodayAttendance>> selectWorkerTodayAcidList(
|
||||
public Result<Page<TodayAttendance>> selectWorkerTodayAcidList(
|
||||
@RequestParam(name = "projectSn", required = true) String projectSn,
|
||||
@RequestParam(name = "codeState", required = false) String codeState,
|
||||
@RequestParam(name = "workerClassify", required = false) String workerClassify,
|
||||
@ -146,7 +147,7 @@ public class ProjectOperationsAnalysisController {
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Result<Page<TodayAttendance>> result = new Result<>();
|
||||
Page<TodayAttendance> list= projectOperationsAnalysisService.selectWorkerTodayAcidList(projectSn,pageNo,pageSize,codeState,workerClassify,vaccineStatus,noVaccine);
|
||||
Page<TodayAttendance> list = projectOperationsAnalysisService.selectWorkerTodayAcidList(projectSn, pageNo, pageSize, codeState, workerClassify, vaccineStatus, noVaccine);
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
result.setCode(200);
|
||||
|
||||
@ -9,6 +9,7 @@ import com.zhgd.xmgl.modules.realnamestatistics.entity.vo.WorkerAttendanceVo;
|
||||
import com.zhgd.xmgl.modules.realnamestatistics.entity.vo.WorkerMonthAttendanceStatisticsVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -23,7 +24,7 @@ public interface ProjectOperationsAnalysisMapper extends BaseMapper<ProjectOpera
|
||||
|
||||
List<ProjectOperationsAnalysis> getAllDetails();
|
||||
|
||||
Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(Page<WorkerMonthAttendanceStatisticsVo> page, @Param("workerName") String workerName, @Param("projectSn") String projectSn, @Param("groupId") Long groupId, @Param("workerTypeId") Long workerTypeId, @Param("time") String time, @Param("queryTime") String queryTime, @Param("personSn") String personSn, @Param("personType") String personType);
|
||||
Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(Page<WorkerMonthAttendanceStatisticsVo> page, @Param("paramMap") HashMap<String, Object> map, @Param("workerName") String workerName, @Param("projectSn") String projectSn, @Param("groupId") Long groupId, @Param("workerTypeId") Long workerTypeId, @Param("time") String time, @Param("queryTime") String queryTime, @Param("personSn") String personSn, @Param("personType") String personType);
|
||||
|
||||
Page<TodayAttendance> selectWorkerTodayAttendancePageList(Page<TodayAttendance> page, @Param("projectSn") String projectSn);
|
||||
|
||||
|
||||
@ -56,6 +56,13 @@
|
||||
LEFT JOIN department_info d on d.id=i.department_id
|
||||
LEFT JOIN enterprise_info ei on ei.id=tm.enterprise_id
|
||||
where 1=1
|
||||
<if test="paramMap.projectSnList != null">
|
||||
and i.project_sn in
|
||||
<foreach collection="paramMap.projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
AND i.project_sn=#{projectSn}
|
||||
</if>
|
||||
|
||||
@ -10,6 +10,7 @@ import com.zhgd.xmgl.modules.realnamestatistics.entity.vo.WorkerMonthAttendanceS
|
||||
import com.zhgd.xmgl.modules.worker.entity.TeamInfo;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerType;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -29,7 +30,7 @@ public interface IProjectOperationsAnalysisService extends IService<ProjectOpera
|
||||
|
||||
List<WorkerType> getAllWorkerType(String projectSn);
|
||||
|
||||
Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(String workerName, String projectSn, Long groupId, Long workerTypeId, String time, String queryTime, String personSn, Integer pageNo, Integer pageSize, String personnelType);
|
||||
Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(HashMap<String, Object> map, String workerName, String projectSn, Long groupId, Long workerTypeId, String time, String queryTime, String personSn, Integer pageNo, Integer pageSize, String personnelType);
|
||||
|
||||
Page<TodayAttendance> selectWorkerTodayAttendancePageList(String projectSn, Integer pageNo, Integer pageSize, String personType);
|
||||
|
||||
|
||||
@ -140,9 +140,9 @@ public class ProjectOperationsAnalysisServiceImpl extends ServiceImpl<ProjectOpe
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(String workerName, String projectSn, Long groupId, Long workerTypeId, String time, String queryTime, String personSn, Integer pageNo, Integer pageSize, String personType) {
|
||||
public Page<WorkerMonthAttendanceStatisticsVo> selectAttendanceDetailByPage(HashMap<String, Object> map, String workerName, String projectSn, Long groupId, Long workerTypeId, String time, String queryTime, String personSn, Integer pageNo, Integer pageSize, String personType) {
|
||||
Page<WorkerMonthAttendanceStatisticsVo> page = new Page<>(pageNo, pageSize);
|
||||
return baseMapper.selectAttendanceDetailByPage(page, workerName, projectSn, groupId, workerTypeId, time, queryTime, personSn, personType);
|
||||
return baseMapper.selectAttendanceDetailByPage(page, map, workerName, projectSn, groupId, workerTypeId, time, queryTime, personSn, personType);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -139,6 +139,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "leaderName", value = "负责人姓名(班组)", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "chargePersonName", value = "负责人姓名(部门)", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "belongingSection", value = "所属标段(部门)", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectWorkerInfoList")
|
||||
public Result<IPage<EntityMap>> selectWorkerInfoList(@RequestBody Map<String, Object> map) {
|
||||
@ -280,6 +281,7 @@ public class WorkerInfoController {
|
||||
@ApiOperation(value = "人员总览人员类型和教育统计", notes = "人员总览人员类型和教育统计")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping("/selectPersonTypeAndEduStatistics")
|
||||
@ -347,8 +349,9 @@ public class WorkerInfoController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计按工种分布的人员数量", notes = "统计按工种分布的人员数量")
|
||||
@GetMapping("/countWorkerNumGroupByWorkerType")
|
||||
public Result<List<TypeNumVo>> countWorkerNumGroupByWorkerType(@RequestParam Map<String, Object> map) {
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "query", required = false, dataType = "String")
|
||||
@PostMapping("/countWorkerNumGroupByWorkerType")
|
||||
public Result<List<TypeNumVo>> countWorkerNumGroupByWorkerType(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(workerInfoService.countWorkerNumGroupByWorkerType(map));
|
||||
}
|
||||
|
||||
|
||||
@ -81,6 +81,7 @@ public class WorkerWagesPaymentController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectWorkerWagesPaymentPageList")
|
||||
public Result<IPage<EntityMap>> selectWorkerWagesPaymentPageList(@RequestBody Map<String,Object> map) {
|
||||
@ -388,11 +389,14 @@ public class WorkerWagesPaymentController {
|
||||
return JSONUtil.toJsonStr(result);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "薪资发放情况", notes = "薪资发放情况", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "payMonth", value = "工资发放月份 格式2022-05", paramType = "query", required = true, dataType = "String")
|
||||
@GetMapping(value = "/getPaymentStatistics")
|
||||
public Result<PaymentStatisticsVo> getPaymentStatistics() {
|
||||
return Result.success(workerWagesPaymentService.getPaymentStatistics());
|
||||
@ApiOperation(value = "薪资发放情况", notes = "薪资发放情况", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "payMonth", value = "工资发放月份 格式2022-05", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/getPaymentStatistics")
|
||||
public Result<PaymentStatisticsVo> getPaymentStatistics(@RequestBody HashMap<String, Object> map) {
|
||||
return Result.success(workerWagesPaymentService.getPaymentStatistics(map));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -51,6 +51,13 @@
|
||||
<if test="param.projectSn != null and param.projectSn != ''">
|
||||
and a.project_sn = #{param.projectSn}
|
||||
</if>
|
||||
<if test="param.projectSnList != null and param.projectSnList != ''">
|
||||
and a.project_sn in
|
||||
<foreach collection="param.projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.workerName != null and param.workerName != ''">
|
||||
and a.worker_name like CONCAT(CONCAT('%', #{param.workerName}), '%')
|
||||
</if>
|
||||
@ -362,6 +369,13 @@
|
||||
<if test="userEnterpriseId != null and userEnterpriseId != ''">
|
||||
and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
|
||||
</if>
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and w1.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectPresenceWorkerPersonTypeTotal" resultType="java.util.Map" parameterType="java.util.Map">
|
||||
@ -382,6 +396,13 @@
|
||||
<if test="userEnterpriseId != null and userEnterpriseId != ''">
|
||||
and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
|
||||
</if>
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and w1.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -822,17 +843,24 @@
|
||||
WHERE p.create_time >= CONCAT(DATE_FORMAT(now(), "%Y-%m-%d"), ' 00:00:00')
|
||||
and w1.inService_type = 1
|
||||
AND w1.person_type = 1
|
||||
and w1.project_sn = #{projectSn}
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and w1.project_sn = #{projectSn}
|
||||
</if>
|
||||
group by w1.team_id
|
||||
) tp ON e.id = tp.team_id
|
||||
LEFT JOIN (SELECT w1.team_id, COUNT(DISTINCT w1.person_sn) total_person_num
|
||||
FROM worker_info w1
|
||||
where w1.inService_type = 1
|
||||
AND w1.person_type = 1
|
||||
and w1.project_sn = #{projectSn}
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and w1.project_sn = #{projectSn}
|
||||
</if>
|
||||
group by w1.team_id
|
||||
) tp2 ON e.id = tp2.team_id
|
||||
WHERE e.project_sn = #{projectSn}
|
||||
WHERE 1=1
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and e.project_sn = #{projectSn}
|
||||
</if>
|
||||
order by attendance_person_num desc LIMIT 10
|
||||
</select>
|
||||
<select id="selectAllProjectTeamList" resultType="com.zhgd.xmgl.modules.worker.entity.vo.AllProjectTeamVo"
|
||||
@ -916,7 +944,14 @@
|
||||
INNER JOIN worker_attendance p ON w1.person_sn = p.person_sn
|
||||
<where>
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
w1.project_sn = #{projectSn}
|
||||
and w1.project_sn = #{projectSn}
|
||||
</if>
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and w1.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and w1.inService_type = 1
|
||||
and p.create_time >= CONCAT(DATE_FORMAT(now(), "%Y-%m-%d"), ' 00:00:00')
|
||||
@ -2300,10 +2335,17 @@
|
||||
|
||||
<select id="countWorkerNumGroupByWorkerType" resultType="com.zhgd.xmgl.modules.worker.entity.vo.TypeNumVo">
|
||||
SELECT wt.type_name AS typeName,
|
||||
count(wi.id) AS num
|
||||
count(wi.id) AS num
|
||||
FROM worker_type wt
|
||||
LEFT JOIN team_info ti ON wt.id = ti.worker_type_id
|
||||
LEFT JOIN worker_info wi ON (ti.id = wi.team_id and wi.inService_type = 1)
|
||||
LEFT JOIN team_info ti ON wt.id = ti.worker_type_id
|
||||
LEFT JOIN worker_info wi ON (ti.id = wi.team_id and wi.inService_type = 1)
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and wt.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY wt.type_name
|
||||
</select>
|
||||
|
||||
|
||||
@ -171,6 +171,13 @@
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and w3.project_sn = #{projectSn}
|
||||
</if>
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and w3.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userEnterpriseId != null and userEnterpriseId != ''">
|
||||
and FIND_IN_SET(w3.enterprise_id, #{userEnterpriseId})
|
||||
</if>
|
||||
|
||||
@ -1,79 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.worker.mapper.WorkerWagesPaymentMapper">
|
||||
|
||||
<select id="selectWorkerWagesPaymentPageList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.id worker_id,a.worker_name,a.id_card,a.person_type,a.inService_type,
|
||||
b.team_name,c.department_name,
|
||||
en.enterprise_name,
|
||||
wp.id,a.person_sn,a.project_sn,IFNULL(wp.pay_month,#{param.payMonth})
|
||||
pay_month,wp.pay_gross,wp.pay_net,wp.balance_date,wp.pay_status,
|
||||
wp.days,wp.work_hours,wp.bank_balance_date,a.pay_roll_bank_name,a.pay_roll_bank_number,
|
||||
(CASE WHEN a.person_type=1 THEN b.team_name
|
||||
WHEN a.person_type=2 THEN c.department_name
|
||||
SELECT a.id worker_id,
|
||||
a.worker_name,
|
||||
a.id_card,
|
||||
a.person_type,
|
||||
a.inService_type,
|
||||
b.team_name,
|
||||
c.department_name,
|
||||
en.enterprise_name,
|
||||
wp.id,
|
||||
a.person_sn,
|
||||
a.project_sn,
|
||||
IFNULL(wp.pay_month, #{param.payMonth})
|
||||
pay_month,
|
||||
wp.pay_gross,
|
||||
wp.pay_net,
|
||||
wp.balance_date,
|
||||
wp.pay_status,
|
||||
wp.days,
|
||||
wp.work_hours,
|
||||
wp.bank_balance_date,
|
||||
a.pay_roll_bank_name,
|
||||
a.pay_roll_bank_number,
|
||||
(CASE
|
||||
WHEN a.person_type = 1 THEN b.team_name
|
||||
WHEN a.person_type = 2 THEN c.department_name
|
||||
ELSE '' END) department_team_name
|
||||
from worker_info a
|
||||
LEFT JOIN worker_wages_payment wp ON (a.person_sn=wp.person_sn and a.project_sn=wp.project_sn and
|
||||
wp.pay_month=#{param.payMonth})
|
||||
LEFT JOIN team_info b ON a.team_id=b.id
|
||||
LEFT JOIN department_info c ON a.department_id=c.id
|
||||
LEFT JOIN enterprise_info en ON en.id=a.enterprise_id
|
||||
where 1=1
|
||||
LEFT JOIN worker_wages_payment wp ON (a.person_sn = wp.person_sn and a.project_sn = wp.project_sn and
|
||||
wp.pay_month = #{param.payMonth})
|
||||
LEFT JOIN team_info b ON a.team_id = b.id
|
||||
LEFT JOIN department_info c ON a.department_id = c.id
|
||||
LEFT JOIN enterprise_info en ON en.id = a.enterprise_id
|
||||
where 1 = 1
|
||||
<if test="param.projectSn != null and param.projectSn != ''">
|
||||
and a.project_sn=#{param.projectSn}
|
||||
and a.project_sn = #{param.projectSn}
|
||||
</if>
|
||||
<if test="param.projectSnList != null">
|
||||
and a.project_sn in
|
||||
<foreach collection="param.projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.workerName != null and param.workerName != ''">
|
||||
and a.worker_name like CONCAT(CONCAT('%',#{param.workerName}),'%')
|
||||
and a.worker_name like CONCAT(CONCAT('%', #{param.workerName}), '%')
|
||||
</if>
|
||||
<if test="param.idCard != null and param.idCard != ''">
|
||||
and a.id_card like CONCAT(CONCAT('%',#{param.idCard}),'%')
|
||||
and a.id_card like CONCAT(CONCAT('%', #{param.idCard}), '%')
|
||||
</if>
|
||||
<if test="param.enterpriseId != null and param.enterpriseId != ''">
|
||||
and a.enterprise_id=#{param.enterpriseId}
|
||||
and a.enterprise_id = #{param.enterpriseId}
|
||||
</if>
|
||||
<if test="param.userEnterpriseId != null and param.userEnterpriseId != ''">
|
||||
and FIND_IN_SET(a.enterprise_id,#{param.userEnterpriseId})
|
||||
and FIND_IN_SET(a.enterprise_id, #{param.userEnterpriseId})
|
||||
</if>
|
||||
<if test="param.inserviceType!=null and param.inserviceType!=''">
|
||||
and a.inService_type=#{param.inserviceType}
|
||||
<if test="param.inserviceType != null and param.inserviceType != ''">
|
||||
and a.inService_type = #{param.inserviceType}
|
||||
</if>
|
||||
<if test="param.teamId!=null and param.teamId!=''">
|
||||
and a.team_id=#{param.teamId}
|
||||
<if test="param.teamId != null and param.teamId != ''">
|
||||
and a.team_id = #{param.teamId}
|
||||
</if>
|
||||
<if test="param.departmentId!=null and param.departmentId!=''">
|
||||
and a.department_id=#{param.departmentId}
|
||||
<if test="param.departmentId != null and param.departmentId != ''">
|
||||
and a.department_id = #{param.departmentId}
|
||||
</if>
|
||||
<if test="param.personType!=null and param.personType!=''">
|
||||
and a.person_type=#{param.personType}
|
||||
<if test="param.personType != null and param.personType != ''">
|
||||
and a.person_type = #{param.personType}
|
||||
</if>
|
||||
<if test="param.payStatus!=null and param.payStatus!='' or param.payStatus==0">
|
||||
and IFNULL(wp.pay_status,0)=#{param.payStatus}
|
||||
<if test="param.payStatus != null and param.payStatus != '' or param.payStatus == 0">
|
||||
and IFNULL(wp.pay_status, 0) = #{param.payStatus}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectWorkerWagesPaymentDataList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.id worker_id,a.worker_name,a.id_card,a.person_type,a.inService_type,b.team_name,c.department_name,en.enterprise_name,
|
||||
wp.id,a.person_sn,a.project_sn,IFNULL(wp.pay_month,#{payMonth}) pay_month,wp.pay_gross,wp.pay_net,wp.balance_date,wp.pay_status,
|
||||
wp.days,wp.work_hours,wp.bank_balance_date,a.pay_roll_bank_name,a.pay_roll_bank_number,a.enter_date,
|
||||
(CASE WHEN a.person_type=1 THEN b.team_name
|
||||
WHEN a.person_type=2 THEN c.department_name
|
||||
SELECT a.id worker_id,
|
||||
a.worker_name,
|
||||
a.id_card,
|
||||
a.person_type,
|
||||
a.inService_type,
|
||||
b.team_name,
|
||||
c.department_name,
|
||||
en.enterprise_name,
|
||||
wp.id,
|
||||
a.person_sn,
|
||||
a.project_sn,
|
||||
IFNULL(wp.pay_month, #{payMonth}) pay_month,
|
||||
wp.pay_gross,
|
||||
wp.pay_net,
|
||||
wp.balance_date,
|
||||
wp.pay_status,
|
||||
wp.days,
|
||||
wp.work_hours,
|
||||
wp.bank_balance_date,
|
||||
a.pay_roll_bank_name,
|
||||
a.pay_roll_bank_number,
|
||||
a.enter_date,
|
||||
(CASE
|
||||
WHEN a.person_type = 1 THEN b.team_name
|
||||
WHEN a.person_type = 2 THEN c.department_name
|
||||
ELSE '' END) department_team_name
|
||||
from worker_info a
|
||||
LEFT JOIN worker_wages_payment wp ON (a.person_sn=wp.person_sn and a.project_sn=wp.project_sn and wp.pay_month=#{payMonth})
|
||||
LEFT JOIN team_info b ON a.team_id=b.id
|
||||
LEFT JOIN department_info c ON a.department_id=c.id
|
||||
LEFT JOIN enterprise_info en ON en.id=a.enterprise_id
|
||||
where a.project_sn=#{projectSn}
|
||||
<if test="workerName!=null and workerName!=''">
|
||||
and a.worker_name like CONCAT(CONCAT('%',#{workerName}),'%')
|
||||
LEFT JOIN worker_wages_payment wp ON (a.person_sn = wp.person_sn and a.project_sn = wp.project_sn and
|
||||
wp.pay_month = #{payMonth})
|
||||
LEFT JOIN team_info b ON a.team_id = b.id
|
||||
LEFT JOIN department_info c ON a.department_id = c.id
|
||||
LEFT JOIN enterprise_info en ON en.id = a.enterprise_id
|
||||
where a.project_sn = #{projectSn}
|
||||
<if test="workerName != null and workerName != ''">
|
||||
and a.worker_name like CONCAT(CONCAT('%', #{workerName}), '%')
|
||||
</if>
|
||||
<if test="idCard!=null and idCard!=''">
|
||||
and a.id_card like CONCAT(CONCAT('%',#{idCard}),'%')
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and a.id_card like CONCAT(CONCAT('%', #{idCard}), '%')
|
||||
</if>
|
||||
<if test="enterpriseId!=null and enterpriseId!=''">
|
||||
and a.enterprise_id=#{enterpriseId}
|
||||
<if test="enterpriseId != null and enterpriseId != ''">
|
||||
and a.enterprise_id = #{enterpriseId}
|
||||
</if>
|
||||
<if test="userEnterpriseId!=null and userEnterpriseId!=''">
|
||||
and FIND_IN_SET(a.enterprise_id,#{userEnterpriseId})
|
||||
<if test="userEnterpriseId != null and userEnterpriseId != ''">
|
||||
and FIND_IN_SET(a.enterprise_id, #{userEnterpriseId})
|
||||
</if>
|
||||
<if test="inserviceType != null and inserviceType != ''">
|
||||
and a.inService_type = #{inserviceType}
|
||||
@ -93,20 +137,35 @@
|
||||
</select>
|
||||
|
||||
<select id="getProjectPaymentStatistics" resultType="com.zhgd.xmgl.modules.worker.entity.vo.PaymentStatisticsVo">
|
||||
SELECT
|
||||
count( t.project_sn ) paidProjectNum,
|
||||
count(*)- count( t.project_sn ) unpaidProjectNum
|
||||
FROM
|
||||
project p
|
||||
LEFT JOIN ( SELECT DISTINCT wp.project_sn FROM worker_wages_payment wp JOIN project p1 where wp.pay_month = #{param.payMonth}) t ON t.project_sn = p.project_sn
|
||||
SELECT count(t.project_sn) paidProjectNum,
|
||||
count(*) - count(t.project_sn) unpaidProjectNum
|
||||
FROM project p
|
||||
LEFT JOIN (SELECT DISTINCT wp.project_sn
|
||||
FROM worker_wages_payment wp
|
||||
JOIN project p1
|
||||
where wp.pay_month = #{param.payMonth}) t ON t.project_sn = p.project_sn
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and p.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getUserPaymentStatistics" resultType="com.zhgd.xmgl.modules.worker.entity.vo.PaymentStatisticsVo">
|
||||
select ifnull(sum(if(wp.pay_status = 1, 1, 0)), 0) paidUserNum,
|
||||
ifnull(sum(if(wp.pay_status = 0 or wp.pay_status is null, 1, 0)), 0) unpaidUserNum
|
||||
ifnull(sum(if(wp.pay_status = 0 or wp.pay_status is null, 1, 0)), 0) unpaidUserNum
|
||||
from worker_info a
|
||||
LEFT JOIN worker_wages_payment wp ON (a.person_sn = wp.person_sn and a.project_sn = wp.project_sn and
|
||||
wp.pay_month = #{param.payMonth})
|
||||
where a.inService_type=1
|
||||
LEFT JOIN worker_wages_payment wp ON (a.person_sn = wp.person_sn and a.project_sn = wp.project_sn and
|
||||
wp.pay_month = #{param.payMonth})
|
||||
where a.inService_type = 1
|
||||
<if test="projectSnList != null and projectSnList != ''">
|
||||
and a.project_sn in
|
||||
<foreach collection="projectSnList" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -28,5 +28,5 @@ public interface IWorkerWagesPaymentService extends IService<WorkerWagesPayment>
|
||||
|
||||
Result uploadWagesPaymentExcel(MultipartFile excelFile, String projectSn);
|
||||
|
||||
PaymentStatisticsVo getPaymentStatistics();
|
||||
PaymentStatisticsVo getPaymentStatistics(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@ -142,8 +142,7 @@ public class WorkerWagesPaymentServiceImpl extends ServiceImpl<WorkerWagesPaymen
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentStatisticsVo getPaymentStatistics() {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
public PaymentStatisticsVo getPaymentStatistics(HashMap<String, Object> map) {
|
||||
getPayMonth(map);
|
||||
PaymentStatisticsVo vo = workerWagesPaymentMapper.getProjectPaymentStatistics(map);
|
||||
PaymentStatisticsVo userVo = workerWagesPaymentMapper.getUserPaymentStatistics(map);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user