Commit bdb4dd3f by zhouhaibao

Merge remote-tracking branch 'origin/v1.0.1' into v1.0.1

2 parents 56fb5203 1da52a5e
......@@ -54,11 +54,13 @@ public class SopCustomerSearch extends Page {
/**
* 进入sop旅程时间-开始
* yyyy-MM-dd HH:mm:ss
*/
private String sopJourneyEnterTimeBegin;
/**
* 进入sop旅程时间-结束
* yyyy-MM-dd HH:mm:ss
*/
private String sopJourneyEnterTimeEnd;
}
package cn.com.glsx.process.modules.model.enums;
public enum SopTplSingletonEnum {
FALSE("多实例", (byte)0), TRUE("单实例", (byte)1);
private String name;
private byte value;
SopTplSingletonEnum(String name, byte value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public byte getValue() {
return value;
}
public void setValue(byte value) {
this.value = value;
}
}
......@@ -14,10 +14,7 @@ import cn.com.glsx.process.modules.converter.SopTplNodeConverter;
import cn.com.glsx.process.modules.entity.*;
import cn.com.glsx.process.modules.mapper.*;
import cn.com.glsx.process.modules.model.*;
import cn.com.glsx.process.modules.model.enums.SopInstNodeSkipEnum;
import cn.com.glsx.process.modules.model.enums.SopInstNodeStatusEnum;
import cn.com.glsx.process.modules.model.enums.SopInstStatusEnum;
import cn.com.glsx.process.modules.model.enums.SopTplNodeSkipableEnum;
import cn.com.glsx.process.modules.model.enums.*;
import cn.com.glsx.process.modules.rabbitmq.MsgProducer;
import cn.com.glsx.process.modules.rabbitmq.RabbitMQConstants;
import cn.com.glsx.process.util.FileUploadServerData;
......@@ -278,10 +275,12 @@ public class SopInstService {
throw new AdminException(ResultEnum.PARAM_ERROR.getCode(), "请选择门店");
}
List<String> groupIds = sopTplGrants.stream().map(sopTplGrant -> sopTplGrant.getGroupId()).collect(Collectors.toList());
List<SopTplGrant> grants = sopTplGrantMapper.selectInUseGrants(tplId, groupIds);
if (!CollectionUtils.isEmpty(grants)) {
throw new AdminException(ResultEnum.PARAM_ERROR.getCode(), String.format("%s已存在该旅程,请确认后重新操作", grants.get(0).getGroupName()));
if (SopTplSingletonEnum.TRUE.getValue() == sopTplDTO.getTplSingleton()) {
List<String> groupIds = sopTplGrants.stream().map(sopTplGrant -> sopTplGrant.getGroupId()).collect(Collectors.toList());
List<SopTplGrant> grants = sopTplGrantMapper.selectInUseGrants(tplId, groupIds);
if (!CollectionUtils.isEmpty(grants)) {
throw new AdminException(ResultEnum.PARAM_ERROR.getCode(), String.format("%s已存在该旅程,请确认后重新操作", grants.get(0).getGroupName()));
}
}
//新增派发门店记录
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!