| | |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import com.ruoyi.sales.vo.ShippingInfoVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("鍙戣揣淇℃伅鍒楄〃") |
| | | public AjaxResult listPage(Page page, ShippingInfo req) { |
| | | IPage<ShippingInfo> listPage = shippingInfoService.listPage(page,req); |
| | | IPage<ShippingInfoVo> listPage = shippingInfoService.listPage(page,req); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.vo.ShippingInfoVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date : 2025/10/22 9:32 |
| | | */ |
| | | public interface ShippingInfoMapper extends BaseMapper<ShippingInfo> { |
| | | IPage<ShippingInfo> listPage(Page page,@Param("req") ShippingInfo req); |
| | | IPage<ShippingInfoVo> listPage(Page page, @Param("req") ShippingInfo req); |
| | | |
| | | List<ShippingInfo> listAll(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.vo.ShippingInfoVo; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/10/22 9:33 |
| | | */ |
| | | public interface ShippingInfoService extends IService<ShippingInfo>{ |
| | | IPage<ShippingInfo> listPage(Page page, ShippingInfo req); |
| | | IPage<ShippingInfoVo> listPage(Page page, ShippingInfo req); |
| | | } |
| | |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import com.ruoyi.sales.vo.ShippingInfoVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Override |
| | | public IPage<ShippingInfo> listPage(Page page, ShippingInfo req) { |
| | | IPage<ShippingInfo> listPage = shippingInfoMapper.listPage(page, req); |
| | | public IPage<ShippingInfoVo> listPage(Page page, ShippingInfo req) { |
| | | IPage<ShippingInfoVo> listPage = shippingInfoMapper.listPage(page, req); |
| | | |
| | | return listPage; |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.sales.vo; |
| | | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | | @Data |
| | | public class SalesLedgerProductVo extends SalesLedgerProduct { |
| | | |
| | | //浜у搧搴撳瓨 |
| | | private BigDecimal productStock; |
| | | |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.sales.vo; |
| | | |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | |
| | | @Data |
| | | public class ShippingInfoVo extends ShippingInfo { |
| | | |
| | | /** |
| | | * 鏁伴噺 |
| | | */ |
| | | private BigDecimal quantity; |
| | | } |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.sales.mapper.ShippingInfoMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.sales.pojo.ShippingInfo"> |
| | | <select id="listPage" resultType="com.ruoyi.sales.vo.ShippingInfoVo"> |
| | | SELECT |
| | | s.id, |
| | | s.sales_ledger_id, |
| | |
| | | s.update_user, |
| | | s.tenant_id, |
| | | sl.sales_contract_no, |
| | | sl.customer_name |
| | | sl.customer_name, |
| | | slp.product_category, |
| | | slp.specification_model, |
| | | slp.quantity |
| | | FROM shipping_info s |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | left join sales_ledger_product slp on slp.id = s.sales_ledger_product_id and slp.type = 1 |
| | | WHERE 1=1 |
| | | <if test="req.salesContractNo != null and req.salesContractNo != ''"> |
| | | AND sl.sales_contract_no LIKE CONCAT('%',#{req.salesContractNo},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | AND slp.product_category LIKE CONCAT('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.shippingCarNumber != null and req.shippingCarNumber != ''"> |
| | | AND s.shipping_car_number LIKE CONCAT('%',#{req.shippingCarNumber},'%') |
| | | </if> |