|
@@ -5,8 +5,10 @@ import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import fcb.project.manager.base.entity.*;
|
|
import fcb.project.manager.base.entity.*;
|
|
import fcb.project.manager.base.enums.AuditStatus;
|
|
import fcb.project.manager.base.enums.AuditStatus;
|
|
|
|
+import fcb.project.manager.base.enums.DeleteStatus;
|
|
import fcb.project.manager.base.enums.HouseStatus;
|
|
import fcb.project.manager.base.enums.HouseStatus;
|
|
import fcb.project.manager.base.service.custom.PanoService;
|
|
import fcb.project.manager.base.service.custom.PanoService;
|
|
|
|
+import fcb.project.manager.base.service.impl.TmAuditLogServiceImpl;
|
|
import fcb.project.manager.base.service.impl.TmAuditServiceImpl;
|
|
import fcb.project.manager.base.service.impl.TmAuditServiceImpl;
|
|
import fcb.project.manager.base.service.impl.TmHouseServiceImpl;
|
|
import fcb.project.manager.base.service.impl.TmHouseServiceImpl;
|
|
import fcb.project.manager.base.service.impl.TmOperationServiceImpl;
|
|
import fcb.project.manager.base.service.impl.TmOperationServiceImpl;
|
|
@@ -16,6 +18,7 @@ import fcb.project.manager.core.feignInterfaces.SceneFeign;
|
|
import fdage.back.sdk.base.entity.Result;
|
|
import fdage.back.sdk.base.entity.Result;
|
|
import fdage.back.sdk.base.enums.ResultCodeEnum;
|
|
import fdage.back.sdk.base.enums.ResultCodeEnum;
|
|
import fdage.back.sdk.base.exception.CommonBaseException;
|
|
import fdage.back.sdk.base.exception.CommonBaseException;
|
|
|
|
+import fdage.back.sdk.base.uuid.SnowFlakeUUidUtils;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -52,6 +55,9 @@ public class AuditController extends BaseController{
|
|
private TmAuditServiceImpl tmAuditService;
|
|
private TmAuditServiceImpl tmAuditService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private TmAuditLogServiceImpl tmAuditLogService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
private TmHouseServiceImpl tmHouseService;
|
|
private TmHouseServiceImpl tmHouseService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -86,8 +92,22 @@ public class AuditController extends BaseController{
|
|
Integer auditStatus , Long pageNum , Long pageSize , String houseId){
|
|
Integer auditStatus , Long pageNum , Long pageSize , String houseId){
|
|
|
|
|
|
IPage<TmAudit> resultPage = tmAuditService.queryOrSearchList(vrTitle , vrType ,
|
|
IPage<TmAudit> resultPage = tmAuditService.queryOrSearchList(vrTitle , vrType ,
|
|
- belongEstate , belongCompany ,
|
|
|
|
- auditStatus , pageNum , pageSize , houseId);
|
|
|
|
|
|
+ belongEstate , belongCompany ,
|
|
|
|
+ auditStatus , pageNum , pageSize , houseId);
|
|
|
|
+ return Result.success(DataUtils.assembleResult(resultPage.getTotal(), resultPage.getPages(),
|
|
|
|
+ resultPage.getCurrent(), resultPage.getRecords()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("/queryAuditLogList")
|
|
|
|
+ @ApiOperation(value = "根据条件拉取所有审批记录")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "pageNum", value = "当前页码", paramType = "query", required = true, dataType = "Long"),
|
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "每页大小", paramType = "query", required = true, dataType = "Long"),
|
|
|
|
+ @ApiImplicitParam(name = "houseId", value = "房源ID", paramType = "query", required = false, dataType = "String")
|
|
|
|
+ })
|
|
|
|
+ public Result<Object> queryAuditLogList(Long pageNum , Long pageSize , String houseId){
|
|
|
|
+
|
|
|
|
+ IPage<TmAuditLog> resultPage = tmAuditLogService.queryAuditLogList(pageNum , pageSize , houseId);
|
|
return Result.success(DataUtils.assembleResult(resultPage.getTotal(), resultPage.getPages(),
|
|
return Result.success(DataUtils.assembleResult(resultPage.getTotal(), resultPage.getPages(),
|
|
resultPage.getCurrent(), resultPage.getRecords()));
|
|
resultPage.getCurrent(), resultPage.getRecords()));
|
|
}
|
|
}
|
|
@@ -124,6 +144,7 @@ public class AuditController extends BaseController{
|
|
}
|
|
}
|
|
ContextTokenBean tokenMap = getContextUserInfo();
|
|
ContextTokenBean tokenMap = getContextUserInfo();
|
|
|
|
|
|
|
|
+ TmAuditLog tmAuditLog = new TmAuditLog();
|
|
//这里要先锁定当前审核记录
|
|
//这里要先锁定当前审核记录
|
|
tmAudit = null;
|
|
tmAudit = null;
|
|
tmAudit = tmAuditService.selectForUpdate(auditRequestBean.getId());
|
|
tmAudit = tmAuditService.selectForUpdate(auditRequestBean.getId());
|
|
@@ -144,10 +165,13 @@ public class AuditController extends BaseController{
|
|
if(AuditStatus.AUDITED.getCode().compareTo(auditRequestBean.getAuditStatus()) == 0){
|
|
if(AuditStatus.AUDITED.getCode().compareTo(auditRequestBean.getAuditStatus()) == 0){
|
|
if(AuditStatus.SHOOT_AUDIT.getCode().compareTo(tmAudit.getAuditStatus().intValue()) == 0){
|
|
if(AuditStatus.SHOOT_AUDIT.getCode().compareTo(tmAudit.getAuditStatus().intValue()) == 0){
|
|
tmAudit.setAuditStatus(AuditStatus.WAITING_AUDIT.getCode());
|
|
tmAudit.setAuditStatus(AuditStatus.WAITING_AUDIT.getCode());
|
|
|
|
+ tmAuditLog.setAuditStatus(AuditStatus.WAITING_AUDIT.getCode());
|
|
//地区审核通过,修改成待集团审核
|
|
//地区审核通过,修改成待集团审核
|
|
dbHouse.setStatus(HouseStatus.WAITING_AUDIT.getCode());
|
|
dbHouse.setStatus(HouseStatus.WAITING_AUDIT.getCode());
|
|
|
|
+
|
|
}else {
|
|
}else {
|
|
tmAudit.setAuditStatus(AuditStatus.AUDITED.getCode());
|
|
tmAudit.setAuditStatus(AuditStatus.AUDITED.getCode());
|
|
|
|
+ tmAuditLog.setAuditStatus(AuditStatus.AUDITED.getCode());
|
|
|
|
|
|
dbHouse.setStatus(HouseStatus.AUDITED.getCode());
|
|
dbHouse.setStatus(HouseStatus.AUDITED.getCode());
|
|
}
|
|
}
|
|
@@ -156,11 +180,13 @@ public class AuditController extends BaseController{
|
|
if(AuditStatus.SHOOT_AUDIT.getCode().compareTo(tmAudit.getAuditStatus().intValue()) == 0){
|
|
if(AuditStatus.SHOOT_AUDIT.getCode().compareTo(tmAudit.getAuditStatus().intValue()) == 0){
|
|
//处于拍摄审核状态时,修改成地区审核不通过
|
|
//处于拍摄审核状态时,修改成地区审核不通过
|
|
tmAudit.setAuditStatus(AuditStatus.REGION_REJECT.getCode());
|
|
tmAudit.setAuditStatus(AuditStatus.REGION_REJECT.getCode());
|
|
|
|
+ tmAuditLog.setAuditStatus(AuditStatus.REGION_REJECT.getCode());
|
|
//地区审核通过,修改成待集团审核
|
|
//地区审核通过,修改成待集团审核
|
|
dbHouse.setStatus(HouseStatus.REGION_REJECT.getCode());
|
|
dbHouse.setStatus(HouseStatus.REGION_REJECT.getCode());
|
|
}else {
|
|
}else {
|
|
//修改成集团审核不通过
|
|
//修改成集团审核不通过
|
|
tmAudit.setAuditStatus(AuditStatus.REJECT.getCode());
|
|
tmAudit.setAuditStatus(AuditStatus.REJECT.getCode());
|
|
|
|
+ tmAuditLog.setAuditStatus(AuditStatus.REJECT.getCode());
|
|
|
|
|
|
dbHouse.setStatus(HouseStatus.REJECT.getCode());
|
|
dbHouse.setStatus(HouseStatus.REJECT.getCode());
|
|
}
|
|
}
|
|
@@ -220,6 +246,24 @@ public class AuditController extends BaseController{
|
|
if(ins != 1){
|
|
if(ins != 1){
|
|
log.info("插入操作记录失败");
|
|
log.info("插入操作记录失败");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //增加审核操作记录
|
|
|
|
+ tmAuditLog.setId(SnowFlakeUUidUtils.generaUUid(null , null , "AUL00000"));
|
|
|
|
+ tmAuditLog.setVrId(dbHouse.getId());
|
|
|
|
+ tmAuditLog.setAuditId(tmAudit.getId());
|
|
|
|
+ tmAuditLog.setAuditType(1);
|
|
|
|
+ tmAuditLog.setAuditRemark(auditRequestBean.getAuditRemark());
|
|
|
|
+ tmAuditLog.setAuditTime(LocalDateTime.now());
|
|
|
|
+ tmAuditLog.setAuditorId(tokenMap.getId());
|
|
|
|
+ tmAuditLog.setAuditorName(tokenMap.getNickName());
|
|
|
|
+ tmAuditLog.setBelongCompanyId(tokenMap.getDepartmentId());
|
|
|
|
+ tmAuditLog.setBelongCompanyName(tokenMap.getDepartmentName());
|
|
|
|
+ tmAuditLog.setCreateTime(LocalDateTime.now());
|
|
|
|
+ tmAuditLog.setUpdateTime(LocalDateTime.now());
|
|
|
|
+ tmAuditLog.setIsDelete(DeleteStatus.NOT_DELETE.getCode());
|
|
|
|
+
|
|
|
|
+ tmAuditLogService.save(tmAuditLog);
|
|
|
|
+
|
|
Map<String , Object> resMap = new HashMap<>();
|
|
Map<String , Object> resMap = new HashMap<>();
|
|
resMap.put("auditId" , tmAudit.getId());
|
|
resMap.put("auditId" , tmAudit.getId());
|
|
return Result.success("审核成功" , resMap);
|
|
return Result.success("审核成功" , resMap);
|