|
@@ -8,6 +8,7 @@ import com.fs.hisStore.domain.FsStoreOrderAuditLogScrm;
|
|
|
import com.fs.hisStore.enums.OrderAuditStateEnum;
|
|
import com.fs.hisStore.enums.OrderAuditStateEnum;
|
|
|
import com.fs.hisStore.mapper.FsStoreOrderAuditScrmMapper;
|
|
import com.fs.hisStore.mapper.FsStoreOrderAuditScrmMapper;
|
|
|
import com.fs.hisStore.param.FsStoreOrderAuditParam;
|
|
import com.fs.hisStore.param.FsStoreOrderAuditParam;
|
|
|
|
|
+import com.fs.hisStore.param.FsStoreOrderAuditPayRemainParam;
|
|
|
import com.fs.hisStore.param.FsStoreOrderAuditReviewParam;
|
|
import com.fs.hisStore.param.FsStoreOrderAuditReviewParam;
|
|
|
import com.fs.hisStore.service.IFsStoreOrderAuditLogScrmService;
|
|
import com.fs.hisStore.service.IFsStoreOrderAuditLogScrmService;
|
|
|
import com.fs.hisStore.service.IFsStoreOrderAuditScrmService;
|
|
import com.fs.hisStore.service.IFsStoreOrderAuditScrmService;
|
|
@@ -123,7 +124,7 @@ public class FsStoreOrderAuditScrmServiceImpl extends ServiceImpl<FsStoreOrderAu
|
|
|
if (param.getReviewType() == 1) { // 审核通过
|
|
if (param.getReviewType() == 1) { // 审核通过
|
|
|
newStatus = OrderAuditStateEnum.APPROVED;
|
|
newStatus = OrderAuditStateEnum.APPROVED;
|
|
|
message = "审核通过";
|
|
message = "审核通过";
|
|
|
- } else { // 审核拒绝
|
|
|
|
|
|
|
+ }else { // 审核拒绝
|
|
|
newStatus = OrderAuditStateEnum.COMPANY_REJECT;
|
|
newStatus = OrderAuditStateEnum.COMPANY_REJECT;
|
|
|
if (StringUtils.isBlank(param.getReviewContent())) {
|
|
if (StringUtils.isBlank(param.getReviewContent())) {
|
|
|
throw new CustomException("被拒原因不能为空");
|
|
throw new CustomException("被拒原因不能为空");
|
|
@@ -134,13 +135,10 @@ public class FsStoreOrderAuditScrmServiceImpl extends ServiceImpl<FsStoreOrderAu
|
|
|
fsStoreOrderAudit.setReason(param.getReviewContent());
|
|
fsStoreOrderAudit.setReason(param.getReviewContent());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
fsStoreOrderAudit.setCompanyAuditTime(now);
|
|
fsStoreOrderAudit.setCompanyAuditTime(now);
|
|
|
- fsStoreOrderAudit.setCompanyAuditUserId(userId);
|
|
|
|
|
fsStoreOrderAudit.setAuditStatus(newStatus.getValue());
|
|
fsStoreOrderAudit.setAuditStatus(newStatus.getValue());
|
|
|
-
|
|
|
|
|
|
|
+ fsStoreOrderAudit.setCompanyAuditUserId(userId);
|
|
|
baseMapper.updateById(fsStoreOrderAudit);
|
|
baseMapper.updateById(fsStoreOrderAudit);
|
|
|
-
|
|
|
|
|
FsStoreOrderAuditLogScrm auditLog = new FsStoreOrderAuditLogScrm();
|
|
FsStoreOrderAuditLogScrm auditLog = new FsStoreOrderAuditLogScrm();
|
|
|
auditLog.setAuditId(fsStoreOrderAudit.getId());
|
|
auditLog.setAuditId(fsStoreOrderAudit.getId());
|
|
|
auditLog.setOrderId(fsStoreOrderAudit.getOrderId());
|
|
auditLog.setOrderId(fsStoreOrderAudit.getOrderId());
|
|
@@ -194,4 +192,34 @@ public class FsStoreOrderAuditScrmServiceImpl extends ServiceImpl<FsStoreOrderAu
|
|
|
fsStoreOrderAuditLogService.saveBatch(auditLogs);
|
|
fsStoreOrderAuditLogService.saveBatch(auditLogs);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @Description: 重新提交审核
|
|
|
|
|
+ * @Param:
|
|
|
|
|
+ * @Return:
|
|
|
|
|
+ * @Author xgb
|
|
|
|
|
+ * @Date 2025/9/26 17:16
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void auditAgain(FsStoreOrderAuditPayRemainParam param, boolean b) {
|
|
|
|
|
+ FsStoreOrderAuditScrm fsStoreOrderAudit = baseMapper.selectByOrderId(param.getOrderId());
|
|
|
|
|
+ if (Objects.isNull(fsStoreOrderAudit)) {
|
|
|
|
|
+ throw new CustomException("记录不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+ OrderAuditStateEnum orderAuditStateEnum = OrderAuditStateEnum.getOrderAuditStateEnum(fsStoreOrderAudit.getAuditStatus());
|
|
|
|
|
+ if (OrderAuditStateEnum.COMPANY_REJECT != orderAuditStateEnum) {
|
|
|
|
|
+ throw new CustomException("审核未被拒绝,无需重新审核");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ fsStoreOrderAudit.setCompanyAuditTime(LocalDateTime.now());
|
|
|
|
|
+ fsStoreOrderAudit.setAuditStatus(OrderAuditStateEnum.COMPANY_PENDING.getValue());
|
|
|
|
|
+ baseMapper.updateById(fsStoreOrderAudit);
|
|
|
|
|
+
|
|
|
|
|
+ FsStoreOrderAuditLogScrm auditLog = new FsStoreOrderAuditLogScrm();
|
|
|
|
|
+ auditLog.setAuditId(fsStoreOrderAudit.getId());
|
|
|
|
|
+ auditLog.setOrderId(fsStoreOrderAudit.getOrderId());
|
|
|
|
|
+ auditLog.setContent("销售修改订单重新提交审核");
|
|
|
|
|
+ auditLog.setCreateTime(LocalDateTime.now());
|
|
|
|
|
+ fsStoreOrderAuditLogService.save(auditLog);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|