md
This commit is contained in:
parent
385b02791d
commit
6455df8421
@ -43,9 +43,6 @@ public class Oms2cCommonController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRpcCommonSvc iRpcCommonSvc;
|
private IRpcCommonSvc iRpcCommonSvc;
|
||||||
|
|
||||||
// public Oms2cCommonController(IRpcCommonSvc iRpcCommonSvc) {
|
|
||||||
// this.iRpcCommonSvc = iRpcCommonSvc;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取电子面单单号
|
* 获取电子面单单号
|
||||||
|
|||||||
@ -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: <p> TMS扫描记录 控制器 </p>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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.common.utils.DateUtils;
|
||||||
import com.xdadan.erp.oms.domain.exception.EmisBizError;
|
import com.xdadan.erp.oms.domain.exception.EmisBizError;
|
||||||
import com.xdadan.erp.oms.domain.vo.*;
|
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.*;
|
||||||
import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc;
|
import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc;
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -55,9 +57,9 @@ public class Oms2cWaybillController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRpcWaybillSvc iRpcWaybillSvc;
|
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<Map> 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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: <p> 仓库 实体类 </p>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
@ -34,4 +34,7 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
|
|||||||
*/
|
*/
|
||||||
public List<EmisWaybill> selectUserOrderList(EmisWaybill emisWaybill);
|
public List<EmisWaybill> selectUserOrderList(EmisWaybill emisWaybill);
|
||||||
|
|
||||||
|
public List<Map> selectUserBindSalesmenList(@Param("customerCode") String customerCode,@Param("searchValue")String searchValue);
|
||||||
|
|
||||||
|
public int bindSalesmen(@Param("customerCode") String customerCode,@Param("empCode") String empCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,10 +10,9 @@
|
|||||||
package com.xdadan.erp.oms.service;
|
package com.xdadan.erp.oms.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.xdadan.erp.oms.domain.EmisWaybill;
|
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
|
* @ClassName EmisWaybillService
|
||||||
@ -31,4 +30,12 @@ public interface IEmisWaybillService
|
|||||||
*/
|
*/
|
||||||
public List<EmisWaybill> selectUserOrderList(EmisWaybill emisWaybill);
|
public List<EmisWaybill> selectUserOrderList(EmisWaybill emisWaybill);
|
||||||
|
|
||||||
|
public List<Map> selectUserBindSalesmenList(String searchValue);
|
||||||
|
|
||||||
|
|
||||||
|
public int bindSalesmen(String empCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,6 +65,23 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单列表列表
|
||||||
|
*
|
||||||
|
* @param searchValue 运单列表
|
||||||
|
* @return 运单列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
@ -38,7 +38,7 @@ public interface IRpcWaybillSvc {
|
|||||||
* @param orderSn
|
* @param orderSn
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/apiweb/emisWaybill/getWaybillDetailByOms")
|
@GetMapping(value = "/apiweb/emisWaybill/getWaybillDetailByOms")
|
||||||
public AjaxResult getWaybillDetailByOms(@RequestParam("billCode")String billCode,@RequestParam("orderSn") String orderSn);
|
public AjaxResult getWaybillDetailByOms(@RequestParam("billCode")String billCode,@RequestParam("orderSn") String orderSn);
|
||||||
|
|
||||||
|
|
||||||
@ -50,4 +50,13 @@ public interface IRpcWaybillSvc {
|
|||||||
@PostMapping(value = "/apiweb/emisWaybill/draftSubmitOrderByOms")
|
@PostMapping(value = "/apiweb/emisWaybill/draftSubmitOrderByOms")
|
||||||
public AjaxResult draftSubmitOrderByOms(@RequestBody EmisWaybill emisWaybillSave);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
@ -538,5 +538,34 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectUserBindSalesmenList" resultType="map">
|
||||||
|
SELECT
|
||||||
|
b.emp_code AS empCode,
|
||||||
|
b.emp_name AS empName,
|
||||||
|
b.extra_data AS rate,
|
||||||
|
b.avatar,
|
||||||
|
b.phonenumber AS phone,
|
||||||
|
b.owner_site_code AS ownerSiteCode,
|
||||||
|
'' AS ownerSiteName,
|
||||||
|
a.default_flag as defaultFlag
|
||||||
|
FROM
|
||||||
|
sys_oms_user_bind_emp a,
|
||||||
|
sys_user b
|
||||||
|
WHERE
|
||||||
|
a.emp_code = b.emp_code
|
||||||
|
AND a.customer_code = #{customerCode}
|
||||||
|
<if test="searchValue != null and searchValue != ''">
|
||||||
|
and b.emp_name like concat('%', #{searchValue}, '%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="bindSalesmen" parameterType="String" >
|
||||||
|
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;
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user