Browse Source

1.干线bug修复

chenglong
zhenghaoyu 1 year ago
parent
commit
f057ed1ee2
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/constant/RabbitConstant.java
  2. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java
  3. 9
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AdvanceDTO.java
  4. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportCustomizedOuPaiDTO.java
  5. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportStandardOuPaiDTO.java
  6. 5
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenLabelDTO.java
  7. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  8. 54
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OrderNoPackageExcelDTO.java
  9. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java
  10. 5
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  11. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  12. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.java
  13. 21
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml
  14. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataClientService.java
  15. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  16. 2
      blade-service/logpm-factory/src/main/resources/application-dev.yml
  17. 5
      blade-service/logpm-trunkline/pom.xml
  18. 62
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/config/RabbitMqConfiguration.java
  19. 57
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  20. 30
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml
  21. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java
  22. 132
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  23. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  24. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  25. 27
      blade-service/logpm-trunkline/src/main/resources/application-dev.yml
  26. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

5
blade-biz-common/src/main/java/org/springblade/common/constant/RabbitConstant.java

@ -139,4 +139,9 @@ public interface RabbitConstant {
String TEST_RECEIVE_INFO_ROUTING = "test_receive_info_routing" + ModuleNameConstant.DEVAUTH;
/****************干线卸车确认队列******************/
String TRUNKLINE_UNLOAD_CONFIRM_QUEUE = "trunkline_unload_confirm_queue" + ModuleNameConstant.DEVAUTH;
String TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE = "trunkline_unload_confirm_exchange" + ModuleNameConstant.DEVAUTH;
String TRUNKLINE_UNLOAD_CONFIRM_ROUTING = "trunkline_unload_confirm_routing" + ModuleNameConstant.DEVAUTH;
}

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java

@ -79,7 +79,7 @@ public interface IBasicdataClientClient {
Long addReturnId(@RequestBody BasicdataClientEntity basicdataClientEntity);
@GetMapping(API_PREFIX+"/findListByClientName")
List<JSONObject> findListByClientName(@RequestParam String clientName);
List<JSONObject> findListByClientName(@RequestParam String clientName,@RequestParam String linkMan,@RequestParam String linkPhone);
/**
* 根据Id查询客户

9
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AdvanceDTO.java

@ -24,4 +24,13 @@ public class AdvanceDTO implements Serializable {
private String freezeStatus;
//列表查询参数
private String orderCode;
private String dealerName;
private String storeName;
private String siteName;
private String trainNumber;
private String serviceNum;
private String brand;
}

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportCustomizedOuPaiDTO.java

@ -62,7 +62,7 @@ public class ImportCustomizedOuPaiDTO implements Serializable {
private String carNumber;
@ExcelProperty(value = "货主")
private String goodsMan;
@ExcelProperty(value = "客户名")
@ExcelProperty(value = "客户名")
private String customerName;
@ExcelProperty(value = "客户电话")
private String customerPhone;

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ImportStandardOuPaiDTO.java

@ -70,7 +70,7 @@ public class ImportStandardOuPaiDTO implements Serializable {
@ExcelProperty(value = "订单号")
private String order;
@ExcelProperty(value = "客户名")
@ExcelProperty(value = "客户名")
private String customerName;
@ExcelProperty(value = "客户电话")
private String customerPhone;

5
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenLabelDTO.java

@ -1,7 +1,6 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.math.BigDecimal;
@ -46,7 +45,9 @@ public class OpenLabelDTO implements Serializable {
private String customerPhone;
private String customerAddress;
private String consigneePerson;
private String consigneeMobile;
private String consigneeAddress;
private MultipartFile file;
}

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -52,6 +52,7 @@ public class OpenOrderDTO implements Serializable {
private BigDecimal warehouseManagementFee = BigDecimal.ZERO;//仓库管理费
private BigDecimal storageFee = BigDecimal.ZERO;//仓储费
private BigDecimal handlingFee = BigDecimal.ZERO;//装卸费
private BigDecimal installFee = BigDecimal.ZERO;//安装费
private BigDecimal otherFee = BigDecimal.ZERO;//其他费
private BigDecimal insuranceFee = BigDecimal.ZERO;//保价费
private BigDecimal claimingValue;//申明价值
@ -80,6 +81,8 @@ public class OpenOrderDTO implements Serializable {
private Integer receiptNum;//回单份数
private String clientName;//客户名称
private String linkMan;//联系人
private String linkPhone;//联系人
private Long clientId;//客户id
private String warehouseName;

54
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OrderNoPackageExcelDTO.java

@ -0,0 +1,54 @@
package com.logpm.trunkline.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderNoPackageExcelDTO implements Serializable {
@ExcelProperty(value = "下单日期")
private String orderTime;
@ExcelProperty(value = "商场名称")
private String dealerName;
@ExcelProperty(value = "订单自编号")
private String orderCode;
@ExcelProperty(value = "物料名称")
private String materialName;
@ExcelProperty(value = "物料编码")
private String materialCode;
@ExcelProperty(value = "单位")
private String materialUnit;
@ExcelProperty(value = "销售数量")
private String num;
@ExcelProperty(value = "商场收货人")
private String consigneePerson;
@ExcelProperty(value = "商场收货人电话")
private String consigneeMobile;
@ExcelProperty(value = "商场收货地址")
private String consigneeAddress;
@ExcelProperty(value = "收货人")
private String customerName ;
@ExcelProperty(value = "联系电话")
private String customerPhone ;
@ExcelProperty(value = "地址")
private String customerAddress ;
@ExcelProperty(value = "车次")
private String trainNumber ;
@ExcelProperty(value = "发货日期")
private String sendDateStr ;
@ExcelProperty(value = "品牌")
private String brand ;
@ExcelProperty(value = "一级品类")
private String firsts ;
@ExcelProperty(value = "二级品类")
private String sencods ;
@ExcelProperty(value = "三级品类")
private String thirds ;
@ExcelProperty(value = "配送区域")
private String area ;
@ExcelProperty(value = "服务号")
private String serviceNum ;
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OpenOrderVO.java

@ -44,5 +44,6 @@ public class OpenOrderVO implements Serializable {
private String openOrderDate;//开单时间
private String openOrderUserName;//开单人
private Integer totalNum;
}

5
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -325,6 +325,11 @@ public class WarehouseWaybillEntity extends TenantEntity {
*/
@ApiModelProperty(value = "装卸费")
private BigDecimal handlingFee;//装卸费
/**
* 安装费
*/
@ApiModelProperty(value = "安装费")
private BigDecimal installFee;//安装费
/**
* 其他费
*/

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java

@ -110,8 +110,8 @@ public class BasicdataClientClient implements IBasicdataClientClient {
}
@Override
public List<JSONObject> findListByClientName(String clientName) {
return basicdataClientService.findListByClientName(clientName);
public List<JSONObject> findListByClientName(String clientName,String linkMan,String linkPhone) {
return basicdataClientService.findListByClientName(clientName,linkMan,linkPhone);
}
@Override

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.java

@ -55,5 +55,5 @@ public interface BasicdataClientMapper extends BaseMapper<BasicdataClientEntity>
List<BasicdataClientVO> selectListDict(@Param("id") Long id);
List<ClientInfoVO> findListByClientName(@Param("clientName") String clientName);
List<ClientInfoVO> findListByClientName(@Param("clientName") String clientName,@Param("linkMan") String linkMan,@Param("linkPhone") String linkPhone);
}

21
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml

@ -55,16 +55,23 @@
</select>
<select id="findListByClientName" resultType="com.logpm.basicdata.vo.ClientInfoVO">
select id clientId,
client_name clientName,
linkman linkMan,
phone linkPhone,
detailedly linkAddress
from logpm_basicdata_client
select lbc.id clientId,
lbc.client_name clientName,
lbsc.linkman linkMan,
lbsc.phone linkPhone,
lbc.detailedly linkAddress
from logpm_basicdata_client lbc
left join logpm_basicdata_store_contact lbsc on lbsc.shop_id = lbc.id
where is_deleted = 0
<if test="clientName != null and clientName != ''">
and client_name like CONCAT('%',#{clientName},'%')
and lbc.client_name like CONCAT('%',#{clientName},'%')
</if>
<if test="linkMan != null and linkMan != ''">
and lbsc.linkman like CONCAT('%',#{linkMan},'%')
</if>
<if test="linkPhone != null and linkPhone != ''">
and lbsc.phone like CONCAT('%',#{linkPhone},'%')
</if>
limit 10
</select>

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataClientService.java

@ -94,5 +94,5 @@ public interface IBasicdataClientService extends BaseService<BasicdataClientEnti
void importClient(List<BasicdataClientExcel> data, Boolean isCovered);
List<JSONObject> findListByClientName(String clientName);
List<JSONObject> findListByClientName(String clientName,String linkMan,String linkPhone);
}

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -525,9 +525,9 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
}
@Override
public List<JSONObject> findListByClientName(String clientName) {
public List<JSONObject> findListByClientName(String clientName,String linkMan,String linkPhone) {
List<ClientInfoVO> ls = baseMapper.findListByClientName(clientName);
List<ClientInfoVO> ls = baseMapper.findListByClientName(clientName,linkMan,linkPhone);
List<JSONObject> list = new ArrayList<>();
for (ClientInfoVO clientInfoVO : ls) {
list.add(JSONObject.parseObject(JSONObject.toJSONString(clientInfoVO)));

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

@ -12,7 +12,7 @@ server:
spring:
#rabbitmq配置
rabbitmq:
host: 192.168.10.46
host: 192.168.2.46
port: 5672
username: admin
password: admin

5
blade-service/logpm-trunkline/pom.xml

@ -65,6 +65,11 @@
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<!--mq-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
</dependencies>
<build>

62
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/config/RabbitMqConfiguration.java

@ -0,0 +1,62 @@
package com.logpm.trunkline.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.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Map;
@Slf4j
@Configuration
public class RabbitMqConfiguration {
@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);
}
});
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 Queue unloadConfirmQueue() {
return new Queue(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_QUEUE, true);
}
@Bean
public CustomExchange unloadConfirmExchange() {
Map<String, Object> args = Maps.newHashMap();
args.put("x-delayed-type", "direct");
return new CustomExchange(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, "x-delayed-message", true, false, args);
}
@Bean
public Binding unloadConfirmBinding(Queue unloadConfirmQueue, CustomExchange unloadConfirmExchange) {
return BindingBuilder.bind(unloadConfirmQueue).to(unloadConfirmExchange).with(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING).noargs();
}
}

57
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -387,6 +387,33 @@ public class OpenOrderController {
}
}
@ResponseBody
@PostMapping("/findPayWayByClientId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "根据收货单位查询付款方式", notes = "传入openOrderDTO")
public R findPayWayByClientId(@RequestBody OpenOrderDTO openOrderDTO) {
String method = "############findPayWayByClientId: ";
log.info(method+" 请求参数:{}",openOrderDTO);
try{
Long clientId = openOrderDTO.getClientId();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
return openOrderService.findPayWayByClientId(clientId);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/openZeroWaybill")
@ -426,6 +453,8 @@ public class OpenOrderController {
String method = "############findClientInfo: ";
log.info(method + "请求参数{}", openOrderDTO);
String clientName = openOrderDTO.getClientName();
String linkMan = openOrderDTO.getLinkMan();
String linkPhone = openOrderDTO.getLinkPhone();
try{
@ -434,7 +463,7 @@ public class OpenOrderController {
// return R.fail(400,"客户名称为空");
// }
return openOrderService.findClientInfo(clientName);
return openOrderService.findClientInfo(clientName,linkMan,linkPhone);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -834,6 +863,32 @@ public class OpenOrderController {
}
@ResponseBody
@PostMapping("/batchOpenLabel")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "批量开标签", notes = "传入openOrderDTO")
public R batchOpenLabel(@RequestParam(value = "file") MultipartFile file) {
String method = "############batchOpenLabel: ";
log.info(method + "请求参数{}", file);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
return openOrderService.batchOpenLabel(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/openLabelHasPacakage")

30
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml

@ -20,6 +20,36 @@
<if test="param.warehouseId != null">
and lta.warehouse_id = #{param.warehouseId}
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and lta.order_code like concat('%',${param.orderCode},'%')
</if>
<if test="param.dealerName != null and param.dealerName != ''">
and lta.dealer_name like concat('%',${param.dealerName},'%')
</if>
<if test="param.storeName != null and param.storeName != ''">
and lta.store_name like concat('%',${param.storeName},'%')
</if>
<if test="param.siteName != null and param.siteName != ''">
and lta.site_name like concat('%',${param.siteName},'%')
</if>
<if test="param.trainNumber != null and param.trainNumber != ''">
and lta.train_number like concat('%',${param.trainNumber},'%')
</if>
<if test="param.serviceNum != null and param.serviceNum != ''">
and lta.service_num like concat('%',${param.serviceNum},'%')
</if>
<if test="param.brand != null and param.brand != ''">
and lta.brand like concat('%',${param.brand},'%')
</if>
<if test="param.customerName != null and param.customerName != ''">
and lta.customer_name like concat('%',${param.customerName},'%')
</if>
<if test="param.customerPhone != null and param.customerPhone != ''">
and lta.customer_phone like concat('%',${param.customerPhone},'%')
</if>
<if test="param.customerAddress != null and param.customerAddress != ''">
and lta.customer_address like concat('%',${param.customerAddress},'%')
</if>
</select>
<select id="findListByIds" resultType="com.logpm.trunkline.entity.TrunklineAdvanceEntity">

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java

@ -35,7 +35,7 @@ public interface IOpenOrderService {
R findCustomerInfoList(List<Long> advanceIds);
R findClientInfo(String clientName);
R findClientInfo(String clientName,String linkMan,String linkPhone);
R findDestinationByClientId(Long clientId);
@ -57,6 +57,11 @@ public interface IOpenOrderService {
R findBrandList(OpenOrderDTO openOrderDTO);
R batchOpenLabel(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R findPayWayByClientId(Long clientId);
// R findWaybillInfo(String waybillNo);
}

132
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -110,6 +110,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
String dealerName = null;
String brand = null;
Integer totalNum = 0;
for (TrunklineAdvanceEntity advanceEntity:list){
if(StringUtil.isBlank(dealerName)){
dealerName = advanceEntity.getDealerName();
@ -117,6 +118,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if(StringUtil.isBlank(brand)){
brand = advanceEntity.getBrand();
}
totalNum = totalNum + advanceEntity.getTotalNum();
}
OpenOrderVO openOrderVO = new OpenOrderVO();
//查询品牌 客户车次号 订单自编码
@ -126,6 +129,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//发站仓-----目前登录人的仓库
openOrderVO.setDepartureWarehouseName(basicdataWarehouseEntity.getName());
openOrderVO.setDepartureWarehouseId(warehouseId);
openOrderVO.setTotalNum(totalNum);
//发货单位 TODO
@ -193,7 +197,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//查询回单方式
openOrderVO.setTransportTypeList(DictBizCache.getList(DictBizConstant.OPEN_ORDER_TRANSPORT_TYPE));
openOrderVO.setOpenOrderUserName(AuthUtil.getUserName());
openOrderVO.setOpenOrderUserName(AuthUtil.getNickName());
openOrderVO.setOpenOrderDate(CommonUtil.dateToStringGeneral(new Date()));
@ -303,6 +307,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setWarehouseManagementFee(openOrderDTO.getWarehouseManagementFee());
waybillEntity.setStorageFee(openOrderDTO.getStorageFee());
waybillEntity.setHandlingFee(openOrderDTO.getHandlingFee());
waybillEntity.setInstallFee(openOrderDTO.getInstallFee());
waybillEntity.setOtherFee(openOrderDTO.getOtherFee());
waybillEntity.setInsuranceFee(openOrderDTO.getInsuranceFee());
waybillEntity.setClaimingValue(openOrderDTO.getClaimingValue());
@ -556,6 +561,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setWarehouseManagementFee(openOrderDTO.getWarehouseManagementFee());
waybillEntity.setStorageFee(openOrderDTO.getStorageFee());
waybillEntity.setHandlingFee(openOrderDTO.getHandlingFee());
waybillEntity.setInstallFee(openOrderDTO.getInstallFee());
waybillEntity.setOtherFee(openOrderDTO.getOtherFee());
waybillEntity.setInsuranceFee(openOrderDTO.getInsuranceFee());
waybillEntity.setClaimingValue(openOrderDTO.getClaimingValue());
@ -582,7 +588,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if(!Objects.isNull(waybillId)){
log.info("#################openZeroWaybill: 运单保存成功");
//保存运单货物明细
List<WaybillDetailDTO> waybillDetailList = openOrderDTO.getWaybillDetailList();
List<WaybillDetailDTO> waybillDetailList = openOrderDTO.getAddList();
List<WarehouseWayBillDetail> details = new ArrayList<>();
for (WaybillDetailDTO waybillDetailDTO:waybillDetailList){
WarehouseWayBillDetail warehouseWayBillDetail = new WarehouseWayBillDetail();
@ -743,7 +749,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//查询回单方式
openOrderVO.setTransportTypeList(DictBizCache.getList(DictBizConstant.OPEN_ORDER_TRANSPORT_TYPE));
openOrderVO.setOpenOrderUserName(AuthUtil.getUserName());
openOrderVO.setOpenOrderUserName(AuthUtil.getNickName());
openOrderVO.setOpenOrderDate(CommonUtil.dateToStringGeneral(new Date()));
@ -758,13 +764,19 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
@Override
public R findClientInfo(String clientName) {
public R findClientInfo(String clientName,String linkMan,String linkPhone) {
if(clientName == null){
clientName = "";
}
if(linkMan == null){
linkMan = "";
}
if(linkPhone == null){
linkPhone = "";
}
List<JSONObject> ls = basicdataClientClient.findListByClientName(clientName);
List<JSONObject> ls = basicdataClientClient.findListByClientName(clientName,linkMan,linkPhone);
return R.data(ls);
}
@ -814,6 +826,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceEntity.setPackName(firsts);
advanceEntity.setDealerCode(openLabelDTO.getDealerCode());
advanceEntity.setDealerName(openLabelDTO.getDealerName());
advanceEntity.setConsigneePerson(openLabelDTO.getConsigneePerson());
advanceEntity.setConsigneeMobile(openLabelDTO.getConsigneeMobile());
advanceEntity.setConsigneeAddress(openLabelDTO.getConsigneeAddress());
advanceEntity.setCustomerName(openLabelDTO.getCustomerName());
advanceEntity.setCustomerPhone(openLabelDTO.getCustomerPhone());
advanceEntity.setCustomerAddress(openLabelDTO.getCustomerAddress());
@ -1320,6 +1335,113 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
return R.data(ls);
}
@Override
public R batchOpenLabel(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if(Objects.isNull(file)){
log.warn("##################openLabelHasPacakage: 文件不存在");
return R.fail(405,"文件不存在");
}
InputStream inputStream = file.getInputStream();
List<OrderNoPackageExcelDTO> orderNoPackageExcelDTOS = EasyExcel.read(inputStream).head(OrderNoPackageExcelDTO.class).sheet(0).headRowNumber(2).doReadSync();
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
for (OrderNoPackageExcelDTO orderNoPackageExcelDTO : orderNoPackageExcelDTOS) {
TrunklineAdvanceEntity advanceEntity = new TrunklineAdvanceEntity();
advanceEntity.setWarehouseId(warehouseId);
advanceEntity.setWarehouseName(warehouseName);
String orderCode = orderNoPackageExcelDTO.getOrderCode();
advanceEntity.setOrderCode(orderCode);
advanceEntity.setArea(orderNoPackageExcelDTO.getArea());
advanceEntity.setOrderType("Label");
advanceEntity.setBrand(orderNoPackageExcelDTO.getBrand());
Integer totalNumber = Integer.parseInt(orderNoPackageExcelDTO.getNum());
advanceEntity.setTotalNum(totalNumber);
String firsts = orderNoPackageExcelDTO.getFirsts();
advanceEntity.setPackName(firsts);
advanceEntity.setDealerName(orderNoPackageExcelDTO.getDealerName());
advanceEntity.setConsigneePerson(orderNoPackageExcelDTO.getConsigneePerson());
advanceEntity.setConsigneeMobile(orderNoPackageExcelDTO.getConsigneeMobile());
advanceEntity.setConsigneeAddress(orderNoPackageExcelDTO.getConsigneeAddress());
advanceEntity.setCustomerName(orderNoPackageExcelDTO.getCustomerName());
advanceEntity.setCustomerPhone(orderNoPackageExcelDTO.getCustomerPhone());
advanceEntity.setCustomerAddress(orderNoPackageExcelDTO.getCustomerAddress());
advanceEntity.setSystemType("线上");
advanceEntity.setServiceNum(orderNoPackageExcelDTO.getServiceNum());
advanceEntity.setMatingType("1");
advanceEntity.setWaybillStatus("0");
advanceEntity.setFreezeStatus("0");
advanceEntity.setLegacyStatus("0");
advanceService.save(advanceEntity);
Long advanceId = advanceEntity.getId();
TrunklineAdvanceDetailEntity advanceDetailModel = new TrunklineAdvanceDetailEntity();
advanceDetailModel.setWarehouseId(warehouseId);
advanceDetailModel.setWarehouseName(warehouseName);
advanceDetailModel.setAdvanceId(advanceId);
advanceDetailModel.setOrderCode(orderCode);
advanceDetailModel.setBrand(orderNoPackageExcelDTO.getBrand());
advanceDetailModel.setSystemType("线上");
advanceDetailModel.setFirstPackName(firsts);
String sencods = orderNoPackageExcelDTO.getSencods();
if(StringUtil.isBlank(sencods)){
advanceDetailModel.setSecondPackName(firsts);
}else{
advanceDetailModel.setSecondPackName(sencods);
}
String thirds = orderNoPackageExcelDTO.getThirds();
if(StringUtil.isBlank(thirds)){
advanceDetailModel.setThirdPackName(firsts);
}else{
advanceDetailModel.setThirdPackName(thirds);
}
advanceDetailModel.setQuantity(1);
advanceDetailModel.setServiceNum(orderNoPackageExcelDTO.getServiceNum());
advanceDetailModel.setPackageStatus("0");
List<TrunklineAdvanceDetailEntity> detailEntities = new ArrayList<>();
for (int i = 0; i < totalNumber; i++) {
TrunklineAdvanceDetailEntity advanceDetailEntity = new TrunklineAdvanceDetailEntity();
BeanUtil.copy(advanceDetailModel,advanceDetailEntity);
advanceDetailEntity.setOrderPackageCode(basicdataCodeClient.getCodeByType(CodeNumConstant.PACKAGE,basicdataWarehouseEntity.getWarehouseCode(),orderCode));
detailEntities.add(advanceDetailEntity);
}
advanceDetailService.saveBatch(detailEntities);
}
return R.success("添加成功");
}
@Override
public R findPayWayByClientId(Long clientId) {
String payWay = "2";
if(!Objects.isNull(clientId)){
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId);
payWay = basicdataClientEntity.getDefaultPaymentMethods();
}
String deliveryWay = "2";
BasicdataStoreBusinessEntity storeBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(clientId, 3);
if(!Objects.isNull(storeBusinessEntity)){
String mold = storeBusinessEntity.getMold();
if("3".equals(mold)){
deliveryWay = "1";
}else if("2".equals(mold)){
deliveryWay = "3";
}else{
deliveryWay = "2";
}
}
Map<String,Object> map = new HashMap<>();
map.put("payWay",payWay);
map.put("deliveryWay",deliveryWay);
return R.data(map);
}
private String verifyData(OpenOrderDTO openOrderDTO, WarehouseWaybillEntity waybillEntity) {
log.info("###################verifyData: 验证改单数据");
StringBuilder stringBuilder = new StringBuilder();

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -512,7 +512,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
@Override
public R findBillladingClientByName(String clientName) {
List<JSONObject> ls = basicdataClientClient.findListByClientName(clientName);
List<JSONObject> ls = basicdataClientClient.findListByClientName(clientName,"","");
return R.data(ls);
}

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -32,6 +32,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
import org.springblade.common.constant.CodeNumConstant;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@ -42,6 +43,7 @@ import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -73,6 +75,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private final ITrunklineLoadSignOrderService trunklineLoadSignOrderService;
private final IBasicdataDriverArteryClient basicdataDriverArteryClient;
private final ITrunklineCarsSignLogService trunklineCarsSignLogService;
private final RabbitTemplate rabbitTemplate;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
@ -759,6 +762,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
throw new CustomerException(400,"未知的卸车确认类型");
}
//MQ卸车确认推送工厂
JSONObject jsonObject = new JSONObject();
jsonObject.put("loadId",loadId);
jsonObject.put("carsNo",carsLoadEntity.getCarsNo());
jsonObject.put("warehouseId",warehouseId);
Map<String, Object> map = new HashMap<>();
map.put("messageId", CommonUtil.getUUID());
map.put("messageData", jsonObject);
map.put("createTime", new Date().getTime());
map.put("flagType", "TrunklineUnloadConfirm");
rabbitTemplate.convertAndSend(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING, map);
}
@Transactional(rollbackFor = Exception.class)

27
blade-service/logpm-trunkline/src/main/resources/application-dev.yml

@ -10,6 +10,33 @@ server:
# password: ${blade.datasource.dev.password}
spring:
#rabbitmq配置
rabbitmq:
host: 192.168.2.46
port: 5672
username: admin
password: admin
#虚拟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
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -151,6 +151,7 @@
#{item}
</foreach>
</if>
order by create_time desc
</select>
<select id="findMoreWaybillNo" resultType="String">

Loading…
Cancel
Save