Sfoglia il codice sorgente

feature(*): OMS合同模块、交付工单模块需求优化,接口功能实现

likai 2 anni fa
parent
commit
2890b3d458

+ 144 - 123
opms_parent/app/dao/contract/internal/ctr_contract.go

@@ -32,47 +32,54 @@ type CtrContractDao struct {
 
 // CtrContractColumns defines and stores column names for table ctr_contract.
 type ctrContractColumns struct {
-	Id                  string // 主键
-	ContractCode        string // 合同编号
-	ContractName        string // 合同名称
-	CustId              string // 关联客户
-	CustName            string // 客户名称
-	ProductLine         string // 产品线
-	IsBig               string // 是否为大项目
-	CustProvinceId      string // 所在省ID
-	CustProvince        string // 所在省
-	CustCityId          string // 所在市ID
-	CustCity            string // 所在市
-	NboId               string // 关联项目
-	NboName             string // 项目名称
-	ApproStatus         string // 审核状态 10 待提交审核 20 待审核 30 审核已同意 40 审核已拒绝 50 审核已撤销
-	ContractType        string // 合同类型
-	ContractAmount      string // 合同金额
-	InvoiceAmount       string // 已开票金额
-	CollectedAmount     string // 已回款金额
-	ContractStartTime   string // 合同开始时间
-	ContractEndTime     string // 合同结束时间
-	ContractSignTime    string // 合同签订时间
-	InchargeId          string // 负责人ID
-	InchargeName        string // 负责人(销售工程师)
-	SignatoryId         string // 公司签约人ID
-	SignatoryName       string // 公司签约人
-	SignatoryType       string // 签订单位类型 10 终端用户 20 经销商 30 代理商
-	SignatoryUnit       string // 合同签订单位
-	EarnestMoney        string // 质量/履约保证金(元)
-	CustSignatoryId     string // 客户签约人ID
-	CustSignatoryName   string // 客户签约人
-	DistributorId       string // 经销商ID
-	DistributorName     string // 经销商
-	ServiceFeeAgreement string // 运维服务费约定
-	Remark              string // 备注
-	CreatedBy           string // 创建者
-	CreatedName         string // 创建人
-	CreatedTime         string // 创建时间
-	UpdatedBy           string // 更新者
-	UpdatedName         string // 更新人
-	UpdatedTime         string // 更新时间
-	DeletedTime         string // 删除时间
+	Id                           string // 主键
+	ContractCode                 string // 合同编号
+	ContractName                 string // 合同名称
+	CustId                       string // 关联客户
+	CustName                     string // 客户名称
+	ProductLine                  string // 产品线
+	IsBig                        string // 是否为大项目
+	CustProvinceId               string // 所在省ID
+	CustProvince                 string // 所在省
+	CustCityId                   string // 所在市ID
+	CustCity                     string // 所在市
+	NboId                        string // 关联项目
+	NboName                      string // 项目名称
+	ApproStatus                  string // 审核状态 10 待提交审核 20 待审核 30 审核已同意 40 审核已拒绝 50 审核已撤销
+	ContractType                 string // 合同类型
+	ContractAmount               string // 合同金额
+	InvoiceAmount                string // 已开票金额
+	CollectedAmount              string // 已回款金额
+	ContractStartTime            string // 合同开始时间
+	ContractEndTime              string // 合同结束时间
+	ContractSignTime             string // 合同签订时间
+	InchargeId                   string // 负责人ID
+	InchargeName                 string // 负责人(销售工程师)
+	SignatoryId                  string // 公司签约人ID
+	SignatoryName                string // 公司签约人
+	SignatoryType                string // 签订单位类型 10 终端用户 20 经销商 30 代理商
+	SignatoryUnit                string // 合同签订单位
+	EarnestMoney                 string // 质量/履约保证金(元)
+	CustSignatoryId              string // 客户签约人ID
+	CustSignatoryName            string // 客户签约人
+	DistributorId                string // 经销商ID
+	DistributorName              string // 经销商
+	ServiceFeeAgreement          string // 运维服务费约定
+	SoftwareMaintenanceBeginTime string // 软件运维开始时间
+	SoftwareMaintenanceEndTime   string // 软件运维结束时间
+	SoftwareMaintenanceLimit     string // 软件运维期限(年)
+	HardwareMaintenanceBeginTime string // 硬件运维开始时间
+	HardwareMaintenanceEndTime   string // 硬件运维结束时间
+	HardwareMaintenanceLimit     string // 硬件运维期限(年)
+	MaintenanceClause            string // 运维条款
+	Remark                       string // 备注
+	CreatedBy                    string // 创建者
+	CreatedName                  string // 创建人
+	CreatedTime                  string // 创建时间
+	UpdatedBy                    string // 更新者
+	UpdatedName                  string // 更新人
+	UpdatedTime                  string // 更新时间
+	DeletedTime                  string // 删除时间
 }
 
 var (
@@ -82,47 +89,54 @@ var (
 		DB:    g.DB("default"),
 		Table: "ctr_contract",
 		C: ctrContractColumns{
-			Id:                  "id",
-			ContractCode:        "contract_code",
-			ContractName:        "contract_name",
-			CustId:              "cust_id",
-			CustName:            "cust_name",
-			ProductLine:         "product_line",
-			IsBig:               "is_big",
-			CustProvinceId:      "cust_province_id",
-			CustProvince:        "cust_province",
-			CustCityId:          "cust_city_id",
-			CustCity:            "cust_city",
-			NboId:               "nbo_id",
-			NboName:             "nbo_name",
-			ApproStatus:         "appro_status",
-			ContractType:        "contract_type",
-			ContractAmount:      "contract_amount",
-			InvoiceAmount:       "invoice_amount",
-			CollectedAmount:     "collected_amount",
-			ContractStartTime:   "contract_start_time",
-			ContractEndTime:     "contract_end_time",
-			ContractSignTime:    "contract_sign_time",
-			InchargeId:          "incharge_id",
-			InchargeName:        "incharge_name",
-			SignatoryId:         "signatory_id",
-			SignatoryName:       "signatory_name",
-			SignatoryType:       "signatory_type",
-			SignatoryUnit:       "signatory_unit",
-			EarnestMoney:        "earnest_money",
-			CustSignatoryId:     "cust_signatory_id",
-			CustSignatoryName:   "cust_signatory_name",
-			DistributorId:       "distributor_id",
-			DistributorName:     "distributor_name",
-			ServiceFeeAgreement: "service_fee_agreement",
-			Remark:              "remark",
-			CreatedBy:           "created_by",
-			CreatedName:         "created_name",
-			CreatedTime:         "created_time",
-			UpdatedBy:           "updated_by",
-			UpdatedName:         "updated_name",
-			UpdatedTime:         "updated_time",
-			DeletedTime:         "deleted_time",
+			Id:                           "id",
+			ContractCode:                 "contract_code",
+			ContractName:                 "contract_name",
+			CustId:                       "cust_id",
+			CustName:                     "cust_name",
+			ProductLine:                  "product_line",
+			IsBig:                        "is_big",
+			CustProvinceId:               "cust_province_id",
+			CustProvince:                 "cust_province",
+			CustCityId:                   "cust_city_id",
+			CustCity:                     "cust_city",
+			NboId:                        "nbo_id",
+			NboName:                      "nbo_name",
+			ApproStatus:                  "appro_status",
+			ContractType:                 "contract_type",
+			ContractAmount:               "contract_amount",
+			InvoiceAmount:                "invoice_amount",
+			CollectedAmount:              "collected_amount",
+			ContractStartTime:            "contract_start_time",
+			ContractEndTime:              "contract_end_time",
+			ContractSignTime:             "contract_sign_time",
+			InchargeId:                   "incharge_id",
+			InchargeName:                 "incharge_name",
+			SignatoryId:                  "signatory_id",
+			SignatoryName:                "signatory_name",
+			SignatoryType:                "signatory_type",
+			SignatoryUnit:                "signatory_unit",
+			EarnestMoney:                 "earnest_money",
+			CustSignatoryId:              "cust_signatory_id",
+			CustSignatoryName:            "cust_signatory_name",
+			DistributorId:                "distributor_id",
+			DistributorName:              "distributor_name",
+			ServiceFeeAgreement:          "service_fee_agreement",
+			SoftwareMaintenanceBeginTime: "software_maintenance_begin_time",
+			SoftwareMaintenanceEndTime:   "software_maintenance_end_time",
+			SoftwareMaintenanceLimit:     "software_maintenance_limit",
+			HardwareMaintenanceBeginTime: "hardware_maintenance_begin_time",
+			HardwareMaintenanceEndTime:   "hardware_maintenance_end_time",
+			HardwareMaintenanceLimit:     "hardware_maintenance_limit",
+			MaintenanceClause:            "maintenance_clause",
+			Remark:                       "remark",
+			CreatedBy:                    "created_by",
+			CreatedName:                  "created_name",
+			CreatedTime:                  "created_time",
+			UpdatedBy:                    "updated_by",
+			UpdatedName:                  "updated_name",
+			UpdatedTime:                  "updated_time",
+			DeletedTime:                  "deleted_time",
 		},
 	}
 )
@@ -134,47 +148,54 @@ func NewCtrContractDao(tenant string) CtrContractDao {
 		DB:    g.DB(tenant),
 		Table: "ctr_contract",
 		C: ctrContractColumns{
-			Id:                  "id",
-			ContractCode:        "contract_code",
-			ContractName:        "contract_name",
-			CustId:              "cust_id",
-			CustName:            "cust_name",
-			ProductLine:         "product_line",
-			IsBig:               "is_big",
-			CustProvinceId:      "cust_province_id",
-			CustProvince:        "cust_province",
-			CustCityId:          "cust_city_id",
-			CustCity:            "cust_city",
-			NboId:               "nbo_id",
-			NboName:             "nbo_name",
-			ApproStatus:         "appro_status",
-			ContractType:        "contract_type",
-			ContractAmount:      "contract_amount",
-			InvoiceAmount:       "invoice_amount",
-			CollectedAmount:     "collected_amount",
-			ContractStartTime:   "contract_start_time",
-			ContractEndTime:     "contract_end_time",
-			ContractSignTime:    "contract_sign_time",
-			InchargeId:          "incharge_id",
-			InchargeName:        "incharge_name",
-			SignatoryId:         "signatory_id",
-			SignatoryName:       "signatory_name",
-			SignatoryType:       "signatory_type",
-			SignatoryUnit:       "signatory_unit",
-			EarnestMoney:        "earnest_money",
-			CustSignatoryId:     "cust_signatory_id",
-			CustSignatoryName:   "cust_signatory_name",
-			DistributorId:       "distributor_id",
-			DistributorName:     "distributor_name",
-			ServiceFeeAgreement: "service_fee_agreement",
-			Remark:              "remark",
-			CreatedBy:           "created_by",
-			CreatedName:         "created_name",
-			CreatedTime:         "created_time",
-			UpdatedBy:           "updated_by",
-			UpdatedName:         "updated_name",
-			UpdatedTime:         "updated_time",
-			DeletedTime:         "deleted_time",
+			Id:                           "id",
+			ContractCode:                 "contract_code",
+			ContractName:                 "contract_name",
+			CustId:                       "cust_id",
+			CustName:                     "cust_name",
+			ProductLine:                  "product_line",
+			IsBig:                        "is_big",
+			CustProvinceId:               "cust_province_id",
+			CustProvince:                 "cust_province",
+			CustCityId:                   "cust_city_id",
+			CustCity:                     "cust_city",
+			NboId:                        "nbo_id",
+			NboName:                      "nbo_name",
+			ApproStatus:                  "appro_status",
+			ContractType:                 "contract_type",
+			ContractAmount:               "contract_amount",
+			InvoiceAmount:                "invoice_amount",
+			CollectedAmount:              "collected_amount",
+			ContractStartTime:            "contract_start_time",
+			ContractEndTime:              "contract_end_time",
+			ContractSignTime:             "contract_sign_time",
+			InchargeId:                   "incharge_id",
+			InchargeName:                 "incharge_name",
+			SignatoryId:                  "signatory_id",
+			SignatoryName:                "signatory_name",
+			SignatoryType:                "signatory_type",
+			SignatoryUnit:                "signatory_unit",
+			EarnestMoney:                 "earnest_money",
+			CustSignatoryId:              "cust_signatory_id",
+			CustSignatoryName:            "cust_signatory_name",
+			DistributorId:                "distributor_id",
+			DistributorName:              "distributor_name",
+			ServiceFeeAgreement:          "service_fee_agreement",
+			SoftwareMaintenanceBeginTime: "software_maintenance_begin_time",
+			SoftwareMaintenanceEndTime:   "software_maintenance_end_time",
+			SoftwareMaintenanceLimit:     "software_maintenance_limit",
+			HardwareMaintenanceBeginTime: "hardware_maintenance_begin_time",
+			HardwareMaintenanceEndTime:   "hardware_maintenance_end_time",
+			HardwareMaintenanceLimit:     "hardware_maintenance_limit",
+			MaintenanceClause:            "maintenance_clause",
+			Remark:                       "remark",
+			CreatedBy:                    "created_by",
+			CreatedName:                  "created_name",
+			CreatedTime:                  "created_time",
+			UpdatedBy:                    "updated_by",
+			UpdatedName:                  "updated_name",
+			UpdatedTime:                  "updated_time",
+			DeletedTime:                  "deleted_time",
 		},
 	}
 	return dao

+ 36 - 0
opms_parent/app/dao/work/deliver_order_imp_progress_log.go

@@ -0,0 +1,36 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package work
+
+import (
+	"dashoo.cn/micro/app/dao/work/internal"
+)
+
+// deliverOrderImpProgressLogDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type deliverOrderImpProgressLogDao struct {
+	internal.DeliverOrderImpProgressLogDao
+}
+
+var (
+	// DeliverOrderImpProgressLog is globally public accessible object for table deliver_order_imp_progress_log operations.
+	DeliverOrderImpProgressLog = deliverOrderImpProgressLogDao{
+		internal.DeliverOrderImpProgressLog,
+	}
+)
+
+type DeliverOrderImpProgressLogDao struct {
+	internal.DeliverOrderImpProgressLogDao
+}
+
+func NewDeliverOrderImpProgressLogDao(tenant string) *DeliverOrderImpProgressLogDao {
+	dao := internal.NewDeliverOrderImpProgressLogDao(tenant)
+	return &DeliverOrderImpProgressLogDao{
+		dao,
+	}
+}
+
+// Fill with you ideas below.

+ 102 - 90
opms_parent/app/dao/work/internal/deliver_order.go

@@ -30,36 +30,40 @@ type DeliverOrderDao struct {
 
 // DeliverOrderColumns defines and stores column names for table deliver_order.
 type deliverOrderColumns struct {
-	Id                   string // 主键
-	OrderCode            string // 交付订单号
-	OrderStatus          string // 交付状态(10项目立项 20 完成)
-	OrderType            string // 交付类型(10 软件 20 硬件)
-	CustId               string // 关联客户ID
-	CustName             string // 关联客户名称
-	ProjectId            string // 关联项目ID
-	ProjectName          string // 关联项目名称
-	ContractId           string // 关联合同ID
-	ContractCode         string // 关联合同编号
-	ProjectManId         string // 项目经理
-	ProjectManName       string // 项目经理
-	DeliverManId         string // 交付经理
-	DeliverManName       string // 交付经理
-	Product              string // 产品线
-	FinishRemark         string // 完成信息
-	FinishTime           string // 完成时间
-	FinishBy             string // 完成操作人
-	FinishByName         string // 完成操作人
-	RequiredDeliveryTime string // 要求发货时间
-	ReceivingInfo        string // 收货信息
-	SpecialRequirements  string // 特殊要求说明
-	Remark               string // 备注
-	CreatedBy            string // 创建者
-	CreatedName          string // 创建人
-	CreatedTime          string // 创建时间
-	UpdatedBy            string // 更新者
-	UpdatedName          string // 更新人
-	UpdatedTime          string // 更新时间
-	DeletedTime          string // 删除时间
+	Id                           string // 主键
+	OrderCode                    string // 交付订单号
+	OrderStatus                  string // 交付状态(10项目立项 20 完成)
+	OrderType                    string // 交付类型(10 软件 20 硬件)
+	CustId                       string // 关联客户ID
+	CustName                     string // 关联客户名称
+	ProjectId                    string // 关联项目ID
+	ProjectName                  string // 关联项目名称
+	ContractId                   string // 关联合同ID
+	ContractCode                 string // 关联合同编号
+	ProjectManId                 string // 项目经理
+	ProjectManName               string // 项目经理
+	DeliverManId                 string // 交付经理
+	DeliverManName               string // 交付经理
+	Product                      string // 产品线
+	FinishRemark                 string // 完成信息
+	FinishTime                   string // 完成时间
+	FinishBy                     string // 完成操作人
+	FinishByName                 string // 完成操作人
+	RequiredDeliveryTime         string // 要求发货时间
+	ReceivingInfo                string // 收货信息
+	SpecialRequirements          string // 特殊要求说明
+	RealDeliveryTime             string // 实际发货时间
+	SoftwareRequiredDeliveryTime string // (软件)要求交付时间
+	SoftwareSpecialRequirements  string // (软件)特殊事项说明
+	IsDelay                      string // 是否延期(10(或为空)未延期,20已延期)
+	Remark                       string // 备注
+	CreatedBy                    string // 创建者
+	CreatedName                  string // 创建人
+	CreatedTime                  string // 创建时间
+	UpdatedBy                    string // 更新者
+	UpdatedName                  string // 更新人
+	UpdatedTime                  string // 更新时间
+	DeletedTime                  string // 删除时间
 }
 
 var (
@@ -69,36 +73,40 @@ var (
 		DB:    g.DB("default"),
 		Table: "deliver_order",
 		C: deliverOrderColumns{
-			Id:                   "id",
-			OrderCode:            "order_code",
-			OrderStatus:          "order_status",
-			OrderType:            "order_type",
-			CustId:               "cust_id",
-			CustName:             "cust_name",
-			ProjectId:            "project_id",
-			ProjectName:          "project_name",
-			ContractId:           "contract_id",
-			ContractCode:         "contract_code",
-			ProjectManId:         "project_man_id",
-			ProjectManName:       "project_man_name",
-			DeliverManId:         "deliver_man_id",
-			DeliverManName:       "deliver_man_name",
-			Product:              "product",
-			FinishRemark:         "finish_remark",
-			FinishTime:           "finish_time",
-			FinishBy:             "finish_by",
-			FinishByName:         "finish_by_name",
-			RequiredDeliveryTime: "required_delivery_time",
-			ReceivingInfo:        "receiving_info",
-			SpecialRequirements:  "special_requirements",
-			Remark:               "remark",
-			CreatedBy:            "created_by",
-			CreatedName:          "created_name",
-			CreatedTime:          "created_time",
-			UpdatedBy:            "updated_by",
-			UpdatedName:          "updated_name",
-			UpdatedTime:          "updated_time",
-			DeletedTime:          "deleted_time",
+			Id:                           "id",
+			OrderCode:                    "order_code",
+			OrderStatus:                  "order_status",
+			OrderType:                    "order_type",
+			CustId:                       "cust_id",
+			CustName:                     "cust_name",
+			ProjectId:                    "project_id",
+			ProjectName:                  "project_name",
+			ContractId:                   "contract_id",
+			ContractCode:                 "contract_code",
+			ProjectManId:                 "project_man_id",
+			ProjectManName:               "project_man_name",
+			DeliverManId:                 "deliver_man_id",
+			DeliverManName:               "deliver_man_name",
+			Product:                      "product",
+			FinishRemark:                 "finish_remark",
+			FinishTime:                   "finish_time",
+			FinishBy:                     "finish_by",
+			FinishByName:                 "finish_by_name",
+			RequiredDeliveryTime:         "required_delivery_time",
+			ReceivingInfo:                "receiving_info",
+			SpecialRequirements:          "special_requirements",
+			RealDeliveryTime:             "real_delivery_time",
+			SoftwareRequiredDeliveryTime: "software_required_delivery_time",
+			SoftwareSpecialRequirements:  "software_special_requirements",
+			IsDelay:                      "is_delay",
+			Remark:                       "remark",
+			CreatedBy:                    "created_by",
+			CreatedName:                  "created_name",
+			CreatedTime:                  "created_time",
+			UpdatedBy:                    "updated_by",
+			UpdatedName:                  "updated_name",
+			UpdatedTime:                  "updated_time",
+			DeletedTime:                  "deleted_time",
 		},
 	}
 )
@@ -110,36 +118,40 @@ func NewDeliverOrderDao(tenant string) DeliverOrderDao {
 		DB:    g.DB(tenant),
 		Table: "deliver_order",
 		C: deliverOrderColumns{
-			Id:                   "id",
-			OrderCode:            "order_code",
-			OrderStatus:          "order_status",
-			OrderType:            "order_type",
-			CustId:               "cust_id",
-			CustName:             "cust_name",
-			ProjectId:            "project_id",
-			ProjectName:          "project_name",
-			ContractId:           "contract_id",
-			ContractCode:         "contract_code",
-			ProjectManId:         "project_man_id",
-			ProjectManName:       "project_man_name",
-			DeliverManId:         "deliver_man_id",
-			DeliverManName:       "deliver_man_name",
-			Product:              "product",
-			FinishRemark:         "finish_remark",
-			FinishTime:           "finish_time",
-			FinishBy:             "finish_by",
-			FinishByName:         "finish_by_name",
-			RequiredDeliveryTime: "required_delivery_time",
-			ReceivingInfo:        "receiving_info",
-			SpecialRequirements:  "special_requirements",
-			Remark:               "remark",
-			CreatedBy:            "created_by",
-			CreatedName:          "created_name",
-			CreatedTime:          "created_time",
-			UpdatedBy:            "updated_by",
-			UpdatedName:          "updated_name",
-			UpdatedTime:          "updated_time",
-			DeletedTime:          "deleted_time",
+			Id:                           "id",
+			OrderCode:                    "order_code",
+			OrderStatus:                  "order_status",
+			OrderType:                    "order_type",
+			CustId:                       "cust_id",
+			CustName:                     "cust_name",
+			ProjectId:                    "project_id",
+			ProjectName:                  "project_name",
+			ContractId:                   "contract_id",
+			ContractCode:                 "contract_code",
+			ProjectManId:                 "project_man_id",
+			ProjectManName:               "project_man_name",
+			DeliverManId:                 "deliver_man_id",
+			DeliverManName:               "deliver_man_name",
+			Product:                      "product",
+			FinishRemark:                 "finish_remark",
+			FinishTime:                   "finish_time",
+			FinishBy:                     "finish_by",
+			FinishByName:                 "finish_by_name",
+			RequiredDeliveryTime:         "required_delivery_time",
+			ReceivingInfo:                "receiving_info",
+			SpecialRequirements:          "special_requirements",
+			RealDeliveryTime:             "real_delivery_time",
+			SoftwareRequiredDeliveryTime: "software_required_delivery_time",
+			SoftwareSpecialRequirements:  "software_special_requirements",
+			IsDelay:                      "is_delay",
+			Remark:                       "remark",
+			CreatedBy:                    "created_by",
+			CreatedName:                  "created_name",
+			CreatedTime:                  "created_time",
+			UpdatedBy:                    "updated_by",
+			UpdatedName:                  "updated_name",
+			UpdatedTime:                  "updated_time",
+			DeletedTime:                  "deleted_time",
 		},
 	}
 	return dao

+ 171 - 132
opms_parent/app/dao/work/internal/deliver_order_imp_progress.go

@@ -30,50 +30,63 @@ type DeliverOrderImpProgressDao struct {
 
 // DeliverOrderImpProgressColumns defines and stores column names for table deliver_order_imp_progress.
 type deliverOrderImpProgressColumns struct {
-	Id                   string // 主键
-	DeliverOrderId       string // 关联交付订单ID
-	PlanId               string // 关联实施计划
-	DeliverProgressId    string // 关联发货任务单Id
-	ProgressTitle        string // 任务标题
-	ProgressContext      string // 任务内容
-	StartDate            string // 开始时间
-	EndDate              string // 结束时间
-	ReaStartDate         string // 实际开始时间
-	ReaEndDate           string // 实际结束时间
-	ProgressStatus       string // 状态(10未开始20进行中30已完成)
-	DeliverStatus        string // 发货状态(10未开始、20进行中、30已发货、40产品已验收、50确认已到货、60安装完成)
-	ProgressLevel        string // 优先级(10最高 20普通 30较低 )
-	ProgressType         string // 10发货任务单/20组装任务单/30部署安装单
-	PrincipalPersonId    string // 负责人id
-	PrincipalPerson      string // 负责人
-	AssembleFileUrl      string // 组装报告文件
-	AssembleFileName     string // 组装报告文件名称
-	ExpressName          string // 快递名称
-	ExpressCode          string // 快递单号
-	EstimatedArrivalTime string // 预计到货时间
-	ArrivalTime          string // 到货时间
-	CheckFileUrl         string // 验收单文件
-	CheckFileName        string // 验收单文件名称
-	CheckPersonId        string // 验收人Id
-	CheckPerson          string // 验收人
-	InstallDate          string // 安装日期
-	InstallCheckFileUrl  string // 安装验收单文件
-	InstallCheckFileName string // 安装验收单文件名称
-	ExpectInstallTime    string // 期望安装时间
-	InstallBeginTime     string // 安装开始时间
-	InstallEndTime       string // 安装结束时间
-	AuditUserId          string // 审核人Id
-	AuditUser            string // 审核人
-	AuditTime            string // 审核时间
-	AuditDesc            string // 审核描述
-	Remark               string // 备注
-	CreatedBy            string // 创建者
-	CreatedName          string // 创建人
-	CreatedTime          string // 创建时间
-	UpdatedBy            string // 更新者
-	UpdatedName          string // 更新人
-	UpdatedTime          string // 更新时间
-	DeletedTime          string // 删除时间
+	Id                           string // 主键
+	DeliverOrderId               string // 关联交付订单ID
+	PlanId                       string // 关联实施计划
+	DeliverProgressId            string // 关联发货任务单Id
+	ProgressTitle                string // 任务标题
+	ProgressContext              string // 任务内容
+	StartDate                    string // 开始时间
+	EndDate                      string // 结束时间
+	ReaStartDate                 string // 实际开始时间
+	ReaEndDate                   string // 实际结束时间
+	ProgressStatus               string // 状态(10未开始20进行中30已完成)
+	DeliverStatus                string // 发货状态(10未开始、20进行中、30已发货、40产品已验收、50确认已到货、60安装完成)
+	ProgressLevel                string // 优先级(10最高 20普通 30较低 )
+	ProgressType                 string // 10发货任务单/20组装任务单/30部署安装单
+	PrincipalPersonId            string // 负责人id
+	PrincipalPerson              string // 负责人
+	AssembleFileUrl              string // 组装报告文件
+	AssembleFileName             string // 组装报告文件名称
+	ExpressName                  string // 快递名称
+	ExpressCode                  string // 快递单号
+	EstimatedArrivalTime         string // 预计到货时间
+	ArrivalTime                  string // 到货时间
+	CheckFileUrl                 string // 验收单文件
+	CheckFileName                string // 验收单文件名称
+	CheckPersonId                string // 验收人Id
+	CheckPerson                  string // 验收人
+	InstallDate                  string // 安装日期
+	InstallCheckFileUrl          string // 安装验收单文件
+	InstallCheckFileName         string // 安装验收单文件名称
+	ExpectInstallTime            string // 期望安装时间
+	InstallBeginTime             string // 安装开始时间
+	InstallEndTime               string // 安装结束时间
+	AuditUserId                  string // 审核人Id
+	AuditUser                    string // 审核人
+	AuditTime                    string // 审核时间
+	AuditDesc                    string // 审核描述
+	ProductSigningTime           string // 签收时间
+	IsSign                       string // 是否已签收(10(或为空)未签收,20已签收)
+	SoftwareRequiredDeliveryTime string // (软件)要求交付时间
+	SoftwareSpecialRequirements  string // (软件)特殊事项说明
+	SoftwareCheckTime            string // 验收时间
+	SoftwareCheckFileUrl         string // 验收报告url
+	SoftwareCheckFileName        string // 验收报告名称
+	SoftwareCheckPersonId        string // 验收录入人Id
+	SoftwareCheckPerson          string // 验收录入人
+	CompletedContent             string // 已完成工作内容
+	CompletedWork                string // 已完成工作量
+	UncompletedContent           string // 未完成工作内容
+	UncompletedWork              string // 未完成工作量
+	Remark                       string // 备注
+	CreatedBy                    string // 创建者
+	CreatedName                  string // 创建人
+	CreatedTime                  string // 创建时间
+	UpdatedBy                    string // 更新者
+	UpdatedName                  string // 更新人
+	UpdatedTime                  string // 更新时间
+	DeletedTime                  string // 删除时间
 }
 
 var (
@@ -83,50 +96,63 @@ var (
 		DB:    g.DB("default"),
 		Table: "deliver_order_imp_progress",
 		C: deliverOrderImpProgressColumns{
-			Id:                   "id",
-			DeliverOrderId:       "deliver_order_id",
-			PlanId:               "plan_id",
-			DeliverProgressId:    "deliver_progress_id",
-			ProgressTitle:        "progress_title",
-			ProgressContext:      "progress_context",
-			StartDate:            "start_date",
-			EndDate:              "end_date",
-			ReaStartDate:         "rea_start_date",
-			ReaEndDate:           "rea_end_date",
-			ProgressStatus:       "progress_status",
-			DeliverStatus:        "deliver_status",
-			ProgressLevel:        "progress_level",
-			ProgressType:         "progress_type",
-			PrincipalPersonId:    "principal_person_id",
-			PrincipalPerson:      "principal_person",
-			AssembleFileUrl:      "assemble_file_url",
-			AssembleFileName:     "assemble_file_name",
-			ExpressName:          "express_name",
-			ExpressCode:          "express_code",
-			EstimatedArrivalTime: "estimated_arrival_time",
-			ArrivalTime:          "arrival_time",
-			CheckFileUrl:         "check_file_url",
-			CheckFileName:        "check_file_name",
-			CheckPersonId:        "check_person_id",
-			CheckPerson:          "check_person",
-			InstallDate:          "install_date",
-			InstallCheckFileUrl:  "install_check_file_url",
-			InstallCheckFileName: "install_check_file_name",
-			ExpectInstallTime:    "expect_install_time",
-			InstallBeginTime:     "install_begin_time",
-			InstallEndTime:       "install_end_time",
-			AuditUserId:          "audit_user_id",
-			AuditUser:            "audit_user",
-			AuditTime:            "audit_time",
-			AuditDesc:            "audit_desc",
-			Remark:               "remark",
-			CreatedBy:            "created_by",
-			CreatedName:          "created_name",
-			CreatedTime:          "created_time",
-			UpdatedBy:            "updated_by",
-			UpdatedName:          "updated_name",
-			UpdatedTime:          "updated_time",
-			DeletedTime:          "deleted_time",
+			Id:                           "id",
+			DeliverOrderId:               "deliver_order_id",
+			PlanId:                       "plan_id",
+			DeliverProgressId:            "deliver_progress_id",
+			ProgressTitle:                "progress_title",
+			ProgressContext:              "progress_context",
+			StartDate:                    "start_date",
+			EndDate:                      "end_date",
+			ReaStartDate:                 "rea_start_date",
+			ReaEndDate:                   "rea_end_date",
+			ProgressStatus:               "progress_status",
+			DeliverStatus:                "deliver_status",
+			ProgressLevel:                "progress_level",
+			ProgressType:                 "progress_type",
+			PrincipalPersonId:            "principal_person_id",
+			PrincipalPerson:              "principal_person",
+			AssembleFileUrl:              "assemble_file_url",
+			AssembleFileName:             "assemble_file_name",
+			ExpressName:                  "express_name",
+			ExpressCode:                  "express_code",
+			EstimatedArrivalTime:         "estimated_arrival_time",
+			ArrivalTime:                  "arrival_time",
+			CheckFileUrl:                 "check_file_url",
+			CheckFileName:                "check_file_name",
+			CheckPersonId:                "check_person_id",
+			CheckPerson:                  "check_person",
+			InstallDate:                  "install_date",
+			InstallCheckFileUrl:          "install_check_file_url",
+			InstallCheckFileName:         "install_check_file_name",
+			ExpectInstallTime:            "expect_install_time",
+			InstallBeginTime:             "install_begin_time",
+			InstallEndTime:               "install_end_time",
+			AuditUserId:                  "audit_user_id",
+			AuditUser:                    "audit_user",
+			AuditTime:                    "audit_time",
+			AuditDesc:                    "audit_desc",
+			ProductSigningTime:           "product_signing_time",
+			IsSign:                       "is_sign",
+			SoftwareRequiredDeliveryTime: "software_required_delivery_time",
+			SoftwareSpecialRequirements:  "software_special_requirements",
+			SoftwareCheckTime:            "software_check_time",
+			SoftwareCheckFileUrl:         "software_check_file_url",
+			SoftwareCheckFileName:        "software_check_file_name",
+			SoftwareCheckPersonId:        "software_check_person_id",
+			SoftwareCheckPerson:          "software_check_person",
+			CompletedContent:             "completed_content",
+			CompletedWork:                "completed_work",
+			UncompletedContent:           "uncompleted_content",
+			UncompletedWork:              "uncompleted_work",
+			Remark:                       "remark",
+			CreatedBy:                    "created_by",
+			CreatedName:                  "created_name",
+			CreatedTime:                  "created_time",
+			UpdatedBy:                    "updated_by",
+			UpdatedName:                  "updated_name",
+			UpdatedTime:                  "updated_time",
+			DeletedTime:                  "deleted_time",
 		},
 	}
 )
@@ -138,50 +164,63 @@ func NewDeliverOrderImpProgressDao(tenant string) DeliverOrderImpProgressDao {
 		DB:    g.DB(tenant),
 		Table: "deliver_order_imp_progress",
 		C: deliverOrderImpProgressColumns{
-			Id:                   "id",
-			DeliverOrderId:       "deliver_order_id",
-			PlanId:               "plan_id",
-			DeliverProgressId:    "deliver_progress_id",
-			ProgressTitle:        "progress_title",
-			ProgressContext:      "progress_context",
-			StartDate:            "start_date",
-			EndDate:              "end_date",
-			ReaStartDate:         "rea_start_date",
-			ReaEndDate:           "rea_end_date",
-			ProgressStatus:       "progress_status",
-			DeliverStatus:        "deliver_status",
-			ProgressLevel:        "progress_level",
-			ProgressType:         "progress_type",
-			PrincipalPersonId:    "principal_person_id",
-			PrincipalPerson:      "principal_person",
-			AssembleFileUrl:      "assemble_file_url",
-			AssembleFileName:     "assemble_file_name",
-			ExpressName:          "express_name",
-			ExpressCode:          "express_code",
-			EstimatedArrivalTime: "estimated_arrival_time",
-			ArrivalTime:          "arrival_time",
-			CheckFileUrl:         "check_file_url",
-			CheckFileName:        "check_file_name",
-			CheckPersonId:        "check_person_id",
-			CheckPerson:          "check_person",
-			InstallDate:          "install_date",
-			InstallCheckFileUrl:  "install_check_file_url",
-			InstallCheckFileName: "install_check_file_name",
-			ExpectInstallTime:    "expect_install_time",
-			InstallBeginTime:     "install_begin_time",
-			InstallEndTime:       "install_end_time",
-			AuditUserId:          "audit_user_id",
-			AuditUser:            "audit_user",
-			AuditTime:            "audit_time",
-			AuditDesc:            "audit_desc",
-			Remark:               "remark",
-			CreatedBy:            "created_by",
-			CreatedName:          "created_name",
-			CreatedTime:          "created_time",
-			UpdatedBy:            "updated_by",
-			UpdatedName:          "updated_name",
-			UpdatedTime:          "updated_time",
-			DeletedTime:          "deleted_time",
+			Id:                           "id",
+			DeliverOrderId:               "deliver_order_id",
+			PlanId:                       "plan_id",
+			DeliverProgressId:            "deliver_progress_id",
+			ProgressTitle:                "progress_title",
+			ProgressContext:              "progress_context",
+			StartDate:                    "start_date",
+			EndDate:                      "end_date",
+			ReaStartDate:                 "rea_start_date",
+			ReaEndDate:                   "rea_end_date",
+			ProgressStatus:               "progress_status",
+			DeliverStatus:                "deliver_status",
+			ProgressLevel:                "progress_level",
+			ProgressType:                 "progress_type",
+			PrincipalPersonId:            "principal_person_id",
+			PrincipalPerson:              "principal_person",
+			AssembleFileUrl:              "assemble_file_url",
+			AssembleFileName:             "assemble_file_name",
+			ExpressName:                  "express_name",
+			ExpressCode:                  "express_code",
+			EstimatedArrivalTime:         "estimated_arrival_time",
+			ArrivalTime:                  "arrival_time",
+			CheckFileUrl:                 "check_file_url",
+			CheckFileName:                "check_file_name",
+			CheckPersonId:                "check_person_id",
+			CheckPerson:                  "check_person",
+			InstallDate:                  "install_date",
+			InstallCheckFileUrl:          "install_check_file_url",
+			InstallCheckFileName:         "install_check_file_name",
+			ExpectInstallTime:            "expect_install_time",
+			InstallBeginTime:             "install_begin_time",
+			InstallEndTime:               "install_end_time",
+			AuditUserId:                  "audit_user_id",
+			AuditUser:                    "audit_user",
+			AuditTime:                    "audit_time",
+			AuditDesc:                    "audit_desc",
+			ProductSigningTime:           "product_signing_time",
+			IsSign:                       "is_sign",
+			SoftwareRequiredDeliveryTime: "software_required_delivery_time",
+			SoftwareSpecialRequirements:  "software_special_requirements",
+			SoftwareCheckTime:            "software_check_time",
+			SoftwareCheckFileUrl:         "software_check_file_url",
+			SoftwareCheckFileName:        "software_check_file_name",
+			SoftwareCheckPersonId:        "software_check_person_id",
+			SoftwareCheckPerson:          "software_check_person",
+			CompletedContent:             "completed_content",
+			CompletedWork:                "completed_work",
+			UncompletedContent:           "uncompleted_content",
+			UncompletedWork:              "uncompleted_work",
+			Remark:                       "remark",
+			CreatedBy:                    "created_by",
+			CreatedName:                  "created_name",
+			CreatedTime:                  "created_time",
+			UpdatedBy:                    "updated_by",
+			UpdatedName:                  "updated_name",
+			UpdatedTime:                  "updated_time",
+			DeletedTime:                  "deleted_time",
 		},
 	}
 	return dao

+ 700 - 0
opms_parent/app/dao/work/internal/deliver_order_imp_progress_log.go

@@ -0,0 +1,700 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+	"time"
+
+	model "dashoo.cn/micro/app/model/work"
+)
+
+// DeliverOrderImpProgressLogDao is the manager for logic model data accessing and custom defined data operations functions management.
+type DeliverOrderImpProgressLogDao struct {
+	gmvc.M                                    // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
+	C       deliverOrderImpProgressLogColumns // C is the short type for Columns, which contains all the column names of Table for convenient usage.
+	DB      gdb.DB                            // DB is the raw underlying database management object.
+	Table   string                            // Table is the underlying table name of the DAO.
+	TableAs string                            // TableAs is the underlying table alias name of the DAO.
+}
+
+// DeliverOrderImpProgressLogColumns defines and stores column names for table deliver_order_imp_progress_log.
+type deliverOrderImpProgressLogColumns struct {
+	Id                      string // 主键
+	DeliverOrderId          string // 关联交付订单ID
+	DeliverProgressId       string // 关联交付任务单Id
+	OpnPeopleId             string // 操作人ID
+	OpnPeople               string // 操作人
+	OpnDate                 string // 操作日期
+	OpnType                 string // 操作类型
+	OpnContent              string // 操作内容
+	OldRequiredDeliveryTime string // 旧要求交付时间时间
+	NowRequiredDeliveryTime string // 当前要求交付时间时间
+	Remark                  string // 备注
+	CreatedBy               string // 创建者
+	CreatedName             string // 创建人
+	CreatedTime             string // 创建时间
+	UpdatedBy               string // 更新者
+	UpdatedName             string // 更新人
+	UpdatedTime             string // 更新时间
+	DeletedTime             string // 删除时间
+}
+
+var (
+	// DeliverOrderImpProgressLog is globally public accessible object for table deliver_order_imp_progress_log operations.
+	DeliverOrderImpProgressLog = DeliverOrderImpProgressLogDao{
+		M:     g.DB("default").Model("deliver_order_imp_progress_log").Safe(),
+		DB:    g.DB("default"),
+		Table: "deliver_order_imp_progress_log",
+		C: deliverOrderImpProgressLogColumns{
+			Id:                      "id",
+			DeliverOrderId:          "deliver_order_id",
+			DeliverProgressId:       "deliver_progress_id",
+			OpnPeopleId:             "opn_people_id",
+			OpnPeople:               "opn_people",
+			OpnDate:                 "opn_date",
+			OpnType:                 "opn_type",
+			OpnContent:              "opn_content",
+			OldRequiredDeliveryTime: "old_required_delivery_time",
+			NowRequiredDeliveryTime: "now_required_delivery_time",
+			Remark:                  "remark",
+			CreatedBy:               "created_by",
+			CreatedName:             "created_name",
+			CreatedTime:             "created_time",
+			UpdatedBy:               "updated_by",
+			UpdatedName:             "updated_name",
+			UpdatedTime:             "updated_time",
+			DeletedTime:             "deleted_time",
+		},
+	}
+)
+
+func NewDeliverOrderImpProgressLogDao(tenant string) DeliverOrderImpProgressLogDao {
+	var dao DeliverOrderImpProgressLogDao
+	dao = DeliverOrderImpProgressLogDao{
+		M:     g.DB(tenant).Model("deliver_order_imp_progress_log").Safe(),
+		DB:    g.DB(tenant),
+		Table: "deliver_order_imp_progress_log",
+		C: deliverOrderImpProgressLogColumns{
+			Id:                      "id",
+			DeliverOrderId:          "deliver_order_id",
+			DeliverProgressId:       "deliver_progress_id",
+			OpnPeopleId:             "opn_people_id",
+			OpnPeople:               "opn_people",
+			OpnDate:                 "opn_date",
+			OpnType:                 "opn_type",
+			OpnContent:              "opn_content",
+			OldRequiredDeliveryTime: "old_required_delivery_time",
+			NowRequiredDeliveryTime: "now_required_delivery_time",
+			Remark:                  "remark",
+			CreatedBy:               "created_by",
+			CreatedName:             "created_name",
+			CreatedTime:             "created_time",
+			UpdatedBy:               "updated_by",
+			UpdatedName:             "updated_name",
+			UpdatedTime:             "updated_time",
+			DeletedTime:             "deleted_time",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *DeliverOrderImpProgressLogDao) Ctx(ctx context.Context) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Ctx(ctx), Table: d.Table, TableAs: d.TableAs}
+}
+
+// GetCtx returns the context for current Model.
+// It returns "context.Background() i"s there's no context previously set.
+func (d *DeliverOrderImpProgressLogDao) GetCtx() context.Context {
+	return d.M.GetCtx()
+}
+
+// As sets an alias name for current table.
+func (d *DeliverOrderImpProgressLogDao) As(as string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.As(as), Table: d.Table, TableAs: as}
+}
+
+// TX sets the transaction for current operation.
+func (d *DeliverOrderImpProgressLogDao) TX(tx *gdb.TX) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.TX(tx), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Master marks the following operation on master node.
+func (d *DeliverOrderImpProgressLogDao) Master() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Master(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *DeliverOrderImpProgressLogDao) Slave() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Slave(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Args sets custom arguments for model operation.
+func (d *DeliverOrderImpProgressLogDao) Args(args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Args(args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Handler calls each of "handlers" on current Model and returns a new Model.
+// ModelHandler is a function that handles given Model and returns a new Model that is custom modified.
+func (d *DeliverOrderImpProgressLogDao) Handler(handlers ...gdb.ModelHandler) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Handler(handlers...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *DeliverOrderImpProgressLogDao) LeftJoin(table ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.LeftJoin(table...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *DeliverOrderImpProgressLogDao) RightJoin(table ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.RightJoin(table...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *DeliverOrderImpProgressLogDao) InnerJoin(table ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.InnerJoin(table...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *DeliverOrderImpProgressLogDao) Fields(fieldNamesOrMapStruct ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Fields(fieldNamesOrMapStruct...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *DeliverOrderImpProgressLogDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// FieldCount formats and appends commonly used field "COUNT(column)" to the select fields of model.
+func (d *DeliverOrderImpProgressLogDao) FieldCount(column string, as ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.FieldCount(column, as...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// FieldSum formats and appends commonly used field "SUM(column)" to the select fields of model.
+func (d *DeliverOrderImpProgressLogDao) FieldSum(column string, as ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.FieldSum(column, as...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// FieldMin formats and appends commonly used field "MIN(column)" to the select fields of model.
+func (d *DeliverOrderImpProgressLogDao) FieldMin(column string, as ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.FieldMin(column, as...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// FieldMax formats and appends commonly used field "MAX(column)" to the select fields of model.
+func (d *DeliverOrderImpProgressLogDao) FieldMax(column string, as ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.FieldMax(column, as...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// FieldAvg formats and appends commonly used field "AVG(column)" to the select fields of model.
+func (d *DeliverOrderImpProgressLogDao) FieldAvg(column string, as ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.FieldAvg(column, as...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Option adds extra operation option for the model.
+// Deprecated, use separate operations instead.
+func (d *DeliverOrderImpProgressLogDao) Option(option int) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Option(option), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *DeliverOrderImpProgressLogDao) OmitEmpty() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OmitEmpty(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OmitEmptyWhere sets optionOmitEmptyWhere option for the model, which automatically filers
+// the Where/Having parameters for "empty" values.
+func (d *DeliverOrderImpProgressLogDao) OmitEmptyWhere() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OmitEmptyWhere(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OmitEmptyData sets optionOmitEmptyData option for the model, which automatically filers
+// the Data parameters for "empty" values.
+func (d *DeliverOrderImpProgressLogDao) OmitEmptyData() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OmitEmptyData(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OmitNil sets optionOmitNil option for the model, which automatically filers
+// the data and where parameters for "nil" values.
+func (d *DeliverOrderImpProgressLogDao) OmitNil() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OmitNil(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OmitNilWhere sets optionOmitNilWhere option for the model, which automatically filers
+// the Where/Having parameters for "nil" values.
+func (d *DeliverOrderImpProgressLogDao) OmitNilWhere() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OmitNilWhere(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OmitNilData sets optionOmitNilData option for the model, which automatically filers
+// the Data parameters for "nil" values.
+func (d *DeliverOrderImpProgressLogDao) OmitNilData() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OmitNilData(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+// Note that this function supports only single table operations.
+// Deprecated, filter feature is automatically enabled from GoFrame v1.16.0, it is so no longer used.
+func (d *DeliverOrderImpProgressLogDao) Filter() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Filter(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *DeliverOrderImpProgressLogDao) Where(where interface{}, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Where(where, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *DeliverOrderImpProgressLogDao) WherePri(where interface{}, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WherePri(where, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Having sets the having statement for the model.
+// The parameters of this function usage are as the same as function Where.
+// See Where.
+func (d *DeliverOrderImpProgressLogDao) Having(having interface{}, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Having(having, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Wheref builds condition string using fmt.Sprintf and arguments.
+// Note that if the number of "args" is more than the place holder in "format",
+// the extra "args" will be used as the where condition arguments of the Model.
+func (d *DeliverOrderImpProgressLogDao) Wheref(format string, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Wheref(format, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereLT builds "column < value" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereLT(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereLT(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereLTE builds "column <= value" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereLTE(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereLTE(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereGT builds "column > value" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereGT(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereGT(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereGTE builds "column >= value" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereGTE(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereGTE(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereBetween builds "column BETWEEN min AND max" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereBetween(column string, min, max interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereBetween(column, min, max), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereLike builds "column LIKE like" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereLike(column string, like interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereLike(column, like), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereIn builds "column IN (in)" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereIn(column string, in interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereIn(column, in), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereNull builds "columns[0] IS NULL AND columns[1] IS NULL ..." statement.
+func (d *DeliverOrderImpProgressLogDao) WhereNull(columns ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereNull(columns...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereNotBetween builds "column NOT BETWEEN min AND max" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereNotBetween(column string, min, max interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereNotBetween(column, min, max), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereNotLike builds "column NOT LIKE like" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereNotLike(column string, like interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereNotLike(column, like), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereNot builds "column != value" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereNot(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereNot(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereNotIn builds "column NOT IN (in)" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereNotIn(column string, in interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereNotIn(column, in), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereNotNull builds "columns[0] IS NOT NULL AND columns[1] IS NOT NULL ..." statement.
+func (d *DeliverOrderImpProgressLogDao) WhereNotNull(columns ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereNotNull(columns...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOr adds "OR" condition to the where statement.
+func (d *DeliverOrderImpProgressLogDao) WhereOr(where interface{}, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOr(where, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrf builds "OR" condition string using fmt.Sprintf and arguments.
+func (d *DeliverOrderImpProgressLogDao) WhereOrf(format string, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrf(format, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrLT builds "column < value" statement in "OR" conditions..
+func (d *DeliverOrderImpProgressLogDao) WhereOrLT(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrLT(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrLTE builds "column <= value" statement in "OR" conditions..
+func (d *DeliverOrderImpProgressLogDao) WhereOrLTE(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrLTE(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrGT builds "column > value" statement in "OR" conditions..
+func (d *DeliverOrderImpProgressLogDao) WhereOrGT(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrGT(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrGTE builds "column >= value" statement in "OR" conditions..
+func (d *DeliverOrderImpProgressLogDao) WhereOrGTE(column string, value interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrGTE(column, value), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrBetween builds "column BETWEEN min AND max" statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrBetween(column string, min, max interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrBetween(column, min, max), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrLike builds "column LIKE like" statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrLike(column string, like interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrLike(column, like), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrIn builds "column IN (in)" statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrIn(column string, in interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrIn(column, in), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrNull builds "columns[0] IS NULL OR columns[1] IS NULL ..." statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrNull(columns ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrNull(columns...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrNotBetween builds "column NOT BETWEEN min AND max" statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrNotBetween(column string, min, max interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrNotBetween(column, min, max), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrNotLike builds "column NOT LIKE like" statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrNotLike(column string, like interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrNotLike(column, like), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrNotIn builds "column NOT IN (in)" statement.
+func (d *DeliverOrderImpProgressLogDao) WhereOrNotIn(column string, in interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrNotIn(column, in), Table: d.Table, TableAs: d.TableAs}
+}
+
+// WhereOrNotNull builds "columns[0] IS NOT NULL OR columns[1] IS NOT NULL ..." statement in "OR" conditions.
+func (d *DeliverOrderImpProgressLogDao) WhereOrNotNull(columns ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.WhereOrNotNull(columns...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *DeliverOrderImpProgressLogDao) Group(groupBy ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Group(groupBy...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// And adds "AND" condition to the where statement.
+// Deprecated, use Where instead.
+func (d *DeliverOrderImpProgressLogDao) And(where interface{}, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.And(where, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Or adds "OR" condition to the where statement.
+// Deprecated, use WhereOr instead.
+func (d *DeliverOrderImpProgressLogDao) Or(where interface{}, args ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Or(where, args...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// GroupBy sets the "GROUP BY" statement for the model.
+func (d *DeliverOrderImpProgressLogDao) GroupBy(groupBy string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Group(groupBy), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *DeliverOrderImpProgressLogDao) Order(orderBy ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Order(orderBy...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OrderAsc sets the "ORDER BY xxx ASC" statement for the model.
+func (d *DeliverOrderImpProgressLogDao) OrderAsc(column string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OrderAsc(column), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OrderDesc sets the "ORDER BY xxx DESC" statement for the model.
+func (d *DeliverOrderImpProgressLogDao) OrderDesc(column string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OrderDesc(column), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OrderRandom sets the "ORDER BY RANDOM()" statement for the model.
+func (d *DeliverOrderImpProgressLogDao) OrderRandom() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.OrderRandom(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// OrderBy is alias of Model.Order.
+// See Model.Order.
+// Deprecated, use Order instead.
+func (d *DeliverOrderImpProgressLogDao) OrderBy(orderBy string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Order(orderBy), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *DeliverOrderImpProgressLogDao) Limit(limit ...int) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Limit(limit...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *DeliverOrderImpProgressLogDao) Offset(offset int) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Offset(offset), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Distinct forces the query to only return distinct results.
+func (d *DeliverOrderImpProgressLogDao) Distinct() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Distinct(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *DeliverOrderImpProgressLogDao) Page(page, limit int) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Page(page, limit), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *DeliverOrderImpProgressLogDao) Batch(batch int) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Batch(batch), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *DeliverOrderImpProgressLogDao) Cache(duration time.Duration, name ...string) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Cache(duration, name...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *DeliverOrderImpProgressLogDao) Data(data ...interface{}) *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Data(data...), Table: d.Table, TableAs: d.TableAs}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.DeliverOrderImpProgressLog.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *DeliverOrderImpProgressLogDao) All(where ...interface{}) ([]*model.DeliverOrderImpProgressLog, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model.DeliverOrderImpProgressLog
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.DeliverOrderImpProgressLog.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *DeliverOrderImpProgressLogDao) One(where ...interface{}) (*model.DeliverOrderImpProgressLog, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model.DeliverOrderImpProgressLog
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *DeliverOrderImpProgressLogDao) FindOne(where ...interface{}) (*model.DeliverOrderImpProgressLog, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model.DeliverOrderImpProgressLog
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *DeliverOrderImpProgressLogDao) FindAll(where ...interface{}) ([]*model.DeliverOrderImpProgressLog, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model.DeliverOrderImpProgressLog
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *DeliverOrderImpProgressLogDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *DeliverOrderImpProgressLogDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *DeliverOrderImpProgressLogDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *DeliverOrderImpProgressLogDao) Chunk(limit int, callback func(entities []*model.DeliverOrderImpProgressLog, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*model.DeliverOrderImpProgressLog
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *DeliverOrderImpProgressLogDao) LockUpdate() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.LockUpdate(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *DeliverOrderImpProgressLogDao) LockShared() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.LockShared(), Table: d.Table, TableAs: d.TableAs}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *DeliverOrderImpProgressLogDao) Unscoped() *DeliverOrderImpProgressLogDao {
+	return &DeliverOrderImpProgressLogDao{M: d.M.Unscoped(), Table: d.Table, TableAs: d.TableAs}
+}

+ 32 - 0
opms_parent/app/handler/work/deliver_order.go

@@ -122,3 +122,35 @@ func (w *DeliverOrder) GetHardwareUserInfo(ctx context.Context, req *model.Hardw
 	rsp.Data = info
 	return nil
 }
+
+/*
+以下为软件交付新增的接口
+*/
+
+// SoftwareStart 启动
+// Swagger:DeliverOrder 交付工单 (软件)启动(开启)工单
+func (w *DeliverOrder) SoftwareStart(ctx context.Context, req *model.SoftwareStartReq, rsp *comm_def.CommonMsg) error {
+	s, err := workSrv.NewDeliverOrderService(ctx)
+	if err != nil {
+		return err
+	}
+	err = s.SoftwareStart(ctx, req)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// GetDeliverTimeChangeLogs 获取交付时间变更记录
+func (w *DeliverOrder) GetDeliverTimeChangeLogs(ctx context.Context, req *model.DeliverTimeChangReq, rsp *comm_def.CommonMsg) error {
+	s, err := workSrv.NewDeliverOrderService(ctx)
+	if err != nil {
+		return err
+	}
+	info, err := s.DeliverTimeChangeLogList(ctx, req)
+	if err != nil {
+		return err
+	}
+	rsp.Data = info
+	return nil
+}

+ 44 - 0
opms_parent/app/handler/work/deliver_order_progress.go

@@ -230,3 +230,47 @@ func (w *DeliverOrderProgress) UpdateProgressProductInfo(ctx context.Context, re
 	}
 	return nil
 }
+
+// Swagger:DeliverOrderProgress 交付工单任务 发货任务单签收
+func (w *DeliverOrderProgress) ProductSign(ctx context.Context, req *model.ProductSignReq, rsp *comm_def.CommonMsg) error {
+	s, err := workSrv.NewDeliverOrderProgressService(ctx)
+	if err != nil {
+		return err
+	}
+	err = s.ProductSign(ctx, req)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+/*
+以下为软件交付新增的接口
+*/
+
+// CompleteSoftwareProgress 软件交付验收任务单完成
+// Swagger:DeliverOrderProgress 交付工单任务 软件交付验收任务单完成
+func (w *DeliverOrderProgress) CompleteSoftwareProgress(ctx context.Context, req *model.CompleteSoftwareReq, rsp *comm_def.CommonMsg) error {
+	s, err := workSrv.NewDeliverOrderProgressService(ctx)
+	if err != nil {
+		return err
+	}
+	err = s.CompleteSoftware(ctx, req)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// Swagger:DeliverOrderProgress 交付工单任务 变更交付时间
+func (w *DeliverOrderProgress) ChangeDeliverTime(ctx context.Context, req *model.ChangeDeliverTimeReq, rsp *comm_def.CommonMsg) error {
+	s, err := workSrv.NewDeliverOrderProgressService(ctx)
+	if err != nil {
+		return err
+	}
+	err = s.ChangeSoftwareDeliverTime(ctx, req)
+	if err != nil {
+		return err
+	}
+	return nil
+}

+ 20 - 17
opms_parent/app/model/contract/ctr_contract.go

@@ -77,23 +77,26 @@ type CtrContractAddReq struct {
 	// ContractAmount    float64         `json:"contractAmount"`    // 合同金额
 	// InvoiceAmount     float64         `json:"invoiceAmount"`     // 已开票金额
 	// CollectedAmount   float64         `json:"collectedAmount"`   // 已回款金额
-	ContractStartTime   *gtime.Time     `json:"contractStartTime"`   // 合同开始时间
-	ContractEndTime     *gtime.Time     `json:"contractEndTime"`     // 合同结束时间
-	ContractSignTime    *gtime.Time     `json:"contractSignTime"`    // 合同签订时间
-	InchargeId          int             `json:"inchargeId"`          // 负责人ID
-	InchargeName        string          `json:"inchargeName"`        // 负责人
-	SignatoryId         int             `json:"signatoryId"`         // 公司签约人ID
-	SignatoryName       string          `json:"signatoryName"`       // 公司签约人
-	SignatoryType       string          `json:"signatoryType"`       // 签订单位类型 10 终端用户 20 经销商 30 代理商
-	SignatoryUnit       string          `json:"signatoryUnit"`       // 合同签订单位
-	EarnestMoney        float64         `json:"earnestMoney"`        // 质量/履约保证金(元)
-	CustSignatoryId     int             `json:"custSignatoryId"`     // 客户签约人ID
-	CustSignatoryName   string          `json:"custSignatoryName"`   // 客户签约人
-	DistributorId       int             `json:"distributorId"`       // 经销商ID
-	DistributorName     string          `json:"distributorName"`     // 经销商
-	Remark              string          `json:"remark"`              // 备注
-	Product             []CtrAddProduct `json:"product"`             // 产品
-	ServiceFeeAgreement string          `json:"serviceFeeAgreement"` // 运维服务费约定
+	ContractStartTime        *gtime.Time     `json:"contractStartTime"`        // 合同开始时间
+	ContractEndTime          *gtime.Time     `json:"contractEndTime"`          // 合同结束时间
+	ContractSignTime         *gtime.Time     `json:"contractSignTime"`         // 合同签订时间
+	InchargeId               int             `json:"inchargeId"`               // 负责人ID
+	InchargeName             string          `json:"inchargeName"`             // 负责人
+	SignatoryId              int             `json:"signatoryId"`              // 公司签约人ID
+	SignatoryName            string          `json:"signatoryName"`            // 公司签约人
+	SignatoryType            string          `json:"signatoryType"`            // 签订单位类型 10 终端用户 20 经销商 30 代理商
+	SignatoryUnit            string          `json:"signatoryUnit"`            // 合同签订单位
+	EarnestMoney             float64         `json:"earnestMoney"`             // 质量/履约保证金(元)
+	CustSignatoryId          int             `json:"custSignatoryId"`          // 客户签约人ID
+	CustSignatoryName        string          `json:"custSignatoryName"`        // 客户签约人
+	DistributorId            int             `json:"distributorId"`            // 经销商ID
+	DistributorName          string          `json:"distributorName"`          // 经销商
+	Remark                   string          `json:"remark"`                   // 备注
+	Product                  []CtrAddProduct `json:"product"`                  // 产品
+	ServiceFeeAgreement      string          `json:"serviceFeeAgreement"`      // 运维服务费约定
+	SoftwareMaintenanceLimit int             `json:"softwareMaintenanceLimit"` // 软件运维期限(年)
+	HardwareMaintenanceLimit int             `json:"hardwareMaintenanceLimit"` // 硬件运维期限(年)
+	MaintenanceClause        string          `json:"maintenanceClause"`        // 运维条款
 }
 
 type CtrContractUpdateReq struct {

+ 48 - 41
opms_parent/app/model/contract/internal/ctr_contract.go

@@ -10,45 +10,52 @@ import (
 
 // CtrContract is the golang structure for table ctr_contract.
 type CtrContract struct {
-	Id                  int         `orm:"id,primary"            json:"id"`                  // 主键
-	ContractCode        string      `orm:"contract_code"         json:"contractCode"`        // 合同编号
-	ContractName        string      `orm:"contract_name"         json:"contractName"`        // 合同名称
-	CustId              int         `orm:"cust_id"               json:"custId"`              // 关联客户
-	CustName            string      `orm:"cust_name"             json:"custName"`            // 客户名称
-	ProductLine         string      `orm:"product_line"          json:"productLine"`         // 产品线
-	IsBig               string      `orm:"is_big"                json:"isBig"`               // 是否为大项目
-	CustProvinceId      int         `orm:"cust_province_id"      json:"custProvinceId"`      // 所在省ID
-	CustProvince        string      `orm:"cust_province"         json:"custProvince"`        // 所在省
-	CustCityId          int         `orm:"cust_city_id"          json:"custCityId"`          // 所在市ID
-	CustCity            string      `orm:"cust_city"             json:"custCity"`            // 所在市
-	NboId               int         `orm:"nbo_id"                json:"nboId"`               // 关联项目
-	NboName             string      `orm:"nbo_name"              json:"nboName"`             // 项目名称
-	ApproStatus         string      `orm:"appro_status"          json:"approStatus"`         // 审核状态 10 待提交审核 20 待审核 30 审核已同意 40 审核已拒绝 50 审核已撤销
-	ContractType        string      `orm:"contract_type"         json:"contractType"`        // 合同类型
-	ContractAmount      float64     `orm:"contract_amount"       json:"contractAmount"`      // 合同金额
-	InvoiceAmount       float64     `orm:"invoice_amount"        json:"invoiceAmount"`       // 已开票金额
-	CollectedAmount     float64     `orm:"collected_amount"      json:"collectedAmount"`     // 已回款金额
-	ContractStartTime   *gtime.Time `orm:"contract_start_time"   json:"contractStartTime"`   // 合同开始时间
-	ContractEndTime     *gtime.Time `orm:"contract_end_time"     json:"contractEndTime"`     // 合同结束时间
-	ContractSignTime    *gtime.Time `orm:"contract_sign_time"    json:"contractSignTime"`    // 合同签订时间
-	InchargeId          int         `orm:"incharge_id"           json:"inchargeId"`          // 负责人ID
-	InchargeName        string      `orm:"incharge_name"         json:"inchargeName"`        // 负责人(销售工程师)
-	SignatoryId         int         `orm:"signatory_id"          json:"signatoryId"`         // 公司签约人ID
-	SignatoryName       string      `orm:"signatory_name"        json:"signatoryName"`       // 公司签约人
-	SignatoryType       string      `orm:"signatory_type"        json:"signatoryType"`       // 签订单位类型 10 终端用户 20 经销商 30 代理商
-	SignatoryUnit       string      `orm:"signatory_unit"        json:"signatoryUnit"`       // 合同签订单位
-	EarnestMoney        float64     `orm:"earnest_money"         json:"earnestMoney"`        // 质量/履约保证金(元)
-	CustSignatoryId     int         `orm:"cust_signatory_id"     json:"custSignatoryId"`     // 客户签约人ID
-	CustSignatoryName   string      `orm:"cust_signatory_name"   json:"custSignatoryName"`   // 客户签约人
-	DistributorId       int         `orm:"distributor_id"        json:"distributorId"`       // 经销商ID
-	DistributorName     string      `orm:"distributor_name"      json:"distributorName"`     // 经销商
-	ServiceFeeAgreement string      `orm:"service_fee_agreement" json:"serviceFeeAgreement"` // 运维服务费约定
-	Remark              string      `orm:"remark"                json:"remark"`              // 备注
-	CreatedBy           int         `orm:"created_by"            json:"createdBy"`           // 创建者
-	CreatedName         string      `orm:"created_name"          json:"createdName"`         // 创建人
-	CreatedTime         *gtime.Time `orm:"created_time"          json:"createdTime"`         // 创建时间
-	UpdatedBy           int         `orm:"updated_by"            json:"updatedBy"`           // 更新者
-	UpdatedName         string      `orm:"updated_name"          json:"updatedName"`         // 更新人
-	UpdatedTime         *gtime.Time `orm:"updated_time"          json:"updatedTime"`         // 更新时间
-	DeletedTime         *gtime.Time `orm:"deleted_time"          json:"deletedTime"`         // 删除时间
+	Id                           int         `orm:"id,primary"                      json:"id"`                           // 主键
+	ContractCode                 string      `orm:"contract_code"                   json:"contractCode"`                 // 合同编号
+	ContractName                 string      `orm:"contract_name"                   json:"contractName"`                 // 合同名称
+	CustId                       int         `orm:"cust_id"                         json:"custId"`                       // 关联客户
+	CustName                     string      `orm:"cust_name"                       json:"custName"`                     // 客户名称
+	ProductLine                  string      `orm:"product_line"                    json:"productLine"`                  // 产品线
+	IsBig                        string      `orm:"is_big"                          json:"isBig"`                        // 是否为大项目
+	CustProvinceId               int         `orm:"cust_province_id"                json:"custProvinceId"`               // 所在省ID
+	CustProvince                 string      `orm:"cust_province"                   json:"custProvince"`                 // 所在省
+	CustCityId                   int         `orm:"cust_city_id"                    json:"custCityId"`                   // 所在市ID
+	CustCity                     string      `orm:"cust_city"                       json:"custCity"`                     // 所在市
+	NboId                        int         `orm:"nbo_id"                          json:"nboId"`                        // 关联项目
+	NboName                      string      `orm:"nbo_name"                        json:"nboName"`                      // 项目名称
+	ApproStatus                  string      `orm:"appro_status"                    json:"approStatus"`                  // 审核状态 10 待提交审核 20 待审核 30 审核已同意 40 审核已拒绝 50 审核已撤销
+	ContractType                 string      `orm:"contract_type"                   json:"contractType"`                 // 合同类型
+	ContractAmount               float64     `orm:"contract_amount"                 json:"contractAmount"`               // 合同金额
+	InvoiceAmount                float64     `orm:"invoice_amount"                  json:"invoiceAmount"`                // 已开票金额
+	CollectedAmount              float64     `orm:"collected_amount"                json:"collectedAmount"`              // 已回款金额
+	ContractStartTime            *gtime.Time `orm:"contract_start_time"             json:"contractStartTime"`            // 合同开始时间
+	ContractEndTime              *gtime.Time `orm:"contract_end_time"               json:"contractEndTime"`              // 合同结束时间
+	ContractSignTime             *gtime.Time `orm:"contract_sign_time"              json:"contractSignTime"`             // 合同签订时间
+	InchargeId                   int         `orm:"incharge_id"                     json:"inchargeId"`                   // 负责人ID
+	InchargeName                 string      `orm:"incharge_name"                   json:"inchargeName"`                 // 负责人(销售工程师)
+	SignatoryId                  int         `orm:"signatory_id"                    json:"signatoryId"`                  // 公司签约人ID
+	SignatoryName                string      `orm:"signatory_name"                  json:"signatoryName"`                // 公司签约人
+	SignatoryType                string      `orm:"signatory_type"                  json:"signatoryType"`                // 签订单位类型 10 终端用户 20 经销商 30 代理商
+	SignatoryUnit                string      `orm:"signatory_unit"                  json:"signatoryUnit"`                // 合同签订单位
+	EarnestMoney                 float64     `orm:"earnest_money"                   json:"earnestMoney"`                 // 质量/履约保证金(元)
+	CustSignatoryId              int         `orm:"cust_signatory_id"               json:"custSignatoryId"`              // 客户签约人ID
+	CustSignatoryName            string      `orm:"cust_signatory_name"             json:"custSignatoryName"`            // 客户签约人
+	DistributorId                int         `orm:"distributor_id"                  json:"distributorId"`                // 经销商ID
+	DistributorName              string      `orm:"distributor_name"                json:"distributorName"`              // 经销商
+	ServiceFeeAgreement          string      `orm:"service_fee_agreement"           json:"serviceFeeAgreement"`          // 运维服务费约定
+	SoftwareMaintenanceBeginTime *gtime.Time `orm:"software_maintenance_begin_time" json:"softwareMaintenanceBeginTime"` // 软件运维开始时间
+	SoftwareMaintenanceEndTime   *gtime.Time `orm:"software_maintenance_end_time"   json:"softwareMaintenanceEndTime"`   // 软件运维结束时间
+	SoftwareMaintenanceLimit     int         `orm:"software_maintenance_limit"      json:"softwareMaintenanceLimit"`     // 软件运维期限(年)
+	HardwareMaintenanceBeginTime *gtime.Time `orm:"hardware_maintenance_begin_time" json:"hardwareMaintenanceBeginTime"` // 硬件运维开始时间
+	HardwareMaintenanceEndTime   *gtime.Time `orm:"hardware_maintenance_end_time"   json:"hardwareMaintenanceEndTime"`   // 硬件运维结束时间
+	HardwareMaintenanceLimit     int         `orm:"hardware_maintenance_limit"      json:"hardwareMaintenanceLimit"`     // 硬件运维期限(年)
+	MaintenanceClause            string      `orm:"maintenance_clause"              json:"maintenanceClause"`            // 运维条款
+	Remark                       string      `orm:"remark"                          json:"remark"`                       // 备注
+	CreatedBy                    int         `orm:"created_by"                      json:"createdBy"`                    // 创建者
+	CreatedName                  string      `orm:"created_name"                    json:"createdName"`                  // 创建人
+	CreatedTime                  *gtime.Time `orm:"created_time"                    json:"createdTime"`                  // 创建时间
+	UpdatedBy                    int         `orm:"updated_by"                      json:"updatedBy"`                    // 更新者
+	UpdatedName                  string      `orm:"updated_name"                    json:"updatedName"`                  // 更新人
+	UpdatedTime                  *gtime.Time `orm:"updated_time"                    json:"updatedTime"`                  // 更新时间
+	DeletedTime                  *gtime.Time `orm:"deleted_time"                    json:"deletedTime"`                  // 删除时间
 }

+ 19 - 5
opms_parent/app/model/work/deliver_order.go

@@ -53,7 +53,7 @@ type DeliverOrderListReq struct {
 
 type DeliverOrderAddReq struct {
 	OrderTypeCode string                 `json:"orderTypeCode"`
-	ContractId    int                    `json:"contractId" v:"required#请输入合同ID"`           // 关联合同ID
+	ContractId    int                    `json:"contractId" v:"required#请输入合同ID"`        // 关联合同ID
 	FormData      []DingTalkFormItemData `json:"formData"         v:"required#表单数据不能为空"` // 表单数据
 }
 
@@ -68,15 +68,15 @@ type DeliverOrderUpdateReq struct {
 
 type DeliverOrderFinishReq struct {
 	OrderId      int    `json:"orderId"     v:"min:1#工单不能为空"` //
-	FinishRemark string `json:"finishRemark"`                       // 完成信息
+	FinishRemark string `json:"finishRemark"`                 // 完成信息
 }
 
 // StartReq 启动
 type StartReq struct {
 	OrderId              int         `json:"orderId"     v:"min:1#工单不能为空"` //
-	RequiredDeliveryTime *gtime.Time `json:"requiredDeliveryTime"`               // 要求发货时间
-	ReceivingInfo        string      `json:"receivingInfo"`                      // 收货信息
-	SpecialRequirements  string      `json:"specialRequirements"`                // 特殊要求说明
+	RequiredDeliveryTime *gtime.Time `json:"requiredDeliveryTime"`         // 要求发货时间
+	ReceivingInfo        string      `json:"receivingInfo"`                // 收货信息
+	SpecialRequirements  string      `json:"specialRequirements"`          // 特殊要求说明
 }
 
 type ProductInfo struct {
@@ -88,3 +88,17 @@ type ProductInfo struct {
 type HardwareReq struct {
 	Name string `json:"name"`
 }
+
+// SoftwareStartReq 启动
+type SoftwareStartReq struct {
+	OrderId                      int         `json:"orderId"     v:"min:1#工单不能为空"` //
+	StartDate                    *gtime.Time `json:"startDate"`                    // 计划开始时间
+	EndDate                      *gtime.Time `json:"endDate"`                      // 计划结束时间
+	SoftwareRequiredDeliveryTime *gtime.Time `json:"softwareRequiredDeliveryTime"` // (软件)要求发货时间
+	SoftwareSpecialRequirements  string      `json:"softwareSpecialRequirements"`  // (软件)特殊要求说明
+}
+
+type DeliverTimeChangReq struct {
+	DeliverOrderId int `json:"deliverOrderId"` // 交付工单Id
+	ProgressId     int `json:"progressId"`     // 任务单Id
+}

+ 31 - 5
opms_parent/app/model/work/deliver_order_imp_progress.go

@@ -31,13 +31,13 @@ type DeliverOrderProgressAddReq struct {
 	PlanId          int         `json:"planId" v:"required#请输入工单计划ID"`         // 关联实施计划
 	DeliverOrderId  int         `json:"deliverOrderId" v:"required#请输入交付订单ID"` // 关联交付订单ID
 	ProgressTitle   string      `json:"progressTitle" v:"required#请输入任务标题"`    // 任务标题
-	ProgressContext string      `json:"progressContext"`                              // 任务内容
+	ProgressContext string      `json:"progressContext"`                       // 任务内容
 	StartDate       *gtime.Time `json:"startDate" v:"required#请输入开始时间"`        // 开始时间
 	EndDate         *gtime.Time `json:"endDate" v:"required#请输入结束时间"`          // 结束时间
-	ReaStartDate    *gtime.Time `json:"reaStartDate"`                                 // 实际开始时间
-	ReaEndDate      *gtime.Time `json:"reaEndDate"`                                   // 实际结束时间
-	ProgressLevel   string      `json:"progressLevel"`                                // 优先级(10最高 20普通 30较低 )
-	Remark          string      `json:"remark"`                                       // 备注
+	ReaStartDate    *gtime.Time `json:"reaStartDate"`                          // 实际开始时间
+	ReaEndDate      *gtime.Time `json:"reaEndDate"`                            // 实际结束时间
+	ProgressLevel   string      `json:"progressLevel"`                         // 优先级(10最高 20普通 30较低 )
+	Remark          string      `json:"remark"`                                // 备注
 }
 
 type DeliverOrderProgressUpdateReq struct {
@@ -96,6 +96,7 @@ type DeliverGoodsReq struct {
 	ExpressName          string      `json:"expressName"`          // 快递名称
 	ExpressCode          string      `json:"expressCode"`          // 快递单号
 	EstimatedArrivalTime *gtime.Time `json:"estimatedArrivalTime"` // 预计到货时间
+	RealDeliveryTime     *gtime.Time `json:"realDeliveryTime"`     // 实际发货时间
 }
 
 type InspectGoodsReq struct {
@@ -125,3 +126,28 @@ type UpdateProductReq struct {
 	Pictures string `json:"pictures"` // 安装图片(地址串)
 	Desc     string `json:"desc"`     // 安装描述
 }
+
+type ChangeDeliverTimeReq struct {
+	DeliverOrderId int         `json:"deliverOrderId"` // 交付工单Id
+	ProgressId     int         `json:"progressId"`     // 任务单Id
+	DeliveryTime   *gtime.Time `json:"deliveryTime"`   // 要求交付时间
+	ChangeReason   string      `json:"changeReason"`   // 变更原因
+}
+
+type CompleteSoftwareReq struct {
+	Id                    int         `json:"id" v:"required#请输入Id"`
+	ContractId            int         `json:"contractId"`            // 合同Id
+	DeliverOrderId        int         `json:"deliverOrderId"`        // 交付工单Id
+	SoftwareCheckTime     *gtime.Time `json:"softwareCheckTime"`     // 验收时间
+	SoftwareCheckFileUrl  string      `json:"softwareCheckFileUrl"`  // 验收报告url
+	SoftwareCheckFileName string      `json:"softwareCheckFileName"` // 验收报告名称
+	CompletedContent      string      `json:"completedContent"`      // 已完成工作内容
+	CompletedWork         string      `json:"completedWork"`         // 已完成工作量
+	UncompletedContent    string      `json:"uncompletedContent" `   // 未完成工作内容
+	UncompletedWork       string      `json:"uncompletedWork" `      // 未完成工作量
+}
+
+type ProductSignReq struct {
+	Id       int         `json:"id" v:"required#请输入Id"`
+	SignTime *gtime.Time `json:"signTime"  v:"required#请输入Id"` // 签收时间
+}

+ 14 - 0
opms_parent/app/model/work/deliver_order_imp_progress_log.go

@@ -0,0 +1,14 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. Fill this file as you wish.
+// ==========================================================================
+
+package work
+
+import (
+	"dashoo.cn/micro/app/model/work/internal"
+)
+
+// DeliverOrderImpProgressLog is the golang structure for table deliver_order_imp_progress_log.
+type DeliverOrderImpProgressLog internal.DeliverOrderImpProgressLog
+
+// Fill with you ideas below.

+ 34 - 30
opms_parent/app/model/work/internal/deliver_order.go

@@ -10,34 +10,38 @@ import (
 
 // DeliverOrder is the golang structure for table deliver_order.
 type DeliverOrder struct {
-	Id                   int         `orm:"id,primary"             json:"id"`                   // 主键
-	OrderCode            string      `orm:"order_code"             json:"orderCode"`            // 交付订单号
-	OrderStatus          string      `orm:"order_status"           json:"orderStatus"`          // 交付状态(10项目立项 20 完成)
-	OrderType            string      `orm:"order_type"             json:"orderType"`            // 交付类型(10 软件 20 硬件)
-	CustId               int         `orm:"cust_id"                json:"custId"`               // 关联客户ID
-	CustName             string      `orm:"cust_name"              json:"custName"`             // 关联客户名称
-	ProjectId            int         `orm:"project_id"             json:"projectId"`            // 关联项目ID
-	ProjectName          string      `orm:"project_name"           json:"projectName"`          // 关联项目名称
-	ContractId           int         `orm:"contract_id"            json:"contractId"`           // 关联合同ID
-	ContractCode         string      `orm:"contract_code"          json:"contractCode"`         // 关联合同编号
-	ProjectManId         int         `orm:"project_man_id"         json:"projectManId"`         // 项目经理
-	ProjectManName       string      `orm:"project_man_name"       json:"projectManName"`       // 项目经理
-	DeliverManId         int         `orm:"deliver_man_id"         json:"deliverManId"`         // 交付经理
-	DeliverManName       string      `orm:"deliver_man_name"       json:"deliverManName"`       // 交付经理
-	Product              string      `orm:"product"                json:"product"`              // 产品线
-	FinishRemark         string      `orm:"finish_remark"          json:"finishRemark"`         // 完成信息
-	FinishTime           *gtime.Time `orm:"finish_time"            json:"finishTime"`           // 完成时间
-	FinishBy             int         `orm:"finish_by"              json:"finishBy"`             // 完成操作人
-	FinishByName         string      `orm:"finish_by_name"         json:"finishByName"`         // 完成操作人
-	RequiredDeliveryTime *gtime.Time `orm:"required_delivery_time" json:"requiredDeliveryTime"` // 要求发货时间
-	ReceivingInfo        string      `orm:"receiving_info"         json:"receivingInfo"`        // 收货信息
-	SpecialRequirements  string      `orm:"special_requirements"   json:"specialRequirements"`  // 特殊要求说明
-	Remark               string      `orm:"remark"                 json:"remark"`               // 备注
-	CreatedBy            int         `orm:"created_by"             json:"createdBy"`            // 创建者
-	CreatedName          string      `orm:"created_name"           json:"createdName"`          // 创建人
-	CreatedTime          *gtime.Time `orm:"created_time"           json:"createdTime"`          // 创建时间
-	UpdatedBy            int         `orm:"updated_by"             json:"updatedBy"`            // 更新者
-	UpdatedName          string      `orm:"updated_name"           json:"updatedName"`          // 更新人
-	UpdatedTime          *gtime.Time `orm:"updated_time"           json:"updatedTime"`          // 更新时间
-	DeletedTime          *gtime.Time `orm:"deleted_time"           json:"deletedTime"`          // 删除时间
+	Id                           int         `orm:"id,primary"                       json:"id"`                           // 主键
+	OrderCode                    string      `orm:"order_code"                       json:"orderCode"`                    // 交付订单号
+	OrderStatus                  string      `orm:"order_status"                     json:"orderStatus"`                  // 交付状态(10项目立项 20 完成)
+	OrderType                    string      `orm:"order_type"                       json:"orderType"`                    // 交付类型(10 软件 20 硬件)
+	CustId                       int         `orm:"cust_id"                          json:"custId"`                       // 关联客户ID
+	CustName                     string      `orm:"cust_name"                        json:"custName"`                     // 关联客户名称
+	ProjectId                    int         `orm:"project_id"                       json:"projectId"`                    // 关联项目ID
+	ProjectName                  string      `orm:"project_name"                     json:"projectName"`                  // 关联项目名称
+	ContractId                   int         `orm:"contract_id"                      json:"contractId"`                   // 关联合同ID
+	ContractCode                 string      `orm:"contract_code"                    json:"contractCode"`                 // 关联合同编号
+	ProjectManId                 int         `orm:"project_man_id"                   json:"projectManId"`                 // 项目经理
+	ProjectManName               string      `orm:"project_man_name"                 json:"projectManName"`               // 项目经理
+	DeliverManId                 int         `orm:"deliver_man_id"                   json:"deliverManId"`                 // 交付经理
+	DeliverManName               string      `orm:"deliver_man_name"                 json:"deliverManName"`               // 交付经理
+	Product                      string      `orm:"product"                          json:"product"`                      // 产品线
+	FinishRemark                 string      `orm:"finish_remark"                    json:"finishRemark"`                 // 完成信息
+	FinishTime                   *gtime.Time `orm:"finish_time"                      json:"finishTime"`                   // 完成时间
+	FinishBy                     int         `orm:"finish_by"                        json:"finishBy"`                     // 完成操作人
+	FinishByName                 string      `orm:"finish_by_name"                   json:"finishByName"`                 // 完成操作人
+	RequiredDeliveryTime         *gtime.Time `orm:"required_delivery_time"           json:"requiredDeliveryTime"`         // 要求发货时间
+	ReceivingInfo                string      `orm:"receiving_info"                   json:"receivingInfo"`                // 收货信息
+	SpecialRequirements          string      `orm:"special_requirements"             json:"specialRequirements"`          // 特殊要求说明
+	RealDeliveryTime             *gtime.Time `orm:"real_delivery_time"               json:"realDeliveryTime"`             // 实际发货时间
+	SoftwareRequiredDeliveryTime *gtime.Time `orm:"software_required_delivery_time"  json:"softwareRequiredDeliveryTime"` // (软件)要求交付时间
+	SoftwareSpecialRequirements  string      `orm:"software_special_requirements"    json:"softwareSpecialRequirements"`  // (软件)特殊事项说明
+	IsDelay                      string      `orm:"is_delay"                         json:"isDelay"`                      // 是否延期(10(或为空)未延期,20已延期)
+	Remark                       string      `orm:"remark"                           json:"remark"`                       // 备注
+	CreatedBy                    int         `orm:"created_by"                       json:"createdBy"`                    // 创建者
+	CreatedName                  string      `orm:"created_name"                     json:"createdName"`                  // 创建人
+	CreatedTime                  *gtime.Time `orm:"created_time"                     json:"createdTime"`                  // 创建时间
+	UpdatedBy                    int         `orm:"updated_by"                       json:"updatedBy"`                    // 更新者
+	UpdatedName                  string      `orm:"updated_name"                     json:"updatedName"`                  // 更新人
+	UpdatedTime                  *gtime.Time `orm:"updated_time"                     json:"updatedTime"`                  // 更新时间
+	DeletedTime                  *gtime.Time `orm:"deleted_time"                     json:"deletedTime"`                  // 删除时间
 }

+ 57 - 44
opms_parent/app/model/work/internal/deliver_order_imp_progress.go

@@ -10,48 +10,61 @@ import (
 
 // DeliverOrderImpProgress is the golang structure for table deliver_order_imp_progress.
 type DeliverOrderImpProgress struct {
-	Id                   int         `orm:"id,primary"              json:"id"`                   // 主键
-	DeliverOrderId       int         `orm:"deliver_order_id"        json:"deliverOrderId"`       // 关联交付订单ID
-	PlanId               int         `orm:"plan_id"                 json:"planId"`               // 关联实施计划
-	DeliverProgressId    int         `orm:"deliver_progress_id"     json:"deliverProgressId"`    // 关联发货任务单Id
-	ProgressTitle        string      `orm:"progress_title"          json:"progressTitle"`        // 任务标题
-	ProgressContext      string      `orm:"progress_context"        json:"progressContext"`      // 任务内容
-	StartDate            *gtime.Time `orm:"start_date"              json:"startDate"`            // 开始时间
-	EndDate              *gtime.Time `orm:"end_date"                json:"endDate"`              // 结束时间
-	ReaStartDate         *gtime.Time `orm:"rea_start_date"          json:"reaStartDate"`         // 实际开始时间
-	ReaEndDate           *gtime.Time `orm:"rea_end_date"            json:"reaEndDate"`           // 实际结束时间
-	ProgressStatus       string      `orm:"progress_status"         json:"progressStatus"`       // 状态(10未开始、15待确认、20进行中、30已完成、40安装审批通过)
-	DeliverStatus        string      `orm:"deliver_status"          json:"deliverStatus"`        // 发货状态(10未开始、20进行中、30已发货、40产品已验收、50确认已到货、60安装完成)
-	ProgressLevel        string      `orm:"progress_level"          json:"progressLevel"`        // 优先级(10最高 20普通 30较低 )
-	ProgressType         string      `orm:"progress_type"           json:"progressType"`         // 10发货任务单/20组装任务单/30部署安装单
-	PrincipalPersonId    int         `orm:"principal_person_id"     json:"principalPersonId"`    // 负责人id
-	PrincipalPerson      string      `orm:"principal_person"        json:"principalPerson"`      // 负责人
-	AssembleFileUrl      string      `orm:"assemble_file_url"       json:"assembleFileUrl"`      // 组装报告文件
-	AssembleFileName     string      `orm:"assemble_file_name"      json:"assembleFileName"`     // 组装报告文件名称
-	ExpressName          string      `orm:"express_name"            json:"expressName"`          // 快递名称
-	ExpressCode          string      `orm:"express_code"            json:"expressCode"`          // 快递单号
-	EstimatedArrivalTime *gtime.Time `orm:"estimated_arrival_time"  json:"estimatedArrivalTime"` // 预计到货时间
-	ArrivalTime          *gtime.Time `orm:"arrival_time"            json:"arrivalTime"`          // 到货时间
-	CheckFileUrl         string      `orm:"check_file_url"          json:"checkFileUrl"`         // 验收单文件
-	CheckFileName        string      `orm:"check_file_name"         json:"checkFileName"`        // 验收单文件名称
-	CheckPersonId        int         `orm:"check_person_id"         json:"checkPersonId"`        // 验收人Id
-	CheckPerson          string      `orm:"check_person"            json:"checkPerson"`          // 验收人
-	InstallDate          *gtime.Time `orm:"install_date"            json:"installDate"`          // 安装日期
-	InstallCheckFileUrl  string      `orm:"install_check_file_url"  json:"installCheckFileUrl"`  // 安装验收单文件
-	InstallCheckFileName string      `orm:"install_check_file_name" json:"installCheckFileName"` // 安装验收单文件名称
-	ExpectInstallTime    *gtime.Time `orm:"expect_install_time"     json:"expectInstallTime"`    // 期望安装时间
-	InstallBeginTime     *gtime.Time `orm:"install_begin_time"      json:"installBeginTime"`     // 安装开始时间
-	InstallEndTime       *gtime.Time `orm:"install_end_time"        json:"installEndTime"`       // 安装结束时间
-	AuditUserId          int         `orm:"audit_user_id"           json:"auditUserId"`          // 审核人Id
-	AuditUser            string      `orm:"audit_user"              json:"auditUser"`            // 审核人
-	AuditTime            *gtime.Time `orm:"audit_time"              json:"auditTime"`            // 审核时间
-	AuditDesc            string      `orm:"audit_desc"              json:"auditDesc"`            // 审核描述
-	Remark               string      `orm:"remark"                  json:"remark"`               // 备注
-	CreatedBy            int         `orm:"created_by"              json:"createdBy"`            // 创建者
-	CreatedName          string      `orm:"created_name"            json:"createdName"`          // 创建人
-	CreatedTime          *gtime.Time `orm:"created_time"            json:"createdTime"`          // 创建时间
-	UpdatedBy            int         `orm:"updated_by"              json:"updatedBy"`            // 更新者
-	UpdatedName          string      `orm:"updated_name"            json:"updatedName"`          // 更新人
-	UpdatedTime          *gtime.Time `orm:"updated_time"            json:"updatedTime"`          // 更新时间
-	DeletedTime          *gtime.Time `orm:"deleted_time"            json:"deletedTime"`          // 删除时间
+	Id                           int         `orm:"id,primary"                      json:"id"`                           // 主键
+	DeliverOrderId               int         `orm:"deliver_order_id"                json:"deliverOrderId"`               // 关联交付订单ID
+	PlanId                       int         `orm:"plan_id"                         json:"planId"`                       // 关联实施计划
+	DeliverProgressId            int         `orm:"deliver_progress_id"             json:"deliverProgressId"`            // 关联发货任务单Id
+	ProgressTitle                string      `orm:"progress_title"                  json:"progressTitle"`                // 任务标题
+	ProgressContext              string      `orm:"progress_context"                json:"progressContext"`              // 任务内容
+	StartDate                    *gtime.Time `orm:"start_date"                      json:"startDate"`                    // 开始时间
+	EndDate                      *gtime.Time `orm:"end_date"                        json:"endDate"`                      // 结束时间
+	ReaStartDate                 *gtime.Time `orm:"rea_start_date"                  json:"reaStartDate"`                 // 实际开始时间
+	ReaEndDate                   *gtime.Time `orm:"rea_end_date"                    json:"reaEndDate"`                   // 实际结束时间
+	ProgressStatus               string      `orm:"progress_status"                 json:"progressStatus"`               // 状态(10未开始、15待确认、20进行中、30已完成、40安装审批通过)
+	DeliverStatus                string      `orm:"deliver_status"                  json:"deliverStatus"`                // 发货状态(10未开始、20进行中、30已发货、40产品已验收、50确认已到货、60安装完成)
+	ProgressLevel                string      `orm:"progress_level"                  json:"progressLevel"`                // 优先级(10最高 20普通 30较低 )
+	ProgressType                 string      `orm:"progress_type"                   json:"progressType"`                 // 10发货任务单/20组装任务单/30部署安装单
+	PrincipalPersonId            int         `orm:"principal_person_id"             json:"principalPersonId"`            // 负责人id
+	PrincipalPerson              string      `orm:"principal_person"                json:"principalPerson"`              // 负责人
+	AssembleFileUrl              string      `orm:"assemble_file_url"               json:"assembleFileUrl"`              // 组装报告文件
+	AssembleFileName             string      `orm:"assemble_file_name"              json:"assembleFileName"`             // 组装报告文件名称
+	ExpressName                  string      `orm:"express_name"                    json:"expressName"`                  // 快递名称
+	ExpressCode                  string      `orm:"express_code"                    json:"expressCode"`                  // 快递单号
+	EstimatedArrivalTime         *gtime.Time `orm:"estimated_arrival_time"          json:"estimatedArrivalTime"`         // 预计到货时间
+	ArrivalTime                  *gtime.Time `orm:"arrival_time"                    json:"arrivalTime"`                  // 到货时间
+	CheckFileUrl                 string      `orm:"check_file_url"                  json:"checkFileUrl"`                 // 验收单文件
+	CheckFileName                string      `orm:"check_file_name"                 json:"checkFileName"`                // 验收单文件名称
+	CheckPersonId                int         `orm:"check_person_id"                 json:"checkPersonId"`                // 验收人Id
+	CheckPerson                  string      `orm:"check_person"                    json:"checkPerson"`                  // 验收人
+	InstallDate                  *gtime.Time `orm:"install_date"                    json:"installDate"`                  // 安装日期
+	InstallCheckFileUrl          string      `orm:"install_check_file_url"          json:"installCheckFileUrl"`          // 安装验收单文件
+	InstallCheckFileName         string      `orm:"install_check_file_name"         json:"installCheckFileName"`         // 安装验收单文件名称
+	ExpectInstallTime            *gtime.Time `orm:"expect_install_time"             json:"expectInstallTime"`            // 期望安装时间
+	InstallBeginTime             *gtime.Time `orm:"install_begin_time"              json:"installBeginTime"`             // 安装开始时间
+	InstallEndTime               *gtime.Time `orm:"install_end_time"                json:"installEndTime"`               // 安装结束时间
+	AuditUserId                  int         `orm:"audit_user_id"                   json:"auditUserId"`                  // 审核人Id
+	AuditUser                    string      `orm:"audit_user"                      json:"auditUser"`                    // 审核人
+	AuditTime                    *gtime.Time `orm:"audit_time"                      json:"auditTime"`                    // 审核时间
+	AuditDesc                    string      `orm:"audit_desc"                      json:"auditDesc"`                    // 审核描述
+	ProductSigningTime           *gtime.Time `orm:"product_signing_time"            json:"productSigningTime"`           // 签收时间
+	IsSign                       string      `orm:"is_sign"                         json:"isSign"`                       // 是否已签收(10(或为空)未签收,20已签收)
+	SoftwareRequiredDeliveryTime *gtime.Time `orm:"software_required_delivery_time" json:"softwareRequiredDeliveryTime"` // (软件)要求交付时间
+	SoftwareSpecialRequirements  string      `orm:"software_special_requirements"   json:"softwareSpecialRequirements"`  // (软件)特殊事项说明
+	SoftwareCheckTime            *gtime.Time `orm:"software_check_time"             json:"softwareCheckTime"`            // 验收时间
+	SoftwareCheckFileUrl         string      `orm:"software_check_file_url"         json:"softwareCheckFileUrl"`         // 验收报告url
+	SoftwareCheckFileName        string      `orm:"software_check_file_name"        json:"softwareCheckFileName"`        // 验收报告名称
+	SoftwareCheckPersonId        int         `orm:"software_check_person_id"        json:"softwareCheckPersonId"`        // 验收录入人Id
+	SoftwareCheckPerson          string      `orm:"software_check_person"           json:"softwareCheckPerson"`          // 验收录入人
+	CompletedContent             string      `orm:"completed_content"               json:"completedContent"`             // 已完成工作内容
+	CompletedWork                string      `orm:"completed_work"                  json:"completedWork"`                // 已完成工作量
+	UncompletedContent           string      `orm:"uncompleted_content"             json:"uncompletedContent" `          // 未完成工作内容
+	UncompletedWork              string      `orm:"uncompleted_work"                json:"uncompletedWork" `             // 未完成工作量
+	Remark                       string      `orm:"remark"                          json:"remark"`                       // 备注
+	CreatedBy                    int         `orm:"created_by"                      json:"createdBy"`                    // 创建者
+	CreatedName                  string      `orm:"created_name"                    json:"createdName"`                  // 创建人
+	CreatedTime                  *gtime.Time `orm:"created_time"                    json:"createdTime"`                  // 创建时间
+	UpdatedBy                    int         `orm:"updated_by"                      json:"updatedBy"`                    // 更新者
+	UpdatedName                  string      `orm:"updated_name"                    json:"updatedName"`                  // 更新人
+	UpdatedTime                  *gtime.Time `orm:"updated_time"                    json:"updatedTime"`                  // 更新时间
+	DeletedTime                  *gtime.Time `orm:"deleted_time"                    json:"deletedTime"`                  // 删除时间
 }

+ 31 - 0
opms_parent/app/model/work/internal/deliver_order_imp_progress_log.go

@@ -0,0 +1,31 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"github.com/gogf/gf/os/gtime"
+)
+
+// DeliverOrderImpProgressLog is the golang structure for table deliver_order_imp_progress_log.
+type DeliverOrderImpProgressLog struct {
+	Id                      int         `orm:"id,primary"                 json:"id"`                      // 主键
+	DeliverOrderId          int         `orm:"deliver_order_id"           json:"deliverOrderId"`          // 关联交付订单ID
+	DeliverProgressId       int         `orm:"deliver_progress_id"        json:"deliverProgressId"`       // 关联交付任务单Id
+	OpnPeopleId             int         `orm:"opn_people_id"              json:"opnPeopleId"`             // 操作人ID
+	OpnPeople               string      `orm:"opn_people"                 json:"opnPeople"`               // 操作人
+	OpnDate                 *gtime.Time `orm:"opn_date"                   json:"opnDate"`                 // 操作日期
+	OpnType                 string      `orm:"opn_type"                   json:"opnType"`                 // 操作类型
+	OpnContent              string      `orm:"opn_content"                json:"opnContent"`              // 操作内容
+	OldRequiredDeliveryTime *gtime.Time `orm:"old_required_delivery_time" json:"oldRequiredDeliveryTime"` // 旧要求交付时间时间
+	NowRequiredDeliveryTime *gtime.Time `orm:"now_required_delivery_time" json:"nowRequiredDeliveryTime"` // 当前要求交付时间时间
+	Remark                  string      `orm:"remark"                     json:"remark"`                  // 备注
+	CreatedBy               int         `orm:"created_by"                 json:"createdBy"`               // 创建者
+	CreatedName             string      `orm:"created_name"               json:"createdName"`             // 创建人
+	CreatedTime             *gtime.Time `orm:"created_time"               json:"createdTime"`             // 创建时间
+	UpdatedBy               int         `orm:"updated_by"                 json:"updatedBy"`               // 更新者
+	UpdatedName             string      `orm:"updated_name"               json:"updatedName"`             // 更新人
+	UpdatedTime             *gtime.Time `orm:"updated_time"               json:"updatedTime"`             // 更新时间
+	DeletedTime             *gtime.Time `orm:"deleted_time"               json:"deletedTime"`             // 删除时间
+}

+ 42 - 39
opms_parent/app/service/contract/ctr_contract.go

@@ -424,45 +424,48 @@ func (s CtrContractService) Add(ctx context.Context, req *model.CtrContractAddRe
 		contractAmount += (p.TranPrice * float64(p.ProdNum))
 	}
 	ctr := model.CtrContract{
-		ContractCode:        req.ContractCode,
-		ContractName:        req.ContractName,
-		CustId:              nbo.CustId,
-		CustName:            nbo.CustName,
-		NboId:               nbo.Id,
-		NboName:             nbo.NboName,
-		IsBig:               nbo.IsBig,
-		ProductLine:         nbo.ProductLine,
-		CustProvinceId:      nbo.CustProvinceId,
-		CustProvince:        nbo.CustProvince,
-		CustCityId:          nbo.CustCityId,
-		CustCity:            nbo.CustCity,
-		ApproStatus:         "10",
-		ContractType:        req.ContractType,
-		ContractAmount:      contractAmount,
-		InvoiceAmount:       0,
-		CollectedAmount:     0,
-		ContractStartTime:   req.ContractStartTime,
-		ContractEndTime:     req.ContractEndTime,
-		ContractSignTime:    req.ContractSignTime,
-		InchargeId:          req.InchargeId,
-		InchargeName:        req.InchargeName,
-		SignatoryId:         req.SignatoryId,
-		SignatoryName:       req.SignatoryName,
-		SignatoryType:       req.SignatoryType,
-		SignatoryUnit:       req.SignatoryUnit,
-		EarnestMoney:        req.EarnestMoney,
-		CustSignatoryId:     req.CustSignatoryId,
-		CustSignatoryName:   req.CustSignatoryName,
-		DistributorId:       req.DistributorId,
-		DistributorName:     req.DistributorName,
-		Remark:              req.Remark,
-		ServiceFeeAgreement: req.ServiceFeeAgreement,
-		CreatedBy:           int(s.userInfo.Id),
-		CreatedName:         s.userInfo.NickName,
-		CreatedTime:         gtime.Now(),
-		UpdatedBy:           int(s.userInfo.Id),
-		UpdatedName:         s.userInfo.NickName,
-		UpdatedTime:         gtime.Now(),
+		ContractCode:             req.ContractCode,
+		ContractName:             req.ContractName,
+		CustId:                   nbo.CustId,
+		CustName:                 nbo.CustName,
+		NboId:                    nbo.Id,
+		NboName:                  nbo.NboName,
+		IsBig:                    nbo.IsBig,
+		ProductLine:              nbo.ProductLine,
+		CustProvinceId:           nbo.CustProvinceId,
+		CustProvince:             nbo.CustProvince,
+		CustCityId:               nbo.CustCityId,
+		CustCity:                 nbo.CustCity,
+		ApproStatus:              "10",
+		ContractType:             req.ContractType,
+		ContractAmount:           contractAmount,
+		InvoiceAmount:            0,
+		CollectedAmount:          0,
+		ContractStartTime:        req.ContractStartTime,
+		ContractEndTime:          req.ContractEndTime,
+		ContractSignTime:         req.ContractSignTime,
+		InchargeId:               req.InchargeId,
+		InchargeName:             req.InchargeName,
+		SignatoryId:              req.SignatoryId,
+		SignatoryName:            req.SignatoryName,
+		SignatoryType:            req.SignatoryType,
+		SignatoryUnit:            req.SignatoryUnit,
+		EarnestMoney:             req.EarnestMoney,
+		CustSignatoryId:          req.CustSignatoryId,
+		CustSignatoryName:        req.CustSignatoryName,
+		DistributorId:            req.DistributorId,
+		DistributorName:          req.DistributorName,
+		Remark:                   req.Remark,
+		ServiceFeeAgreement:      req.ServiceFeeAgreement,
+		SoftwareMaintenanceLimit: req.SoftwareMaintenanceLimit,
+		HardwareMaintenanceLimit: req.HardwareMaintenanceLimit,
+		MaintenanceClause:        req.MaintenanceClause,
+		CreatedBy:                s.userInfo.Id,
+		CreatedName:              s.userInfo.NickName,
+		CreatedTime:              gtime.Now(),
+		UpdatedBy:                s.userInfo.Id,
+		UpdatedName:              s.userInfo.NickName,
+		UpdatedTime:              gtime.Now(),
 	}
 
 	var id int

+ 104 - 3
opms_parent/app/service/work/deliver_order.go

@@ -42,6 +42,7 @@ type DeliverOrderService struct {
 	CtrProductDao      *contractdao.CtrContractProductDao
 	BaseProductDao     *basedao.BaseProductDao
 	ProgressProductDao *workdao.DeliverProgressProductDao
+	ProgressLogDao     *workdao.DeliverOrderImpProgressLogDao
 
 	Tenant    string
 	userInfo  request.UserInfo
@@ -69,6 +70,7 @@ func NewDeliverOrderService(ctx context.Context) (*DeliverOrderService, error) {
 		ProductDao:         workdao.NewDeliverOrderProductDao(tenant),
 		BaseProductDao:     basedao.NewBaseProductDao(tenant),
 		ProgressProductDao: workdao.NewDeliverProgressProductDao(tenant),
+		ProgressLogDao:     workdao.NewDeliverOrderImpProgressLogDao(tenant),
 		Tenant:             tenant,
 		userInfo:           userInfo,
 		DataScope:          userInfo.DataScope,
@@ -499,7 +501,7 @@ func DeliverOrderAdd(tx *gdb.TX, contractId int, userInfo request.UserInfo, prod
 }
 
 // DeliverOrderNotify 工单 审批结果通知
-func (s *DeliverOrderService) DeliverOrderNotify(flow *workflowModel.PlatWorkflow, msg *message.MixMessage) error {
+func (s DeliverOrderService) DeliverOrderNotify(flow *workflowModel.PlatWorkflow, msg *message.MixMessage) error {
 	bizCode := strings.Split(flow.BizCode, ":")
 	if len(bizCode) != 2 {
 		return fmt.Errorf("工单审批 bizCode 不合法:%s Id: %d", flow.BizCode, flow.Id)
@@ -546,7 +548,7 @@ func (s *DeliverOrderService) DeliverOrderNotify(flow *workflowModel.PlatWorkflo
 	return err
 }
 
-func (s *DeliverOrderService) workOrderSendMsg(order *work.DeliverOrder, title, content string) {
+func (s DeliverOrderService) workOrderSendMsg(order *work.DeliverOrder, title, content string) {
 	recvUserIds := []int{}
 	if order.ProjectManId != 0 {
 		recvUserIds = append(recvUserIds, order.ProjectManId)
@@ -688,7 +690,7 @@ func (s DeliverOrderService) Update(ctx context.Context, req *work.DeliverOrderU
 	return nil
 }
 
-func (s *DeliverOrderService) Finish(ctx context.Context, req *work.DeliverOrderFinishReq) error {
+func (s DeliverOrderService) Finish(ctx context.Context, req *work.DeliverOrderFinishReq) error {
 	ent, err := s.Dao.Where("id = ?", req.OrderId).One()
 	if err != nil {
 		return err
@@ -787,3 +789,102 @@ func (s DeliverOrderService) GetHardwareUserInfo(ctx context.Context, req *work.
 		"nickName": user["nick_name"],
 	}, nil
 }
+
+// SoftwareStart 软件交付启动
+func (s DeliverOrderService) SoftwareStart(ctx context.Context, req *work.SoftwareStartReq) error {
+	if req.OrderId == 0 {
+		return myerrors.TipsError("交付工单Id为空,操作失败")
+	}
+	order, err := s.Dao.Where(fmt.Sprintf("id='%v'", req.OrderId)).FindOne()
+	if err != nil {
+		return err
+	}
+	// 交付状态(10项目立项 15进行中 20 完成)
+	if order.OrderStatus != "10" {
+		return myerrors.TipsError("该状态的工单不可启动")
+	}
+
+	// 更新交付工单数据
+	_, err = s.Dao.Update(g.Map{
+		"order_status":                    "15",
+		"software_required_delivery_time": req.SoftwareRequiredDeliveryTime,
+		"software_special_requirements":   req.SoftwareSpecialRequirements,
+		"updated_by":                      s.userInfo.Id,
+		"updated_name":                    s.userInfo.NickName,
+		"updated_time":                    gtime.Now(),
+	}, fmt.Sprintf("id='%v'", req.OrderId))
+	if err != nil {
+		return err
+	}
+	// 生成发货计划
+	var plan work.DeliverOrderImpPlan
+	plan.DeliverOrderId = req.OrderId
+	plan.PlanTitle = "软件交付计划"
+	plan.PlanStatus = "10"
+	plan.PlanStartDate = gtime.Now()
+	plan.PlanEndDate = req.SoftwareRequiredDeliveryTime
+	service.SetCreatedInfo(&plan, s.userInfo.Id, s.userInfo.NickName)
+	// 保存计划
+	planResult, err := s.PlanDao.Save(plan)
+	if err != nil {
+		return err
+	}
+
+	var softwareDeliverProgress work.DeliverOrderImpProgress
+	// 初始化数据
+	planId, _ := planResult.LastInsertId()
+	softwareDeliverProgress.DeliverOrderId = order.Id
+	softwareDeliverProgress.PlanId = int(planId)
+	softwareDeliverProgress.ProgressStatus = "20" // 状态(10未开始20进行中30已完成)
+	softwareDeliverProgress.ProgressType = "40"   // 10发货任务单、20组装任务单、30部署安装单、40软件交付验收任务单
+	softwareDeliverProgress.ProgressTitle = fmt.Sprintf("[%v][%v]软件交付验收任务单", order.ContractCode, order.ProjectName)
+	softwareDeliverProgress.StartDate = req.StartDate
+	softwareDeliverProgress.EndDate = req.EndDate
+	softwareDeliverProgress.ReaStartDate = gtime.Now()
+	softwareDeliverProgress.ProgressLevel = "20" // 优先级(10最高 20普通 30较低 )
+	if softwareDeliverProgress.PrincipalPerson == "" {
+		softwareDeliverProgress.PrincipalPersonId, softwareDeliverProgress.PrincipalPerson = order.DeliverManId, order.DeliverManName
+	}
+	service.SetCreatedInfo(&softwareDeliverProgress, s.userInfo.Id, s.userInfo.NickName)
+	_, err = s.Dao.DB.Model("deliver_order_imp_progress").Save(softwareDeliverProgress)
+	if err != nil {
+		return err
+	}
+
+	msg := g.MapStrStr{
+		"msgTitle":    "软件交付工单提醒",
+		"msgContent":  fmt.Sprintf("<p>%v的交付工单:<a href='%v'>%v</a>已经启动,请前去查看。</p>", order.ProjectName, fmt.Sprintf("#/work/deliveryPlan?id=%v", order.Id), order.OrderCode),
+		"msgType":     "20",
+		"recvUserIds": gconv.String(order.DeliverManId),
+		"msgStatus":   "10",
+		"sendType":    "10",
+	}
+	if err = service.CreateSystemMessage(msg); err != nil {
+		g.Log().Error("消息提醒异常:", err)
+	}
+
+	return err
+}
+
+func (s DeliverOrderService) DeliverTimeChangeLogList(ctx context.Context, req *work.DeliverTimeChangReq) ([]*work.DeliverOrderImpProgressLog, error) {
+	// 参数校验
+	if req.DeliverOrderId == 0 && req.ProgressId != 0 {
+		return nil, myerrors.TipsError("参数缺失,查询失败")
+	}
+
+	where := ""
+	if req.DeliverOrderId != 0 {
+		where = fmt.Sprintf("deliver_order_id='%v'", req.DeliverOrderId)
+	}
+	if req.ProgressId != 0 {
+		if where == "" {
+			where = fmt.Sprintf("deliver_progress_id='%v'", req.ProgressId)
+		} else {
+			where += fmt.Sprintf(" AND deliver_progress_id='%v'", req.ProgressId)
+		}
+	}
+
+	// 查询数据
+	results, err := s.ProgressLogDao.Where(where).OrderDesc("created_time").FindAll()
+	return results, err
+}

+ 177 - 0
opms_parent/app/service/work/deliver_order_progress.go

@@ -355,6 +355,7 @@ func (s DeliverOrderProgressService) StartDeliverGoodsProgress(ctx context.Conte
 		// 初始化数据
 		deliverProgress.ProgressStatus = "20" // 状态(10未开始20进行中30已完成)
 		deliverProgress.DeliverStatus = "20"  // 发货状态(10未开始、20进行中、30已发货、40产品已验收、50确认已到货、60安装完成)
+		deliverProgress.IsSign = "10"         // 是否已签收(10(或为空)未签收,20已签收)
 		//deliverProgress.ProgressType = "10"   // 10发货任务单/20组装任务单/30部署安装单
 		deliverProgress.ReaStartDate = gtime.Now()
 		if deliverProgress.PrincipalPerson == "" {
@@ -469,6 +470,11 @@ func (s DeliverOrderProgressService) DeliverGoods(ctx context.Context, req *work
 	if err != nil {
 		return err
 	}
+	// 获取合同信息
+	contract, err := s.ContractDao.Where(fmt.Sprintf("id='%v'", order.ContractId)).One()
+	if err != nil {
+		return err
+	}
 	// 10发货任务单/20组装任务单/30部署安装单
 	installProgress, err := s.Dao.Where(fmt.Sprintf("deliver_order_id='%v' AND progress_status<>'30' AND progress_type='30'", progress.DeliverOrderId)).FindOne()
 	if err != nil && err != sql.ErrNoRows {
@@ -476,6 +482,20 @@ func (s DeliverOrderProgressService) DeliverGoods(ctx context.Context, req *work
 	}
 
 	err = s.Dao.DB.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
+		// 更新实际发货时间
+		_, err = tx.Update("deliver_order", "real_delivery_time='%v'", req.RealDeliveryTime, fmt.Sprintf("id='%v'", progress.DeliverOrderId))
+		if err != nil {
+			return err
+		}
+		// 若第一次,更新合同的硬件运维开始时间、结束时间
+		if contract.HardwareMaintenanceBeginTime == nil {
+			endTime := req.RealDeliveryTime.AddDate(contract.HardwareMaintenanceLimit, 0, 0)
+			_, err = tx.Update("ctr_contract", "hardware_maintenance_begin_time='%v',hardware_maintenance_end_time='%v'", req.RealDeliveryTime, endTime, fmt.Sprintf("id='%v'", progress.DeliverOrderId))
+			if err != nil {
+				return err
+			}
+		}
+		// 更新发货信息
 		_, err = tx.Update("deliver_order_imp_progress", fmt.Sprintf("deliver_status='30',express_name='%v',express_code='%v',estimated_arrival_time='%v'", req.ExpressName, req.ExpressCode, req.EstimatedArrivalTime), fmt.Sprintf("id='%v'", req.Id))
 		if err != nil {
 			return err
@@ -762,3 +782,160 @@ func (s DeliverOrderProgressService) UpdateProgressProductInfo(ctx context.Conte
 	_, err := s.ProgressProductDao.Update(data, where)
 	return err
 }
+
+// ProductSign 发货任务单签收
+func (s DeliverOrderProgressService) ProductSign(ctx context.Context, req *work.ProductSignReq) error {
+	validErr := gvalid.CheckStruct(ctx, req, nil)
+	if validErr != nil {
+		return myerrors.TipsError(validErr.Current().Error())
+	}
+
+	ent, err := s.Dao.Where("id = ?", req.Id).One()
+	if err != nil {
+		return err
+	}
+	if ent == nil {
+		return myerrors.TipsError(fmt.Sprintf("工单任务不存在: %d", req.Id))
+	}
+
+	txerr := s.Dao.DB.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
+		_, err = tx.Update("deliver_order_imp_progress", map[string]interface{}{
+			"product_signing_time": req.SignTime, // 签约时间
+			"is_sign":              "20",
+			"updated_by":           s.userInfo.Id,
+			"updated_name":         s.userInfo.NickName,
+			"updated_time":         gtime.Now(),
+		}, "id = ?", req.Id)
+		if err != nil {
+			return err
+		}
+		return nil
+	})
+	if txerr != nil {
+		return txerr
+	}
+	return nil
+}
+
+// CompleteSoftware 软件交付验收任务单完成
+func (s DeliverOrderProgressService) CompleteSoftware(ctx context.Context, req *work.CompleteSoftwareReq) error {
+	if req.Id == 0 || req.ContractId == 0 {
+		return myerrors.TipsError("参数缺失,操作失败")
+	}
+	contract, err := s.ContractDao.Where("id=?", req.ContractId).One()
+	if err != nil {
+		return err
+	}
+	data := g.Map{
+		"progress_status":          "30",
+		"software_check_time":      req.SoftwareCheckTime,
+		"software_check_file_url":  req.SoftwareCheckFileUrl,
+		"software_check_file_name": req.SoftwareCheckFileName,
+		"software_check_person_id": s.userInfo.Id,
+		"software_check_person":    s.userInfo.NickName,
+		"completed_content":        req.CompletedContent,
+		"completed_work":           req.CompletedWork,
+		"uncompleted_content":      req.UncompletedContent,
+		"uncompleted_work":         req.UncompletedWork,
+		"updated_by":               s.userInfo.Id,
+		"updated_name":             s.userInfo.NickName,
+		"updated_time":             gtime.Now(),
+	}
+	// 更新验收单信息
+	_, err = s.Dao.Update(data, fmt.Sprintf("id='%v'", req.Id))
+	if err != nil {
+		return err
+	}
+	// 更新交付工单状态
+	_, err = s.OrderDao.Update(g.Map{
+		"order_status":   "20",
+		"finish_time":    gtime.Now(),
+		"finish_by":      s.userInfo.Id,
+		"finish_by_name": s.userInfo.NickName,
+		"updated_by":     s.userInfo.Id,
+		"updated_name":   s.userInfo.NickName,
+		"updated_time":   gtime.Now(),
+	}, fmt.Sprintf("id='%v'", req.DeliverOrderId))
+	if err != nil {
+		return err
+	}
+	// 更新合同信息
+	endTime := req.SoftwareCheckTime.AddDate(contract.SoftwareMaintenanceLimit, 0, 0)
+	_, err = s.ContractDao.Update(g.Map{
+		"software_maintenance_begin_time": req.SoftwareCheckTime,
+		"software_maintenance_end_time":   endTime,
+		"updated_by":                      s.userInfo.Id,
+		"updated_name":                    s.userInfo.NickName,
+		"updated_time":                    gtime.Now(),
+	}, fmt.Sprintf("id='%v'", req.ContractId))
+
+	return err
+}
+
+// ChangeSoftwareDeliverTime 变更交付时间
+func (s DeliverOrderProgressService) ChangeSoftwareDeliverTime(ctx context.Context, req *work.ChangeDeliverTimeReq) error {
+	// 参数校验
+	if (req.DeliverOrderId == 0 && req.ProgressId == 0) || req.DeliveryTime == nil || req.ChangeReason == "" {
+		return myerrors.TipsError("参数缺失,操作失败")
+	}
+	progress, err := s.Dao.Where("id=?", req.ProgressId).One()
+	if err != nil {
+		return err
+	}
+
+	err = s.Dao.DB.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
+		isDelay := "10"
+		// 延期判断
+		if progress.SoftwareRequiredDeliveryTime != nil && progress.SoftwareCheckTime != nil && progress.SoftwareCheckTime.Format("Y-m-d H:i:s") > progress.SoftwareRequiredDeliveryTime.Format("Y-m-d H:i:s") {
+			isDelay = "20"
+		}
+		// 更新要求交付时间和是否延期
+		_, err := tx.Update("deliver_order", g.Map{
+			"software_required_delivery_time": req.DeliveryTime,
+			"is_delay":                        isDelay,
+			"updated_by":                      s.userInfo.Id,
+			"updated_name":                    s.userInfo.NickName,
+			"updated_time":                    gtime.Now(),
+		}, fmt.Sprintf("id='%v'", req.DeliverOrderId))
+		if err != nil {
+			return err
+		}
+		// 更新要求交付时间
+		_, err = tx.Update("deliver_order_imp_progress", g.Map{
+			"software_required_delivery_time": req.DeliveryTime,
+			"is_delay":                        isDelay,
+			"updated_by":                      s.userInfo.Id,
+			"updated_name":                    s.userInfo.NickName,
+			"updated_time":                    gtime.Now(),
+		}, fmt.Sprintf("id='%v'", req.ProgressId))
+		if err != nil {
+			return err
+		}
+		// 添加变更日志
+		var log work.DeliverOrderImpProgressLog
+		log.DeliverOrderId = req.DeliverOrderId
+		log.DeliverProgressId = req.ProgressId
+		log.OpnPeopleId = s.userInfo.Id
+		log.OpnPeople = s.userInfo.NickName
+		log.OpnDate = gtime.Now()
+		log.OpnType = "要求交付时间变更"
+		log.Remark = req.ChangeReason
+		if progress.SoftwareRequiredDeliveryTime != nil {
+			log.OpnContent = fmt.Sprintf("要求交付时间由%v变更为%v", progress.SoftwareRequiredDeliveryTime.Format("Y-m-d"), req.DeliveryTime.Format("Y-m-d"))
+		} else {
+			log.OpnContent = fmt.Sprintf("要求交付时间由[空]变更为%v", req.DeliveryTime.Format("Y-m-d"))
+		}
+		log.OldRequiredDeliveryTime = progress.SoftwareRequiredDeliveryTime
+		log.NowRequiredDeliveryTime = req.DeliveryTime
+		service.SetCreatedInfo(&log, s.userInfo.Id, s.userInfo.NickName)
+
+		_, err = tx.Save("deliver_order_imp_progress_log", log)
+		if err != nil {
+			return err
+		}
+
+		return nil
+	})
+
+	return err
+}