abp(net core)+easyui+efcore实现仓储管理系统目录

abp(net core)+easyui+efcore实现仓储管理系统——EasyUI前端页面框架 (十八)

最近工作有点忙,已经有几个月没有更新了,计划在年前会把出库单管理写完。明年计划升级到Net Core 3.1或是net 5,具体看有没有空闲时间了。这就是最近的两个计划,不过有时候计划赶不上变化。

在上一篇文章中我们创建了出库单的实体类,并使用CodeFirst功能创建了数据库表,接下我们来创建一些有关与出库单有关的DTO类与查询分页类。

四、定义应用服务接口需要用到的DTO类

为了在进行查询出库单表头,我们需要创建, PagedOutStockResultRequestDto类,用来将查询条件数据传递到基础设施层.

1. 在Visual Studio 2017的“解决方案资源管理器”中,右键单击“ABP.TPLMS.Application”项目,在弹出菜单中选择“添加” > “新建文件夹”,并重命名为“OutStocks”

2. 使用鼠标右键单击我们刚才创建的“OutStocks”文件夹,在弹出菜单中选择“添加” > “新建文件夹”,并重命名为“Dto”。

3.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 PagedOutStockResultRequestDto,然后选择“添加”。代码如下。

using Abp.Application.Services.Dto;
using System;
using System.Collections.Generic;
using System.Text; namespace ABP.TPLMS.OutStocks.Dto
{ public class PagedOutStockResultRequestDto : 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(-100)) return DateTime.Now.AddDays(1); else return m_EndTime; }
set
{
m_EndTime = value; }
} public string OwnerName { get; set; } public string No { get; set; }
}
}

4.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 PagedOutStockDetailResultRequestDto,然后选择“添加”。此类根据入库单单号与出库单单号查询出库单的明细数据。代码如下。

using Abp.Application.Services.Dto;
using System;
using System.Collections.Generic;
using System.Text; namespace ABP.TPLMS.OutStocks.Dto
{ public class PagedOutStockDetailResultRequestDto : PagedResultRequestDto
{ public string Keyword { get; set; } public string InStockNo { get; set; } public string OutStockNo { get; set; } }
}

5.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 OutStockOrderDto,然后选择“添加”。代码如下。

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.OutStocks.Dto
{ [AutoMapFrom(typeof(OutStockOrder))]
public class OutStockOrderDto : EntityDto<int>
{ public string No { get; set; } /// <summary>
/// 客户名称
/// </summary>
public string CustomerName { get; set; } /// <summary>
/// 车牌号
/// </summary>
public string VehicleNo { get; set; } /// <summary>
/// 客户代码
/// </summary>
public string CustomerCode { get; set; } /// <summary>
/// 收货人代码
/// </summary>
public string ConsigneeCode { get; set; } /// <summary>
/// 收货人
/// </summary>
public string Consignee { get; set; } /// <summary>
/// 收货人社会信用代码
/// </summary>
public string ConsigneeSCCD { get; set; } /// <summary>
/// 托运人,发货人
/// </summary>
public string Shipper { get; set; } /// <summary>
/// 托运人,发货人代码
/// </summary>
public string ShipperCode { get; set; } /// <summary>
/// 托运人,发货人社会信用代码
/// </summary>
public string ShipperSCCD { get; set; } /// <summary>
/// 通知人
/// </summary>
public string Notify { get; set; } /// <summary>
/// 通知人代码
/// </summary>
public string NotifyCode { get; set; } /// <summary>
/// 通知人社会信用代码
/// </summary>
public string NotifySCCD { get; set; } /// <summary>
/// 送货单号
/// </summary>
public string DeliveryNo { get; set; } /// <summary>
/// 仓库号
/// </summary>
public string WarehouseNo { get; set; } /// <summary>
/// 货主
/// </summary> [StringLength(MaxLength)]
public string OwnerName { get; set; } public decimal Gwt { get; set; }
public decimal Nwt { get; set; }
public int PackageQty { get; set; } /// <summary>
/// 理货时间
/// </summary>
public string TallyTime { get; set; } /// <summary>
/// 理货员
/// </summary> public string TallyClerk { get; set; }
public string Oper { get; set; } public int Status { get; set; }
public string OwnerCode { get; set; } /// <summary>
/// 预计出库时间
/// </summary>
public string PreOutStockTime { 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<OutStockOrderDetailDto> OutStockOrderDetail { get; set; } }
}

6.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 CreateUpdateOutStockOrderDto,然后选择“添加”。代码如下。

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.OutStocks.Dto
{ [AutoMapTo(typeof(OutStockOrder))] public class CreateUpdateOutStockOrderDto : EntityDto<int>
{ public const int MaxLength = 255; [StringLength(50)] [Required] public string No { get; set; } /// <summary>
/// 客户名称
/// </summary> [StringLength(MaxLength)] public string CustomerName { get; set; } /// <summary>
/// 车牌号
/// </summary> public string VehicleNo { get; set; } /// <summary>
/// 客户代码
/// </summary>
[StringLength(50)] public string CustomerCode { get; set; } /// <summary>
/// 收货人代码
/// </summary>
[Required]
public string ConsigneeCode { get; set; } /// <summary>
/// 收货人
/// </summary>
[Required]
public string Consignee { get; set; } /// <summary>
/// 收货人社会信用代码
/// </summary>
public string ConsigneeSCCD { get; set; } /// <summary>
/// 托运人,发货人
/// </summary>
[Required]
public string Shipper { get; set; } /// <summary>
/// 托运人,发货人代码
/// </summary>
[Required]
public string ShipperCode { get; set; } /// <summary>
/// 托运人,发货人社会信用代码
/// </summary>
public string ShipperSCCD { get; set; } /// <summary>
/// 通知人
/// </summary>
public string Notify { get; set; } /// <summary>
/// 通知人代码
/// </summary>
public string NotifyCode { get; set; } /// <summary>
/// 通知人社会信用代码
/// </summary>
public string NotifySCCD { 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(20)]
public string TallyTime { get; set; } /// <summary>
/// 理货员
/// </summary> [StringLength(50)]
public string TallyClerk { get; set; } [StringLength(50)]
public string Oper { get; set; }
public int Status { get; set; } [StringLength(50)]
public string OwnerCode { get; set; } /// <summary>
/// 预计出库时间
/// </summary>
[StringLength(20)] public string PreOutStockTime { get; set; } /// <summary>
/// 审核人
/// </summary>
[StringLength(50)] public string Checker { get; set; }
[StringLength(20)] public string CheckTime { get; set; }
[StringLength(1000)] public string Remark { get; set; }
public DateTime CreationTime { get; set; } [StringLength(20)]
public string LastUpdateTime { get; set; } [StringLength(50)] public string LastOper { get; set; } public List<CreateUpdateInStockOrderDetailDto> InStockOrderDetail { get; set; } } }

7. 重复上面的第3,4,5步,我们来创建OutStockDetailDto与CreateUpdateOutStockDetailDto。

7.1 OutStockDetailDto

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.OutStocks.Dto

{

    [AutoMapFrom(typeof(OutStockOrderDetail))]

    public class OutStockOrderDetailDto : 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; }

        /// <summary>

        /// 目的国

        /// </summary>   

        public string DestCountry { get; set; }

        /// <summary>

        /// 原产国

        /// </summary>     

        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 InStockOrderDetailId { 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 string Loc { get; set; }

    }

}

7.2 CreateUpdateOutStockDetailDto

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.OutStocks.Dto

{

    [AutoMapTo(typeof(OutStockOrderDetail))]

    public class CreateUpdateOutStockOrderDetailDto : EntityDto<int>

    {

        public const int MaxLength = 255;

        public int SupplierId { get; set; }

        [MaxLength(50)]

        public string CargoCode { get; set; }

        [MaxLength(10)]

        public string HSCode { get; set; }

        [MaxLength(MaxLength)]

        public string CargoName { get; set; }

        [MaxLength(MaxLength)]

        public string Spcf { get; set; }

        [MaxLength(20)]

        public string Unit { get; set; }

        /// <summary>

        /// 目的国

        /// </summary>

        [MaxLength(20)]

        public string DestCountry { get; set; }

        /// <summary>

        /// 原产国

        /// </summary>

        [MaxLength(20)]

        public string Country { get; set; }

        [MaxLength(50)]

        public string Brand { get; set; }

        [MaxLength(20)]

        public string Curr { get; set; }

        [MaxLength(20)]

        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(20)]

        public string InStockNo { get; set; }

        public int InStockOrderDetailId { get; set; }

        public decimal Qty { get; set; }

        public decimal LawfQty { get; set; }

        public decimal SecdLawfQty { get; set; }

        [MaxLength(20)]

        public string LawfUnit { get; set; }

        [MaxLength(20)]

        public string SecdLawfUnit { get; set; }

        [MaxLength(20)]

        public string Batch { get; set; }

        public string Loc { get; set; }

    }

}

abp(net core)+easyui+efcore实现仓储管理系统——出库管理之二(五十)的更多相关文章

  1. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之三(五十一)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  2. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之三(五十二)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  3. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之四(五十三)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  4. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之五(五十四)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  5. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之六(五十五)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  6. Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之七(五十六)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  7. Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之八(五十七)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  8. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之一(四十九)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

  9. abp(net core)+easyui+efcore实现仓储管理系统——入库管理之九(四十五)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统——ABP总体介绍(一) abp(net core)+ ...

随机推荐

  1. vue 实现原理及简单示例实现

    目录 相关html代码,用于被解析绑定数据 observer代码 Dep代码 Watcher 代码 Compile 代码 vue 简要构造函数 创建vue实例 结语 主要理解.实现如下方法: Obse ...

  2. 发现新世界:神级浏览器插件TamperMonkey(暴力猴)

    由于谷歌浏览器各种受限 于是我就先使用火狐浏览器尝试此插件 步骤非常简单. 1.在火狐浏览器内打开如下网址:https://addons.mozilla.org/zh-CN/firefox/addon ...

  3. Django 页面之间传递MySql数据表(Django八)

    之前实现了页面传递多个参数,但没有实现页面间传递一整个数据表 session传递几个参数:https://blog.csdn.net/qq_38175040/article/details/10496 ...

  4. selenium中各个模块操作:下拉框、鼠标悬浮连贯、拼图拖拽操作、以及其他拖拽操作、连线操作

    1.下拉框的修改操作 方法一:定位到元素后,通过select选择对应的值 方法二:通过两次点击的方法:没有select的value属性时,采用click两次的方法去选择: click第一次后,出现下拉 ...

  5. swift基本数据类型使用-数组使用

    目录 数组的使用 1.数组的定义 2.对可变数组的基本操作 3.数组的遍历 4.数组的合并 5. 示例 数组的使用 1.数组的定义 1> 定义不可变数组 2> 定义可变数组 2.对可变数组 ...

  6. linux 信号机制

    文章目录 1. 实时信号非实时信号 2. 信号状态: 3. 信号生命周期: 4. 信号的执行和注销 信号掩码和信号处理函数的继承 信号处理函数的继承 信号掩码的继承 sigwait 与多线程 sigw ...

  7. [POJ1050]To the Max(最大子段和)

    题目链接 http://poj.org/problem?id=1050 题意 求最大子矩阵和. 题解 即求二维的最大子段和.二维数组sumRec[I][j]存储原始数组数据rec[0][j] to r ...

  8. [程序员代码面试指南]递归和动态规划-机器人达到指定位置方法数(一维DP待做)(DP)

    题目描述 一行N个位置1到N,机器人初始位置M,机器人可以往左/右走(只能在位置范围内),规定机器人必须走K步,最终到位置P.输入这四个参数,输出机器人可以走的方法数. 解题思路 DP 方法一:时间复 ...

  9. dubbo学习(二)配置dubbo XML方式配置

    provider(生产者) <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo= ...

  10. Java源码赏析(二)Java常见接口

    一.Comparable接口 package java.lang; import java.util.*; public interface Comparable<T> { /** * i ...