|
|
|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.time.LocalTime; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -25,7 +26,7 @@ import java.util.Map;
|
|
|
|
|
* @author yangkai.shen |
|
|
|
|
*/ |
|
|
|
|
@Slf4j |
|
|
|
|
@RabbitListener(queues = RabbitConstant.OUPAI_RECEIVING_QUEUE) |
|
|
|
|
@RabbitListener(queues = RabbitConstant.RECEIVE_INFO_QUEUE) |
|
|
|
|
@Component |
|
|
|
|
public class OpReceivingDataHandler { |
|
|
|
|
|
|
|
|
@ -47,11 +48,20 @@ public class OpReceivingDataHandler {
|
|
|
|
|
JSONObject packageJSON = packages.getJSONObject(j); |
|
|
|
|
String packageStatus = packageJSON.getString("PackageStatus"); |
|
|
|
|
String orderPackageCode = packageJSON.getString("Code"); |
|
|
|
|
Date receivingTime = packageJSON.getDate("ReceivingTime"); |
|
|
|
|
if("已在库".equals(packageStatus)){ |
|
|
|
|
String receivingTime=null; |
|
|
|
|
try{ |
|
|
|
|
|
|
|
|
|
receivingTime = packageJSON.getString("CreateTime"); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
log.info("##################opReceivingDataHandler: 处理欧派收货数据到新系统,packageStatus:{},orderPackageCode:{},receivingTime{}", |
|
|
|
|
packageStatus,orderPackageCode,receivingTime); |
|
|
|
|
//判断是否是已入库
|
|
|
|
|
if("已入库".equals(packageStatus)){ |
|
|
|
|
//真正的处理需要的数据
|
|
|
|
|
try { |
|
|
|
|
panFactoryDataService.handleDataToPlatform(orderPackageCode, CommonUtil.dateToStringGeneral(receivingTime)); |
|
|
|
|
panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|