bug修改
This commit is contained in:
parent
cdf4b0c6bf
commit
846aa55546
@ -228,5 +228,11 @@ public class WorkerInfoAuditRecord implements Serializable {
|
||||
private Date educationTime;
|
||||
|
||||
@ApiModelProperty(value="资格证书信息")
|
||||
private String specialCertificateImage;
|
||||
private String specialCertificateInfo;
|
||||
|
||||
@ApiModelProperty(value="合同信息")
|
||||
private String contractInfo;
|
||||
|
||||
@ApiModelProperty(value="保险信息")
|
||||
private String insuranceInfo;
|
||||
}
|
||||
|
||||
@ -24,5 +24,7 @@ public interface WorkerInfoAuditRecordMapper extends BaseMapper<WorkerInfoAuditR
|
||||
@DataScope(includeTable = "worker_info_audit_record")
|
||||
List<EntityMap> selectWorkerInfoAuditList(Page<EntityMap> page, @Param("param")Map<String, Object> map);
|
||||
|
||||
|
||||
@DataScope(includeTable = "worker_info_audit_record")
|
||||
EntityMap viewWorkerInfoDetail(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -93,6 +93,7 @@ public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {
|
||||
|
||||
List<Map<String, Object>> selectAttendanceWorkerTeamTotal(Map<String, Object> map);
|
||||
|
||||
@DataScope(includeTable = "worker_info")
|
||||
EntityMap viewWorkerInfoDetail(Map<String, Object> map);
|
||||
|
||||
List<EntityMap> selectWorkExperienceList(Map<String, Object> map);
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
package com.zhgd.xmgl.modules.worker.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfoAuditRecord;
|
||||
import com.zhgd.xmgl.modules.worker.entity.*;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerCertificateMapper;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoAuditRecordMapper;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoAuditRecordService;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||
import com.zhgd.xmgl.modules.worker.service.*;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -38,6 +39,16 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAudi
|
||||
@Autowired
|
||||
private IWorkerInfoService workerInfoService;
|
||||
|
||||
@Autowired
|
||||
private IWorkerContractService workerContractService;
|
||||
|
||||
@Autowired
|
||||
private IWorkerCertificateService workerCertificateService;
|
||||
|
||||
@Autowired
|
||||
private IWorkerInsuranceService workerInsuranceService;
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<EntityMap> selectWorkerInfoAuditList(Map<String, Object> map) {
|
||||
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
|
||||
@ -99,8 +110,30 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAudi
|
||||
workerInfo.setAccountType(MapUtils.getInteger(map,"accountType"));
|
||||
workerInfo.setUfaceDevId(MapUtils.getString(map,"ufaceDevId"));
|
||||
workerInfo.setInserviceType(1);
|
||||
|
||||
//调用向正式表添加接口并下发设备
|
||||
workerInfoService.saveWorkerInfo(workerInfo);
|
||||
WorkerInfo workerInfo1 = workerInfoService.saveWorkerInfo(workerInfo);
|
||||
if (StringUtils.isNotBlank(workerInfoAuditRecord.getContractInfo())) {
|
||||
List<WorkerContract> workerContracts = JSONArray.parseArray(workerInfoAuditRecord.getContractInfo(), WorkerContract.class);
|
||||
for (WorkerContract workerContract : workerContracts) {
|
||||
workerContract.setWorkerId(workerInfo1.getId());
|
||||
}
|
||||
workerContractService.saveBatch(workerContracts);
|
||||
}
|
||||
if (StringUtils.isNotBlank(workerInfoAuditRecord.getSpecialCertificateInfo())) {
|
||||
List<WorkerCertificate> workerCertificates = JSONArray.parseArray(workerInfoAuditRecord.getSpecialCertificateInfo(), WorkerCertificate.class);
|
||||
for (WorkerCertificate workerCertificate : workerCertificates) {
|
||||
workerCertificate.setWorkerId(workerInfo1.getId());
|
||||
}
|
||||
workerCertificateService.saveBatch(workerCertificates);
|
||||
}
|
||||
if (StringUtils.isNotBlank(workerInfoAuditRecord.getInsuranceInfo())) {
|
||||
List<WorkerInsurance> workerInsurances = JSONArray.parseArray(workerInfoAuditRecord.getInsuranceInfo(), WorkerInsurance.class);
|
||||
for (WorkerInsurance workerInsurance : workerInsurances) {
|
||||
workerInsurance.setWorkerId(workerInfo1.getId());
|
||||
}
|
||||
workerInsuranceService.saveBatch(workerInsurances);
|
||||
}
|
||||
//删除审核表记录
|
||||
workerInfoAuditRecordMapper.deleteById(MapUtils.getString(map,"id"));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user