|
|
@@ -4,6 +4,7 @@ package com.goafanti.order.service.impl;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.goafanti.admin.bo.AdminListBo;
|
|
|
import com.goafanti.admin.service.DepartmentService;
|
|
|
+import com.goafanti.business.bo.OutRestrictProject;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
import com.goafanti.common.bo.Error;
|
|
|
import com.goafanti.common.bo.OrderOperator;
|
|
|
@@ -152,6 +153,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
private TemporaryReceivablesMapper temporaryReceivablesMapper;
|
|
|
@Autowired
|
|
|
private ProjectAsyncService projectAsyncService;
|
|
|
+ @Autowired
|
|
|
+ private RestrictProjectMapper restrictProjectMapper;
|
|
|
|
|
|
|
|
|
@Value(value = "${upload.path}")
|
|
|
@@ -2747,4 +2750,28 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
tOrderNewMapper.update(orderNew);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean checkLimit(InputAddTask in) {
|
|
|
+ // true 返回错误,flase可以正常添加
|
|
|
+ TOrderNewBo orderNewBo = tOrderNewMapper.getOrderNewDetail(in.getOrderNo());
|
|
|
+ if (orderNewBo.getUserType()==3){
|
|
|
+ List<OutRestrictProject> outRestrictProjects = restrictProjectMapper.selectByUid(orderNewBo.getBuyerId());
|
|
|
+ for (OutRestrictProject e : outRestrictProjects) {
|
|
|
+ //找到配合的项目
|
|
|
+ if (e.getPid().equals(in.getCommodityId())){
|
|
|
+ //是私有或者签单
|
|
|
+ if (e.getType()==1||e.getType()==2){
|
|
|
+ if (e.getAid().equals(TokenManager.getAdminId())){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ //非限定直接可以发起
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
}
|