bp(net core)+easyui+efcore实现仓储管理系统——入库管理之二(三十八)
abp(net core)+easyui+efcore实现仓储管理系统目录
abp(net core)+easyui+efcore实现仓储管理系统——EasyUI前端页面框架 (十八)
abp(net core)+easyui+efcore实现仓储管理系统——ABP WebAPI与EasyUI结合增删改查之八(三十四)
在上一篇文章abp(net core)+easyui+efcore实现仓储管理系统——入库管理之一(三十七)中我们创建了入库单的实体类,并使用CodeFirst功能创建了数据库表,接下我们来创建一些有关与入库单有关的DTO类与查询分页类。
四、定义应用服务接口需要用到的DTO类
为了在进行查询入库单表头,我们需要创建, PagedInStockResultRequestDto类,用来将查询条件数据传递到基础设施层.
1. 在Visual Studio 2017的“解决方案资源管理器”中,右键单击“ABP.TPLMS.Application”项目,在弹出菜单中选择“添加” > “新建文件夹”,并重命名为“InStocks”
2. 使用鼠标右键单击我们刚才创建的“InStocks”文件夹,在弹出菜单中选择“添加” > “新建文件夹”,并重命名为“Dto”。
3.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 Paged InStockResultRequestDto,然后选择“添加”。代码如下。
- using Abp.Application.Services.Dto;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- public class PagedInStockResultRequestDto : PagedResultRequestDto
- {
- public string Keyword { get; set; }
- public string InStockNo { get; set; }
- public DateTime BeginTime { get; set; }
- DateTime m_EndTime;
- /// <summary>
- /// 查询截止日期,如果当前时间小于100年前,就给一个默认日期(明天)
- /// </summary>
- public DateTime EndTime { get
- {
- if (m_EndTime < DateTime.Now.AddYears(-))
- return DateTime.Now.AddDays();
- else
- return m_EndTime;
- }
- set
- {
- m_EndTime = value;
- }
- }
- public string OwnerName { get; set; }
- public string No { get; set; }
- }
- }
4.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 PagedInStockDetailResultRequestDto,然后选择“添加”。此类根据入库单单号查询入库单的明细数据。代码如下。
- using Abp.Application.Services.Dto;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- public class PagedInStockDetailResultRequestDto : PagedResultRequestDto
- {
- public string Keyword { get; set; }
- public string InStockNo { get; set; }
- }
- }
5.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 PagedInStockDetailLocResultRequestDto,然后选择“添加”。此类根据入库单明细的ID查询入库单某条明细数据的库位信息。代码如下。
- using Abp.Application.Services.Dto;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- public class PagedInStockDetailLocResultRequestDto : PagedResultRequestDto
- {
- public string Keyword { get; set; }
- public int InStockOrderDetailId { get; set; }
- }
- }
6.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 InStockOrderDto,然后选择“添加”。代码如下。
- using Abp.Application.Services.Dto;
- using Abp.AutoMapper;
- using ABP.TPLMS.Entitys;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- [AutoMapFrom(typeof(InStockOrder))]
- public class InStockOrderDto : EntityDto<int>
- {
- public string No { get; set; }
- /// <summary>
- /// 客户名称
- /// </summary>
- public string CustomerName { get; set; }
- public string WarehouseType { get; set; }
- /// <summary>
- /// 客户代码
- /// </summary>
- public string CustomerCode { get; set; }
- /// <summary>
- /// 送货单号
- /// </summary>
- public string DeliveryNo { get; set; }
- /// <summary>
- /// 仓库号
- /// </summary>
- public string WarehouseNo { get; set; }
- /// <summary>
- /// 货主
- /// </summary>
- public string OwnerName { get; set; }
- /// <summary>
- /// 毛重
- /// </summary>
- public decimal Gwt { get; set; }
- public decimal Nwt { get; set; }
- public int PackageQty { get; set; }
- /// <summary>
- /// 接收时间
- /// </summary>
- public string ReceiveTime { get; set; }
- /// <summary>
- /// 接收人
- /// </summary>
- public string Receiver { get; set; }
- public string Oper { get; set; }
- public int Status { get; set; }
- public string OwnerCode { get; set; }
- /// <summary>
- /// 预计送货时间
- /// </summary>
- public string PreDeliveryTime { get; set; }
- /// <summary>
- /// 审核人
- /// </summary>
- public string Checker { get; set; }
- public string CheckTime { get; set; }
- public string Remark { get; set; }
- public DateTime CreationTime { get; set; }
- public string LastUpdateTime { get; set; }
- public string LastOper { get; set; }
- public List<InStockOrderDetailDto> InStockOrderDetail { get; set; }
- }
- }
7.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 CreateUpdateInStockOrderDto,然后选择“添加”。代码如下。
- using Abp.Application.Services.Dto;
- using Abp.AutoMapper;
- using ABP.TPLMS.Entitys;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- [AutoMapTo(typeof(InStockOrder))]
- public class CreateUpdateInStockOrderDto : EntityDto<int>
- {
- public const int MaxLength = ;
- [StringLength()]
- [Required]
- public string No { get; set; }
- /// <summary>
- /// 客户名称
- /// </summary>
- [StringLength(MaxLength)]
- [Required]
- public string CustomerName { get; set; }
- public string WarehouseType { get; set; }
- /// <summary>
- /// 客户代码
- /// </summary>
- [StringLength()]
- [Required]
- public string CustomerCode { get; set; }
- /// <summary>
- /// 送货单号
- /// </summary>
- public string DeliveryNo { get; set; }
- /// <summary>
- /// 仓库号
- /// </summary>
- public string WarehouseNo { get; set; }
- /// <summary>
- /// 货主
- /// </summary>
- [StringLength(MaxLength)]
- [Required]
- public string OwnerName { get; set; }
- public decimal Gwt { get; set; }
- public decimal Nwt { get; set; }
- public int PackageQty { get; set; }
- /// <summary>
- /// 接收时间
- /// </summary>
- [StringLength()]
- public string ReceiveTime { get; set; }
- /// <summary>
- /// 接收人
- /// </summary>
- [StringLength()]
- public string Receiver { get; set; }
- [StringLength()]
- public string Oper { get; set; }
- public int Status { get; set; }
- [StringLength()]
- public string OwnerCode { get; set; }
- /// <summary>
- /// 预计送货时间
- /// </summary>
- [StringLength()]
- public string PreDeliveryTime { get; set; }
- /// <summary>
- /// 审核人
- /// </summary>
- [StringLength()]
- public string Checker { get; set; }
- [StringLength()]
- public string CheckTime { get; set; }
- [StringLength()]
- public string Remark { get; set; }
- public DateTime CreationTime { get; set; }
- [StringLength()]
- public string LastUpdateTime { get; set; }
- [StringLength()]
- public string LastOper { get; set; }
- public List<CreateUpdateInStockOrderDetailDto> InStockOrderDetail { get; set; }
- }
- }
8.1 InStockDetailDto
- using Abp.Application.Services.Dto;
- using Abp.AutoMapper;
- using Abp.Domain.Entities;
- using Abp.Domain.Entities.Auditing;
- using ABP.TPLMS.Entitys;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- [AutoMapFrom(typeof(InStockOrderDetail))]
- public class InStockOrderDetailDto : EntityDto<int>
- {
- public int SupplierId { get; set; }
- public string CargoCode { get; set; }
- public string HSCode { get; set; }
- public string CargoName { get; set; }
- public string Spcf { get; set; }
- public string Unit { get; set; }
- public string Country { get; set; }
- public string Brand { get; set; }
- public string Curr { get; set; }
- public string Package { get; set; }
- public decimal Length { get; set; }
- public decimal Width { get; set; }
- public decimal Height { get; set; }
- public decimal Vol { get; set; }
- public decimal Price { get; set; }
- public decimal TotalAmt { get; set; }
- public decimal GrossWt { get; set; }
- public decimal NetWt { get; set; }
- public DateTime CreationTime { get; set; }
- public string InStockNo { get; set; }
- public int SeqNo { get; set; }
- public decimal Qty { get; set; }
- public decimal LawfQty { get; set; }
- public decimal SecdLawfQty { get; set; }
- public string LawfUnit { get; set; }
- public string SecdLawfUnit { get; set; }
- public string Batch { get; set; }
- public int DeliveryOrderDetailId { get; set; }
- [NotMapped]
- public List<InStockOrderDetailLoc> InStockOrderDetailLoc { get; set; }
- }
- }
8.2 CreateUpdateInStockDetailDto
- using Abp.Application.Services.Dto;
- using Abp.AutoMapper;
- using Abp.Domain.Entities;
- using Abp.Domain.Entities.Auditing;
- using ABP.TPLMS.Entitys;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- [AutoMapTo(typeof(InStockOrderDetail))]
- public class CreateUpdateInStockOrderDetailDto : EntityDto<int>
- {
- public const int MaxLength = ;
- public int SupplierId { get; set; }
- [MaxLength()]
- public string CargoCode { get; set; }
- [MaxLength()]
- public string HSCode { get; set; }
- [MaxLength(MaxLength)]
- public string CargoName { get; set; }
- [MaxLength(MaxLength)]
- public string Spcf { get; set; }
- [MaxLength()]
- public string Unit { get; set; }
- [MaxLength()]
- public string Country { get; set; }
- [MaxLength()]
- public string Brand { get; set; }
- [MaxLength()]
- public string Curr { get; set; }
- [MaxLength()]
- public string Package { get; set; }
- public decimal Length { get; set; }
- public decimal Width { get; set; }
- public decimal Height { get; set; }
- public decimal Vol { get; set; }
- public decimal Price { get; set; }
- public decimal TotalAmt { get; set; }
- public decimal GrossWt { get; set; }
- public decimal NetWt { get; set; }
- public DateTime CreationTime { get; set; }
- [MaxLength()]
- public string InStockNo { get; set; }
- public int SeqNo { get; set; }
- public decimal Qty { get; set; }
- public decimal LawfQty { get; set; }
- public decimal SecdLawfQty { get; set; }
- [MaxLength()]
- public string LawfUnit { get; set; }
- [MaxLength()]
- public string SecdLawfUnit { get; set; }
- [MaxLength()]
- public string Batch { get; set; }
- public int DeliveryOrderDetailId { get; set; }
- [NotMapped]
- public List<InStockOrderDetailLoc> InStockOrderDetailLoc { get; set; }
- }
- }
8.3 InStockDetailLocDto
- using Abp.Application.Services.Dto;
- using Abp.AutoMapper;
- using Abp.Domain.Entities;
- using Abp.Domain.Entities.Auditing;
- using ABP.TPLMS.Entitys;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- public class InStockOrderDetailLocDto : EntityDto<int>
- {
- [AutoMapFrom(typeof(InStockOrderDetailLoc))]
- public InStockOrderDetailLocDto()
- {
- this.Qty = ;
- this.SeqNo = ;
- this.Loc = string.Empty;
- this.CreationTime = DateTime.Now;
- this.InStockOrderDetailId = ;
- }
- public int InStockOrderDetailId { get; set; }
- public int SeqNo { get; set; }
- public string Loc { get; set; }
- public decimal Qty { get; set; }
- public DateTime CreationTime { get; set; }
- }
- }
8.4 CreateUpdateInStockDetailLocDto。
- using Abp.Application.Services.Dto;
- using Abp.AutoMapper;
- using Abp.Domain.Entities;
- using Abp.Domain.Entities.Auditing;
- using ABP.TPLMS.Entitys;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.Text;
- namespace ABP.TPLMS.InStocks.Dto
- {
- public class CreateUpdateInStockOrderDetailLocDto : EntityDto<int>
- {
- [AutoMapTo(typeof(InStockOrderDetailLoc))]
- public CreateUpdateInStockOrderDetailLocDto()
- {
- this.Qty = ;
- this.SeqNo = ;
- this.Loc = string.Empty;
- this.CreationTime = DateTime.Now;
- this.InStockOrderDetailId = ;
- }
- public int InStockOrderDetailId { get; set; }
- public int SeqNo { get; set; }
- [StringLength()]
- public string Loc { get; set; }
- public decimal Qty { get; set; }
- public DateTime CreationTime { get; set; }
- }
- }
bp(net core)+easyui+efcore实现仓储管理系统——入库管理之二(三十八)的更多相关文章
- bp(net core)+easyui+efcore实现仓储管理系统——入库管理之三存储过程(三十九)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之九(四十五)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之四(四十)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之五(四十一)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之六(四十二)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之七(四十三)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之八(四十四)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之十(四十六)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
- abp(net core)+easyui+efcore实现仓储管理系统——入库管理之十一(四十七)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...
随机推荐
- 【2】从零认识中心极限思想-e往无尽
目录 e往无尽 单调性.有界性 \(e^{-x^2}\)的积分性质 函数列的近似 傅里叶的方案 三角函数系的正交性 傅立叶展开 傅立叶展开式的指数形式 e往无尽 无论是学高数,还是学习数分,我们在讲到 ...
- ionic 创建服务命令
创建Util工具库 ionic g provider Util
- Serverless 基本概念入门
从行业趋势看,Serverless 是云计算必经的一场革命 2019 年,Serverless 被 Gartner 称为最有潜力的云计算技术发展方向,并被赋予是必然性的发展趋势.Serverless ...
- springboot支付项目之springboot集成jpa
springboot集成spring-jpa 本文主要内容: 1:spring boot怎么集成spring-jpa以及第一个jpa查询示例 如jpa几个常用注解.lombok注解使用 2:怎么设置i ...
- <c:if >标签的坑!!
<c:if test="${trans.Transition}"> <input id="${trans.nextnode}" type=&q ...
- 吴裕雄--天生自然python学习笔记:python文档操作插入图片
向 Word 文件中插入图片 向 Word 文件插入图片的语法为: 例如,在 cl ip graph.docx 文件的第 4 段插入 ce ll.jpg 图片,井将图片文件保存于 Word 文件内: ...
- 树形dp(最小支配集)
http://poj.org/problem?id=3659 #include<iostream> #include<cstring> #include<algorith ...
- python后端面试第二部分:网络编程和并发编程--长期维护
1. 简述 OSI 七层协议. 2. 什么是C/S和B/S架构? 3. 简述 三次握手.四次挥手的流程. 4. 什么是arp协议? 5. TCP和UDP的区别? 6. 什么是局域网和广域网? 7. 为 ...
- 图表|Line graphs|Bar graphs|Pie graphs|Scatter graphs|标目|标值|图解|图题|标值|
科研论文写作-图表 图像的特点是直观性高效,可用于描述非线性关系,将文字难以描述的内容表达出来. Line graphs中有自变量和因变量,用于表示变化趋势.为了清晰简洁和易于辨认,所以其中的线条最好 ...
- perf4j+logback配置 非spring 可使用注解
最近项目打算使用perf4j进行性能监控,由于项目没有使用spring,而又不想对代码入侵过高,打算使用注解的方式进行接入.perf4j采用AspectJ库实现AOP. 具体接入方法如下: logba ...