提交 3b7e6724 authored 作者: 000516's avatar 000516

物流单据根据ID回写属性(签收状态、回单图片是否完整);前端版本更新key

...@@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableCustomConfig @EnableCustomConfig
@EnableRyFeignClients @EnableRyFeignClients
@MapperScan("com.link.bi.domain.mapper") @MapperScan("com.link.bi.domain.**.mapper")
@SpringBootApplication @SpringBootApplication
public class WangxiaoluLinkModuleBiApplication { public class WangxiaoluLinkModuleBiApplication {
......
...@@ -22,7 +22,6 @@ public class FrontVersionCoreController { ...@@ -22,7 +22,6 @@ public class FrontVersionCoreController {
@PostMapping() @PostMapping()
public void addFrontVersion(@RequestBody List<Map> versionList) { public void addFrontVersion(@RequestBody List<Map> versionList) {
iFrontVersionCoreService.addFrontVersion(versionList); iFrontVersionCoreService.addFrontVersion(versionList);
} }
......
package com.link.bi.controller.ordercore;
import com.link.bi.pojo.orderrequest.OrdersSentVo;
import com.link.bi.service.orderservice.IOrdersSentCoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author : liqiulin
* @date : 2025-08-14 19
* @describe : 订单-物流回写
*/
@RestController
@RequestMapping("/ordersent/core")
public class OrdersSentCoreController {
@Autowired
IOrdersSentCoreService ordersSentCoreService;
@PutMapping("/update")
public void updateOrdersSent(@RequestBody OrdersSentVo ordersSentVo) {
ordersSentCoreService.updateOrdersSent(ordersSentVo);
}
}
package com.link.bi.controller.orderquery;
import com.link.bi.pojo.orderrequest.OrdersSentVo;
import com.link.bi.service.orderservice.IOrdersSentQueryService;
import com.sfa.common.core.web.domain.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author : liqiulin
* @date : 2025-08-14 16
* @describe : 订单-物流查询
*/
@RestController
@RequestMapping("/ordersent/query")
public class OrdersSentQueryController {
@Autowired
private IOrdersSentQueryService ordersSentQueryService;
@GetMapping("/page")
public PageInfo page(OrdersSentVo ordersSentVo){
return ordersSentQueryService.page(ordersSentVo);
}
}
package com.link.bi.domain.orderdomain.dao;
import com.link.bi.domain.orderdomain.wq.OrdersSentWq;
import com.sfa.common.core.web.domain.PageInfo;
/**
* @author : liqiulin
* @date : 2025-08-14 17
* @describe :
*/
public interface IOrdersSentDao {
PageInfo page(OrdersSentWq ordersSentWq);
void updateById(Long sendId, String receiptPhotoCompleteFlag, String sentStatus);
}
package com.link.bi.domain.orderdomain.dao;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.link.bi.domain.orderdomain.entity.OrdersSent;
import com.link.bi.domain.orderdomain.mapper.OrdersSentMapper;
import com.link.bi.domain.orderdomain.wq.OrdersSentWq;
import com.sfa.common.core.enums.ECode;
import com.sfa.common.core.exception.CheckedException;
import com.sfa.common.core.exception.ServiceException;
import com.sfa.common.core.utils.StringUtils;
import com.sfa.common.core.web.domain.PageInfo;
import com.sfa.common.core.web.page.TableSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Objects;
/**
* @author : liqiulin
* @date : 2025-08-14 17
* @describe :
*/
@Service
public class OrdersSentDaoImpl implements IOrdersSentDao{
@Autowired
private OrdersSentMapper ordersSentMapper;
@Override
public PageInfo page(OrdersSentWq ordersSentWq) {
LambdaQueryWrapper<OrdersSent> qw = builderWq(ordersSentWq);
Page<OrdersSent> ordersSentPage = ordersSentMapper.selectPage(TableSupport.pageI(), qw);
PageInfo<OrdersSent> pageInfo = new PageInfo<>(ordersSentPage);
return pageInfo;
}
@Override
public void updateById(Long sendId, String receiptPhotoCompleteFlag, String sentStatus) {
if (StringUtils.isAllBlank(receiptPhotoCompleteFlag,sentStatus)){
throw new CheckedException(ECode.LEAST_INCLUDE_ONE_ERROR);
}
if (Objects.isNull(sendId)){
throw new CheckedException(ECode.DB_TABLE_UNIQUE_EXIST, "发货单据");
}
ordersSentMapper.updateById(new OrdersSent().setSendId(sendId).setReceiptPhotoCompleteFlag(receiptPhotoCompleteFlag).setSentStatus(sentStatus));
}
private LambdaQueryWrapper<OrdersSent> builderWq(OrdersSentWq ordersSentWq) {
LambdaQueryWrapper<OrdersSent> qw = new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(ordersSentWq.getAhSentNo())){
qw.eq(OrdersSent::getAhSentNo, ordersSentWq.getAhSentNo());
}
if (StringUtils.isNotBlank(ordersSentWq.getBjSentNo())){
qw.eq(OrdersSent::getBjSentNo, ordersSentWq.getBjSentNo());
}
if (StringUtils.isNotBlank(ordersSentWq.getTransport())){
qw.eq(OrdersSent::getTransport, ordersSentWq.getTransport());
}
if (StringUtils.isNotBlank(ordersSentWq.getExpressNo())){
qw.eq(OrdersSent::getExpressNo, ordersSentWq.getExpressNo());
}
if (StringUtils.isNotBlank(ordersSentWq.getDdNo())){
qw.eq(OrdersSent::getDdNo, ordersSentWq.getDdNo());
}
if (ordersSentWq.getIsOperateEnd() != null && ordersSentWq.getIsOperateEnd()){
qw.isNotNull(OrdersSent::getOperateEndDatetime);
}
if (ordersSentWq.getIsOperateEnd() != null && !ordersSentWq.getIsOperateEnd()){
qw.isNull(OrdersSent::getOperateEndDatetime);
}
return qw;
}
}
package com.link.bi.domain.orderdomain.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* T100出货单中的物流单据
* @TableName orders_sent
*/
@TableName(value ="orders_sent")
@Data
@Accessors(chain = true)
public class OrdersSent implements Serializable {
/**
* 发货单自增ID
*/
@TableId(type = IdType.AUTO)
private Long sendId;
/**
* 安徽单据编号
*/
private String ahSentNo;
/**
* 北京单据编号
*/
private String bjSentNo;
/**
* 版本号
*/
private Integer bjSentVersion;
/**
* X06:销售出库单;N02:杂发单
*/
private String type;
/**
* 过账日期
*/
private Date postData;
/**
* 状态
*/
private String status;
/**
* 运输公司编码
*/
private String transport;
/**
* 运输公司
*/
private String transportName;
/**
* 经销商编码
*/
private String dealerCode;
/**
* 快递单号
*/
private String expressNo;
/**
* DD单号
*/
private String ddNo;
/**
* 0:已推送;1:未推送(推送勤策)
*/
private Integer pushQc;
/**
* 签收时间,为空时代表未签收
*/
private Date operateEndDatetime;
/**
* 物流状态
*/
private String sentStatus;
/**
* 回单状态:有/无/回单异常
*/
private String receiptFlag;
/**
* 回单图片
*/
private String receiptPhoto;
/**
* 回单图片是否完整
*/
private String receiptPhotoCompleteFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.link.bi.domain.orderdomain.mapper;
import com.link.bi.domain.orderdomain.entity.OrdersSent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* @author a02200059
* @description 针对表【orders_sent(T100出货单中的物流单据)】的数据库操作Mapper
* @createDate 2025-08-14 16:06:51
* @Entity com.link.bi.domain.order.entity.OrdersSent
*/
@Repository
public interface OrdersSentMapper extends BaseMapper<OrdersSent> {
}
package com.link.bi.domain.orderdomain.wq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author : liqiulin
* @date : 2025-08-14 18
* @describe :
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class OrdersSentWq {
/**
* 安徽/北京单据编号
*/
private String sentNo;
/**
* 安徽单据编号
*/
private String ahSentNo;
/**
* 北京单据编号
*/
private String bjSentNo;
private String transport;
/**
* 快递单号
*/
private String expressNo;
/**
* DD单号
*/
private String ddNo;
/**
* 是否签收
*/
private Boolean isOperateEnd;
public void setSentNo(String sentNo) {
if (sentNo == null) {
return;
}
if (sentNo.startsWith("BJHQ")){
this.bjSentNo = sentNo;
} else if (sentNo.startsWith("AHSD")) {
this.ahSentNo = sentNo;
}
}
}
package com.link.bi.pojo.orderrequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* @author : liqiulin
* @date : 2025-08-14 16
* @describe :
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class OrdersSentVo {
private Long sendId;
/**
* 安徽/北京单据编号
*/
private String sentNo;
private String transport;
/**
* 快递单号
*/
private String expressNo;
/**
* DD单号
*/
private String ddNo;
/**
* 是否签收
*/
private Boolean isOperateEnd;
/**
* 物流状态:【整单签收;整单拒收;部分退回在途;部分退回已完结;整单退回在途;整单退回完结;发货在途;部分滞留;整单滞留】
*/
private String sentStatus;
/**
* 回单状态:【完整,不完整】
*/
private String receiptPhotoCompleteFlag;
}
package com.link.bi.service.impl; package com.link.bi.service.impl;
import com.link.bi.service.IFrontVersionCoreService; import com.link.bi.service.IFrontVersionCoreService;
import com.sfa.common.core.constant.CacheConstants;
import com.sfa.common.redis.service.RedisService; import com.sfa.common.redis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -22,13 +23,13 @@ public class FrontVersionCoreServiceImpl implements IFrontVersionCoreService { ...@@ -22,13 +23,13 @@ public class FrontVersionCoreServiceImpl implements IFrontVersionCoreService {
@Override @Override
public void addFrontVersion(List<Map> versionList) { public void addFrontVersion(List<Map> versionList) {
redisService.deleteObject("frontVersion"); redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY);
redisService.setCacheList("frontVersion", versionList); redisService.setCacheList(CacheConstants.LOGIN_TOKEN_KEY, versionList);
} }
@Override @Override
public void deleteFrontVersion() { public void deleteFrontVersion() {
redisService.deleteObject("frontVersion"); redisService.deleteObject(CacheConstants.FRONT_VERSION_KEY);
} }
......
package com.link.bi.service.impl; package com.link.bi.service.impl;
import com.link.bi.service.IFrontVersionQueryService; import com.link.bi.service.IFrontVersionQueryService;
import com.sfa.common.core.constant.CacheConstants;
import com.sfa.common.redis.service.RedisService; import com.sfa.common.redis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -21,6 +22,6 @@ public class FrontVersionQueryServiceImpl implements IFrontVersionQueryService { ...@@ -21,6 +22,6 @@ public class FrontVersionQueryServiceImpl implements IFrontVersionQueryService {
@Override @Override
public List getFrontVersion() { public List getFrontVersion() {
return redisService.getCacheList( "frontVersion"); return redisService.getCacheList( CacheConstants.FRONT_VERSION_KEY);
} }
} }
package com.link.bi.service.orderservice;
import com.link.bi.pojo.orderrequest.OrdersSentVo;
/**
* @author : liqiulin
* @date : 2025-08-14 16
* @describe :
*/
public interface IOrdersSentCoreService {
void updateOrdersSent(OrdersSentVo ordersSentVo);
}
package com.link.bi.service.orderservice;
import com.link.bi.pojo.orderrequest.OrdersSentVo;
import com.sfa.common.core.web.domain.PageInfo;
/**
* @author : liqiulin
* @date : 2025-08-14 16
* @describe :
*/
public interface IOrdersSentQueryService {
PageInfo page(OrdersSentVo ordersSentVo);
}
package com.link.bi.service.orderservice.impl;
import com.link.bi.domain.orderdomain.dao.IOrdersSentDao;
import com.link.bi.pojo.orderrequest.OrdersSentVo;
import com.link.bi.service.orderservice.IOrdersSentCoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author : liqiulin
* @date : 2025-08-14 20
* @describe :
*/
@Service
public class OrdersSentCoreServiceImpl implements IOrdersSentCoreService {
@Autowired
private IOrdersSentDao ordersSentDao;
@Override
public void updateOrdersSent(OrdersSentVo ordersSentVo) {
ordersSentDao.updateById(ordersSentVo.getSendId(),ordersSentVo.getReceiptPhotoCompleteFlag(),ordersSentVo.getSentStatus());
}
}
package com.link.bi.service.orderservice.impl;
import com.link.bi.domain.orderdomain.dao.IOrdersSentDao;
import com.link.bi.domain.orderdomain.wq.OrdersSentWq;
import com.link.bi.pojo.orderrequest.OrdersSentVo;
import com.link.bi.service.orderservice.IOrdersSentQueryService;
import com.sfa.common.core.web.domain.PageInfo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author : liqiulin
* @date : 2025-08-14 16
* @describe :
*/
@Service
public class OrdersSentQueryServiceImpl implements IOrdersSentQueryService {
@Autowired
private IOrdersSentDao ordersSentDao;
@Override
public PageInfo page(OrdersSentVo ordersSentVo) {
OrdersSentWq ordersSentWq = new OrdersSentWq();
BeanUtils.copyProperties(ordersSentVo,ordersSentWq);
return ordersSentDao.page(ordersSentWq);
}
}
<?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.link.bi.domain.orderdomain.mapper.OrdersSentMapper">
<resultMap id="OrdersSentBaseResultMap" type="com.link.bi.domain.orderdomain.entity.OrdersSent">
<id property="sendId" column="send_id" jdbcType="BIGINT"/>
<result property="ahSentNo" column="ah_sent_no" jdbcType="VARCHAR"/>
<result property="bjSentNo" column="bj_sent_no" jdbcType="VARCHAR"/>
<result property="bjSentVersion" column="bj_sent_version" jdbcType="INTEGER"/>
<result property="type" column="type" jdbcType="CHAR"/>
<result property="postData" column="post_data" jdbcType="DATE"/>
<result property="status" column="status" jdbcType="CHAR"/>
<result property="transport" column="transport" jdbcType="VARCHAR"/>
<result property="transportName" column="transport_name" jdbcType="VARCHAR"/>
<result property="dealerCode" column="dealer_code" jdbcType="VARCHAR"/>
<result property="expressNo" column="express_no" jdbcType="VARCHAR"/>
<result property="ddNo" column="dd_no" jdbcType="VARCHAR"/>
<result property="pushQc" column="push_qc" jdbcType="INTEGER"/>
<result property="operateEndDatetime" column="operate_end_dateTime" jdbcType="TIMESTAMP"/>
<result property="sentStatus" column="sent_status" jdbcType="VARCHAR"/>
<result property="receiptFlag" column="receipt_flag" jdbcType="VARCHAR"/>
<result property="receiptPhoto" column="receipt_photo" jdbcType="VARCHAR"/>
<result property="receiptPhotoCompleteFlag" column="receipt_photo_complete_flag" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论