|
@@ -1,14 +1,22 @@
|
|
|
package com.zd.bottle.service.impl;
|
|
package com.zd.bottle.service.impl;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
|
|
|
import com.zd.bottle.domain.UsegasApply;
|
|
import com.zd.bottle.domain.UsegasApply;
|
|
|
import com.zd.bottle.domain.UsegasAuditRecord;
|
|
import com.zd.bottle.domain.UsegasAuditRecord;
|
|
|
import com.zd.bottle.mapper.UsegasAuditRecordMapper;
|
|
import com.zd.bottle.mapper.UsegasAuditRecordMapper;
|
|
|
import com.zd.bottle.service.UsegasAuditRecordService;
|
|
import com.zd.bottle.service.UsegasAuditRecordService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
+import com.zd.common.security.service.TokenService;
|
|
|
|
|
+import jdk.nashorn.internal.parser.Token;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -22,6 +30,12 @@ import java.util.List;
|
|
|
@Service
|
|
@Service
|
|
|
public class UsegasAuditRecordServiceImpl extends ServiceImpl<UsegasAuditRecordMapper, UsegasAuditRecord> implements UsegasAuditRecordService {
|
|
public class UsegasAuditRecordServiceImpl extends ServiceImpl<UsegasAuditRecordMapper, UsegasAuditRecord> implements UsegasAuditRecordService {
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TokenService tokenService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private UsegasApplyServiceImpl usegasApplyService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List <UsegasAuditRecord> auditRecordList(UsegasAuditRecord usegasAuditRecord) {
|
|
public List <UsegasAuditRecord> auditRecordList(UsegasAuditRecord usegasAuditRecord) {
|
|
|
LambdaQueryWrapper <UsegasAuditRecord> wrapper = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper <UsegasAuditRecord> wrapper = Wrappers.lambdaQuery();
|
|
@@ -30,4 +44,20 @@ public class UsegasAuditRecordServiceImpl extends ServiceImpl<UsegasAuditRecordM
|
|
|
List <UsegasAuditRecord> list = list(wrapper);
|
|
List <UsegasAuditRecord> list = list(wrapper);
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ public int auditPass(UsegasAuditRecord usegasAuditRecord) {
|
|
|
|
|
+ Boolean flag = usegasApplyService.updatetUseagsApply(usegasAuditRecord.getUsegasApplyId(),usegasAuditRecord.getAuditStatus());
|
|
|
|
|
+ if(flag){
|
|
|
|
|
+ usegasAuditRecord.setAuditUserid(tokenService.getLoginUser().getUserid());
|
|
|
|
|
+ usegasAuditRecord.setAuditUser(tokenService.getLoginUser().getNickName());
|
|
|
|
|
+ usegasAuditRecord.setAuditTime(new Date());
|
|
|
|
|
+ usegasAuditRecord.setCreateBy(tokenService.getLoginUser().getNickName());
|
|
|
|
|
+ usegasAuditRecord.setCreateTime(new Date());
|
|
|
|
|
+ save(usegasAuditRecord);
|
|
|
|
|
+ }
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|