From 6455df842136951838e29d114ad2ce3081ef580f Mon Sep 17 00:00:00 2001 From: linfso Date: Tue, 16 Jul 2024 00:44:45 +0800 Subject: [PATCH] md --- .../erp/oms/web/Oms2cCommonController.java | 3 - .../oms/web/Oms2cTmsScanRecordController.java | 55 ++++++++++++ .../erp/oms/web/Oms2cWaybillController.java | 50 ++++++++++- .../erp/oms/domain/wms/WmsWarehouse.java | 84 +++++++++++++++++++ .../erp/oms/mapper/EmisWaybillMapper.java | 3 + .../erp/oms/service/IEmisWaybillService.java | 11 ++- .../service/impl/EmisWaybillServiceImpl.java | 17 ++++ .../oms/service/svc/IRpcTmsScanRecordSvc.java | 24 ++++++ .../erp/oms/service/svc/IRpcWaybillSvc.java | 11 ++- .../oms/service/svc/IRpcWmsWarehouseSvc.java | 20 +++++ .../resources/mapper/EmisWaybillMapper.xml | 29 +++++++ 11 files changed, 298 insertions(+), 9 deletions(-) create mode 100644 emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cTmsScanRecordController.java create mode 100644 emis-oms-biz/src/main/java/com/xdadan/erp/oms/domain/wms/WmsWarehouse.java create mode 100644 emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcTmsScanRecordSvc.java create mode 100644 emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWmsWarehouseSvc.java diff --git a/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cCommonController.java b/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cCommonController.java index a60e850..7d30ebb 100644 --- a/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cCommonController.java +++ b/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cCommonController.java @@ -43,9 +43,6 @@ public class Oms2cCommonController extends BaseController @Autowired private IRpcCommonSvc iRpcCommonSvc; -// public Oms2cCommonController(IRpcCommonSvc iRpcCommonSvc) { -// this.iRpcCommonSvc = iRpcCommonSvc; -// } /** * 获取电子面单单号 diff --git a/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cTmsScanRecordController.java b/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cTmsScanRecordController.java new file mode 100644 index 0000000..7c958e1 --- /dev/null +++ b/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cTmsScanRecordController.java @@ -0,0 +1,55 @@ + +/** + * @Project: emis + * @Title: EmisTmsScanRecordController.java + * @author linfso + * @date 2024-03-07 10:42:44 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

TMS扫描记录 控制器

+ */ + +package com.xdadan.erp.oms.web; + + +import com.xdadan.erp.oms.common.core.controller.BaseController; +import com.xdadan.erp.oms.common.core.domain.AjaxResult; +import com.xdadan.erp.oms.common.core.page.TableDataInfo; +import com.xdadan.erp.oms.domain.EmisTmsScanRecord; +import com.xdadan.erp.oms.service.svc.IRpcTmsScanRecordSvc; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.*; + +/** + * TMS扫描记录Controller + * + * @author linfso + * @date 2024-03-07 10:42:44 + */ +@Slf4j +@RestController +@RequestMapping("/oms2c/emisTmsScanRecord") +public class Oms2cTmsScanRecordController extends BaseController +{ + + @Autowired + IRpcTmsScanRecordSvc iRpcTmsScanRecordSvc; + /** + * 查询物流轨迹信息 + * @param trackingNo + * @return + */ + @GetMapping("/queryWaybillTraceInfo") + public AjaxResult queryWaybillTraceInfo(String trackingNo, String lang) + { + return iRpcTmsScanRecordSvc.queryWaybillTraceInfo(trackingNo,lang); + } + +} diff --git a/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cWaybillController.java b/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cWaybillController.java index 2766508..abfe325 100644 --- a/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cWaybillController.java +++ b/emis-oms-biz-web/src/main/java/com/xdadan/erp/oms/web/Oms2cWaybillController.java @@ -20,9 +20,11 @@ import com.xdadan.erp.oms.common.annotation.filter.jackson.JacksonFilter; import com.xdadan.erp.oms.common.utils.DateUtils; import com.xdadan.erp.oms.domain.exception.EmisBizError; import com.xdadan.erp.oms.domain.vo.*; +import com.xdadan.erp.oms.domain.wms.WmsWarehouse; import com.xdadan.erp.oms.service.*; import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc; import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc; +import com.xdadan.erp.oms.service.svc.IRpcWmsWarehouseSvc; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -55,9 +57,9 @@ public class Oms2cWaybillController extends BaseController @Autowired private IRpcWaybillSvc iRpcWaybillSvc; -// public Oms2cWaybillController(IRpcWaybillSvc iRpcWaybillSvc) { -// this.iRpcWaybillSvc = iRpcWaybillSvc; -// } + + @Autowired + private IRpcWmsWarehouseSvc iRpcWmsWarehouseSvc; /** @@ -165,4 +167,46 @@ public class Oms2cWaybillController extends BaseController } + /** + * 获取绑定业务员 + * @param searchValue + * @return + */ + @GetMapping("/listBindSalesmen") + public TableDataInfo listBindSalesmen(String searchValue) + { + startPage(); +// "empCode": "业务员编码", +// "empName": "业务员名称", +// "rate": "3", +// "avater": "http://123213", +// "phone":"联系电话", +// "ownerSiteCode":"所属网点编号", +// "ownerSiteName":"所属网点名称", + + List list = emisWaybillService.selectUserBindSalesmenList(searchValue); + return getDataTable(list); + } + + + @GetMapping("/listWmsWarehouse") + public AjaxResult listWmsWarehouse(@RequestBody WmsWarehouse wmsWarehouse,Integer pageNum,Integer pageSize) + { + return iRpcWmsWarehouseSvc.listWmsWarehouse(wmsWarehouse,pageNum,pageSize); + } + + + + /** + * 绑定业务员 + * @param empCode + * @return + */ + @PostMapping("/bindSalesmen") + public AjaxResult bindSalesmen(String empCode) + { + return AjaxResult.success(emisWaybillService.bindSalesmen(empCode)); + } + + } diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/domain/wms/WmsWarehouse.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/domain/wms/WmsWarehouse.java new file mode 100644 index 0000000..7da4009 --- /dev/null +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/domain/wms/WmsWarehouse.java @@ -0,0 +1,84 @@ +/** + * @Project: wms + * @Title: WmsWarehouse.java + * @author linfso + * @date 2023-05-09 10:35:25 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

仓库 实体类

+ */ + +package com.xdadan.erp.oms.domain.wms; + +import com.xdadan.erp.oms.common.core.domain.BaseEntity; +import lombok.Data; + + +/** + * @ClassName WmsWarehouse + * @Description 仓库 + * @author linfso + * @date 2023-05-09 10:35:25 + */ +@Data +public class WmsWarehouse extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /* 序号 */ + private Long id; + /* 仓库代码 */ + private String code; + /* 仓库名称 */ + private String name; + /* 接口类型 */ + private String intefaceType; + /* 仓库用途 */ + private String warehouseType; + /* 仓库规划属性 */ + private String warehouseProp; + /* 跨境类型 */ + private String bondedType; + /* 仓库归属类型 */ + private String ownType; + /* 联系人 */ + private String contact; + /* 电话 */ + private String tel; + /* 国家 */ + private String country; + /* 省 */ + private String province; + /* 市 */ + private String city; + /* 区 */ + private String district; + /* 地址 */ + private String address; + /* 邮编 */ + private String zip; + /* 发货公司 */ + private String sendCompany; + /* 发货人 */ + private String sendName; + /* 发货省 */ + private String sendProvince; + /* 发货市 */ + private String sendCity; + /* 发货区 */ + private String sendDistrict; + /* 发货电话 */ + private String sendTel; + /* 发货地址 */ + private String sendAddress; + /* 发货邮编 */ + private String sendZip; + /* 0-初始 1-正常 2-禁止 3-测试 */ + private Integer status; + /* 显示顺序 */ + private Integer orderNum; + /* 坐标 */ + private String coordinate; + /* 扩展参数 */ + private String extParam; +} diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/mapper/EmisWaybillMapper.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/mapper/EmisWaybillMapper.java index 68c23ad..0bb9254 100644 --- a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/mapper/EmisWaybillMapper.java +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/mapper/EmisWaybillMapper.java @@ -34,4 +34,7 @@ public interface EmisWaybillMapper extends BaseMapper */ public List selectUserOrderList(EmisWaybill emisWaybill); + public List selectUserBindSalesmenList(@Param("customerCode") String customerCode,@Param("searchValue")String searchValue); + + public int bindSalesmen(@Param("customerCode") String customerCode,@Param("empCode") String empCode); } diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/IEmisWaybillService.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/IEmisWaybillService.java index e2fb8ee..0853ba2 100644 --- a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/IEmisWaybillService.java +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/IEmisWaybillService.java @@ -10,10 +10,9 @@ package com.xdadan.erp.oms.service; import java.util.List; +import java.util.Map; import com.xdadan.erp.oms.domain.EmisWaybill; -import com.xdadan.erp.oms.domain.exception.EmisBizError; -import com.xdadan.erp.oms.domain.vo.WaybillOrder; /** * @ClassName EmisWaybillService @@ -31,4 +30,12 @@ public interface IEmisWaybillService */ public List selectUserOrderList(EmisWaybill emisWaybill); + public List selectUserBindSalesmenList(String searchValue); + + + public int bindSalesmen(String empCode); + + + + } diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/impl/EmisWaybillServiceImpl.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/impl/EmisWaybillServiceImpl.java index 548719d..2d29456 100644 --- a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/impl/EmisWaybillServiceImpl.java +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/impl/EmisWaybillServiceImpl.java @@ -65,6 +65,23 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService return list; } + /** + * 查询订单列表列表 + * + * @param searchValue 运单列表 + * @return 运单列表 + */ + @Override + public List selectUserBindSalesmenList(String searchValue) + { + return emisWaybillMapper.selectUserBindSalesmenList(SecurityUtils.getLoginUser().getUser().getCustomerCode(),searchValue); + } + + @Override + public int bindSalesmen(String empCode){ + return emisWaybillMapper.bindSalesmen(SecurityUtils.getLoginUser().getUser().getCustomerCode(),empCode); + } + } diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcTmsScanRecordSvc.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcTmsScanRecordSvc.java new file mode 100644 index 0000000..08eb47f --- /dev/null +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcTmsScanRecordSvc.java @@ -0,0 +1,24 @@ +package com.xdadan.erp.oms.service.svc; + + +import com.xdadan.erp.oms.common.core.domain.AjaxResult; +import com.xdadan.erp.oms.domain.EmisWaybill; +import com.xdadan.erp.oms.domain.vo.WaybillOrder; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +@FeignClient(name = "IRpcTmsScanRecordSvc",url = "${service.provider.url}",configuration = {FeignErrorDecoder.class}) +public interface IRpcTmsScanRecordSvc { + + /** + * 查询物流轨迹信息 + * @param trackingNo + * @return + */ + @GetMapping("/apiweb/queryWaybillTraceInfo") + public AjaxResult queryWaybillTraceInfo(@RequestParam("trackingNo")String trackingNo, @RequestParam("lang")String lang); + +} \ No newline at end of file diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWaybillSvc.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWaybillSvc.java index b767a2b..00d5106 100644 --- a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWaybillSvc.java +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWaybillSvc.java @@ -38,7 +38,7 @@ public interface IRpcWaybillSvc { * @param orderSn * @return */ - @PostMapping(value = "/apiweb/emisWaybill/getWaybillDetailByOms") + @GetMapping(value = "/apiweb/emisWaybill/getWaybillDetailByOms") public AjaxResult getWaybillDetailByOms(@RequestParam("billCode")String billCode,@RequestParam("orderSn") String orderSn); @@ -50,4 +50,13 @@ public interface IRpcWaybillSvc { @PostMapping(value = "/apiweb/emisWaybill/draftSubmitOrderByOms") public AjaxResult draftSubmitOrderByOms(@RequestBody EmisWaybill emisWaybillSave); + + @GetMapping(value = "/apiweb/emisWaybill/listBindSalesmenByOms") + public AjaxResult listBindSalesmenByOms(@RequestParam("customerCode")String customerCode, + @RequestParam("userId")Long userId, + @RequestParam("postCode")String postCode, + @RequestParam("empCode")String empCode, + @RequestParam("ownerSiteCode")String ownerSiteCode, + @RequestParam("searchValue")String searchValue); + } \ No newline at end of file diff --git a/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWmsWarehouseSvc.java b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWmsWarehouseSvc.java new file mode 100644 index 0000000..02f61be --- /dev/null +++ b/emis-oms-biz/src/main/java/com/xdadan/erp/oms/service/svc/IRpcWmsWarehouseSvc.java @@ -0,0 +1,20 @@ +package com.xdadan.erp.oms.service.svc; + + +import com.xdadan.erp.oms.common.core.domain.AjaxResult; +import com.xdadan.erp.oms.domain.EmisWaybill; +import com.xdadan.erp.oms.domain.vo.WaybillOrder; +import com.xdadan.erp.oms.domain.wms.WmsWarehouse; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +@FeignClient(name = "IRpcWmsWarehouseSvc",url = "${service.provider.url}",configuration = {FeignErrorDecoder.class}) +public interface IRpcWmsWarehouseSvc { + + @GetMapping("/apiweb/wmsWarehouse/listWmsWarehouse") + public AjaxResult listWmsWarehouse(@RequestBody WmsWarehouse wmsWarehouse,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize")Integer pageSize); + +} \ No newline at end of file diff --git a/emis-oms-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-oms-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 8b418a0..71c8327 100644 --- a/emis-oms-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-oms-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -538,5 +538,34 @@ + + + + begin + replace into sys_oms_user_bind_emp(customer_code,emp_code) values(#{customerCode}, #{empCode}); + update sys_oms_user_bind_emp set default_flag='0' where customer_code=#{customerCode}; + update sys_oms_user_bind_emp set default_flag='1' where customer_code=#{customerCode} and emp_code=#{empCode}; + end; + + \ No newline at end of file