|
@@ -1,6 +1,7 @@
|
|
|
package com.gree.mall.manager.logic.workorder;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -110,6 +111,10 @@ public class ChangeOrderLogic {
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void changeAppointmentTime(String id, String appointmentTime, String appointmentEndTime, String remark, String imgSrc) {
|
|
|
+ PgOrderBase pgOrderBase = pgOrderBaseService.getById(id);
|
|
|
+ if (!StringUtils.equalsAny(pgOrderBase.getOrderStatus(),"YWG","GCSZX","WDWG","YWGO","YJS","LRCD","YQX","FWZT","YCGB","FWQX","FL")){
|
|
|
+ return;
|
|
|
+ }
|
|
|
pgOrderBaseService.lambdaUpdate()
|
|
|
.eq(PgOrderBase::getId, id)
|
|
|
.set(!StringUtils.isEmpty(remark), PgOrderBase::getChangeRemark, remark)
|
|
@@ -142,15 +147,27 @@ public class ChangeOrderLogic {
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void changeWorker(List<String> ids, List<String> workerIds, String websitId) {
|
|
|
+ public void changeWorker(List<String> orderIds, List<String> workerIds, String websitId) {
|
|
|
|
|
|
- ids = ids.stream().distinct().collect(Collectors.toList());
|
|
|
+ orderIds = orderIds.stream().distinct().collect(Collectors.toList());
|
|
|
workerIds = workerIds.stream().distinct().collect(Collectors.toList());
|
|
|
//循环师傅获得网点派工数据
|
|
|
AdminWebsit adminWebsit = adminWebsitService.getById(websitId);
|
|
|
|
|
|
List<PgOrderWorker> pgOrderWorkers = new ArrayList<>();
|
|
|
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ for (String id : orderIds) {
|
|
|
+ PgOrderBase pgOrderBase = pgOrderBaseService.getById(id);
|
|
|
+
|
|
|
+ if (!StringUtils.equalsAny(pgOrderBase.getOrderStatus(),"YWG","GCSZX","WDWG","YWGO","YJS","LRCD","YQX","FWZT","YCGB","FWQX","FL")){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ ids.add(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CollectionUtil.isEmpty(ids))
|
|
|
+ return;
|
|
|
|
|
|
boolean isDa = true;
|
|
|
|