| | |
| | | package com.panzhihua.sangeshenbian.service.impl; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.sangeshenbian.model.entity.ComplaintAuditRecord; |
| | | import com.panzhihua.sangeshenbian.dao.ComplaintAuditRecordMapper; |
| | | import com.panzhihua.sangeshenbian.service.IComplaintAuditRecordService; |
| | |
| | | * 诉求上报、延期申请审核表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @author |
| | | * @since 2025-02-23 |
| | | */ |
| | | @Service |
| | | public class ComplaintAuditRecordServiceImpl extends ServiceImpl<ComplaintAuditRecordMapper, ComplaintAuditRecord> implements IComplaintAuditRecordService { |
| | | |
| | | @Override |
| | | public void createComplaintAuditRecord(Long complaintId, Integer auditType, String comment, Long userId) { |
| | | ComplaintAuditRecord auditRecord = new ComplaintAuditRecord(); |
| | | auditRecord.setComplaintId(complaintId); |
| | | auditRecord.setAuditType(1); |
| | | auditRecord.setAuditStatus(0); |
| | | auditRecord.setComment(comment); |
| | | auditRecord.setCreateBy(userId); |
| | | auditRecord.setCreateTime(DateUtils.getCurrentDate()); |
| | | auditRecord.setUpdateBy(userId); |
| | | auditRecord.setUpdateTime(DateUtils.getCurrentDate()); |
| | | save(auditRecord); |
| | | } |
| | | |
| | | @Override |
| | | public void audit(Long id, Long userId, Integer auditResult, String rejectReason) { |
| | | ComplaintAuditRecord auditRecord = getById(id); |
| | | if (auditRecord == null) { |
| | | throw new RuntimeException("审核记录不存在"); |
| | | } |
| | | auditRecord.setAuditStatus(auditResult); |
| | | auditRecord.setRejectReason(rejectReason); |
| | | auditRecord.setUpdateBy(userId); |
| | | auditRecord.setUpdateTime(DateUtils.getCurrentDate()); |
| | | save(auditRecord); |
| | | } |
| | | } |