|
|
@@ -1974,23 +1974,12 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return 1;
|
|
|
// return true;
|
|
|
}
|
|
|
- String[] split = in.getAssistAid().split(",");
|
|
|
- for (String s : split) {
|
|
|
- if(checkPublicTime(s, in)){
|
|
|
- //第二种,协单人时间重复
|
|
|
- return 2;
|
|
|
-// return true;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ Integer x = checkTech(in);
|
|
|
+ if (x != null) return x;
|
|
|
}else if(in.getAssist()==1&&in.getAlone()==2){
|
|
|
- String[] split = in.getAssistAid().split(",");
|
|
|
- for (String s : split) {
|
|
|
- if(checkPublicTime(s, in)){
|
|
|
- //第二种,协单人时间重复
|
|
|
- return 2;
|
|
|
-// return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ Integer x = checkTech(in);
|
|
|
+ if (x != null) return x;
|
|
|
}else {
|
|
|
//判定当前发起人能发起不
|
|
|
if(checkPublicTime(TokenManager.getAdminId(), in)){
|
|
|
@@ -2003,6 +1992,32 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ private Integer checkTech(InputPublicRelease in) {
|
|
|
+ String[] split = in.getAssistAid().split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ if(checkPublicTime(s, in)){
|
|
|
+ //第二种,协单人时间重复
|
|
|
+ return 2;
|
|
|
+// return true;
|
|
|
+ }
|
|
|
+ List<PublicRelease> is = publicReleaseMapper.checkTech(s,in.getReleaseStart(),in.getReleaseEnd());
|
|
|
+ if (is.size()>1) {
|
|
|
+ return 2;
|
|
|
+ }else if(is.size()==1){
|
|
|
+ //如果id为新增那么直接不允许时间重复
|
|
|
+ if (in.getId()==null){
|
|
|
+ return 2;
|
|
|
+ }else {
|
|
|
+ //如果有id,与获取id一直,则为当前修改可以
|
|
|
+ if (in.getId().equals(is.get(0))){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
*
|
|
|
* @param aid
|