| | |
| | | package com.ruoyi.management.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.management.domain.*; |
| | |
| | | @Override |
| | | public void updSlAuditRecord(AuditRecordDTO auditRecordDTO) { |
| | | SlAudit slAudit = slAuditMapper.selectById(auditRecordDTO.getAuditId()); |
| | | SlAuditRecord byId = this.getById(auditRecordDTO.getId()); |
| | | SlAuditRecord byId = this.getOne(new QueryWrapper<SlAuditRecord>() |
| | | .eq("type", auditRecordDTO.getType()) |
| | | .eq("audit_id", auditRecordDTO.getAuditId())); |
| | | Long userid = SecurityUtils.getUserId(); |
| | | SysUser data = sysUserClient.getSysUser(userid).getData(); |
| | | if (auditRecordDTO.getState()==2){ |
| | | Long userid = SecurityUtils.getUserId(); |
| | | SysUser data = sysUserClient.getSysUser(userid).getData(); |
| | | byId.setShenhName(data.getNickName()); |
| | | byId.setShenhTime(new Date()); |
| | | byId.setState(auditRecordDTO.getState()); |
| | | this.updateById(byId); |
| | | if (slAudit.getState()==1){ |
| | | slAudit.setState(2); |
| | |
| | | slVolumeProductionZyglMapper.updateById(slVolumeProductionZygl); |
| | | } |
| | | |
| | | } if (slAudit.getState()==2){ |
| | | } else if (slAudit.getState()==2){ |
| | | slAudit.setState(3); |
| | | LambdaQueryWrapper<SlAuditRecord> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(SlAuditRecord::getAuditId,auditRecordDTO.getAuditId()); |
| | | wrapper.eq(SlAuditRecord::getType,3); |
| | | wrapper.eq( SlAuditRecord::getDelFlag,0); |
| | | wrapper.eq(SlAuditRecord::getDelFlag,0); |
| | | SlAuditRecord one = this.getOne(wrapper); |
| | | slAudit.setShenhId(one.getShenhId()); |
| | | slAuditMapper.updateById(slAudit); |
| | |
| | | slVolumeProductionZyglMapper.updateById(slVolumeProductionZygl); |
| | | } |
| | | |
| | | }if (slAudit.getState()==3){ |
| | | }else if (slAudit.getState()==3){ |
| | | slAudit.setState(4); |
| | | slAuditMapper.updateById(slAudit); |
| | | if (slAudit.getType()==1){ |
| | |
| | | |
| | | } |
| | | |
| | | } |
| | | if (auditRecordDTO.getState()==3){ |
| | | }else if (auditRecordDTO.getState()==3){ |
| | | byId.setShenhName(data.getNickName()); |
| | | byId.setShenhTime(new Date()); |
| | | byId.setState(auditRecordDTO.getState()); |
| | | this.updateById(byId); |
| | | LambdaQueryWrapper<SlAuditRecord> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(SlAuditRecord::getAuditId,auditRecordDTO.getAuditId()); |
| | | wrapper.eq(SlAuditRecord::getType,3); |
| | | wrapper.eq(SlAuditRecord::getDelFlag,0); |
| | | SlAuditRecord one = this.getOne(wrapper); |
| | | slAudit.setShenhId(one.getShenhId()); |
| | | slAudit.setCause(auditRecordDTO.getCause()); |
| | | slAudit.setState(5); |
| | | slAuditMapper.updateById(slAudit); |
| | | |
| | | if (slAudit.getType()==1){ |
| | | SlVolumeProductionRkgl slVolumeProductionRkgl = slVolumeProductionRkglMapper.selectById(slAudit.getRkId()); |
| | | slVolumeProductionRkgl.setAuditStatus(5); |