劳务管理人员审核通过bug修改

This commit is contained in:
guoshengxiong 2025-08-15 16:46:25 +08:00
parent af7fb5f8f9
commit f3320a0587

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.worker.service.impl; package com.zhgd.xmgl.modules.worker.service.impl;
import cn.hutool.core.convert.Convert;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -14,6 +15,7 @@ import com.zhgd.xmgl.modules.worker.entity.*;
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoAuditRecordMapper; import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoAuditRecordMapper;
import com.zhgd.xmgl.modules.worker.service.*; import com.zhgd.xmgl.modules.worker.service.*;
import com.zhgd.xmgl.util.MessageUtil; import com.zhgd.xmgl.util.MessageUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -36,6 +38,7 @@ import java.util.Map;
*/ */
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Slf4j
public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAuditRecordMapper, WorkerInfoAuditRecord> implements IWorkerInfoAuditRecordService { public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAuditRecordMapper, WorkerInfoAuditRecord> implements IWorkerInfoAuditRecordService {
@Autowired @Autowired
private WorkerInfoAuditRecordMapper workerInfoAuditRecordMapper; private WorkerInfoAuditRecordMapper workerInfoAuditRecordMapper;
@ -131,10 +134,10 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl<WorkerInfoAudi
//调用向正式表添加接口并下发设备 //调用向正式表添加接口并下发设备
WorkerInfo workerInfo1 = new WorkerInfo(); WorkerInfo workerInfo1 = new WorkerInfo();
try { try {
workerInfo.setNoticeUserId(Long.valueOf(MapUtils.getString(map, "startUser"))); workerInfo.setNoticeUserId(Convert.toLong(MapUtils.getString(map, "startUser")));
workerInfo1 = workerInfoService.saveWorkerInfo(workerInfo); workerInfo1 = workerInfoService.saveWorkerInfo(workerInfo);
} catch (Exception e) { } catch (Exception e) {
log.error("同步人员信息失败:" + workerInfo.getWorkerName() + e.getMessage()); log.error("同步人员信息失败:" + workerInfo.getWorkerName() + e.getMessage(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return workerInfoAuditRecord.getId() + "#" + e.getMessage(); return workerInfoAuditRecord.getId() + "#" + e.getMessage();
} }