Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
This commit is contained in:
commit
19841e51c7
@ -18,5 +18,7 @@ public interface ISafeEducationQuestionAnswerService extends IService<SafeEducat
|
|||||||
|
|
||||||
WorkerSafeEducationWorker saveQuestionAnswer(SafeEducationQuestionAnswerDataVo dataVo);
|
WorkerSafeEducationWorker saveQuestionAnswer(SafeEducationQuestionAnswerDataVo dataVo);
|
||||||
|
|
||||||
|
WorkerSafeEducationWorker xzSaveQuestionAnswer(SafeEducationQuestionAnswerDataVo dataVo);
|
||||||
|
|
||||||
WorkerInfo getAnswerWorkerInfo(Map<String, Object> map);
|
WorkerInfo getAnswerWorkerInfo(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,10 @@ import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionAnswerMapper;
|
|||||||
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionMapper;
|
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionMapper;
|
||||||
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionOptionMapper;
|
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionOptionMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||||
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfoAuditRecord;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerSafeEducation;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerSafeEducation;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerSafeEducationWorker;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerSafeEducationWorker;
|
||||||
|
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoAuditRecordMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerSafeEducationMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.WorkerSafeEducationMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerSafeEducationWorkerMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.WorkerSafeEducationWorkerMapper;
|
||||||
@ -44,6 +46,8 @@ public class SafeEducationQuestionAnswerServiceImpl extends ServiceImpl<SafeEduc
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WorkerInfoMapper workerInfoMapper;
|
private WorkerInfoMapper workerInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private WorkerInfoAuditRecordMapper workerInfoAuditRecordMapper;
|
||||||
|
@Autowired
|
||||||
private SafeEducationQuestionMapper safeEducationQuestionMapper;
|
private SafeEducationQuestionMapper safeEducationQuestionMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SafeEducationQuestionOptionMapper safeEducationQuestionOptionMapper;
|
private SafeEducationQuestionOptionMapper safeEducationQuestionOptionMapper;
|
||||||
@ -150,5 +154,90 @@ public class SafeEducationQuestionAnswerServiceImpl extends ServiceImpl<SafeEduc
|
|||||||
return workerSafeEducationWorker;
|
return workerSafeEducationWorker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WorkerSafeEducationWorker xzSaveQuestionAnswer(SafeEducationQuestionAnswerDataVo dataVo) {
|
||||||
|
WorkerSafeEducation safeEducation=workerSafeEducationMapper.selectById(dataVo.getEduId());
|
||||||
|
if(safeEducation==null){
|
||||||
|
throw new OpenAlertException(MessageUtil.get("notFindErr"));
|
||||||
|
}
|
||||||
|
WorkerInfoAuditRecord info=workerInfoAuditRecordMapper.selectById(dataVo.getWorkerId());
|
||||||
|
if(info==null){
|
||||||
|
throw new OpenAlertException(MessageUtil.get("notFindErr"));
|
||||||
|
}
|
||||||
|
WorkerSafeEducationWorker workerSafeEducationWorker=new WorkerSafeEducationWorker();
|
||||||
|
workerSafeEducationWorker.setEduId(dataVo.getEduId());
|
||||||
|
workerSafeEducationWorker.setWorkerId(dataVo.getWorkerId());
|
||||||
|
workerSafeEducationWorker.setIdCard(info.getIdCard());
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
workerSafeEducationWorker.setStudyTime(sdf.format(new Date()));
|
||||||
|
Map<String, List<Long>> dataList=new HashMap<>();
|
||||||
|
if(dataVo.getList()!=null&&dataVo.getList().size()>0){
|
||||||
|
//清除上一次回答记录
|
||||||
|
QueryWrapper<WorkerSafeEducationWorker> workerInfoQueryWrapper=new QueryWrapper<>();
|
||||||
|
workerInfoQueryWrapper.lambda().eq(WorkerSafeEducationWorker::getWorkerId,dataVo.getWorkerId())
|
||||||
|
.eq(WorkerSafeEducationWorker::getEduId,dataVo.getEduId());
|
||||||
|
workerSafeEducationWorkerMapper.delete(workerInfoQueryWrapper);
|
||||||
|
QueryWrapper<SafeEducationQuestionAnswer> answerQueryWrapper=new QueryWrapper<>();
|
||||||
|
answerQueryWrapper.lambda().eq(SafeEducationQuestionAnswer::getWorkerId,dataVo.getWorkerId())
|
||||||
|
.eq(SafeEducationQuestionAnswer::getEduId,dataVo.getEduId());
|
||||||
|
safeEducationQuestionAnswerMapper.delete(answerQueryWrapper);
|
||||||
|
//保存用户的回答
|
||||||
|
for (SafeEducationQuestionAnswer answer:dataVo.getList()){
|
||||||
|
answer.setEduId(dataVo.getEduId());
|
||||||
|
answer.setWorkerId(dataVo.getWorkerId());
|
||||||
|
safeEducationQuestionAnswerMapper.insert(answer);
|
||||||
|
if(dataList.containsKey(String.valueOf(answer.getQuestionId()))){
|
||||||
|
List<Long> opList=dataList.get(String.valueOf(answer.getQuestionId()));
|
||||||
|
opList.add(answer.getOptionId());
|
||||||
|
dataList.put(String.valueOf(answer.getQuestionId()),opList);
|
||||||
|
}else{
|
||||||
|
List<Long> opList=new ArrayList<>();
|
||||||
|
opList.add(answer.getOptionId());
|
||||||
|
dataList.put(String.valueOf(answer.getQuestionId()),opList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算分数
|
||||||
|
QueryWrapper<SafeEducationQuestion> questionQueryWrapper=new QueryWrapper<>();
|
||||||
|
questionQueryWrapper.lambda().eq(SafeEducationQuestion::getEduId,dataVo.getEduId());
|
||||||
|
questionQueryWrapper.orderByAsc("sort_num");
|
||||||
|
List<SafeEducationQuestion> list=safeEducationQuestionMapper.selectList(questionQueryWrapper);
|
||||||
|
int totalSocre=0;
|
||||||
|
if(list!=null&&list.size()>0){
|
||||||
|
//查询正确答案的选项
|
||||||
|
QueryWrapper<SafeEducationQuestionOption> optionQueryWrapper=new QueryWrapper<>();
|
||||||
|
optionQueryWrapper.lambda().eq(SafeEducationQuestionOption::getEduId, dataVo.getEduId())
|
||||||
|
.eq(SafeEducationQuestionOption::getCorrectType,1);
|
||||||
|
List<SafeEducationQuestionOption> optionList=safeEducationQuestionOptionMapper.selectList(optionQueryWrapper);
|
||||||
|
for(SafeEducationQuestion question:list){
|
||||||
|
List<Long> optionIdList=new ArrayList<>();
|
||||||
|
for (SafeEducationQuestionOption option:optionList){
|
||||||
|
if(question.getQuestionId().longValue()==option.getQuestionId()){
|
||||||
|
optionIdList.add(option.getOptionId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Collections.sort(optionIdList);
|
||||||
|
if(dataList.containsKey(String.valueOf(question.getQuestionId()))){
|
||||||
|
List<Long> opList=dataList.get(String.valueOf(question.getQuestionId()));
|
||||||
|
Collections.sort(opList);
|
||||||
|
//比较用户的选择和答案是否一致
|
||||||
|
if(Arrays.toString(optionIdList.toArray()).equals(Arrays.toString(opList.toArray()))){
|
||||||
|
totalSocre=totalSocre+question.getQuestionScore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
workerSafeEducationWorker.setScore(totalSocre);
|
||||||
|
//判断是否及格
|
||||||
|
if(StringUtils.isNotEmpty(safeEducation.getPassScore()) &&totalSocre>=Integer.valueOf(safeEducation.getPassScore())){
|
||||||
|
workerSafeEducationWorker.setIsQualified(1);
|
||||||
|
}else{
|
||||||
|
workerSafeEducationWorker.setIsQualified(2);
|
||||||
|
}
|
||||||
|
workerSafeEducationWorker.setProjectSn(info.getProjectSn());
|
||||||
|
workerSafeEducationWorkerMapper.insert(workerSafeEducationWorker);
|
||||||
|
}
|
||||||
|
return workerSafeEducationWorker;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,5 +148,12 @@ public class ProjectExtend implements Serializable {
|
|||||||
@ApiModelProperty(value = "绿色施工")
|
@ApiModelProperty(value = "绿色施工")
|
||||||
private String greenConstruction;
|
private String greenConstruction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全教育ID
|
||||||
|
*/
|
||||||
|
@Excel(name = "安全教育ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "安全教育ID")
|
||||||
|
private Long educationId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -215,4 +215,9 @@ public class WorkerInfoAuditRecord implements Serializable {
|
|||||||
@Excel(name = "是否上传住建,0否,1是", width = 15)
|
@Excel(name = "是否上传住建,0否,1是", width = 15)
|
||||||
@ApiModelProperty(value="是否上传住建,0否,1是")
|
@ApiModelProperty(value="是否上传住建,0否,1是")
|
||||||
private java.lang.Integer isUploadHousing ;
|
private java.lang.Integer isUploadHousing ;
|
||||||
|
|
||||||
|
/**培训是否合格*/
|
||||||
|
@Excel(name = "培训是否合格", width = 15)
|
||||||
|
@ApiModelProperty(value="培训是否合格")
|
||||||
|
private java.lang.Boolean isExamPass;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,5 +39,8 @@
|
|||||||
<if test="param.personType!=null and param.personType!=''">
|
<if test="param.personType!=null and param.personType!=''">
|
||||||
and a.person_type=#{param.personType}
|
and a.person_type=#{param.personType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.isExamPass!=null">
|
||||||
|
and a.is_exam_pass=#{param.isExamPass}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -5,6 +5,7 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
|||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfoAuditRecord;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfoAuditRecord;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,6 +18,8 @@ public interface IWorkerInfoAuditRecordService extends IService<WorkerInfoAuditR
|
|||||||
|
|
||||||
IPage<EntityMap> selectWorkerInfoAuditList(Map<String, Object> map);
|
IPage<EntityMap> selectWorkerInfoAuditList(Map<String, Object> map);
|
||||||
|
|
||||||
|
List<EntityMap> getPassList(Map<String, Object> map);
|
||||||
|
|
||||||
void saveWorkerInfoAuditRecord(WorkerInfoAuditRecord workerInfoAuditRecord);
|
void saveWorkerInfoAuditRecord(WorkerInfoAuditRecord workerInfoAuditRecord);
|
||||||
|
|
||||||
void editWorkerInfoAuditRecord(WorkerInfoAuditRecord workerInfoAuditRecord);
|
void editWorkerInfoAuditRecord(WorkerInfoAuditRecord workerInfoAuditRecord);
|
||||||
|
|||||||
@ -46,6 +46,13 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAudi
|
|||||||
return page.setRecords(list);
|
return page.setRecords(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EntityMap> getPassList(Map<String, Object> map) {
|
||||||
|
Page<EntityMap> page = new Page<>(-1, 10);
|
||||||
|
map.put("isExamPass", true);
|
||||||
|
return workerInfoAuditRecordMapper.selectWorkerInfoAuditList(page, map);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveWorkerInfoAuditRecord(WorkerInfoAuditRecord workerInfoAuditRecord) {
|
public void saveWorkerInfoAuditRecord(WorkerInfoAuditRecord workerInfoAuditRecord) {
|
||||||
QueryWrapper<WorkerInfo> queryWrapper=new QueryWrapper<>();
|
QueryWrapper<WorkerInfo> queryWrapper=new QueryWrapper<>();
|
||||||
|
|||||||
@ -19,6 +19,8 @@ import com.zhgd.xmgl.modules.edu.mapper.EducationClassifyMapper;
|
|||||||
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionAnswerMapper;
|
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionAnswerMapper;
|
||||||
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionMapper;
|
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionMapper;
|
||||||
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionOptionMapper;
|
import com.zhgd.xmgl.modules.edu.mapper.SafeEducationQuestionOptionMapper;
|
||||||
|
import com.zhgd.xmgl.modules.project.entity.ProjectExtend;
|
||||||
|
import com.zhgd.xmgl.modules.project.mapper.ProjectExtendMapper;
|
||||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||||
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
||||||
import com.zhgd.xmgl.modules.sanjiang.service.impl.SjSafeEnvironmentFileServiceImpl;
|
import com.zhgd.xmgl.modules.sanjiang.service.impl.SjSafeEnvironmentFileServiceImpl;
|
||||||
@ -77,6 +79,8 @@ public class WorkerSafeEducationServiceImpl extends ServiceImpl<WorkerSafeEducat
|
|||||||
private WorkerInfoMapper workerInfoMapper;
|
private WorkerInfoMapper workerInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectService projectService;
|
private IProjectService projectService;
|
||||||
|
@Autowired
|
||||||
|
private ProjectExtendMapper projectExtendMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<Map<String, Object>> selectWorkerSafeEducationPage(Map<String, Object> map) {
|
public IPage<Map<String, Object>> selectWorkerSafeEducationPage(Map<String, Object> map) {
|
||||||
@ -138,6 +142,10 @@ public class WorkerSafeEducationServiceImpl extends ServiceImpl<WorkerSafeEducat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteWorkerSafeEducation(String id) {
|
public void deleteWorkerSafeEducation(String id) {
|
||||||
|
List<ProjectExtend> projectExtends = projectExtendMapper.selectList(Wrappers.<ProjectExtend>lambdaQuery().eq(ProjectExtend::getEducationId, id));
|
||||||
|
if (projectExtends.size() > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
workerSafeEducationMapper.deleteById(id);
|
workerSafeEducationMapper.deleteById(id);
|
||||||
QueryWrapper<WorkerSafeEducationWorker> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WorkerSafeEducationWorker> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(WorkerSafeEducationWorker::getEduId, id);
|
queryWrapper.lambda().eq(WorkerSafeEducationWorker::getEduId, id);
|
||||||
|
|||||||
@ -0,0 +1,218 @@
|
|||||||
|
package com.zhgd.xmgl.modules.xz.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.zhgd.annotation.OperLog;
|
||||||
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
|
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||||
|
import com.zhgd.xmgl.entity.vo.SafeEducationQuestionAnswerDataVo;
|
||||||
|
import com.zhgd.xmgl.modules.edu.service.ISafeEducationQuestionAnswerService;
|
||||||
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfoAuditRecord;
|
||||||
|
import com.zhgd.xmgl.modules.worker.entity.WorkerSafeEducationWorker;
|
||||||
|
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoAuditRecordService;
|
||||||
|
import com.zhgd.xmgl.util.MessageUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: Controller
|
||||||
|
* @Description: 劳务人员-审核表
|
||||||
|
* @author: pds
|
||||||
|
* @date: 2021-05-13
|
||||||
|
* @version: V1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/xmgl/xzWorkerInfoAuditRecord")
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "劳务人员-审核表")
|
||||||
|
public class XzWorkerInfoAuditRecordController {
|
||||||
|
@Autowired
|
||||||
|
private IWorkerInfoAuditRecordService workerInfoAuditRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISafeEducationQuestionAnswerService safeEducationQuestionAnswerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "分页列表查询劳务人员-审核表信息", notes = "分页列表查询劳务人员-审核表信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "workerName", value = "姓名", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "idCard", value = "身份证号", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "所属企业", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "teamId", value = "班组ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "personType", value = "人员类型 1、劳务人员 2、管理人员", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/selectWorkerInfoAuditList")
|
||||||
|
public Result<IPage<EntityMap>> selectWorkerInfoAuditList(@RequestBody Map<String, Object> map) {
|
||||||
|
return Result.success(workerInfoAuditRecordService.selectWorkerInfoAuditList(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "列表查询劳务人员-审核表信息", notes = "列表查询劳务人员-审核表信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "workerName", value = "姓名", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "idCard", value = "身份证号", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "userEnterpriseId", value = "用户能查看的企业", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "所属企业", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "teamId", value = "班组ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "personType", value = "人员类型 1、劳务人员 2、管理人员", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/getPassList")
|
||||||
|
public Result<List<EntityMap>> getPassList(@RequestBody Map<String, Object> map) {
|
||||||
|
return Result.success(workerInfoAuditRecordService.getPassList(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param workerInfoAuditRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "劳务管理", operType = "添加劳务人员-审核", operDesc = "添加劳务人员-审核表信息")
|
||||||
|
@ApiOperation(value = "添加劳务人员-审核表信息", notes = "添加劳务人员-审核表信息", httpMethod = "POST")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<WorkerInfoAuditRecord> add(@RequestBody WorkerInfoAuditRecord workerInfoAuditRecord) {
|
||||||
|
workerInfoAuditRecordService.saveWorkerInfoAuditRecord(workerInfoAuditRecord);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "安全教育管理", operType = "添加安全教育-人员回答记录", operDesc = "添加安全教育-人员回答记录")
|
||||||
|
@ApiOperation(value = "添加安全教育-人员回答记录信息", notes = "添加安全教育-人员回答记录信息", httpMethod = "POST")
|
||||||
|
@PostMapping(value = "/submit")
|
||||||
|
public Result<WorkerSafeEducationWorker> submit(@RequestBody SafeEducationQuestionAnswerDataVo dataVo) {
|
||||||
|
WorkerSafeEducationWorker workerSafeEducationWorker = safeEducationQuestionAnswerService.xzSaveQuestionAnswer(dataVo);
|
||||||
|
WorkerInfoAuditRecord infoAuditRecord = new WorkerInfoAuditRecord();
|
||||||
|
infoAuditRecord.setId(dataVo.getWorkerId());
|
||||||
|
infoAuditRecord.setIsExamPass(workerSafeEducationWorker.getIsQualified() == 1 ? true : false);
|
||||||
|
workerInfoAuditRecordService.updateById(infoAuditRecord);
|
||||||
|
return Result.success(workerSafeEducationWorker);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "劳务管理", operType = "删除劳务人员-审核", operDesc = "删除劳务人员-审核表信息")
|
||||||
|
@ApiOperation(value = "删除劳务人员-审核表信息", notes = "删除劳务人员-审核表信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParam(name = "id", value = "劳务人员-审核表ID", paramType = "body", required = true, dataType = "Integer")
|
||||||
|
@PostMapping(value = "/delete")
|
||||||
|
public Result<WorkerInfoAuditRecord> delete(@RequestBody Map<String, Object> map) {
|
||||||
|
Result<WorkerInfoAuditRecord> result = new Result<WorkerInfoAuditRecord>();
|
||||||
|
WorkerInfoAuditRecord workerInfoAuditRecord = workerInfoAuditRecordService.getById(MapUtils.getString(map, "id"));
|
||||||
|
if (workerInfoAuditRecord == null) {
|
||||||
|
result.error500(MessageUtil.get("notFindErr"));
|
||||||
|
} else {
|
||||||
|
boolean ok = workerInfoAuditRecordService.removeById(MapUtils.getString(map, "id"));
|
||||||
|
if (ok) {
|
||||||
|
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过card查询
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "通过card查询劳务人员-审核表信息", notes = "通过card查询劳务人员-审核表信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "idCard", value = "身份证号", paramType = "body", required = false, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/queryByCard")
|
||||||
|
public Result<WorkerInfoAuditRecord> queryByCard(@RequestBody Map<String, Object> map) {
|
||||||
|
String idCard = MapUtils.getString(map, "idCard");
|
||||||
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
|
Result<WorkerInfoAuditRecord> result = new Result<WorkerInfoAuditRecord>();
|
||||||
|
WorkerInfoAuditRecord workerInfoAuditRecord = workerInfoAuditRecordService.getOne(Wrappers.<WorkerInfoAuditRecord>lambdaQuery()
|
||||||
|
.eq(WorkerInfoAuditRecord::getIdCard, idCard).eq(WorkerInfoAuditRecord::getProjectSn, projectSn));
|
||||||
|
if (workerInfoAuditRecord == null) {
|
||||||
|
result.error500(MessageUtil.get("notFindErr"));
|
||||||
|
} else {
|
||||||
|
result.setResult(workerInfoAuditRecord);
|
||||||
|
result.setSuccess(true);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "通过id查询劳务人员-审核表信息", notes = "通过id查询劳务人员-审核表信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParam(name = "id", value = "劳务人员-审核表ID", paramType = "body", required = true, dataType = "Integer")
|
||||||
|
@PostMapping(value = "/queryById")
|
||||||
|
public Result<WorkerInfoAuditRecord> queryById(@RequestBody Map<String, Object> map) {
|
||||||
|
Result<WorkerInfoAuditRecord> result = new Result<WorkerInfoAuditRecord>();
|
||||||
|
WorkerInfoAuditRecord workerInfoAuditRecord = workerInfoAuditRecordService.getById(MapUtils.getString(map, "id"));
|
||||||
|
if (workerInfoAuditRecord == null) {
|
||||||
|
result.error500(MessageUtil.get("notFindErr"));
|
||||||
|
} else {
|
||||||
|
result.setResult(workerInfoAuditRecord);
|
||||||
|
result.setSuccess(true);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperLog(operModul = "劳务管理", operType = "劳务人员审核通过", operDesc = "劳务人员审核通过")
|
||||||
|
@ApiOperation(value = "审核通过", notes = "审核通过", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "劳务人员-审核表ID", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "ufaceDevId", value = "人脸设备表ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/adoptWorkerInfo")
|
||||||
|
public Result<WorkerInfoAuditRecord> adoptWorkerInfo(@RequestBody String paramMap) {
|
||||||
|
JSONObject param = JSONObject.parseObject(paramMap);
|
||||||
|
param.put("id", param.get("id").toString().replace("[", "").replace("]", ""));
|
||||||
|
param.put("ufaceDevId", param.get("ufaceDevId").toString().replace("[", "").replace("]", ""));
|
||||||
|
param.put("accountType", 2);
|
||||||
|
param.put("registerType", 2);
|
||||||
|
workerInfoAuditRecordService.adoptWorkerInfo(param);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.zhgd.xmgl.modules.xz.entity;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class XzWorkerInfoAuditRecord {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Integer registerType;
|
||||||
|
|
||||||
|
private Integer accountType;
|
||||||
|
|
||||||
|
private Long ufaceDevId;
|
||||||
|
|
||||||
|
public XzWorkerInfoAuditRecord(String json) {
|
||||||
|
XzWorkerInfoAuditRecord xzWorkerInfoAuditRecord = JSON.parseObject(json, XzWorkerInfoAuditRecord.class);
|
||||||
|
this.id = xzWorkerInfoAuditRecord.getId();
|
||||||
|
this.registerType = xzWorkerInfoAuditRecord.getRegisterType();
|
||||||
|
this.accountType = xzWorkerInfoAuditRecord.getAccountType();
|
||||||
|
this.ufaceDevId = xzWorkerInfoAuditRecord.getUfaceDevId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -365,6 +365,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers("/xmgl/systemUser/resetPwByEmail").permitAll()
|
.antMatchers("/xmgl/systemUser/resetPwByEmail").permitAll()
|
||||||
.antMatchers("/xmgl/xzRegistry/validCode").permitAll()
|
.antMatchers("/xmgl/xzRegistry/validCode").permitAll()
|
||||||
.antMatchers("/xmgl/videoItem/updateStatus").permitAll()
|
.antMatchers("/xmgl/videoItem/updateStatus").permitAll()
|
||||||
|
.antMatchers("/xmgl/xzWorkerInfoAuditRecord/adoptWorkerInfo").permitAll()
|
||||||
|
.antMatchers("/xmgl/xzWorkerInfoAuditRecord/queryByCard").permitAll()
|
||||||
|
.antMatchers("/xmgl/xzWorkerInfoAuditRecord/submit").permitAll()
|
||||||
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
||||||
.anyRequest().authenticated() // 剩下所有的验证都需要验证.
|
.anyRequest().authenticated() // 剩下所有的验证都需要验证.
|
||||||
.and()
|
.and()
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user