|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.pj.api.client.admin.AdminInterface;
|
|
import com.pj.api.client.admin.AdminInterface;
|
|
import com.pj.api.client.level_one_server.LevelOneServerInterface;
|
|
import com.pj.api.client.level_one_server.LevelOneServerInterface;
|
|
import com.pj.api.dto.MessageDto;
|
|
import com.pj.api.dto.MessageDto;
|
|
|
|
+import com.pj.api.dto.OrderDto;
|
|
import com.pj.api.dto.PeopleDto;
|
|
import com.pj.api.dto.PeopleDto;
|
|
import com.pj.common.core.exception.ServiceException;
|
|
import com.pj.common.core.exception.ServiceException;
|
|
import com.pj.current.dto.APPLoginUserInfo;
|
|
import com.pj.current.dto.APPLoginUserInfo;
|
|
@@ -21,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -109,11 +111,16 @@ public class TbDemandQuotationService extends ServiceImpl<TbDemandQuotationMappe
|
|
* @param demandQuotationParam
|
|
* @param demandQuotationParam
|
|
*/
|
|
*/
|
|
public boolean quotation(DemandQuotationParam demandQuotationParam) throws Exception {
|
|
public boolean quotation(DemandQuotationParam demandQuotationParam) throws Exception {
|
|
|
|
+
|
|
//获取并判断当前登陆人
|
|
//获取并判断当前登陆人
|
|
APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
|
|
APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
|
|
if (appLoginInfo == null || appLoginInfo.getLoginId() == null)
|
|
if (appLoginInfo == null || appLoginInfo.getLoginId() == null)
|
|
throw new ServiceException("当前登录账号信息已失效!");
|
|
throw new ServiceException("当前登录账号信息已失效!");
|
|
|
|
+ //将需求改成已被报价状态
|
|
demandQuotationParam.setIsOrders(1);
|
|
demandQuotationParam.setIsOrders(1);
|
|
|
|
+ //接单前判断组长是否当天在一级市场接单
|
|
|
|
+ List<OrderDto> dtoList = levelOneServerInterface.selectOrderList(appLoginInfo.getLoginId());
|
|
|
|
+ if(dtoList.size() != 1)throw new ServiceException("您今天还未在一级市场接单哟~");
|
|
//获取边民组信息
|
|
//获取边民组信息
|
|
PeopleDto rpcById = levelOneServerInterface.getRpcById(appLoginInfo.getFk());
|
|
PeopleDto rpcById = levelOneServerInterface.getRpcById(appLoginInfo.getFk());
|
|
if (rpcById == null) throw new ServiceException("边民组信息有误!");
|
|
if (rpcById == null) throw new ServiceException("边民组信息有误!");
|