Browse Source

1.新增梦天工厂对接数据接口

dev-warehouse
zhenghaoyu 2 years ago
parent
commit
1e5c695840
  1. 81
      blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/MtFactoryOrder.java
  2. 57
      blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/MtFactoryOrderMain.java
  3. 54
      blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/MtPackageInfo.java
  4. 8
      blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/OrderStatusLog.java
  5. 124
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java
  6. 18
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtFactoryDataDTO.java
  7. 18
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtFactoryOrderDTO.java
  8. 10
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtPackageInfoDTO.java
  9. 6
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/controller/PanFactoryDataController.java
  10. 7
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/MtFactoryOrderMainMapper.java
  11. 20
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/MtFactoryOrderMainMapper.xml
  12. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/OrderStatusLogMapper.java
  13. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/OrderStatusLogMapper.xml
  14. 12
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IMtFactoryDataService.java
  15. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IMtFactoryOrderMainService.java
  16. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IOrderStatusLogService.java
  17. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IPanOrderStatusLogService.java
  18. 39
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/MtFactoryDataServiceImpl.java
  19. 15
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/MtFactoryOrderMainServiceImpl.java
  20. 19
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderStatusLogServiceImpl.java
  21. 10
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanFactoryDataServiceImpl.java
  22. 19
      blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanOrderStatusLogServiceImpl.java

81
blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/MtFactoryOrder.java

@ -0,0 +1,81 @@
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;
}

57
blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/MtFactoryOrderMain.java

@ -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;
}

54
blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/MtPackageInfo.java

@ -0,0 +1,54 @@
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;
}

8
blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/PanOrderStatusLog.java → blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/snm/entity/OrderStatusLog.java

@ -7,13 +7,15 @@ import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
@Data
@TableName("pan_order_status_log")
@ApiModel(value = "PanOrderStatusLog对象", description = "皮艾诺订单状态日志")
@TableName("order_status_log")
@ApiModel(value = "OrderStatusLog对象", description = "工厂订单状态日志")
@EqualsAndHashCode(callSuper = true)
public class PanOrderStatusLog extends BaseEntity {
public class OrderStatusLog extends BaseEntity {
private String args;
private Integer type;
private String brand;//品牌
}

124
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java

@ -0,0 +1,124 @@
/*
* 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.mt.dto.MtFactoryDataDTO;
import com.logpm.factory.snm.bean.Resp;
import com.logpm.factory.snm.entity.OrderStatusLog;
import com.logpm.factory.snm.service.IMtFactoryDataService;
import com.logpm.factory.snm.service.IOrderStatusLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
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;
/**
* 工厂数据推送接口
*/
@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);
//数据存入数据库
boolean flag = mtFactoryDataService.dealWithData(mtFactoryDataDTO);
// //判断数据是否已存入
// 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();
// BeanUtil.copyProperties(factoryOrderDTO,factoryOrder);
// factoryOrder.setCorpid(corpId);
// //保存订单数据
// factoryOrderService.save(factoryOrder);
//
// List<PanPackageInfoDTO> packageInfos = factoryOrderDTO.getORDER_ATTRIBUTES();
//
// for (PanPackageInfoDTO dto:packageInfos){
// PanPackageInfo packageInfo = new PanPackageInfo();
// BeanUtil.copyProperties(dto,packageInfo);
// packageInfo.setOrderId(factoryOrder.getId());
// //保存包件信息数据
// //因为需要先保存包件明细需要包件的id
// packageInfoService.save(packageInfo);
//
// //再存入包件明细
// List<PanPackageList> PanPackagelist = new ArrayList<>();
// List<PanPackageListDTO> order_attributes_line = dto.getORDER_ATTRIBUTES_LINE();
// for (PanPackageListDTO panPackageListDTO:order_attributes_line){
// PanPackageList panPackageList = new PanPackageList();
// BeanUtil.copyProperties(panPackageListDTO,panPackageList);
// panPackageList.setPackageId(packageInfo.getId());
// PanPackagelist.add(panPackageList);
// }
// packageListService.saveBatch(PanPackagelist);
// }
//
// //修改保存数据的状态
// panOrderStatusLog.setStatus(0);
// panOrderStatusLogService.saveOrUpdate(panOrderStatusLog);
//
// //开启异步线程处理数据
// syncDataService.handlerPanDataToHt();
return Resp.fail(400,"fail");
}
}

18
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtFactoryDataDTO.java

@ -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<>();
}

18
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtFactoryOrderDTO.java

@ -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<>();
}

10
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/dto/MtPackageInfoDTO.java

@ -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 {
}

6
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/controller/PanFactoryDataController.java

@ -23,7 +23,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.factory.snm.bean.Resp;
import com.logpm.factory.snm.dto.*;
import com.logpm.factory.snm.entity.PanFactoryOrder;
import com.logpm.factory.snm.entity.PanOrderStatusLog;
import com.logpm.factory.snm.entity.OrderStatusLog;
import com.logpm.factory.snm.entity.PanPackageInfo;
import com.logpm.factory.snm.entity.PanPackageList;
import com.logpm.factory.snm.service.*;
@ -60,7 +60,7 @@ public class PanFactoryDataController extends BladeController {
private final IPanPackageListService packageListService;
private final IPanFactoryDataService factoryDataService;
private final IAsyncDataService syncDataService;
private final IPanOrderStatusLogService panOrderStatusLogService;
private final IOrderStatusLogService panOrderStatusLogService;
// @ResponseBody
// @PostMapping("/token")
@ -102,7 +102,7 @@ public class PanFactoryDataController extends BladeController {
String corpId = request.getHeader("corpId");
//先保存原始请求数据
PanOrderStatusLog panOrderStatusLog = new PanOrderStatusLog();
OrderStatusLog panOrderStatusLog = new OrderStatusLog();
panOrderStatusLog.setArgs(JSONObject.toJSONString(factoryOrderDTO));
panOrderStatusLog.setStatus(1);
panOrderStatusLog.setType(3);

7
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/MtFactoryOrderMainMapper.java

@ -0,0 +1,7 @@
package com.logpm.factory.snm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.factory.snm.entity.MtFactoryOrderMain;
public interface MtFactoryOrderMainMapper extends BaseMapper<MtFactoryOrderMain> {
}

20
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/MtFactoryOrderMainMapper.xml

@ -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.snm.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>

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/PanOrderStatusLogMapper.java → blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/OrderStatusLogMapper.java

@ -17,7 +17,7 @@
package com.logpm.factory.snm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.factory.snm.entity.PanOrderStatusLog;
import com.logpm.factory.snm.entity.OrderStatusLog;
/**
* 工厂推送数据接口日志 Mapper 接口
@ -25,7 +25,7 @@ import com.logpm.factory.snm.entity.PanOrderStatusLog;
* @author zhy
* @since 2023-03-28
*/
public interface PanOrderStatusLogMapper extends BaseMapper<PanOrderStatusLog> {
public interface OrderStatusLogMapper extends BaseMapper<OrderStatusLog> {
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/PanOrderStatusLogMapper.xml → blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/mapper/OrderStatusLogMapper.xml

@ -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.snm.mapper.OrderStatusLogMapper">
<!-- 通用查询映射结果 -->
<!-- <resultMap id="orderLogResultMap" type="com.logpm.factory.snm.entity.FactoryOrder">-->

12
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IMtFactoryDataService.java

@ -0,0 +1,12 @@
package com.logpm.factory.snm.service;
import com.logpm.factory.mt.dto.MtFactoryDataDTO;
/**
* 工厂推送数据接口
*/
public interface IMtFactoryDataService {
boolean dealWithData(MtFactoryDataDTO mtFactoryDataDTO);
}

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IMtFactoryOrderMainService.java

@ -0,0 +1,8 @@
package com.logpm.factory.snm.service;
import com.logpm.factory.snm.entity.MtFactoryOrderMain;
import org.springblade.core.mp.base.BaseService;
public interface IMtFactoryOrderMainService extends BaseService<MtFactoryOrderMain> {
}

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IOrderStatusLogService.java

@ -0,0 +1,8 @@
package com.logpm.factory.snm.service;
import com.logpm.factory.snm.entity.OrderStatusLog;
import org.springblade.core.mp.base.BaseService;
public interface IOrderStatusLogService extends BaseService<OrderStatusLog> {
}

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/IPanOrderStatusLogService.java

@ -1,8 +0,0 @@
package com.logpm.factory.snm.service;
import com.logpm.factory.snm.entity.PanOrderStatusLog;
import org.springblade.core.mp.base.BaseService;
public interface IPanOrderStatusLogService extends BaseService<PanOrderStatusLog> {
}

39
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/MtFactoryDataServiceImpl.java

@ -0,0 +1,39 @@
package com.logpm.factory.snm.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.factory.mt.dto.MtFactoryDataDTO;
import com.logpm.factory.snm.entity.MtFactoryOrderMain;
import com.logpm.factory.snm.service.IMtFactoryDataService;
import com.logpm.factory.snm.service.IMtFactoryOrderMainService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Objects;
@Slf4j
@Service
@AllArgsConstructor
public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
private final IMtFactoryOrderMainService mtFactoryOrderMainService;
@Transactional
@Override
public boolean 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)){
}
return false;
}
}

15
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/MtFactoryOrderMainServiceImpl.java

@ -0,0 +1,15 @@
package com.logpm.factory.snm.service.impl;
import com.logpm.factory.snm.entity.MtFactoryOrderMain;
import com.logpm.factory.snm.mapper.MtFactoryOrderMainMapper;
import com.logpm.factory.snm.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 {
}

19
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderStatusLogServiceImpl.java

@ -0,0 +1,19 @@
package com.logpm.factory.snm.service.impl;
import com.logpm.factory.snm.entity.OrderStatusLog;
import com.logpm.factory.snm.mapper.OrderStatusLogMapper;
import com.logpm.factory.snm.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);
}

10
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanFactoryDataServiceImpl.java

@ -10,11 +10,11 @@ import com.logpm.factory.snm.bean.Resp;
import com.logpm.factory.snm.dto.OrderInfoDTO;
import com.logpm.factory.snm.dto.OrderStatusDTO;
import com.logpm.factory.snm.entity.PanFactoryOrder;
import com.logpm.factory.snm.entity.PanOrderStatusLog;
import com.logpm.factory.snm.entity.OrderStatusLog;
import com.logpm.factory.snm.entity.PanPackageInfo;
import com.logpm.factory.snm.service.IPanFactoryDataService;
import com.logpm.factory.snm.service.IPanFactoryOrderService;
import com.logpm.factory.snm.service.IPanOrderStatusLogService;
import com.logpm.factory.snm.service.IOrderStatusLogService;
import com.logpm.factory.snm.service.IPanPackageInfoService;
import com.logpm.oldproject.feign.IAdvanceDetailClient;
import com.logpm.oldproject.feign.IWarehouseClient;
@ -42,7 +42,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
private final IPanFactoryOrderService factoryOrderService;
private final PanFactoryProperties panFactoryProperties;
private final IPanOrderStatusLogService panOrderStatusLogService;
private final IOrderStatusLogService panOrderStatusLogService;
private final IPanPackageInfoService panPackageInfoService;
private final IPanFactoryOrderService panFactoryOrderService;
private final IAdvanceDetailClient advanceDetailClient;
@ -96,7 +96,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
public R handleData(OrderInfoDTO orderInfoDTO) throws CustomerException {
//先保存原始请求数据
PanOrderStatusLog panOrderStatusLog = new PanOrderStatusLog();
OrderStatusLog panOrderStatusLog = new OrderStatusLog();
panOrderStatusLog.setArgs(JSONObject.toJSONString(orderInfoDTO));
panOrderStatusLog.setStatus(1);
panOrderStatusLog.setType(1);
@ -167,7 +167,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
public R handleStatusData(OrderStatusDTO orderStatusDTO) throws CustomerException {
//先保存原始请求数据
PanOrderStatusLog panOrderStatusLog = new PanOrderStatusLog();
OrderStatusLog panOrderStatusLog = new OrderStatusLog();
panOrderStatusLog.setArgs(JSONObject.toJSONString(orderStatusDTO));
panOrderStatusLog.setStatus(1);
panOrderStatusLog.setType(2);

19
blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/PanOrderStatusLogServiceImpl.java

@ -1,19 +0,0 @@
package com.logpm.factory.snm.service.impl;
import com.logpm.factory.snm.entity.PanOrderStatusLog;
import com.logpm.factory.snm.mapper.PanOrderStatusLogMapper;
import com.logpm.factory.snm.service.IPanOrderStatusLogService;
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 PanOrderStatusLogServiceImpl extends BaseServiceImpl<PanOrderStatusLogMapper, PanOrderStatusLog> implements IPanOrderStatusLogService {
private static final Logger logger = LoggerFactory.getLogger(PanOrderStatusLogServiceImpl.class);
}
Loading…
Cancel
Save