|
|
@ -18,6 +18,7 @@ package com.logpm.factory.snm.controller; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.logpm.factory.snm.bean.Resp; |
|
|
|
import com.logpm.factory.snm.bean.Resp; |
|
|
|
import com.logpm.factory.snm.dto.*; |
|
|
|
import com.logpm.factory.snm.dto.*; |
|
|
@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 皮阿诺数据 控制器 |
|
|
|
* 皮阿诺数据 控制器 |
|
|
@ -106,6 +108,16 @@ public class PanFactoryDataController extends BladeController { |
|
|
|
panOrderStatusLog.setType(3); |
|
|
|
panOrderStatusLog.setType(3); |
|
|
|
panOrderStatusLogService.save(panOrderStatusLog); |
|
|
|
panOrderStatusLogService.save(panOrderStatusLog); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断数据是否已存入
|
|
|
|
|
|
|
|
String orderNo = factoryOrderDTO.getOrderNo(); |
|
|
|
|
|
|
|
QueryWrapper<PanFactoryOrder> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq("order_no",orderNo); |
|
|
|
|
|
|
|
PanFactoryOrder one = factoryOrderService.getOne(queryWrapper); |
|
|
|
|
|
|
|
if(!Objects.isNull(one)){ |
|
|
|
|
|
|
|
log.warn("############data: 订单数据已存在 orderNo={}",orderNo); |
|
|
|
|
|
|
|
return Resp.fail(400,"订单数据已存在"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PanFactoryOrder factoryOrder = new PanFactoryOrder(); |
|
|
|
PanFactoryOrder factoryOrder = new PanFactoryOrder(); |
|
|
|
BeanUtil.copyProperties(factoryOrderDTO,factoryOrder); |
|
|
|
BeanUtil.copyProperties(factoryOrderDTO,factoryOrder); |
|
|
|
factoryOrder.setCorpid(corpId); |
|
|
|
factoryOrder.setCorpid(corpId); |
|
|
@ -141,7 +153,7 @@ public class PanFactoryDataController extends BladeController { |
|
|
|
//开启异步线程处理数据
|
|
|
|
//开启异步线程处理数据
|
|
|
|
syncDataService.handlerPanDataToHt(); |
|
|
|
syncDataService.handlerPanDataToHt(); |
|
|
|
|
|
|
|
|
|
|
|
return Resp.successOrderNo(factoryOrder.getOrderNo(),"SUCCESS"); |
|
|
|
return Resp.successOrderNo(factoryOrder.getOrderNo(),factoryOrder.getDeliveryNumber(),"SUCCESS"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|