Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
This commit is contained in:
commit
34bd1679b4
@ -522,7 +522,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "queryEndTime", value = "查询人员结束时间2022-03-01", paramType = "body", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping("/selectWorkerTeamStatistics")
|
||||
public Result<List<WorkerTeamStatisticsVo>> selectWorkerTeamStatistics(@RequestBody Map<String, Object> map) {
|
||||
public Result<List<WorkerTeamDepartmentStatisticsVo>> selectWorkerTeamStatistics(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(workerInfoService.selectWorkerTeamStatistics(map));
|
||||
}
|
||||
|
||||
@ -531,7 +531,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping("/selectWorkerTeamAndDepartmentStatistics")
|
||||
public Result<Map<String, Object>> selectWorkerTeamAndDepartmentStatistics(@RequestBody Map<String, Object> map) {
|
||||
public Result<WorkerTeamAndDepartmentStatisticsVo> selectWorkerTeamAndDepartmentStatistics(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(workerInfoService.selectWorkerTeamAndDepartmentStatistics(map));
|
||||
}
|
||||
|
||||
|
||||
@ -3,19 +3,17 @@ package com.zhgd.xmgl.modules.worker.entity.vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WorkerTeamStatisticsVo {
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WorkerTeamAndDepartmentStatisticsVo {
|
||||
|
||||
@ApiModelProperty(value = "班组名称")
|
||||
private String teamName;
|
||||
@ApiModelProperty(value = "班组ID")
|
||||
private String teamId;
|
||||
private String name;
|
||||
@ApiModelProperty(value = "出勤人数")
|
||||
private Integer attendancePersonTotal;
|
||||
@ApiModelProperty(value = "在场人数")
|
||||
private Integer presencePersonTotal;
|
||||
@ApiModelProperty(value = "在册人数")
|
||||
private Integer totalPerson;
|
||||
|
||||
@ApiModelProperty(value = "部门班组统计")
|
||||
private List<WorkerTeamDepartmentStatisticsVo> list;
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.zhgd.xmgl.modules.worker.entity.vo;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class WorkerTeamDepartmentStatisticsVo {
|
||||
@ApiModelProperty(value = "班组名称")
|
||||
private String teamName;
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String departmentName;
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
private String departmentId;
|
||||
@ApiModelProperty(value = "班组ID")
|
||||
private String teamId;
|
||||
@ApiModelProperty(value = "班组或部门名称")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "出勤人数")
|
||||
private Integer attendancePersonTotal;
|
||||
@ApiModelProperty(value = "在场人数")
|
||||
private Integer presencePersonTotal;
|
||||
@ApiModelProperty(value = "在册人数")
|
||||
private Integer totalPerson;
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wflow.bean.vo.OrgTreeVo;
|
||||
import com.zhgd.annotation.DataScope;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.worker.entity.TeamInfo;
|
||||
import com.zhgd.xmgl.modules.worker.entity.vo.GroupVo;
|
||||
@ -32,6 +33,7 @@ public interface TeamInfoMapper extends BaseMapper<TeamInfo> {
|
||||
|
||||
EntityMap selectTeamInfoById(@Param("teamId") Long teamId);
|
||||
|
||||
@DataScope(includeTable = "team_info")
|
||||
List<TeamInfo> selectTeamInfoList(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectEnterpriseTeamList(Map<String, Object> map);
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
order by a.enter_date desc
|
||||
</when>
|
||||
<otherwise>
|
||||
order by a.add_time desc,a.update_time desc
|
||||
order by a.add_time desc,a.id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@ -49,7 +49,7 @@ public interface IWorkerInfoService extends IService<WorkerInfo> {
|
||||
|
||||
Map<String, Object> selectWorkerPersonTypeStatistics(Map<String, Object> map);
|
||||
|
||||
List<WorkerTeamStatisticsVo> selectWorkerTeamStatistics(Map<String, Object> map);
|
||||
List<WorkerTeamDepartmentStatisticsVo> selectWorkerTeamStatistics(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectWorkerDepartmentStatistics(Map<String, Object> map);
|
||||
|
||||
@ -90,7 +90,7 @@ public interface IWorkerInfoService extends IService<WorkerInfo> {
|
||||
|
||||
List<WorkerInfo> getLaborManagementInfoList(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> selectWorkerTeamAndDepartmentStatistics(Map<String, Object> map);
|
||||
WorkerTeamAndDepartmentStatisticsVo selectWorkerTeamAndDepartmentStatistics(Map<String, Object> map);
|
||||
|
||||
void batchSendWorkerInfo(Map<String, Object> map);
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAudi
|
||||
//调用向正式表添加接口并下发设备
|
||||
WorkerInfo workerInfo1 = new WorkerInfo();
|
||||
try {
|
||||
workerInfo1.setNoticeUserId(Long.valueOf(MapUtils.getString(map, "startUser")));
|
||||
workerInfo.setNoticeUserId(Long.valueOf(MapUtils.getString(map, "startUser")));
|
||||
workerInfo1 = workerInfoService.saveWorkerInfo(workerInfo);
|
||||
} catch (Exception e) {
|
||||
log.error("同步人员信息失败:" + workerInfo.getWorkerName() + e.getMessage());
|
||||
|
||||
@ -633,7 +633,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
public Map<String, Object> selectWorkerOverviewStatistics(Map<String, Object> map) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
Map<String, Object> personType = selectWorkerPersonTypeStatistics(map);
|
||||
List<WorkerTeamStatisticsVo> teamList = selectWorkerTeamStatistics(map);
|
||||
List<WorkerTeamDepartmentStatisticsVo> teamList = selectWorkerTeamStatistics(map);
|
||||
//map.put("sn",MapUtils.getString(map,"projectSn"));
|
||||
int totalEducationPerson = workerSafeEducationMapper.getProjectSafeEducationPersonToltal(map);
|
||||
data.put("totalEducationPerson", totalEducationPerson);
|
||||
@ -686,7 +686,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WorkerTeamStatisticsVo> selectWorkerTeamStatistics(Map<String, Object> map) {
|
||||
public List<WorkerTeamDepartmentStatisticsVo> selectWorkerTeamStatistics(Map<String, Object> map) {
|
||||
QueryWrapper<TeamInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(TeamInfo::getProjectSn, MapUtils.getString(map, "projectSn"));
|
||||
List<TeamInfo> list = teamInfoMapper.selectTeamInfoList(map);
|
||||
@ -752,7 +752,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
tempList.add(data);
|
||||
}
|
||||
}
|
||||
List<WorkerTeamStatisticsVo> voList = tempList.stream().map(e -> BeanUtil.toBean(e, WorkerTeamStatisticsVo.class)).collect(Collectors.toList());
|
||||
List<WorkerTeamDepartmentStatisticsVo> voList = tempList.stream().map(e -> BeanUtil.toBean(e, WorkerTeamDepartmentStatisticsVo.class)).collect(Collectors.toList());
|
||||
return voList;
|
||||
}
|
||||
|
||||
@ -1421,8 +1421,8 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> selectWorkerTeamAndDepartmentStatistics(Map<String, Object> map) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
public WorkerTeamAndDepartmentStatisticsVo selectWorkerTeamAndDepartmentStatistics(Map<String, Object> map) {
|
||||
WorkerTeamAndDepartmentStatisticsVo data = new WorkerTeamAndDepartmentStatisticsVo();
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
//部门统计
|
||||
List<Map<String, Object>> departmentList = selectWorkerDepartmentStatistics(map);
|
||||
@ -1430,7 +1430,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
list.addAll(departmentList);
|
||||
}
|
||||
//班组统计
|
||||
List<WorkerTeamStatisticsVo> teamList = selectWorkerTeamStatistics(map);
|
||||
List<WorkerTeamDepartmentStatisticsVo> teamList = selectWorkerTeamStatistics(map);
|
||||
List<Map<String, Object>> teamMapList = teamList.stream().map(e -> BeanUtil.beanToMap(e)).collect(Collectors.toList());
|
||||
if (teamList.size() > 0) {
|
||||
list.addAll(teamMapList);
|
||||
@ -1445,10 +1445,10 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
attendancePersonTotal = attendancePersonTotal + MapUtils.getInteger(result, "attendancePersonTotal");
|
||||
}
|
||||
}
|
||||
data.put("list", list);
|
||||
data.put("totalPerson", totalPerson);
|
||||
data.put("presencePersonTotal", presencePersonTotal);
|
||||
data.put("attendancePersonTotal", attendancePersonTotal);
|
||||
data.setAttendancePersonTotal(attendancePersonTotal);
|
||||
data.setPresencePersonTotal(presencePersonTotal);
|
||||
data.setTotalPerson(totalPerson);
|
||||
data.setList(BeanUtil.copyToList(list, WorkerTeamDepartmentStatisticsVo.class));
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.xz.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.sun.corba.se.pept.transport.ContactInfo;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
@ -34,8 +34,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -65,6 +67,8 @@ public class XzWorkerInfoAuditRecordController {
|
||||
|
||||
@Autowired
|
||||
private ISafeEducationQuestionAnswerService safeEducationQuestionAnswerService;
|
||||
@Resource
|
||||
private IUfaceDevService ufaceDevService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@ -124,7 +128,6 @@ public class XzWorkerInfoAuditRecordController {
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
@ -146,11 +149,12 @@ public class XzWorkerInfoAuditRecordController {
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param workerInfoAuditRecord
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "劳务管理",operType = "编辑劳务人员-审核",operDesc = "编辑劳务人员-审核表信息")
|
||||
@ApiOperation(value = "编辑劳务人员-审核表信息", notes = "编辑劳务人员-审核表信息" , httpMethod="POST")
|
||||
@OperLog(operModul = "劳务管理", operType = "编辑劳务人员-审核", operDesc = "编辑劳务人员-审核表信息")
|
||||
@ApiOperation(value = "编辑劳务人员-审核表信息", notes = "编辑劳务人员-审核表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<WorkerInfoAuditRecord> edit(@RequestBody WorkerInfoAuditRecord workerInfoAuditRecord) {
|
||||
workerInfoAuditRecordService.editWorkerInfoAuditRecord(workerInfoAuditRecord);
|
||||
@ -229,9 +233,6 @@ public class XzWorkerInfoAuditRecordController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Resource
|
||||
private IUfaceDevService ufaceDevService;
|
||||
|
||||
@OperLog(operModul = "劳务管理", operType = "劳务人员审核通过", operDesc = "劳务人员审核通过")
|
||||
@ApiOperation(value = "审核通过", notes = "审核通过", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ -257,7 +258,7 @@ public class XzWorkerInfoAuditRecordController {
|
||||
List<String> workerIds = new ArrayList<>();
|
||||
JSONArray ids = paramMap.getJSONArray("id");
|
||||
JSONArray workerInfo = new JSONArray();
|
||||
String [] param = {"workerId", "workerName", "enterpriseName", "teamName", "personType", "idCard", "upUrl", "downUrl", "contract", "insurance", "certificate"};
|
||||
String[] param = {"workerId", "workerName", "enterpriseName", "teamName", "personType", "idCard", "upUrl", "downUrl", "contract", "insurance", "certificate"};
|
||||
for (int i = 0; i < ids.size(); i++) {
|
||||
JSONObject detailObj = new JSONObject();
|
||||
JSONObject j = ids.getJSONObject(i);
|
||||
@ -360,8 +361,9 @@ public class XzWorkerInfoAuditRecordController {
|
||||
List<Long> collect = systemUserList.stream().map(s -> s.getUserId()).collect(Collectors.toList());
|
||||
collect.addAll(xzSystemUserToCompanyProjects.stream().map(x -> x.getUserId()).collect(Collectors.toList()));
|
||||
collect.add(Long.valueOf(paramMap.getString("startUser")));
|
||||
WorkerInfoAuditRecord wia = workerInfoAuditRecordService.getById(split[0]);
|
||||
for (Long userId : collect) {
|
||||
noticeService.addUserNotice(userId, "人员同步异常,原因:" + split[1], "人员审批数据同步失败", "1");
|
||||
noticeService.addUserNotice(userId, StrUtil.format("人员同步异常,原因:{},姓名:{},身份证号:{}", split[1], wia.getWorkerName(), wia.getIdCard()), "人员审批数据同步失败", "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user