132 changed files with 3100 additions and 458 deletions
@ -0,0 +1,84 @@
|
||||
package com.logpm.factory.snm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
@Data |
||||
@TableName("mt_factory_order") |
||||
@ApiModel(value = "MtFactoryOrder对象", description = "梦天工厂订单") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MtFactoryOrder extends BaseEntity { |
||||
|
||||
@JsonProperty("总单编号") |
||||
@ApiModelProperty(value = "总单编号") |
||||
private String mainOrderCode; |
||||
|
||||
@JsonProperty("订单编号") |
||||
@ApiModelProperty(value = "订单编号") |
||||
private String orderCode; |
||||
|
||||
@JsonProperty("客户姓名") |
||||
@ApiModelProperty(value = "客户姓名") |
||||
private String customName; |
||||
|
||||
@JsonProperty("客户电话") |
||||
@ApiModelProperty(value = "客户电话") |
||||
private String customPhone; |
||||
|
||||
@JsonProperty("客户地址") |
||||
@ApiModelProperty(value = "客户地址") |
||||
private String customAddress; |
||||
|
||||
@JsonProperty("经销商编号") |
||||
@ApiModelProperty(value = "经销商编码") |
||||
private String dealerCode; |
||||
|
||||
@JsonProperty("经销商名称") |
||||
@ApiModelProperty(value = "经销商名称") |
||||
private String dealerName; |
||||
|
||||
@JsonProperty("专卖店编号") |
||||
@ApiModelProperty(value = "专卖店编号") |
||||
private String exclusiveCode; |
||||
|
||||
@JsonProperty("专卖店名称") |
||||
@ApiModelProperty(value = "专卖店名称") |
||||
private String exclusiveName; |
||||
|
||||
@JsonProperty("收货人") |
||||
@ApiModelProperty(value = "收货人") |
||||
private String consignee; |
||||
|
||||
@JsonProperty("收货人电话") |
||||
@ApiModelProperty(value = "收货人电话") |
||||
private String consigneePhone; |
||||
|
||||
@JsonProperty("收货地址") |
||||
@ApiModelProperty(value = "收货人地址") |
||||
private String consigneeAddress; |
||||
|
||||
@JsonProperty("出库方式") |
||||
@ApiModelProperty(value = "出库方式") |
||||
private String outboundType; |
||||
|
||||
@JsonProperty("品牌") |
||||
@ApiModelProperty(value = "品牌") |
||||
private String brand; |
||||
|
||||
@JsonProperty("生产单号") |
||||
@ApiModelProperty(value = "生产单号") |
||||
private String produceOrderCode; |
||||
|
||||
@JsonProperty("包件数") |
||||
@ApiModelProperty(value = "包件数") |
||||
private String quantity; |
||||
|
||||
@ApiModelProperty(value = "发货单id") |
||||
private Long mainId; |
||||
|
||||
} |
@ -0,0 +1,57 @@
|
||||
package com.logpm.factory.snm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
@Data |
||||
@TableName("mt_factory_order_main") |
||||
@ApiModel(value = "MtFactoryOrderMain对象", description = "梦天工厂订单主对象") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MtFactoryOrderMain extends BaseEntity { |
||||
|
||||
@JsonProperty("发货单编号") |
||||
@ApiModelProperty(value = "发货单编号") |
||||
private String invoiceOrderCode; |
||||
|
||||
@JsonProperty("中心仓编号") |
||||
@ApiModelProperty(value = "中心仓编号") |
||||
private String centerWarehouseCode; |
||||
|
||||
@JsonProperty("中心仓") |
||||
@ApiModelProperty(value = "中心仓") |
||||
private String centerWarehouseName; |
||||
|
||||
@JsonProperty("仓库类型") |
||||
@ApiModelProperty(value = "仓库类型") |
||||
private String warehouseType; |
||||
|
||||
@JsonProperty("送货车号") |
||||
@ApiModelProperty(value = "送货车号") |
||||
private String sendCarNumber; |
||||
|
||||
@JsonProperty("送货司机") |
||||
@ApiModelProperty(value = "送货车司机") |
||||
private String sendCarDriver; |
||||
|
||||
@JsonProperty("送货司机电话") |
||||
@ApiModelProperty(value = "送货车司机电话") |
||||
private String sendCarDriverPhone; |
||||
|
||||
@JsonProperty("确认发车人") |
||||
@ApiModelProperty(value = "确认发车人") |
||||
private String reallyMan; |
||||
|
||||
@JsonProperty("确认发车时间") |
||||
@ApiModelProperty(value = "确认发车时间") |
||||
private String reallyDate; |
||||
|
||||
@JsonProperty("备注") |
||||
@ApiModelProperty(value = "备注") |
||||
private String remark; |
||||
|
||||
} |
@ -0,0 +1,57 @@
|
||||
package com.logpm.factory.snm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
@Data |
||||
@TableName("mt_package_info") |
||||
@ApiModel(value = "MtPackageInfo对象", description = "梦天工厂包件信息") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MtPackageInfo extends BaseEntity { |
||||
|
||||
|
||||
@JsonProperty("出库人") |
||||
@ApiModelProperty(value = "出库人") |
||||
private String outboundMan; |
||||
|
||||
@JsonProperty("出库时间") |
||||
@ApiModelProperty(value = "出库时间") |
||||
private String outboundDate; |
||||
|
||||
@JsonProperty("包装编号") |
||||
@ApiModelProperty(value = "包装编号") |
||||
private String packageCode; |
||||
|
||||
@JsonProperty("包装类型") |
||||
@ApiModelProperty(value = "包装类型") |
||||
private String packageType; |
||||
|
||||
@JsonProperty("大类") |
||||
@ApiModelProperty(value = "大类") |
||||
private String bigType; |
||||
|
||||
@JsonProperty("小类") |
||||
@ApiModelProperty(value = "小类") |
||||
private String smallType; |
||||
|
||||
@JsonProperty("油漆颜色") |
||||
@ApiModelProperty(value = "油漆颜色") |
||||
private String color; |
||||
|
||||
@JsonProperty("型号") |
||||
@ApiModelProperty(value = "型号") |
||||
private String model; |
||||
|
||||
@JsonProperty("门扇尺寸") |
||||
@ApiModelProperty(value = "尺寸") |
||||
private String size; |
||||
|
||||
@ApiModelProperty(value = "订单id") |
||||
private Long orderId; |
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.logpm.factory.snm.vo; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
@Data |
||||
public class ImagesVO implements Serializable { |
||||
|
||||
private String suffix;//后缀
|
||||
|
||||
private byte[] imageBytes;//图片字节流
|
||||
|
||||
} |
@ -0,0 +1,155 @@
|
||||
package com.logpm.oldproject.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
@Data |
||||
@TableName("ht_order") |
||||
@ApiModel(value = "Order对象", description = "订单信息") |
||||
public class OrderEntity { |
||||
|
||||
@TableId( |
||||
value = "id", |
||||
type = IdType.AUTO |
||||
) |
||||
private Integer id; |
||||
|
||||
private Integer test; |
||||
|
||||
@ApiModelProperty(value = "订单号") |
||||
@TableField("number") |
||||
private String number; |
||||
|
||||
@ApiModelProperty(value = "服务号") |
||||
@TableField("servicenum") |
||||
private String servicenum; |
||||
|
||||
@ApiModelProperty(value = "仓库id") |
||||
@TableField("warehouse_id") |
||||
private Integer warehouseId; |
||||
|
||||
@ApiModelProperty(value = "货区id") |
||||
@TableField("cargo_id") |
||||
private Integer cargoId; |
||||
|
||||
@ApiModelProperty(value = "货架id") |
||||
@TableField("shelf_id") |
||||
private Integer shelfId; |
||||
|
||||
@ApiModelProperty(value = "货位id") |
||||
@TableField("location_id") |
||||
private String locationId; |
||||
|
||||
@ApiModelProperty(value = "订单来源") |
||||
@TableField("source") |
||||
private String source; |
||||
|
||||
@ApiModelProperty(value = "紧急程度:0=正常,1=加急") |
||||
@TableField("emergency") |
||||
private Integer emergency; |
||||
|
||||
@ApiModelProperty(value = "订单自编号") |
||||
@TableField("selfnumber") |
||||
private String selfnumber; |
||||
|
||||
@ApiModelProperty(value = "客户姓名") |
||||
@TableField("contact") |
||||
private String contact; |
||||
|
||||
@ApiModelProperty(value = "联系方式") |
||||
@TableField("phone") |
||||
private String phone; |
||||
|
||||
@ApiModelProperty(value = "收货地址") |
||||
@TableField("address") |
||||
private String address; |
||||
|
||||
@ApiModelProperty(value = "上门提货:0=否,1=是") |
||||
@TableField("door") |
||||
private Integer door; |
||||
|
||||
@ApiModelProperty(value = "总订单数量【未使用】") |
||||
@TableField("total") |
||||
private Integer total; |
||||
|
||||
@ApiModelProperty(value = "付款方式") |
||||
@TableField("payment") |
||||
private String payment; |
||||
|
||||
@ApiModelProperty(value = "入库状态") |
||||
@TableField("status") |
||||
private Integer status; |
||||
|
||||
@ApiModelProperty(value = "入库数量【未使用】") |
||||
@TableField("in_num") |
||||
private Integer inNum; |
||||
|
||||
@ApiModelProperty(value = "装车数量【未使用】") |
||||
@TableField("trans_num") |
||||
private Integer transNum; |
||||
|
||||
@ApiModelProperty(value = "分拣数量【未使用】") |
||||
@TableField("sorting") |
||||
private Integer sorting; |
||||
|
||||
@ApiModelProperty(value = "出库数量【未使用】") |
||||
@TableField("out_num") |
||||
private Integer outNum; |
||||
|
||||
@ApiModelProperty(value = "配送数量【未使用】") |
||||
@TableField("delive_num") |
||||
private Integer deliveNum; |
||||
|
||||
@ApiModelProperty(value = "签收数量【未使用】") |
||||
@TableField("sign_num") |
||||
private Integer signNum; |
||||
|
||||
@ApiModelProperty(value = "创建时间") |
||||
@TableField("create_time") |
||||
private Date createTime; |
||||
|
||||
@ApiModelProperty(value = "修改时间") |
||||
@TableField("update_time") |
||||
private Date updateTime; |
||||
|
||||
@ApiModelProperty(value = "删除时间") |
||||
@TableField("delete_time") |
||||
private Integer deleteTime; |
||||
|
||||
@ApiModelProperty(value = "创建人") |
||||
@TableField("administrators_id") |
||||
private Integer administratorsId; |
||||
|
||||
@ApiModelProperty(value = "是否异常") |
||||
@TableField("abnormal") |
||||
private Integer abnormal; |
||||
|
||||
@ApiModelProperty(value = "寄件人") |
||||
@TableField("sender") |
||||
private String sender; |
||||
|
||||
@ApiModelProperty(value = "寄件人电话") |
||||
@TableField("sender_tel") |
||||
private String senderTel; |
||||
|
||||
@ApiModelProperty(value = "寄件人地址") |
||||
@TableField("sender_address") |
||||
private String senderAddress; |
||||
|
||||
@ApiModelProperty(value = "上架状态:0未上架,1已上架,2部分上架,3已下架") |
||||
@TableField("on_shelf_type") |
||||
private Integer onShelfType; |
||||
|
||||
@ApiModelProperty(value = "旧id") |
||||
@TableField("old_id") |
||||
private Integer oldId; |
||||
|
||||
|
||||
} |
@ -0,0 +1,43 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.oldproject.feign; |
||||
|
||||
import com.logpm.oldproject.entity.OrderEntity; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 订单 Feign接口类 |
||||
* |
||||
* @author zhy |
||||
* @since 2023-06-24 |
||||
*/ |
||||
@FeignClient( |
||||
value = "logpm-old-project" |
||||
) |
||||
public interface IOrderClient { |
||||
|
||||
String API_PREFIX = "/client"; |
||||
|
||||
@GetMapping(API_PREFIX + "/getOrderByOrderSelfNum") |
||||
List<OrderEntity> getOrderByOrderSelfNum(@RequestParam String orderSelfNum); |
||||
|
||||
|
||||
} |
@ -0,0 +1,67 @@
|
||||
package com.logpm.oldproject.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class DistributionParcelListEntityVO { |
||||
|
||||
@ApiModelProperty(value = "仓库") |
||||
private String warehouse; |
||||
/** |
||||
* 状态 |
||||
*/ |
||||
@ApiModelProperty(value = "状态") |
||||
private Integer conditions; |
||||
/** |
||||
* 包条码 |
||||
*/ |
||||
@ApiModelProperty(value = "包条码") |
||||
private String packetBarCode; |
||||
/** |
||||
* 货位信息 |
||||
*/ |
||||
@ApiModelProperty(value = "货位信息") |
||||
private String goodsAllocation; |
||||
/** |
||||
* 所在托盘 |
||||
*/ |
||||
@ApiModelProperty(value = "所在托盘") |
||||
private String pallet; |
||||
/** |
||||
* 一级品 |
||||
*/ |
||||
@ApiModelProperty(value = "一级品") |
||||
private String firsts; |
||||
/** |
||||
* 二级品 |
||||
*/ |
||||
@ApiModelProperty(value = "二级品") |
||||
private String second; |
||||
/** |
||||
* 三级品 |
||||
*/ |
||||
@ApiModelProperty(value = "三级品") |
||||
private String thirdProduct; |
||||
/** |
||||
* 物料 |
||||
*/ |
||||
@ApiModelProperty(value = "物料") |
||||
private String material; |
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ApiModelProperty(value = "数量") |
||||
private Integer quantity; |
||||
/** |
||||
* 车次号 |
||||
*/ |
||||
@ApiModelProperty(value = "车次号") |
||||
private String trainNumber; |
||||
/** |
||||
* 在库订单ID |
||||
*/ |
||||
@ApiModelProperty(value = "在库订单ID") |
||||
private String stockArticleId; |
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.logpm.factory.comfac.constant; |
||||
|
||||
/** |
||||
* 工厂名称常量池 |
||||
* |
||||
* @author zhy |
||||
*/ |
||||
public class FactoryConstant { |
||||
|
||||
public static final String PIANO = "皮阿诺"; |
||||
public static final String MENGT = "梦天"; |
||||
|
||||
} |
@ -0,0 +1,149 @@
|
||||
package com.logpm.factory.comfac.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.logpm.factory.comfac.dto.OrderInfoDTO; |
||||
import com.logpm.factory.comfac.dto.OrderStatusDTO; |
||||
import com.logpm.factory.comfac.dto.ReceiveInfoDTO; |
||||
import com.logpm.factory.comfac.service.IFactoryCommonService; |
||||
import com.logpm.factory.comfac.service.IOrderStatusLogService; |
||||
import com.logpm.factory.snm.entity.OrderStatusLog; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.log4j.Log4j2; |
||||
import org.springblade.common.constant.RabbitConstant; |
||||
import org.springblade.common.exception.CustomerException; |
||||
import org.springblade.common.utils.CommonUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.amqp.rabbit.connection.CorrelationData; |
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
||||
import org.springframework.validation.annotation.Validated; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
@Log4j2 |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/factory/common") |
||||
@Api(value = "工厂通用数据", tags = "工厂通用接口") |
||||
public class FactoryCommonController { |
||||
|
||||
private final RabbitTemplate rabbitTemplate; |
||||
private final IOrderStatusLogService orderStatusLogService; |
||||
private final IFactoryCommonService factoryCommonService; |
||||
|
||||
@ResponseBody |
||||
@PostMapping("/sendOrders") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "订单数据推送", notes = "传入orderInfoDTO") |
||||
public R sendOrders(@Validated @RequestBody OrderInfoDTO orderInfoDTO) { |
||||
log.info("############sendOrders: 请求参数{}",orderInfoDTO); |
||||
try{ |
||||
|
||||
//先保存原始请求数据
|
||||
OrderStatusLog orderStatusLog = new OrderStatusLog(); |
||||
orderStatusLog.setArgs(JSONObject.toJSONString(orderInfoDTO)); |
||||
orderStatusLog.setStatus(1); |
||||
orderStatusLog.setType(1); |
||||
orderStatusLogService.save(orderStatusLog); |
||||
|
||||
Map<String,Object> map=new HashMap<>(); |
||||
map.put("messageId", CommonUtil.getUUID()); |
||||
map.put("logId", orderStatusLog.getId()); |
||||
map.put("messageData",orderInfoDTO); |
||||
map.put("createTime",new Date().getTime()); |
||||
//将消息携带绑定键值
|
||||
rabbitTemplate.convertAndSend(RabbitConstant.OPEN_ORDER_EXCHANGE, RabbitConstant.OPEN_ORDER_ROUTING, map,new CorrelationData(String.valueOf(orderStatusLog.getId()))); |
||||
|
||||
// R r = factoryDataService.handleData(orderInfoDTO);
|
||||
return R.success("调用成功"); |
||||
}catch (CustomerException e){ |
||||
log.error(e.message,e); |
||||
return R.fail(e.code,e.message); |
||||
}catch (Exception e){ |
||||
log.error("############sendOrders: 系统异常",e); |
||||
return R.fail(500,"############sendOrders: 系统异常"); |
||||
} |
||||
} |
||||
|
||||
|
||||
@ResponseBody |
||||
@PostMapping("/sendOrderStatus") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "订单状态推送", notes = "传入orderInfoDTO") |
||||
public R sendOrderStatus(@RequestBody OrderStatusDTO orderStatusDTO) { |
||||
log.info("############sendOrderStatus: 请求参数{}",orderStatusDTO); |
||||
try{ |
||||
|
||||
//先保存原始请求数据
|
||||
OrderStatusLog orderStatusLog = new OrderStatusLog(); |
||||
orderStatusLog.setArgs(JSONObject.toJSONString(orderStatusDTO)); |
||||
orderStatusLog.setStatus(1); |
||||
orderStatusLog.setType(2); |
||||
orderStatusLogService.save(orderStatusLog); |
||||
|
||||
Map<String,Object> map=new HashMap<>(); |
||||
map.put("messageId", CommonUtil.getUUID()); |
||||
map.put("logId", orderStatusLog.getId()); |
||||
map.put("type", "Push"); |
||||
map.put("messageData",orderStatusDTO); |
||||
map.put("createTime",new Date().getTime()); |
||||
//将消息携带绑定键值
|
||||
rabbitTemplate.convertAndSend(RabbitConstant.ORDER_STATUS_EXCHANGE, RabbitConstant.ORDER_STATUS_ROUTING, map); |
||||
map.put("type", "DealWith"); |
||||
rabbitTemplate.convertAndSend(RabbitConstant.DEAL_WITH_EXCHANGE, RabbitConstant.DEAL_WITH_ROUTING,map); |
||||
|
||||
|
||||
// R r = factoryDataService.handleStatusData(orderStatusDTO);
|
||||
return R.success("调用成功"); |
||||
}catch (CustomerException e){ |
||||
log.error(e.message,e); |
||||
return R.fail(e.code,e.message); |
||||
}catch (Exception e){ |
||||
log.error("############sendOrderStatus: 系统异常",e); |
||||
return R.fail(500,"############sendOrderStatus: 系统异常"); |
||||
} |
||||
} |
||||
|
||||
|
||||
@ResponseBody |
||||
@PostMapping("/sendReceiveInfo") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "订单状态推送", notes = "传入orderInfoDTO") |
||||
public R sendReceiveInfo(@RequestBody ReceiveInfoDTO receiveInfoDTO) { |
||||
log.info("############sendReceiveInfo: 请求参数{}", receiveInfoDTO); |
||||
//处理数据
|
||||
// R r = factoryCommonService.sendReceiveInfo(receiveInfoDTO);
|
||||
try{ |
||||
|
||||
//先保存原始请求数据
|
||||
OrderStatusLog orderStatusLog = new OrderStatusLog(); |
||||
orderStatusLog.setArgs(JSONObject.toJSONString(receiveInfoDTO)); |
||||
orderStatusLog.setStatus(1); |
||||
orderStatusLog.setType(4); |
||||
orderStatusLogService.save(orderStatusLog); |
||||
|
||||
Map<String,Object> map=new HashMap<>(); |
||||
map.put("messageId", CommonUtil.getUUID()); |
||||
map.put("logId", orderStatusLog.getId()); |
||||
map.put("messageData",receiveInfoDTO); |
||||
map.put("createTime",new Date().getTime()); |
||||
//将消息携带绑定键值
|
||||
rabbitTemplate.convertAndSend(RabbitConstant.RECEIVE_INFO_EXCHANGE, RabbitConstant.RECEIVE_INFO_ROUTING, map); |
||||
|
||||
return R.success("调用成功"); |
||||
}catch (CustomerException e){ |
||||
log.error(e.message,e); |
||||
return R.fail(e.code,e.message); |
||||
}catch (Exception e){ |
||||
log.error("############sendReceiveInfo: 系统异常",e); |
||||
return R.fail(500,"############sendReceiveInfo: 系统异常"); |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.dto; |
||||
package com.logpm.factory.comfac.dto; |
||||
|
||||
import com.logpm.factory.snm.entity.FactoryAccount; |
||||
import lombok.Data; |
@ -0,0 +1,19 @@
|
||||
package com.logpm.factory.comfac.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
@Data |
||||
public class ReceiveBodyDTO implements Serializable { |
||||
|
||||
private String produceOrderCode;//生产单号
|
||||
|
||||
private String orderCode;//订单自编码
|
||||
|
||||
private String unitNo;//包条码
|
||||
|
||||
private String operateDate;//签收时间
|
||||
|
||||
|
||||
} |
@ -0,0 +1,26 @@
|
||||
package com.logpm.factory.comfac.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class ReceiveInfoDTO implements Serializable { |
||||
|
||||
private String invoiceOrderCode;//发运单编号
|
||||
|
||||
private String sendTaskId;//送货任务ID
|
||||
|
||||
private String warehouse;//仓库
|
||||
|
||||
private String warehouseCode;//仓库编码
|
||||
|
||||
private String receiver;//收货人
|
||||
|
||||
private List<ReceiveBodyDTO> receiveBodyList = new ArrayList<>(); |
||||
|
||||
private List<ReceivePhotoDTO> receivePhotoList = new ArrayList<>(); |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.logpm.factory.comfac.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
@Data |
||||
public class ReceivePhotoDTO implements Serializable { |
||||
|
||||
private String url;//图片地址
|
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.factory.comfac.mapper.FactoryAccountMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">--> |
||||
<!-- <result column="id" property="id"/>--> |
||||
<!-- <result column="req_args" property="reqArgs"/>--> |
||||
<!-- <result column="res_body" property="resBody"/>--> |
||||
<!-- <result column="type" property="type"/>--> |
||||
<!-- <result column="create_user" property="createUser"/>--> |
||||
<!-- <result column="create_time" property="createTime"/>--> |
||||
<!-- <result column="update_user" property="updateUser"/>--> |
||||
<!-- <result column="update_time" property="updateTime"/>--> |
||||
<!-- <result column="status" property="status"/>--> |
||||
<!-- <result column="is_deleted" property="isDeleted"/>--> |
||||
<!-- <result column="create_dept" property="createDept"/>--> |
||||
<!-- </resultMap>--> |
||||
|
||||
</mapper> |
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.factory.snm.mapper.FactoryAccountMapper"> |
||||
<mapper namespace="com.logpm.factory.comfac.mapper.FactoryTokenMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">--> |
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.factory.snm.mapper.PanOrderStatusLogMapper"> |
||||
<mapper namespace="com.logpm.factory.comfac.mapper.OrderStatusLogMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">--> |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.service; |
||||
package com.logpm.factory.comfac.service; |
||||
|
||||
import com.logpm.factory.snm.entity.FactoryAccount; |
||||
import org.springblade.core.mp.base.BaseService; |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.service; |
||||
package com.logpm.factory.comfac.service; |
||||
|
||||
import com.logpm.factory.snm.vo.FactoryTokenVO; |
||||
|
@ -0,0 +1,6 @@
|
||||
package com.logpm.factory.comfac.service; |
||||
|
||||
|
||||
public interface IFactoryCommonService { |
||||
|
||||
} |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.service; |
||||
package com.logpm.factory.comfac.service; |
||||
|
||||
import com.logpm.factory.snm.entity.FactoryToken; |
||||
import org.springblade.core.mp.base.BaseService; |
@ -0,0 +1,8 @@
|
||||
package com.logpm.factory.comfac.service; |
||||
|
||||
import com.logpm.factory.snm.entity.OrderStatusLog; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
public interface IOrderStatusLogService extends BaseService<OrderStatusLog> { |
||||
|
||||
} |
@ -1,8 +1,8 @@
|
||||
package com.logpm.factory.snm.service.impl; |
||||
package com.logpm.factory.comfac.service.impl; |
||||
|
||||
import com.logpm.factory.snm.entity.FactoryAccount; |
||||
import com.logpm.factory.snm.mapper.FactoryAccountMapper; |
||||
import com.logpm.factory.snm.service.IFactoryAccountService; |
||||
import com.logpm.factory.comfac.mapper.FactoryAccountMapper; |
||||
import com.logpm.factory.comfac.service.IFactoryAccountService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
@ -1,12 +1,12 @@
|
||||
package com.logpm.factory.snm.service.impl; |
||||
package com.logpm.factory.comfac.service.impl; |
||||
|
||||
import com.alibaba.nacos.common.utils.MD5Utils; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.logpm.factory.snm.entity.FactoryAccount; |
||||
import com.logpm.factory.snm.entity.FactoryToken; |
||||
import com.logpm.factory.snm.service.IFactoryAccountService; |
||||
import com.logpm.factory.snm.service.IFactoryAuthService; |
||||
import com.logpm.factory.snm.service.IFactoryTokenService; |
||||
import com.logpm.factory.comfac.service.IFactoryAccountService; |
||||
import com.logpm.factory.comfac.service.IFactoryAuthService; |
||||
import com.logpm.factory.comfac.service.IFactoryTokenService; |
||||
import com.logpm.factory.snm.vo.FactoryTokenVO; |
||||
import lombok.AllArgsConstructor; |
||||
import org.slf4j.Logger; |
@ -0,0 +1,18 @@
|
||||
package com.logpm.factory.comfac.service.impl; |
||||
|
||||
|
||||
import com.logpm.factory.comfac.service.IFactoryCommonService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Slf4j |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class FactoryCommonServiceImpl implements IFactoryCommonService { |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -1,10 +1,10 @@
|
||||
package com.logpm.factory.snm.service.impl; |
||||
package com.logpm.factory.comfac.service.impl; |
||||
|
||||
import com.alibaba.nacos.common.utils.MD5Utils; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.logpm.factory.snm.entity.FactoryToken; |
||||
import com.logpm.factory.snm.mapper.FactoryTokenMapper; |
||||
import com.logpm.factory.snm.service.IFactoryTokenService; |
||||
import com.logpm.factory.comfac.mapper.FactoryTokenMapper; |
||||
import com.logpm.factory.comfac.service.IFactoryTokenService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
@ -0,0 +1,19 @@
|
||||
package com.logpm.factory.comfac.service.impl; |
||||
|
||||
import com.logpm.factory.snm.entity.OrderStatusLog; |
||||
import com.logpm.factory.comfac.mapper.OrderStatusLogMapper; |
||||
import com.logpm.factory.comfac.service.IOrderStatusLogService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@AllArgsConstructor |
||||
@Service |
||||
public class OrderStatusLogServiceImpl extends BaseServiceImpl<OrderStatusLogMapper, OrderStatusLog> implements IOrderStatusLogService { |
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(OrderStatusLogServiceImpl.class); |
||||
|
||||
|
||||
} |
@ -0,0 +1,27 @@
|
||||
package com.logpm.factory.comfac.utils; |
||||
|
||||
import java.io.ByteArrayOutputStream; |
||||
import java.io.IOException; |
||||
import java.io.InputStream; |
||||
import java.net.HttpURLConnection; |
||||
import java.net.URL; |
||||
|
||||
public class CommonUntis { |
||||
|
||||
public static byte[] imageUrlToByte(String url) throws IOException { |
||||
URL urlImg = new URL(url); |
||||
HttpURLConnection httpcon =(HttpURLConnection)urlImg.openConnection(); |
||||
httpcon.addRequestProperty("User-Agent","Mozilla / 4.76"); |
||||
InputStream is = httpcon.getInputStream(); |
||||
//定义字节数组大小
|
||||
byte[] buffer = new byte[1024]; |
||||
ByteArrayOutputStream swapStream = new ByteArrayOutputStream(); |
||||
int rc = 0; |
||||
while ((rc = is.read(buffer, 0, 100)) > 0) { |
||||
swapStream.write(buffer, 0, rc); |
||||
} |
||||
return buffer; |
||||
} |
||||
|
||||
|
||||
} |
@ -1,53 +1,179 @@
|
||||
package com.logpm.factory.config; |
||||
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Maps; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.common.constant.RabbitConstant; |
||||
import org.springframework.amqp.core.*; |
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory; |
||||
import org.springframework.amqp.rabbit.connection.CorrelationData; |
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
||||
import org.springframework.amqp.rabbit.retry.MessageRecoverer; |
||||
import org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* RabbitMQ配置,主要是配置队列,如果提前存在该队列,可以省略本配置类 |
||||
* |
||||
* @author yangkai.shen |
||||
*/ |
||||
//@Slf4j
|
||||
//@Configuration(proxyBeanMethods = false)
|
||||
@Slf4j |
||||
@Configuration |
||||
public class RabbitMqConfiguration { |
||||
|
||||
// @Bean
|
||||
// public RabbitTemplate rabbitTemplate() {
|
||||
// CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
|
||||
// connectionFactory.setPublisherConfirms(true);
|
||||
// connectionFactory.setPublisherReturns(true);
|
||||
// RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory);
|
||||
// rabbitTemplate.setMandatory(true);
|
||||
// rabbitTemplate.setConfirmCallback((correlationData, ack, cause) -> log.info("消息发送成功:correlationData({}),ack({}),cause({})", correlationData, ack, cause));
|
||||
// rabbitTemplate.setReturnCallback((message, replyCode, replyText, exchange, routingKey) -> log.info("消息丢失:exchange({}),route({}),replyCode({}),replyText({}),message:{}", exchange, routingKey, replyCode, replyText, message));
|
||||
// return rabbitTemplate;
|
||||
// }
|
||||
@Bean |
||||
public RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory){ |
||||
RabbitTemplate template = new RabbitTemplate(); |
||||
template.setConnectionFactory(connectionFactory); |
||||
template.setMandatory(true); |
||||
template.setConfirmCallback(new RabbitTemplate.ConfirmCallback() { |
||||
@Override |
||||
public void confirm(CorrelationData correlationData, boolean b, String s) { |
||||
System.out.println("确认回调-相关数据:"+correlationData); |
||||
System.out.println("确认回调-确认情况:"+b); |
||||
System.out.println("确认回调-原因:"+s); |
||||
// Long id = Long.parseLong(correlationData.getId());
|
||||
// UpdateWrapper<PanOrderStatusLog> updateWrapper = new UpdateWrapper<>();
|
||||
// if(b){
|
||||
// //修改处理日志为已处理
|
||||
// updateWrapper.set("status",0)
|
||||
// .eq("id",id);
|
||||
//
|
||||
// }else{
|
||||
// //修改处理日志为已处理
|
||||
// updateWrapper.set("status",2)
|
||||
// .eq("id",id);
|
||||
// }
|
||||
// panOrderStatusLogService.update(updateWrapper);
|
||||
} |
||||
}); |
||||
|
||||
template.setReturnsCallback(new RabbitTemplate.ReturnsCallback() { |
||||
@Override |
||||
public void returnedMessage(ReturnedMessage returnedMessage) { |
||||
System.out.println("返回回调-消息:"+returnedMessage.getMessage()); |
||||
System.out.println("返回回调-回应码:"+returnedMessage.getReplyCode()); |
||||
System.out.println("返回回调-回应信息:"+returnedMessage.getReplyText()); |
||||
System.out.println("返回回调-交换机:"+returnedMessage.getExchange()); |
||||
System.out.println("返回回调-路由键:"+returnedMessage.getRoutingKey()); |
||||
} |
||||
}); |
||||
return template; |
||||
} |
||||
|
||||
@Bean |
||||
public DirectExchange errorMessageExchange(){ |
||||
return new DirectExchange(RabbitConstant.ERROR_EXCHANGE); |
||||
} |
||||
@Bean |
||||
public Queue errorQueue(){ |
||||
return new Queue(RabbitConstant.ERROR_QUEUE, true); |
||||
} |
||||
@Bean |
||||
public Binding errorBinding(Queue errorQueue, DirectExchange errorMessageExchange){ |
||||
return BindingBuilder.bind(errorQueue).to(errorMessageExchange).with(RabbitConstant.ERROR_ROUTING); |
||||
} |
||||
|
||||
/** |
||||
* 消费失败队列 |
||||
* @param rabbitTemplate |
||||
* @return |
||||
*/ |
||||
@Bean |
||||
public MessageRecoverer republishMessageRecoverer(RabbitTemplate rabbitTemplate){ |
||||
return new RepublishMessageRecoverer(rabbitTemplate, RabbitConstant.ERROR_EXCHANGE, RabbitConstant.ERROR_ROUTING); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 延迟队列 |
||||
*/ |
||||
// @Bean
|
||||
// public Queue delayQueue() {
|
||||
// return new Queue(RabbitConstant.DIRECT_MODE_QUEUE_ONE, true);
|
||||
// }
|
||||
@Bean |
||||
public Queue orderStatusQueue() { |
||||
return new Queue(RabbitConstant.ORDER_STATUS_QUEUE, true); |
||||
} |
||||
|
||||
/** |
||||
* 延迟队列交换器, x-delayed-type 和 x-delayed-message 固定 |
||||
*/ |
||||
// @Bean
|
||||
// public CustomExchange delayExchange() {
|
||||
// Map<String, Object> args = Maps.newHashMap();
|
||||
// args.put("x-delayed-type", "direct");
|
||||
// return new CustomExchange("TestDirectExchange", "x-delayed-message", true, false, args);
|
||||
// }
|
||||
@Bean |
||||
public CustomExchange orderStatusExchange() { |
||||
Map<String, Object> args = Maps.newHashMap(); |
||||
args.put("x-delayed-type", "direct"); |
||||
return new CustomExchange(RabbitConstant.ORDER_STATUS_EXCHANGE, "x-delayed-message", true, false, args); |
||||
} |
||||
|
||||
/** |
||||
* 延迟队列绑定自定义交换器 |
||||
* |
||||
* @param delayQueue 队列 |
||||
* @param delayExchange 延迟交换器 |
||||
* @param orderStatusQueue 队列 |
||||
* @param orderStatusExchange 延迟交换器 |
||||
*/ |
||||
// @Bean
|
||||
// public Binding delayBinding(Queue delayQueue, CustomExchange delayExchange) {
|
||||
// return BindingBuilder.bind(delayQueue).to(delayExchange).with("TestDirectRouting").noargs();
|
||||
// }
|
||||
@Bean |
||||
public Binding orderStatusBinding(Queue orderStatusQueue, CustomExchange orderStatusExchange) { |
||||
return BindingBuilder.bind(orderStatusQueue).to(orderStatusExchange).with(RabbitConstant.ORDER_STATUS_ROUTING).noargs(); |
||||
} |
||||
|
||||
|
||||
@Bean |
||||
DirectExchange lonelyDirectExchange() { |
||||
return new DirectExchange("lonelyDirectExchange"); |
||||
} |
||||
|
||||
@Bean |
||||
public Queue openOrderQueue() { |
||||
return new Queue(RabbitConstant.OPEN_ORDER_QUEUE, true); |
||||
} |
||||
|
||||
@Bean |
||||
public CustomExchange openOrderExchange() { |
||||
Map<String, Object> args = Maps.newHashMap(); |
||||
args.put("x-delayed-type", "direct"); |
||||
return new CustomExchange(RabbitConstant.OPEN_ORDER_EXCHANGE, "x-delayed-message", true, false, args); |
||||
} |
||||
|
||||
@Bean |
||||
public Binding openOrderBinding(Queue openOrderQueue, CustomExchange openOrderExchange) { |
||||
return BindingBuilder.bind(openOrderQueue).to(openOrderExchange).with(RabbitConstant.OPEN_ORDER_ROUTING).noargs(); |
||||
} |
||||
|
||||
|
||||
@Bean |
||||
public Queue dealWithQueue() { |
||||
return new Queue(RabbitConstant.DEAL_WITH_QUEUE, true); |
||||
} |
||||
|
||||
@Bean |
||||
public CustomExchange dealWithExchange() { |
||||
Map<String, Object> args = Maps.newHashMap(); |
||||
args.put("x-delayed-type", "direct"); |
||||
return new CustomExchange(RabbitConstant.DEAL_WITH_EXCHANGE, "x-delayed-message", true, false, args); |
||||
} |
||||
|
||||
@Bean |
||||
public Binding dealWithBinding(Queue dealWithQueue, CustomExchange dealWithExchange) { |
||||
return BindingBuilder.bind(dealWithQueue).to(dealWithExchange).with(RabbitConstant.DEAL_WITH_ROUTING).noargs(); |
||||
} |
||||
|
||||
@Bean |
||||
public Queue receiveInfoQueue() { |
||||
return new Queue(RabbitConstant.RECEIVE_INFO_QUEUE, true); |
||||
} |
||||
|
||||
@Bean |
||||
public CustomExchange receiveInfoExchange() { |
||||
Map<String, Object> args = Maps.newHashMap(); |
||||
args.put("x-delayed-type", "direct"); |
||||
return new CustomExchange(RabbitConstant.RECEIVE_INFO_EXCHANGE, "x-delayed-message", true, false, args); |
||||
} |
||||
|
||||
@Bean |
||||
public Binding receiveInfoBinding(Queue receiveInfoQueue, CustomExchange receiveInfoExchange) { |
||||
return BindingBuilder.bind(receiveInfoQueue).to(receiveInfoExchange).with(RabbitConstant.RECEIVE_INFO_ROUTING).noargs(); |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
@ -0,0 +1,102 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.factory.mt.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.logpm.factory.comfac.service.IAsyncDataService; |
||||
import com.logpm.factory.comfac.service.IOrderStatusLogService; |
||||
import com.logpm.factory.mt.dto.MtFactoryDataDTO; |
||||
import com.logpm.factory.mt.service.IMtFactoryDataService; |
||||
import com.logpm.factory.snm.entity.OrderStatusLog; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.log4j.Log4j2; |
||||
import org.springblade.common.exception.CustomerException; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.validation.annotation.Validated; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
|
||||
/** |
||||
* 梦天数据 控制器 |
||||
* |
||||
* @author zhy |
||||
* @since 2023-06-06 |
||||
*/ |
||||
@Log4j2 |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/factory/mt") |
||||
@Api(value = "工厂数据", tags = "工厂数据接口") |
||||
public class MtFactoryDataController extends BladeController { |
||||
|
||||
private final IOrderStatusLogService orderStatusLogService; |
||||
private final IMtFactoryDataService mtFactoryDataService; |
||||
|
||||
private final IAsyncDataService asyncDataService; |
||||
/** |
||||
* 工厂数据推送接口 |
||||
*/ |
||||
@ResponseBody |
||||
@PostMapping("/data") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "通常数据推送", notes = "传入factoryOrderDTO") |
||||
public R data(@Validated @RequestBody MtFactoryDataDTO mtFactoryDataDTO, HttpServletRequest request) { |
||||
log.info("############data: "); |
||||
String corpId = request.getHeader("corpId"); |
||||
|
||||
//先保存原始请求数据
|
||||
OrderStatusLog orderStatusLog = new OrderStatusLog(); |
||||
orderStatusLog.setArgs(JSONObject.toJSONString(mtFactoryDataDTO)); |
||||
orderStatusLog.setStatus(1); |
||||
orderStatusLog.setType(3); |
||||
orderStatusLog.setBrand("梦天"); |
||||
orderStatusLogService.save(orderStatusLog); |
||||
|
||||
try{ |
||||
//数据存入数据库
|
||||
R r = mtFactoryDataService.dealWithData(mtFactoryDataDTO); |
||||
|
||||
int code = r.getCode(); |
||||
if(code == 200){ |
||||
orderStatusLog.setStatus(0); |
||||
//开启异步线程处理数据
|
||||
asyncDataService.handlerMtDataToHt(); |
||||
}else{ |
||||
orderStatusLog.setStatus(2); |
||||
} |
||||
orderStatusLogService.saveOrUpdate(orderStatusLog); |
||||
return r; |
||||
}catch (CustomerException e){ |
||||
orderStatusLog.setStatus(2); |
||||
orderStatusLogService.saveOrUpdate(orderStatusLog); |
||||
log.error("#################data: "+e.message); |
||||
return R.fail(e.code, e.message); |
||||
}catch (Exception e){ |
||||
orderStatusLog.setStatus(2); |
||||
orderStatusLogService.saveOrUpdate(orderStatusLog); |
||||
log.error("#################data: 保存数据失败",e); |
||||
return R.fail(405, "保存数据失败"); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.logpm.factory.mt.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrderMain; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MtFactoryDataDTO extends MtFactoryOrderMain { |
||||
|
||||
@JsonProperty("发货单明细") |
||||
private List<MtFactoryOrderDTO> orderList = new ArrayList<>(); |
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.logpm.factory.mt.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrder; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MtFactoryOrderDTO extends MtFactoryOrder { |
||||
|
||||
@JsonProperty("包装明细") |
||||
private List<MtPackageInfoDTO> packageInfos = new ArrayList<>(); |
||||
|
||||
} |
@ -0,0 +1,10 @@
|
||||
package com.logpm.factory.mt.dto; |
||||
|
||||
import com.logpm.factory.snm.entity.MtPackageInfo; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class MtPackageInfoDTO extends MtPackageInfo { |
||||
} |
@ -0,0 +1,7 @@
|
||||
package com.logpm.factory.mt.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrderMain; |
||||
|
||||
public interface MtFactoryOrderMainMapper extends BaseMapper<MtFactoryOrderMain> { |
||||
} |
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.factory.mt.mapper.MtFactoryOrderMainMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">--> |
||||
<!-- <result column="id" property="id"/>--> |
||||
<!-- <result column="req_args" property="reqArgs"/>--> |
||||
<!-- <result column="res_body" property="resBody"/>--> |
||||
<!-- <result column="type" property="type"/>--> |
||||
<!-- <result column="create_user" property="createUser"/>--> |
||||
<!-- <result column="create_time" property="createTime"/>--> |
||||
<!-- <result column="update_user" property="updateUser"/>--> |
||||
<!-- <result column="update_time" property="updateTime"/>--> |
||||
<!-- <result column="status" property="status"/>--> |
||||
<!-- <result column="is_deleted" property="isDeleted"/>--> |
||||
<!-- <result column="create_dept" property="createDept"/>--> |
||||
<!-- </resultMap>--> |
||||
|
||||
</mapper> |
@ -0,0 +1,7 @@
|
||||
package com.logpm.factory.mt.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrder; |
||||
|
||||
public interface MtFactoryOrderMapper extends BaseMapper<MtFactoryOrder> { |
||||
} |
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.factory.snm.mapper.FactoryTokenMapper"> |
||||
<mapper namespace="com.logpm.factory.mt.mapper.MtFactoryOrderMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">--> |
@ -0,0 +1,7 @@
|
||||
package com.logpm.factory.mt.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.logpm.factory.snm.entity.MtPackageInfo; |
||||
|
||||
public interface MtPackageInfoMapper extends BaseMapper<MtPackageInfo> { |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.logpm.factory.mt.service; |
||||
|
||||
import com.logpm.factory.comfac.dto.OrderInfoDTO; |
||||
import com.logpm.factory.comfac.dto.OrderStatusDTO; |
||||
import com.logpm.factory.comfac.dto.ReceiveInfoDTO; |
||||
import com.logpm.factory.mt.dto.MtFactoryDataDTO; |
||||
import org.springblade.core.tool.api.R; |
||||
|
||||
/** |
||||
* 工厂推送数据接口 |
||||
*/ |
||||
public interface IMtFactoryDataService { |
||||
|
||||
R dealWithData(MtFactoryDataDTO mtFactoryDataDTO); |
||||
|
||||
R handleData(OrderInfoDTO orderInfoDTO); |
||||
|
||||
R handleStatusData(OrderStatusDTO orderStatusDTO); |
||||
|
||||
R sendReceiveInfo(ReceiveInfoDTO receiveInfoDTO); |
||||
} |
@ -0,0 +1,8 @@
|
||||
package com.logpm.factory.mt.service; |
||||
|
||||
import com.logpm.factory.snm.entity.MtFactoryOrderMain; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
public interface IMtFactoryOrderMainService extends BaseService<MtFactoryOrderMain> { |
||||
|
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.logpm.factory.mt.service; |
||||
|
||||
import com.logpm.factory.snm.entity.MtFactoryOrder; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
public interface IMtFactoryOrderService extends BaseService<MtFactoryOrder> { |
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,7 @@
|
||||
package com.logpm.factory.mt.service; |
||||
|
||||
import com.logpm.factory.snm.entity.MtPackageInfo; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
public interface IMtPackageInfoService extends BaseService<MtPackageInfo> { |
||||
} |
@ -0,0 +1,283 @@
|
||||
package com.logpm.factory.mt.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.http.HttpRequest; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.alibaba.nacos.shaded.com.google.gson.Gson; |
||||
import com.alibaba.nacos.shaded.com.google.gson.GsonBuilder; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.logpm.factory.comfac.dto.OrderInfoDTO; |
||||
import com.logpm.factory.comfac.dto.OrderStatusDTO; |
||||
import com.logpm.factory.comfac.dto.ReceiveBodyDTO; |
||||
import com.logpm.factory.comfac.dto.ReceiveInfoDTO; |
||||
import com.logpm.factory.mt.dto.MtFactoryDataDTO; |
||||
import com.logpm.factory.mt.dto.MtFactoryOrderDTO; |
||||
import com.logpm.factory.mt.dto.MtPackageInfoDTO; |
||||
import com.logpm.factory.mt.service.IMtFactoryDataService; |
||||
import com.logpm.factory.mt.service.IMtFactoryOrderMainService; |
||||
import com.logpm.factory.mt.service.IMtFactoryOrderService; |
||||
import com.logpm.factory.mt.service.IMtPackageInfoService; |
||||
import com.logpm.factory.snm.bean.Resp; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrder; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrderMain; |
||||
import com.logpm.factory.snm.entity.MtPackageInfo; |
||||
import com.logpm.oldproject.feign.IAdvanceDetailClient; |
||||
import com.logpm.oldproject.feign.IWarehouseClient; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springblade.common.exception.CustomerException; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.*; |
||||
|
||||
@Slf4j |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class MtFactoryDataServiceImpl implements IMtFactoryDataService { |
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MtFactoryDataServiceImpl.class); |
||||
|
||||
private final IMtFactoryOrderMainService mtFactoryOrderMainService; |
||||
private final IMtFactoryOrderService mtFactoryOrderService; |
||||
private final IMtPackageInfoService mtPackageInfoService; |
||||
private final IAdvanceDetailClient advanceDetailClient; |
||||
private final IWarehouseClient warehouseClient; |
||||
|
||||
@Transactional |
||||
@Override |
||||
public R dealWithData(MtFactoryDataDTO mtFactoryDataDTO) { |
||||
log.info("#############dealWithData: 处理梦天工厂数据 开始"); |
||||
String invoiceOrderCode = mtFactoryDataDTO.getInvoiceOrderCode();//发货单编码
|
||||
//先判断该发货单编码是否已经存在
|
||||
QueryWrapper<MtFactoryOrderMain> queryWrapper = new QueryWrapper<>(); |
||||
queryWrapper.eq("invoice_order_code",invoiceOrderCode); |
||||
MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getOne(queryWrapper); |
||||
if(!Objects.isNull(mtFactoryOrderMain)){ |
||||
log.warn("#############dealWithData: 数据已存在 invoiceOrderCode={}",invoiceOrderCode); |
||||
return R.fail(405,"发货单已存在"); |
||||
} |
||||
mtFactoryOrderMain = new MtFactoryOrderMain(); |
||||
BeanUtil.copyProperties(mtFactoryDataDTO,mtFactoryOrderMain); |
||||
boolean saveMain = mtFactoryOrderMainService.save(mtFactoryOrderMain); |
||||
if(saveMain){ |
||||
Long mainId = mtFactoryOrderMain.getId();//发货单id
|
||||
List<MtFactoryOrderDTO> orderList = mtFactoryDataDTO.getOrderList();//所有订单数据
|
||||
for(MtFactoryOrderDTO mtFactoryOrderDTO:orderList){ |
||||
String orderCode = mtFactoryOrderDTO.getOrderCode(); |
||||
MtFactoryOrder mtFactoryOrder = new MtFactoryOrder(); |
||||
BeanUtil.copyProperties(mtFactoryOrderDTO,mtFactoryOrder); |
||||
mtFactoryOrder.setMainId(mainId); |
||||
boolean saveOrder = mtFactoryOrderService.save(mtFactoryOrder); |
||||
if(saveOrder){ |
||||
Long orderId = mtFactoryOrder.getId(); |
||||
List<MtPackageInfoDTO> packageInfos = mtFactoryOrderDTO.getPackageInfos(); |
||||
List<MtPackageInfo> list = new ArrayList<>(); |
||||
for(MtPackageInfoDTO mtPackageInfoDTO:packageInfos){ |
||||
MtPackageInfo mtPackageInfo = new MtPackageInfo(); |
||||
BeanUtil.copyProperties(mtPackageInfoDTO,mtPackageInfo); |
||||
mtPackageInfo.setOrderId(orderId); |
||||
list.add(mtPackageInfo); |
||||
} |
||||
//保存包件信息
|
||||
boolean b = mtPackageInfoService.saveBatch(list); |
||||
if(b){ |
||||
log.info("#############dealWithData: 保存数据成功"); |
||||
}else{ |
||||
log.warn("#############dealWithData: 保存数据失败 orderCode={}",orderCode); |
||||
throw new CustomerException(405,"保存数据失败"); |
||||
} |
||||
}else{ |
||||
log.warn("#############dealWithData: 保存订单失败 orderCode={}",orderCode); |
||||
throw new CustomerException(405,"保存订单失败"); |
||||
} |
||||
} |
||||
}else{ |
||||
log.warn("#############dealWithData: 保存发货单失败 invoiceOrderCode={}",invoiceOrderCode); |
||||
throw new CustomerException(405,"保存发货单失败"); |
||||
} |
||||
return R.success("接收成功"); |
||||
} |
||||
|
||||
@Override |
||||
public R handleData(OrderInfoDTO orderInfoDTO) { |
||||
String orderNo = orderInfoDTO.getOrderNo();//订单自编号
|
||||
|
||||
//根据客户订单号去查询WMS装车清单号
|
||||
QueryWrapper<MtFactoryOrder> queryWrapper = new QueryWrapper<>(); |
||||
queryWrapper.eq("order_code",orderNo); |
||||
MtFactoryOrder mtFactoryOrder = mtFactoryOrderService.getOne(queryWrapper); |
||||
if(Objects.isNull(mtFactoryOrder)){ |
||||
logger.info("#############handleData: 未找到订单数据 合同自编码orderNo={}",orderNo); |
||||
return R.fail(400,"未找到订单数据"); |
||||
} |
||||
|
||||
//TODO 组装数据
|
||||
|
||||
|
||||
//判断数据是都已存在
|
||||
if(!orderInfoDTO.verifyData()){ |
||||
logger.info("#############handleData: 数据不齐全 orderInfoDTO={}",orderInfoDTO); |
||||
return R.fail(405,"数据不齐全"); |
||||
} |
||||
|
||||
//拼接参数
|
||||
Map<String,Object> map = new HashMap<>(); |
||||
map.put("payload", JSONObject.toJSONString(orderInfoDTO)); |
||||
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create(); |
||||
String s = gson.toJson(map); |
||||
|
||||
//先获取token
|
||||
String panToken = "getPanToken()"; |
||||
|
||||
//请求参数
|
||||
logger.info("##############handleData: 推送包件状态请求参数 {}",s); |
||||
//处理逻辑
|
||||
String result = HttpRequest.post("URL"+"/hitf/v1/rest/invoke?namespace=HZERO&serverCode=OPEN&interfaceCode=HUITONG_MID_RECEIVE") |
||||
.header("Authorization","Bearer "+panToken) |
||||
.header("Content-Type","application/json") |
||||
.body(s).timeout(5 * 1000) |
||||
.execute().body(); |
||||
|
||||
logger.info("##############handleData: 推送包件状态返回参数 {}",result); |
||||
|
||||
//把结果字符串转为json对象
|
||||
JSONObject jsonObject = JSONObject.parseObject(result); |
||||
JSONObject payload = jsonObject.getJSONObject("payload"); |
||||
if(!Objects.isNull(payload)){ |
||||
Integer code = payload.getInteger("code"); |
||||
String message = payload.getString("data"); |
||||
if(code.equals(1)){ |
||||
logger.info("##########handleData: 物流状态传递成功"); |
||||
}else{ |
||||
return R.fail(405,message); |
||||
} |
||||
}else{ |
||||
return R.fail(405,"返回格式有误:"+result); |
||||
} |
||||
return Resp.success("SUCCESS"); |
||||
|
||||
} |
||||
|
||||
|
||||
@Override |
||||
public R handleStatusData(OrderStatusDTO orderStatusDTO) throws CustomerException { |
||||
|
||||
String status = orderStatusDTO.getStatus(); |
||||
String orderNo = orderStatusDTO.getOrderNo(); |
||||
if("1".equals(status)||"2".equals(status)||"3".equals(status)||"6".equals(status)||"7".equals(status)||"8".equals(status)||"9".equals(status)){ |
||||
logger.info("#############handleStatusData: 当前数据的状态不推送 status={}",status); |
||||
return Resp.fail(400,"当前数据的状态不推送"); |
||||
} |
||||
|
||||
//通过包件码查询是否是要推送的订单
|
||||
String unitNo = orderStatusDTO.getUnitNo();//包件码
|
||||
String currentWarehouse = orderStatusDTO.getCurrentWarehouse(); |
||||
QueryWrapper<MtPackageInfo> packageInfoQueryWrapper = new QueryWrapper<>(); |
||||
packageInfoQueryWrapper.eq("package_code",unitNo); |
||||
MtPackageInfo one = mtPackageInfoService.getOne(packageInfoQueryWrapper); |
||||
if(Objects.isNull(one)){ |
||||
logger.info("#############handleStatusData: 当前包条码未找到对应数据unitNo={}",unitNo); |
||||
return Resp.fail(400,"未找到包件数据"); |
||||
} |
||||
Long orderId = one.getOrderId(); |
||||
MtFactoryOrder mtFactoryOrder = mtFactoryOrderService.getById(orderId); |
||||
if(Objects.isNull(mtFactoryOrder)){ |
||||
logger.info("#############handleStatusData: 未找到对应订单orderId={}",orderId); |
||||
return Resp.fail(400,"未找到对应订单"); |
||||
} |
||||
Long mainId = mtFactoryOrder.getMainId(); |
||||
MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getById(mainId); |
||||
if(Objects.isNull(mtFactoryOrderMain)){ |
||||
logger.info("#############handleStatusData: 未找到对应订单mainId={}",mainId); |
||||
return Resp.fail(400,"未找到对应订单"); |
||||
} |
||||
|
||||
//根据仓库ID查询仓库名字
|
||||
currentWarehouse = warehouseClient.selectNameById(Integer.parseInt(currentWarehouse)); |
||||
|
||||
//拼接参数
|
||||
Map<String,Object> map = new HashMap<>(); |
||||
map.put("发运单编号", mtFactoryOrderMain.getInvoiceOrderCode()); |
||||
map.put("订单编号", orderNo); |
||||
map.put("包条码", unitNo); |
||||
map.put("操作时间", orderStatusDTO.getOperationTime()); |
||||
map.put("仓库", currentWarehouse); |
||||
map.put("生产单号", mtFactoryOrder.getProduceOrderCode()); |
||||
map.put("经销商名称", mtFactoryOrder.getDealerName()); |
||||
map.put("状态", orderStatusDTO.getStatus()); |
||||
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create(); |
||||
String s = gson.toJson(map); |
||||
|
||||
//先获取token
|
||||
String panToken = "getPanToken()"; |
||||
|
||||
//请求参数
|
||||
logger.info("##############handleStatusData: 推送包件状态请求参数 {}",s); |
||||
//处理逻辑
|
||||
String result = HttpRequest.post("URL"+"/hitf/v1/rest/invoke?namespace=HZERO&serverCode=OPEN&interfaceCode=HUITONG_RECEIVE") |
||||
.header("Authorization","Bearer "+panToken) |
||||
.header("Content-Type","application/json") |
||||
.body(s).timeout(5 * 1000) |
||||
.execute().body(); |
||||
|
||||
logger.info("##############handleStatusData: 推送包件状态返回参数 {}",result); |
||||
|
||||
//把结果字符串转为json对象
|
||||
JSONObject jsonObject = JSONObject.parseObject(result); |
||||
JSONObject payload = jsonObject.getJSONObject("payload"); |
||||
if(!Objects.isNull(payload)){ |
||||
Integer code = payload.getInteger("code"); |
||||
String message = payload.getString("data"); |
||||
if(code.equals(1)){ |
||||
logger.info("##########handleStatusData: 物流状态传递成功"); |
||||
}else{ |
||||
return Resp.fail(405,message); |
||||
} |
||||
}else{ |
||||
return Resp.fail(405,"返回格式有误:"+result); |
||||
} |
||||
return Resp.success("SUCCESS"); |
||||
} |
||||
|
||||
|
||||
|
||||
@Override |
||||
public R sendReceiveInfo(ReceiveInfoDTO receiveInfoDTO) { |
||||
log.info("###########sendReceiveInfo: 处理签收图片数据开始"); |
||||
List<ReceiveBodyDTO> receiveBodyList = receiveInfoDTO.getReceiveBodyList(); |
||||
Long mainId = null; |
||||
for(ReceiveBodyDTO receiveBodyDTO:receiveBodyList){ |
||||
String orderCode = receiveBodyDTO.getOrderCode();//订单自编号
|
||||
QueryWrapper<MtFactoryOrder> queryWrapper = new QueryWrapper<>(); |
||||
queryWrapper.eq("order_code",orderCode); |
||||
MtFactoryOrder one = mtFactoryOrderService.getOne(queryWrapper); |
||||
if(Objects.isNull(one)){ |
||||
log.warn("################sendReceiveInfo: 订单数据不存在 orderCode={}",orderCode); |
||||
return R.fail(400,"订单数据不存在"); |
||||
} |
||||
receiveBodyDTO.setProduceOrderCode(one.getProduceOrderCode()); |
||||
mainId = one.getMainId(); |
||||
} |
||||
MtFactoryOrderMain mtFactoryOrderMain = mtFactoryOrderMainService.getById(mainId); |
||||
if(Objects.isNull(mtFactoryOrderMain)){ |
||||
log.warn("################sendReceiveInfo: 主订单数据不存在 mainId={}",mainId); |
||||
return R.fail(400,"主订单数据不存在"); |
||||
} |
||||
receiveInfoDTO.setInvoiceOrderCode(mtFactoryOrderMain.getInvoiceOrderCode()); |
||||
receiveInfoDTO.setWarehouse(mtFactoryOrderMain.getCenterWarehouseName()); |
||||
receiveInfoDTO.setWarehouseCode(mtFactoryOrderMain.getCenterWarehouseCode()); |
||||
receiveInfoDTO.setReceiveBodyList(receiveBodyList); |
||||
|
||||
//拼装参数 ,推送数据到梦天
|
||||
|
||||
|
||||
return R.success("处理签收数据完成"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,15 @@
|
||||
package com.logpm.factory.mt.service.impl; |
||||
|
||||
import com.logpm.factory.snm.entity.MtFactoryOrderMain; |
||||
import com.logpm.factory.mt.mapper.MtFactoryOrderMainMapper; |
||||
import com.logpm.factory.mt.service.IMtFactoryOrderMainService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@AllArgsConstructor |
||||
@Service |
||||
public class MtFactoryOrderMainServiceImpl extends BaseServiceImpl<MtFactoryOrderMainMapper, MtFactoryOrderMain> implements IMtFactoryOrderMainService { |
||||
|
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.logpm.factory.mt.service.impl; |
||||
|
||||
import com.logpm.factory.mt.mapper.MtFactoryOrderMapper; |
||||
import com.logpm.factory.mt.service.IMtFactoryOrderService; |
||||
import com.logpm.factory.snm.entity.MtFactoryOrder; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@AllArgsConstructor |
||||
@Service |
||||
public class MtFactoryOrderServiceImpl extends BaseServiceImpl<MtFactoryOrderMapper, MtFactoryOrder> implements IMtFactoryOrderService { |
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.logpm.factory.mt.service.impl; |
||||
|
||||
import com.logpm.factory.mt.mapper.MtPackageInfoMapper; |
||||
import com.logpm.factory.mt.service.IMtPackageInfoService; |
||||
import com.logpm.factory.snm.entity.MtPackageInfo; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@AllArgsConstructor |
||||
@Service |
||||
public class MtPackageInfoServiceImpl extends BaseServiceImpl<MtPackageInfoMapper,MtPackageInfo> implements IMtPackageInfoService { |
||||
} |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.dto; |
||||
package com.logpm.factory.pan.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import com.logpm.factory.snm.entity.PanFactoryOrder; |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.dto; |
||||
package com.logpm.factory.pan.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import com.logpm.factory.snm.entity.PanPackageInfo; |
@ -1,4 +1,4 @@
|
||||
package com.logpm.factory.snm.dto; |
||||
package com.logpm.factory.pan.dto; |
||||
|
||||
import com.logpm.factory.snm.entity.PanPackageList; |
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.factory.snm.mapper.PanFactoryOrderMapper"> |
||||
<mapper namespace="com.logpm.factory.pan.mapper.PanFactoryOrderMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">--> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue