|
@@ -12,10 +12,7 @@ import com.gree.mall.manager.bean.workorder.PgAppraiseApplyVO;
|
|
|
import com.gree.mall.manager.bean.workorder.PgAppraiseCategoryVO;
|
|
|
import com.gree.mall.manager.commonmapper.CommonMapper;
|
|
|
import com.gree.mall.manager.enums.ExamineStatusEnum;
|
|
|
-import com.gree.mall.manager.enums.workorder.AppraiseApplyStatusEnum;
|
|
|
-import com.gree.mall.manager.enums.workorder.AppraiseConfigTypeEnum;
|
|
|
-import com.gree.mall.manager.enums.workorder.AppraiseOnusEnum;
|
|
|
-import com.gree.mall.manager.enums.workorder.AppraiseStatusEnum;
|
|
|
+import com.gree.mall.manager.enums.workorder.*;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.plus.entity.*;
|
|
@@ -223,11 +220,16 @@ public class AppraiseRelaLogic {
|
|
|
throw new RemoteServiceException("填入的“工单编号”不存在");
|
|
|
}
|
|
|
|
|
|
- if (orderBase.getAppraiseStatus().equals(AppraiseStatusEnum.A.getKey())
|
|
|
- || orderBase.getAppraiseStatus().equals(AppraiseStatusEnum.D.getKey())) {
|
|
|
- throw new RemoteServiceException("工单评价为“好评”,不需要申诉");
|
|
|
+ if (!(orderBase.getOrderStatus().equals(OrderBaseStatusEnum.YWG.getKey())
|
|
|
+ || orderBase.getOrderStatus().equals(OrderBaseStatusEnum.YJS.getKey()))) {
|
|
|
+ throw new RemoteServiceException("工单状态非“已完工”,不能提交申诉");
|
|
|
}
|
|
|
|
|
|
+// if (orderBase.getAppraiseStatus().equals(AppraiseStatusEnum.A.getKey())
|
|
|
+// || orderBase.getAppraiseStatus().equals(AppraiseStatusEnum.D.getKey())) {
|
|
|
+// throw new RemoteServiceException("工单评价为“好评”,不需要申诉");
|
|
|
+// }
|
|
|
+
|
|
|
final PgAppraiseApply beforeApply = pgAppraiseApplyService.lambdaQuery()
|
|
|
.eq(PgAppraiseApply::getIsSecond, false)
|
|
|
.eq(PgAppraiseApply::getOrderBaseId, bean.getOrderBaseId())
|
|
@@ -297,6 +299,8 @@ public class AppraiseRelaLogic {
|
|
|
throw new RemoteServiceException("已有中差评申诉“审核通过”记录, 提交失败");
|
|
|
}
|
|
|
|
|
|
+ bean.setAppraiseStatus(orderBase.getAppraiseStatus());
|
|
|
+ bean.setAppraiseSource(orderBase.getAppraiseSource());
|
|
|
bean.setStatus(AppraiseApplyStatusEnum.WAIT_CENTER.getKey());
|
|
|
bean.setApplyTime(DateUtil.date());
|
|
|
bean.setApplyBy(adminUser.getNickName());
|
|
@@ -396,7 +400,6 @@ public class AppraiseRelaLogic {
|
|
|
// 首次申诉:判定网点【无责】的,则申诉成功,审核结果为【好评】,不触发二次可申诉
|
|
|
// 二次申诉:判定网点【无责】的,则申诉成功,审核结果为【好评】
|
|
|
apply.setExamineResult(AppraiseStatusEnum.A.getKey());
|
|
|
-
|
|
|
} else if (apply.getWebsitResult().equals(AppraiseOnusEnum.HALF.getKey())) {
|
|
|
// 首次申诉:判定网点为【半责】的,审核结果为【剔除】,不触发起二次可申诉
|
|
|
// 二次申诉:判定网点【半责】的,审核结果为【剔除】
|
|
@@ -405,6 +408,10 @@ public class AppraiseRelaLogic {
|
|
|
// 首次申诉:判定网点【全责】的,审核结果为【驳回】,触发二次可申诉
|
|
|
// 二次申诉:判定网点【全责】的,审核结果为【驳回】,维护原评价
|
|
|
apply.setExamineResult(orderBase.getAppraiseStatus());
|
|
|
+ PgAppraiseApply copy = new PgAppraiseApply();
|
|
|
+ this.copyApply(copy, apply);
|
|
|
+ copy.setIsSecond(true);
|
|
|
+ copy.insert();
|
|
|
}
|
|
|
|
|
|
apply.updateById();
|
|
@@ -452,29 +459,7 @@ public class AppraiseRelaLogic {
|
|
|
List<PgAppraiseApply> newList = new ArrayList<>();
|
|
|
for (PgAppraiseApply apply : copyList) {
|
|
|
PgAppraiseApply copy = new PgAppraiseApply();
|
|
|
- copy.setOrderBaseId(apply.getOrderBaseId())
|
|
|
- .setOrderType(apply.getOrderType())
|
|
|
- .setOrderSmallType(apply.getOrderSmallType())
|
|
|
- .setOrderSmallTypeText(apply.getOrderSmallTypeText())
|
|
|
- .setCompanyWechatId(apply.getCompanyWechatId())
|
|
|
- .setCompanyWechatName(apply.getCompanyWechatName())
|
|
|
- .setStatus(AppraiseApplyStatusEnum.WAIT.getKey())
|
|
|
- .setWorkerId(apply.getWorkerId())
|
|
|
- .setWorkerNumber(apply.getWorkerNumber())
|
|
|
- .setWorkerName(apply.getWorkerName())
|
|
|
- .setWorkerMobile(apply.getWorkerMobile())
|
|
|
- .setWorkerIdcard(apply.getWorkerIdcard())
|
|
|
- .setWebsitId(apply.getWebsitId())
|
|
|
- .setWebsitName(apply.getWebsitName())
|
|
|
- .setOverTime(apply.getOverTime())
|
|
|
- .setAppraiseStatus(apply.getAppraiseStatus())
|
|
|
- .setAppraiseContent(apply.getAppraiseContent())
|
|
|
- .setAppraiseSource(apply.getAppraiseSource())
|
|
|
- .setReason(apply.getReason())
|
|
|
- .setUserName(apply.getUserName())
|
|
|
- .setUserMobile(apply.getUserMobile())
|
|
|
- .setAddress(apply.getAddress());
|
|
|
-
|
|
|
+ this.copyApply(copy, apply);
|
|
|
|
|
|
newList.add(copy);
|
|
|
}
|
|
@@ -489,6 +474,31 @@ public class AppraiseRelaLogic {
|
|
|
.update();
|
|
|
}
|
|
|
|
|
|
+ private void copyApply(PgAppraiseApply copy, PgAppraiseApply apply) {
|
|
|
+ copy.setOrderBaseId(apply.getOrderBaseId())
|
|
|
+ .setOrderType(apply.getOrderType())
|
|
|
+ .setOrderSmallType(apply.getOrderSmallType())
|
|
|
+ .setOrderSmallTypeText(apply.getOrderSmallTypeText())
|
|
|
+ .setCompanyWechatId(apply.getCompanyWechatId())
|
|
|
+ .setCompanyWechatName(apply.getCompanyWechatName())
|
|
|
+ .setStatus(AppraiseApplyStatusEnum.WAIT.getKey())
|
|
|
+ .setWorkerId(apply.getWorkerId())
|
|
|
+ .setWorkerNumber(apply.getWorkerNumber())
|
|
|
+ .setWorkerName(apply.getWorkerName())
|
|
|
+ .setWorkerMobile(apply.getWorkerMobile())
|
|
|
+ .setWorkerIdcard(apply.getWorkerIdcard())
|
|
|
+ .setWebsitId(apply.getWebsitId())
|
|
|
+ .setWebsitName(apply.getWebsitName())
|
|
|
+ .setOverTime(apply.getOverTime())
|
|
|
+ .setAppraiseStatus(apply.getAppraiseStatus())
|
|
|
+ .setAppraiseContent(apply.getAppraiseContent())
|
|
|
+ .setAppraiseSource(apply.getAppraiseSource())
|
|
|
+ .setReason(apply.getReason())
|
|
|
+ .setUserName(apply.getUserName())
|
|
|
+ .setUserMobile(apply.getUserMobile())
|
|
|
+ .setAddress(apply.getAddress());
|
|
|
+ }
|
|
|
+
|
|
|
public void batchUpdateEnd(List<String> ids) {
|
|
|
if (CollectionUtil.isEmpty(ids)) {
|
|
|
throw new RemoteServiceException("请选择记录");
|