|
|
@@ -4,7 +4,6 @@ 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.InputRestrictProject;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
import com.goafanti.common.bo.Error;
|
|
|
import com.goafanti.common.bo.OrderOperator;
|
|
|
@@ -235,30 +234,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
if(t.getCommodityPrice()!=null) {
|
|
|
order.setTotalAmount(order.getTotalAmount());
|
|
|
}
|
|
|
- RestrictProject outRestrictProjects = restrictProjectMapper.selectByParam(new InputRestrictProject(order.getBuyerId(), TokenManager.getAdminId(), t.getCommodityId()));
|
|
|
- //没有限定或为公共时
|
|
|
- if (outRestrictProjects==null||outRestrictProjects.getType()==0){
|
|
|
- User user = userMapper.selectByPrimaryKey(order.getBuyerId());
|
|
|
- //客户归属不属自己
|
|
|
- if (!user.getAid().equals(TokenManager.getAdminId())){
|
|
|
- //是签单 是曹津
|
|
|
- if (user.getShareType()==2&&user.getAid().equals(AFTConstants.CAOJIN_AID)){
|
|
|
- throw new BusinessException("该项目已为他人限定项目,无法创建");
|
|
|
- }else if (user.getShareType()==2&&!user.getAid().equals(AFTConstants.CAOJIN_AID)){
|
|
|
- //是签单 不是曹津
|
|
|
- BusinessProject businessProject = businessProjectMapper.selectByPrimaryKey(t.getCommodityId());
|
|
|
- //判定是否是限定项目
|
|
|
- if (businessProject.getRestrictStatus()==1){
|
|
|
- throw new BusinessException("该项目已为公共限定项目,请先领取");
|
|
|
- }else {
|
|
|
- throw new BusinessException("该客户为他人签单,您只能签订限定项目");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }else if (!outRestrictProjects.getAid().equals(TokenManager.getAdminId())){
|
|
|
- //有限定但不是自己的
|
|
|
- throw new BusinessException("该项目已为他人限定项目,无法创建");
|
|
|
- }
|
|
|
|
|
|
addTTaskMember(t);
|
|
|
addTaskMid(t);
|