From fd18ec7c07b3d9e77c2cd9fe1ecf9a7f66faa73b Mon Sep 17 00:00:00 2001 From: linfso Date: Thu, 25 Apr 2024 17:42:49 +0800 Subject: [PATCH] md --- .../erp/web/emis/EmisWaybillController.java | 92 ++++++++-------- .../emis/domain/EmisWaybillAttachment.java | 6 +- .../erp/emis/domain/EmisWaybillCargo.java | 35 +++--- .../erp/emis/domain/vo/WaybillOrder.java | 3 + .../service/impl/EmisWaybillServiceImpl.java | 19 +++- .../mapper/EmisWaybillAttachmentMapper.xml | 8 +- .../mapper/EmisWaybillCargoMapper.xml | 103 +++++++++--------- 7 files changed, 146 insertions(+), 120 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java index b6b9f810c..dbe50b8f7 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillController.java @@ -131,69 +131,71 @@ public class EmisWaybillController extends BaseController return getDataTable(list); } - /** - * 导出运单列表列表 - */ - @PreAuthorize("@ss.hasPermi('emis:emisWaybill:export')") - @Log(title = "运单列表", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, EmisWaybill emisWaybill) - { - List list = emisWaybillService.selectEmisWaybillList(emisWaybill); - ExcelUtil util = new ExcelUtil(EmisWaybill.class); - util.exportExcel(response, list, "运单列表数据"); - } +// /** +// * 导出运单列表列表 +// */ +// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:export')") +// @Log(title = "运单列表", businessType = BusinessType.EXPORT) +// @PostMapping("/export") +// public void export(HttpServletResponse response, EmisWaybill emisWaybill) +// { +// List list = emisWaybillService.selectEmisWaybillList(emisWaybill); +// ExcelUtil util = new ExcelUtil(EmisWaybill.class); +// util.exportExcel(response, list, "运单列表数据"); +// } /** * 获取运单列表详细信息 */ - @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')") - @GetMapping("/getInfoByBillCode") - public AjaxResult getInfoByBillCode(String billCode) - { - return AjaxResult.success(emisWaybillService.selectEmisWaybillByBillCode(billCode)); - } +// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')") +// @GetMapping("/getInfoByBillCode") +// public AjaxResult getInfoByBillCode(String billCode) +// { +// return AjaxResult.success(emisWaybillService.selectEmisWaybillByBillCode(billCode)); +// } /** * 获取运单列表详细信息 */ - @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return AjaxResult.success(emisWaybillService.selectEmisWaybillById(id)); - } +// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')") +// @GetMapping(value = "/{id}") +// public AjaxResult getInfo(@PathVariable("id") Long id) +// { +// return AjaxResult.success(emisWaybillService.selectEmisWaybillById(id)); +// } /** * 新增运单列表 */ - @PreAuthorize("@ss.hasPermi('emis:emisWaybill:add')") - @Log(title = "运单列表", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody EmisWaybill emisWaybill) - { - return toAjax(emisWaybillService.insertEmisWaybill(emisWaybill)); - } +// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:add')") +// @Log(title = "运单列表", businessType = BusinessType.INSERT) +// @PostMapping +// public AjaxResult add(@RequestBody EmisWaybill emisWaybill) +// { +// return toAjax(emisWaybillService.insertEmisWaybill(emisWaybill)); +// } /** * 修改运单列表 */ - @PreAuthorize("@ss.hasPermi('emis:emisWaybill:edit')") - @Log(title = "运单列表", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody EmisWaybill emisWaybill) - { - return toAjax(emisWaybillService.updateEmisWaybill(emisWaybill)); - } +// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:edit')") +// @Log(title = "运单列表", businessType = BusinessType.UPDATE) +// @PutMapping +// public AjaxResult edit(@RequestBody EmisWaybill emisWaybill) +// { +// return toAjax(emisWaybillService.updateEmisWaybill(emisWaybill)); +// } /** * 删除运单列表 */ - @PreAuthorize("@ss.hasPermi('emis:emisWaybill:remove')") - @Log(title = "运单列表", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(emisWaybillService.deleteEmisWaybillByIds(ids)); - } +// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:remove')") +// @Log(title = "运单列表", businessType = BusinessType.DELETE) +// @DeleteMapping("/{ids}") +// public AjaxResult remove(@PathVariable Long[] ids) +// { +// return toAjax(emisWaybillService.deleteEmisWaybillByIds(ids)); +// } + + } diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAttachment.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAttachment.java index 28e8d42a4..c23d02ff7 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAttachment.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillAttachment.java @@ -2,7 +2,7 @@ * @Project: emis * @Title: EmisWaybillAttachment.java * @author linfso - * @date 2024-03-01 06:18:21 + * @date 2024-04-25 09:41:23 * @Copyright: ShangHai Duta 2022 All rights reserved. * @version v1.0 * @Description:

运单附件 实体类

@@ -26,7 +26,7 @@ import lombok.Data; * @ClassName EmisWaybillAttachment * @Description 运单附件 * @author linfso - * @date 2024-03-01 06:18:21 + * @date 2024-04-25 09:41:23 */ @Data public class EmisWaybillAttachment extends BaseEntity @@ -46,6 +46,6 @@ public class EmisWaybillAttachment extends BaseEntity /* 文件描述 */ private String fileDesc; /* 排序 */ - private String orderNum; + private Integer orderNum; } diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillCargo.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillCargo.java index 358585ea7..71f7e4274 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillCargo.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillCargo.java @@ -1,10 +1,10 @@ -/** +/** * @Project: emis * @Title: EmisWaybillCargo.java * @author linfso - * @date 2024-02-29 08:15:15 + * @date 2024-04-25 09:18:11 * @Copyright: ShangHai Duta 2022 All rights reserved. - * @version v1.0 + * @version v1.0 * @Description:

运单货物 实体类

*/ @@ -17,6 +17,7 @@ import com.xdadan.erp.common.annotation.Excel; import com.xdadan.erp.common.core.domain.BaseEntity; import com.xdadan.erp.common.core.domain.TreeEntity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import lombok.Data; @@ -25,9 +26,9 @@ import lombok.Data; * @ClassName EmisWaybillCargo * @Description 运单货物 * @author linfso - * @date 2024-02-29 08:15:15 + * @date 2024-04-25 09:18:11 */ - @Data +@Data public class EmisWaybillCargo extends BaseEntity { private static final long serialVersionUID = 1L; @@ -41,13 +42,13 @@ public class EmisWaybillCargo extends BaseEntity /* 货物名称 */ private String goodsName; /* 货物数量 */ - private String cargoQty; + private Integer cargoQty; /* 单位 */ private String unit; /* 重量 */ - private String weight; + private BigDecimal weight; /* 货物单价 */ - private String price; + private BigDecimal price; /* 货物币种 */ private String currency; /* 原产国 */ @@ -69,20 +70,22 @@ public class EmisWaybillCargo extends BaseEntity /* 厂家 */ private String manufacturer; /* 毛重 */ - private String grossWeight; + private BigDecimal grossWeight; /* 长 */ - private String length; + private BigDecimal length; /* 宽 */ - private String width; + private BigDecimal width; + /* 高 */ + private BigDecimal height; + /* 体积 */ + private BigDecimal volume; /* 申报价值 */ - private String declaredValue; + private BigDecimal declaredValue; /* 申报价值币种 */ private String declaredValueCurrency; /* 条码 */ private String barcode; - /* 高 */ - private String height; - /* 体积 */ - private String volume; + /* 排序 */ + private Integer orderNum; } diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java index 753ea4c7f..1b9ae0ab4 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/vo/WaybillOrder.java @@ -50,6 +50,9 @@ public class WaybillOrder implements Serializable { /* wx openid */ private String openId; + /* 寄件客户编号2502021 */ + private String customerCode; + /* 支付方式 : 现金或月结 */ private String paymentType; diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java index b88738026..61c9245c0 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java @@ -136,7 +136,6 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService - /** * 删除运单列表信息 * @@ -205,8 +204,6 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService sender.setCompany(emisWaybill.getSendCompany()); waybillOrder.setSender(sender); - - // 收费项 // 查询收费项 List feeItems = new ArrayList<>(); EmisWaybillFeeitem queryFeeitem = new EmisWaybillFeeitem(); @@ -373,4 +370,20 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService return 1; } + public static void main(String[] args) { + + EmisWaybill emisWaybill =new EmisWaybill(); + emisWaybill.setBillCode("T123123"); + WaybillOrder waybillOrder = new WaybillOrder(); + + // 忽略复制过程中出现的错误 + CopyOptions options = CopyOptions.create().setIgnoreError(true); + + // 基础信息 + BeanUtil.copyProperties(emisWaybill,waybillOrder,options); + + System.out.println(waybillOrder.toString()); + + } + } diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml index bc9cc9a99..e71c1e25b 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillAttachmentMapper.xml @@ -33,7 +33,7 @@ and file_name like concat('%', #{fileName}, '%') and file_url like concat('%', #{fileUrl}, '%') and file_desc like concat('%', #{fileDesc}, '%') - and order_num like concat('%', #{orderNum}, '%') + and order_num like concat('%', #{orderNum}, '%') and del_flag like concat('%', #{delFlag}, '%') and create_by like concat('%', #{createBy}, '%') and create_time = #{createTime} @@ -59,7 +59,7 @@ file_name, file_url, file_desc, - order_num, + order_num, del_flag, create_by, create_time, @@ -74,7 +74,7 @@ #{fileName}, #{fileUrl}, #{fileDesc}, - #{orderNum}, + #{orderNum}, #{delFlag}, #{createBy}, #{createTime}, @@ -92,7 +92,7 @@ file_name = #{fileName}, file_url = #{fileUrl}, file_desc = #{fileDesc}, - order_num = #{orderNum}, + order_num = #{orderNum}, del_flag = #{delFlag}, create_by = #{createBy}, create_time = #{createTime}, diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillCargoMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillCargoMapper.xml index 04c2f0fdc..ba9f8c6ff 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillCargoMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillCargoMapper.xml @@ -1,9 +1,9 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -26,11 +26,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - - + @@ -40,20 +41,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, waybill_id, goods_code, goods_name, cargo_qty, unit, weight, price, currency, nation_area, tax_no, hscode, brand, purpose, ingredients, function, goods_model, manufacturer, gross_weight, length, width, declared_value, declared_value_currency, barcode, height, volume, del_flag, create_by, create_time, update_by, update_time, remark from emis_waybill_cargo + select id, waybill_id, goods_code, goods_name, cargo_qty, unit, weight, price, currency, nation_area, tax_no, hscode, brand, purpose, ingredients, function, goods_model, manufacturer, gross_weight, length, width, height, volume, declared_value, declared_value_currency, barcode, order_num, del_flag, create_by, create_time, update_by, update_time, remark from emis_waybill_cargo - + - + insert into emis_waybill_cargo @@ -95,10 +97,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" waybill_id, goods_code, goods_name, - cargo_qty, + cargo_qty, unit, - weight, - price, + weight, + price, currency, nation_area, tax_no, @@ -109,30 +111,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" function, goods_model, manufacturer, - gross_weight, - length, - width, - declared_value, + gross_weight, + length, + width, + height, + volume, + declared_value, declared_value_currency, barcode, - height, - volume, + order_num, del_flag, create_by, create_time, update_by, update_time, remark, - + #{id}, #{waybillId}, #{goodsCode}, #{goodsName}, - #{cargoQty}, + #{cargoQty}, #{unit}, - #{weight}, - #{price}, + #{weight}, + #{price}, #{currency}, #{nationArea}, #{taxNo}, @@ -143,21 +146,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{function}, #{goodsModel}, #{manufacturer}, - #{grossWeight}, - #{length}, - #{width}, - #{declaredValue}, + #{grossWeight}, + #{length}, + #{width}, + #{height}, + #{volume}, + #{declaredValue}, #{declaredValueCurrency}, #{barcode}, - #{height}, - #{volume}, + #{orderNum}, #{delFlag}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, - + @@ -166,10 +170,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" waybill_id = #{waybillId}, goods_code = #{goodsCode}, goods_name = #{goodsName}, - cargo_qty = #{cargoQty}, + cargo_qty = #{cargoQty}, unit = #{unit}, - weight = #{weight}, - price = #{price}, + weight = #{weight}, + price = #{price}, currency = #{currency}, nation_area = #{nationArea}, tax_no = #{taxNo}, @@ -180,14 +184,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" function = #{function}, goods_model = #{goodsModel}, manufacturer = #{manufacturer}, - gross_weight = #{grossWeight}, - length = #{length}, - width = #{width}, - declared_value = #{declaredValue}, + gross_weight = #{grossWeight}, + length = #{length}, + width = #{width}, + height = #{height}, + volume = #{volume}, + declared_value = #{declaredValue}, declared_value_currency = #{declaredValueCurrency}, barcode = #{barcode}, - height = #{height}, - volume = #{volume}, + order_num = #{orderNum}, del_flag = #{delFlag}, create_by = #{createBy}, create_time = #{createTime}, @@ -203,7 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from emis_waybill_cargo where id in + delete from emis_waybill_cargo where id in #{id}