Browse Source

Merge branch 'dev' into test

test
zhenghaoyu 2 years ago
parent
commit
0078e16aba
  1. 9
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  2. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  3. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  4. 6
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceDetailClient.java
  5. 7
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/vo/DistributionParcelListEntityVO.java
  6. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  7. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  8. 48
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java
  9. 42
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  10. 23
      blade-service/logpm-factory/src/main/java/com/logpm/factory/props/MtFactoryProperties.java
  11. 6
      blade-service/logpm-factory/src/main/resources/application-dev.yml
  12. 26
      blade-service/logpm-factory/src/main/resources/application-prod.yml
  13. 28
      blade-service/logpm-factory/src/main/resources/application-test.yml
  14. 49
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java
  15. 60
      blade-service/logpm-factory/src/test/java/com/logpm/factory/launch/FactoryLauncherServiceImpl.java
  16. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceDetailClient.java
  17. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.java
  18. 35
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml
  19. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceDetailService.java
  20. 4
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceDetailServiceImpl.java

9
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -17,10 +17,9 @@
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@ -81,6 +80,12 @@ public class DistributionParcelListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "包条码")
private String packetBarCode;
@ApiModelProperty(value = "货区信息")
private String cargoTitle;
@ApiModelProperty(value = "货架信息")
private String shelfTitle;
/**
* 货位信息
*/

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -17,7 +17,6 @@
package com.logpm.distribution.feign;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@ -56,4 +55,7 @@ public interface IDistributionParcelListClient {
@PostMapping(API_PREFIX+"/addBatch")
boolean addBatch(@RequestBody List<DistributionParcelListEntity> parcelListEntityList);
@PostMapping(API_PREFIX+"/add")
boolean add(@RequestBody DistributionParcelListEntity entity);
}

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java

@ -53,4 +53,7 @@ public interface IDistributionStockArticleClient {
@GetMapping(API_PREFIX + "/findByAdvanceId")
DistributionStockArticleEntity findByAdvanceId(@RequestParam Integer advanceId);
@PostMapping(API_PREFIX + "/saveOrUpdate")
void saveOrUpdate(DistributionStockArticleEntity distributionStockArticleEntity);
}

6
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceDetailClient.java

@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
@ -72,8 +71,7 @@ public interface IAdvanceDetailClient {
@GetMapping(API_PREFIX + "/getOneByUnitNo")
AdvanceDetailEntity getOneByUnitNo(@RequestParam String unitNo);
@GetMapping(API_PREFIX + "/getListByOrderSelfNum")
List<DistributionParcelListEntityVO> getListByOrderSelfNum(@RequestParam String orderSelfNum);
@GetMapping(API_PREFIX + "/getByUnitNo")
DistributionParcelListEntityVO getByUnitNo(@RequestParam String unitNo);
void getOneByUnitNo();
}

7
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/vo/DistributionParcelListEntityVO.java

@ -18,6 +18,13 @@ public class DistributionParcelListEntityVO {
*/
@ApiModelProperty(value = "包条码")
private String packetBarCode;
@ApiModelProperty(value = "货区信息")
private String cargoTitle;
@ApiModelProperty(value = "货架信息")
private String shelfTitle;
/**
* 货位信息
*/

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -68,4 +68,10 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
return distributionParcelListService.saveBatch(parcelListEntityList);
}
@Override
@PostMapping(API_PREFIX+"/add")
public boolean add(DistributionParcelListEntity entity) {
return distributionParcelListService.save(entity);
}
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -71,4 +71,10 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
return distributionStockArticleService.getOne(queryWrapper);
}
@Override
@PostMapping(API_PREFIX + "/saveOrUpdate")
public void saveOrUpdate(DistributionStockArticleEntity distributionStockArticleEntity) {
distributionStockArticleService.saveOrUpdate(distributionStockArticleEntity);
}
}

48
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java

@ -2,6 +2,7 @@ package com.logpm.factory.mt.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.alibaba.nacos.shaded.com.google.gson.GsonBuilder;
@ -17,6 +18,7 @@ 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.props.MtFactoryProperties;
import com.logpm.factory.snm.bean.Resp;
import com.logpm.factory.snm.entity.MtFactoryOrder;
import com.logpm.factory.snm.entity.MtFactoryOrderMain;
@ -28,9 +30,12 @@ import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.util.*;
@ -47,6 +52,10 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
private final IAdvanceDetailClient advanceDetailClient;
private final IWarehouseClient warehouseClient;
private final BladeRedis bladeRedis;
private final MtFactoryProperties mtFactoryProperties;
@Transactional
@Override
public R dealWithData(MtFactoryDataDTO mtFactoryDataDTO) {
@ -151,7 +160,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
String s = gson.toJson(map);
//先获取token
String panToken = "getPanToken()";
String panToken = getMtToken();
//请求参数
logger.info("##############handleData: 推送包件状态请求参数 {}",s);
@ -180,6 +189,43 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
}
return Resp.success("SUCCESS");
}
/**
* 获取梦天的工厂的数据token
* @return
*/
public String getMtToken() {
String mtToken =bladeRedis.get("mt_token");
if(StringUtil.isBlank(mtToken)){
// 重新获取
JSONObject jsonObject1 =new JSONObject();
jsonObject1.put("APPKEY",mtFactoryProperties.getAppkey());
jsonObject1.put("APPSECRET",mtFactoryProperties.getAppsecret());
jsonObject1.put("USERID",mtFactoryProperties.getUserid());
jsonObject1.put("USERPWD",mtFactoryProperties.getUserpwd());
String result = HttpRequest.post(mtFactoryProperties.getUrl())
.header("Content-Type","application/json").body(jsonObject1.toJSONString()).timeout(5 * 1000)
.execute()
.body();
logger.info("##############getMengtianToken: 获取梦天token返回参数 {}",result);
//获取的结果转成json对象
JSONObject jsonObject = JSONObject.parseObject(result);
logger.info("##############getMengtianToken: 获取梦天token返回参数 {}",result);
String access_token = jsonObject.getString("Data");
if(StringUtil.hasLength(access_token)){
mtToken= access_token;
// 加入redis
bladeRedis.setEx("mt_token",mtToken,25*60L);
}else{
throw new CustomerException(402,"获取梦天token失败");
}
}
return mtToken;
}

42
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -36,6 +36,7 @@ import com.logpm.oldproject.feign.IAdvanceClient;
import com.logpm.oldproject.feign.IAdvanceDetailClient;
import com.logpm.oldproject.feign.IOrderClient;
import com.logpm.oldproject.feign.IWarehouseClient;
import com.logpm.oldproject.vo.DistributionParcelListEntityVO;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -322,6 +323,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
//判断新系统是否有这条订单数据
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByAdvanceId(advanceId);
Long id = null;
if(Objects.isNull(distributionStockArticleEntity)){
Date date = CommonUtil.StringToDate(operationTime);
@ -334,7 +336,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setTotalNumber(advanceEntity.getTotal());
distributionStockArticleEntity.setHandQuantity(0);
distributionStockArticleEntity.setCompleteSet(1);//TODO
distributionStockArticleEntity.setCompleteSet(1);
distributionStockArticleEntity.setBrand(advanceEntity.getType());
String customerName = advanceEntity.getCustomerName();//客户名称
@ -353,29 +355,27 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
distributionStockArticleEntity.setGenre(1);
distributionStockArticleEntity.setState(2);
distributionStockArticleEntity.setAdvanceId(advanceId);
}
Long id = distributionStockArticleClient.addData(distributionStockArticleEntity);
if(id == 0){
logger.warn("#################handleDataToPlatform: 保存订单信息失败 orderSelfNum={}",orderSelfNum);
throw new CustomerException(405,"保存订单信息失败");
id = distributionStockArticleClient.addData(distributionStockArticleEntity);
if(id == 0){
logger.warn("#################handleDataToPlatform: 保存订单信息失败 orderSelfNum={}",orderSelfNum);
throw new CustomerException(405,"保存订单信息失败");
}
}else{
id = distributionStockArticleEntity.getId();
}
//存入包件明细
//查询包件信息数据
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo);
DistributionParcelListEntity entity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vo,entity);
// List<DistributionParcelListEntity> parcelListEntityList = new ArrayList<>();
// for (DistributionParcelListEntityVO vo:detailList){
// DistributionParcelListEntity entity = new DistributionParcelListEntity();
// BeanUtil.copyProperties(vo,entity);
// entity.setStockArticleId(id+"");
// parcelListEntityList.add(entity);
// }
// boolean b = distributionParcelListClient.addBatch(parcelListEntityList);
// if(!b){
// logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderSelfNum={}",orderSelfNum);
// throw new CustomerException(405,"保存包件信息失败");
// }
boolean b = distributionParcelListClient.add(entity);
if(!b){
logger.warn("#################handleDataToPlatform: 保存包件信息失败 orderSelfNum={}",orderSelfNum);
throw new CustomerException(405,"保存包件信息失败");
}
distributionStockArticleEntity.setHandQuantity(distributionStockArticleEntity.getHandQuantity()+1);
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
logger.info("#################handleDataToPlatform: 数据处理完成");
}else{

23
blade-service/logpm-factory/src/main/java/com/logpm/factory/props/MtFactoryProperties.java

@ -0,0 +1,23 @@
package com.logpm.factory.props;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Data
@ConfigurationProperties(prefix = "mengtian")
@Component
public class MtFactoryProperties {
private String url;
private String appkey ;
private String appsecret ;
private String userid ;
private String userpwd ;
}

6
blade-service/logpm-factory/src/main/resources/application-dev.yml

@ -43,8 +43,4 @@ spring:
username: ${blade.datasource.factory.slave.username}
password: ${blade.datasource.factory.slave.password}
pan:
url: http://157.122.179.34:15019
clientId: hzero-front-dev
clientSecret: c2VjcmV0
grantType: client_credentials

26
blade-service/logpm-factory/src/main/resources/application-prod.yml

@ -29,3 +29,29 @@ spring:
url: ${blade.datasource.factory.slave.url}
username: ${blade.datasource.factory.slave.username}
password: ${blade.datasource.factory.slave.password}
#rabbitmq配置
rabbitmq:
host: 172.16.128.146
port: 5672
username: admin
password: Slwk@123654
#虚拟host 可以不设置,使用server默认host
virtual-host: /
#确认消息已发送到队列(Queue)
publisher-returns: true
publisher-confirm-type: correlated
# 手动提交消息
listener:
simple:
acknowledge-mode: auto
default-requeue-rejected: false
retry:
enabled: true # 开启消费者失败重试
initial-interval: 1000 # 初识的失败等待时长为1秒
multiplier: 1 # 失败的等待时长倍数,下次等待时长 = multiplier * last-interval
max-attempts: 3 # 最大重试次数
stateless: true # true无状态;false有状态。如果业务中包含事务,这里改为false
direct:
acknowledge-mode: manual
template:
mandatory: true

28
blade-service/logpm-factory/src/main/resources/application-test.yml

@ -29,3 +29,31 @@ spring:
url: ${blade.datasource.factory.slave.url}
username: ${blade.datasource.factory.slave.username}
password: ${blade.datasource.factory.slave.password}
#rabbitmq配置
rabbitmq:
host: 172.16.128.146
port: 5672
username: admin
password: Slwk@123654
#虚拟host 可以不设置,使用server默认host
virtual-host: /
#确认消息已发送到队列(Queue)
publisher-returns: true
publisher-confirm-type: correlated
# 手动提交消息
listener:
simple:
acknowledge-mode: auto
default-requeue-rejected: false
retry:
enabled: true # 开启消费者失败重试
initial-interval: 1000 # 初识的失败等待时长为1秒
multiplier: 1 # 失败的等待时长倍数,下次等待时长 = multiplier * last-interval
max-attempts: 3 # 最大重试次数
stateless: true # true无状态;false有状态。如果业务中包含事务,这里改为false
direct:
acknowledge-mode: manual
template:
mandatory: true

49
blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

@ -1,41 +1,28 @@
package com.logpm.factory;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.factory.mt.service.impl.MtFactoryDataServiceImpl;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springblade.core.test.BladeBootTest;
import org.springblade.core.test.BladeSpringExtension;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Random;
//@ExtendWith(BladeSpringExtension.class)
//@BladeBootTest(appName = "logpm-factory", enableLoader = true)
public class TestService {
public static void main(String[] args) {
@Autowired
private MtFactoryDataServiceImpl mtFactoryDataService;
@Test
public void contextLoads() {
String code = getCharAndNumr(32);
System.out.println(code);
}
/**
* 方法1生成随机数字和字母组合
* @param length
* @return
*/
public static String getCharAndNumr(int length) {
Random random = new Random();
StringBuffer valSb = new StringBuffer();
String charStr = "0123456789abcdefghijklmnopqrstuvwxyz";
int charLength = charStr.length();
for (int i = 0; i < length; i++) {
int index = random.nextInt(charLength);
valSb.append(charStr.charAt(index));
}
return valSb.toString();
String tolk =mtFactoryDataService.getMtToken();
System.out.println(tolk);
}

60
blade-service/logpm-factory/src/test/java/com/logpm/factory/launch/FactoryLauncherServiceImpl.java

@ -0,0 +1,60 @@
/*
* 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.launch;
import org.springblade.core.auto.service.AutoService;
import org.springblade.core.launch.constant.NacosConstant;
import org.springblade.core.launch.service.LauncherService;
import org.springblade.core.launch.utils.PropsUtil;
import org.springframework.boot.builder.SpringApplicationBuilder;
import java.util.Properties;
/**
* 启动参数拓展
*
* @author Chill
*/
@AutoService(LauncherService.class)
public class FactoryLauncherServiceImpl implements LauncherService {
@Override
public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
Properties props = System.getProperties();
// 开启多数据源
PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true");
// 指定注册配置信息
PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].data-id", NacosConstant.dataId("factory", profile));
PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].group", NacosConstant.NACOS_CONFIG_GROUP);
PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].refresh", NacosConstant.NACOS_CONFIG_REFRESH);
// 指定注册IP
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.ip", "127.0.0.1");
// 指定注册端口
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.port", "8200");
// 自定义命名空间
// PropsUtil.setProperty(props, "spring.cloud.nacos.config.namespace", LauncherConstant.NACOS_NAMESPACE);
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.namespace", LauncherConstant.NACOS_NAMESPACE);
// 自定义分组
// PropsUtil.setProperty(props, "spring.cloud.nacos.config.group", NacosConstant.NACOS_CONFIG_GROUP);
// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.group", NacosConstant.NACOS_CONFIG_GROUP);
}
@Override
public int getOrder() {
return 20;
}
}

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/AdvanceDetailClient.java

@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
/**
@ -76,8 +75,8 @@ public class AdvanceDetailClient implements IAdvanceDetailClient {
}
@Override
public List<DistributionParcelListEntityVO> getListByOrderSelfNum(String orderSelfNum) {
return advanceDetailService.getListByOrderSelfNum(orderSelfNum);
public DistributionParcelListEntityVO getByUnitNo(String UnitNo) {
return advanceDetailService.getByUnitNo(UnitNo);
}
}

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.java

@ -52,6 +52,6 @@ public interface AdvanceDetailMapper extends BaseMapper<AdvanceDetailEntity> {
Map<String, String> getSupplyData(@Param("unitNo") String unitNo);
List<DistributionParcelListEntityVO> getListByOrderSelfNum(@Param("orderSelfNum") String orderSelfNum);
DistributionParcelListEntityVO getByUnitNo(@Param("unitNo") String unitNo);
}

35
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

@ -87,23 +87,28 @@
</select>
<select id="getListByOrderSelfNum" resultType="com.logpm.oldproject.vo.DistributionParcelListEntityVO" >
select w.title warehouse, --仓库
2 conditions, --状态
od.unitNo packetBarCode, --包条码
l.title goodsAllocation, --货位信息
'托盘信息' pallet, --托盘信息
od.title firsts, --一级品
od.secondPackName `second`, --二级品
od.thirdPackName `thirdProduct`, --三级品
od.title material, --物料
ad.mscsNum quantity, --数量
od.start_cars_no trainNumber --车次号
<select id="getByUnitNo" resultType="com.logpm.oldproject.vo.DistributionParcelListEntityVO" >
select w.title warehouse,
od.unitNo packetBarCode,
c.title cargoTitle,
s.title shelfTitle,
l.title goodsAllocation,
t.tray_no pallet,
ad.firstPackName firsts,
ad.secondPackName `second`,
ad.thirdPackName thirdProduct,
ad.productCode material,
ad.mscsNum quantity,
ad.mctsTruck trainNumber
from ht_order_detail od
left join ht_advance_detail ad on od.unitNo = ad.unitNo and ad.delete_time = 0
left join ht_advance_detail ad on ad.unitNo = od.unitNo
left join ht_warehouse w on w.id = od.now_warehouse_id
left join ht_location l on l.id = od.location_id
where od.detail_number = #{orderSelfNum}
left join ht_location l on od.location_id = l.id
left join ht_shelf s on l.shelf_id = s.id
left join ht_cargo c on s.cargo_id = c.id
left join ht_tray_scan_des tsd on tsd.unitNo = od.unitNo
left join ht_tray t on t.id = tsd.tray_id
where od.unitNo = #{unitNo}
</select>

3
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/IAdvanceDetailService.java

@ -19,7 +19,6 @@ package com.logpm.oldproject.service;
import com.logpm.oldproject.entity.AdvanceDetailEntity;
import com.logpm.oldproject.vo.DistributionParcelListEntityVO;
import java.util.List;
import java.util.Map;
/**
@ -37,6 +36,6 @@ public interface IAdvanceDetailService {
AdvanceDetailEntity getOneByUnitNo(String unitNo);
List<DistributionParcelListEntityVO> getListByOrderSelfNum(String orderSelfNum);
DistributionParcelListEntityVO getByUnitNo(String unitNo);
}

4
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/AdvanceDetailServiceImpl.java

@ -60,8 +60,8 @@ public class AdvanceDetailServiceImpl implements IAdvanceDetailService {
}
@Override
public List<DistributionParcelListEntityVO> getListByOrderSelfNum(String orderSelfNum) {
return advanceDetailMapper.getListByOrderSelfNum(orderSelfNum);
public DistributionParcelListEntityVO getByUnitNo(String unitNo) {
return advanceDetailMapper.getByUnitNo(unitNo);
}

Loading…
Cancel
Save