|
@@ -8237,7 +8237,8 @@ func (this *CompanyController) EditTryOutCompanyReason() {
|
|
endDateTime, _ = time.Parse(utils.FormatDate, endDate)
|
|
endDateTime, _ = time.Parse(utils.FormatDate, endDate)
|
|
sub := time.Now().Sub(endDateTime)
|
|
sub := time.Now().Sub(endDateTime)
|
|
renewalReason.ExpirationTimeExceeded = int(sub.Hours() / 24)
|
|
renewalReason.ExpirationTimeExceeded = int(sub.Hours() / 24)
|
|
- err = company.AddRenewalReason(&renewalReason)
|
|
|
|
|
|
+ var newId int64
|
|
|
|
+ newId, err = company.AddRenewalReason(&renewalReason)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "新增续约情况说明操作异常!"
|
|
br.Msg = "新增续约情况说明操作异常!"
|
|
br.ErrMsg = "新增续约情况说明操作异常,err:" + err.Error()
|
|
br.ErrMsg = "新增续约情况说明操作异常,err:" + err.Error()
|
|
@@ -8342,6 +8343,22 @@ func (this *CompanyController) EditTryOutCompanyReason() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if req.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
|
+ //权益客户新增历史备注总表
|
|
|
|
+ itemRecord := new(company.CompanyHistoryRemark)
|
|
|
|
+ itemRecord.CompanyId = req.CompanyId
|
|
|
|
+ itemRecord.Content = req.Remark
|
|
|
|
+ itemRecord.SysAdminId = sysUser.AdminId
|
|
|
|
+ itemRecord.SysAdminName = sysUser.RealName
|
|
|
|
+ itemRecord.CreateTime = time.Now().Local()
|
|
|
|
+ itemRecord.ModifyTime = time.Now().Local()
|
|
|
|
+ itemRecord.ShowTime = time.Now().Local()
|
|
|
|
+ itemRecord.ProductId = 2
|
|
|
|
+ itemRecord.TableName = "company_renewal_reason"
|
|
|
|
+ itemRecord.TableId = int(newId)
|
|
|
|
+ go services.AddCompanyHistoryRemark(itemRecord)
|
|
|
|
+ }
|
|
|
|
+
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|
|
br.Msg = "编辑成功"
|
|
br.Msg = "编辑成功"
|
|
@@ -8437,7 +8454,8 @@ func (this *CompanyController) AddTryOutCompanyReason() {
|
|
endDateTime, _ = time.Parse(utils.FormatDate, endDate)
|
|
endDateTime, _ = time.Parse(utils.FormatDate, endDate)
|
|
sub := time.Now().Sub(endDateTime)
|
|
sub := time.Now().Sub(endDateTime)
|
|
renewalReason.ExpirationTimeExceeded = int(sub.Hours() / 24)
|
|
renewalReason.ExpirationTimeExceeded = int(sub.Hours() / 24)
|
|
- err = company.AddRenewalReason(&renewalReason)
|
|
|
|
|
|
+ var newId int64
|
|
|
|
+ newId, err = company.AddRenewalReason(&renewalReason)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "新增续约情况说明操作异常!"
|
|
br.Msg = "新增续约情况说明操作异常!"
|
|
br.ErrMsg = "新增续约情况说明操作异常,err:" + err.Error()
|
|
br.ErrMsg = "新增续约情况说明操作异常,err:" + err.Error()
|
|
@@ -8523,6 +8541,22 @@ func (this *CompanyController) AddTryOutCompanyReason() {
|
|
companyProduct.ProductName, sysUser.RealName, remark, operation, approveContent, approveContentExtra, sysUser.RealName, "", companyProduct.Status)
|
|
companyProduct.ProductName, sysUser.RealName, remark, operation, approveContent, approveContentExtra, sysUser.RealName, "", companyProduct.Status)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if req.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
|
+ //权益客户新增历史备注总表
|
|
|
|
+ itemRecord := new(company.CompanyHistoryRemark)
|
|
|
|
+ itemRecord.CompanyId = req.CompanyId
|
|
|
|
+ itemRecord.Content = req.Remark
|
|
|
|
+ itemRecord.SysAdminId = sysUser.AdminId
|
|
|
|
+ itemRecord.SysAdminName = sysUser.RealName
|
|
|
|
+ itemRecord.CreateTime = time.Now().Local()
|
|
|
|
+ itemRecord.ModifyTime = time.Now().Local()
|
|
|
|
+ itemRecord.ShowTime = time.Now().Local()
|
|
|
|
+ itemRecord.ProductId = 2
|
|
|
|
+ itemRecord.TableName = "company_renewal_reason"
|
|
|
|
+ itemRecord.TableId = int(newId)
|
|
|
|
+ go services.AddCompanyHistoryRemark(itemRecord)
|
|
|
|
+ }
|
|
|
|
+
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|
|
br.Msg = "编辑成功"
|
|
br.Msg = "编辑成功"
|
|
@@ -8678,7 +8712,9 @@ func (this *CompanyController) AddRenewalReason() {
|
|
endDateTime, _ = time.Parse(utils.FormatDate, endDate)
|
|
endDateTime, _ = time.Parse(utils.FormatDate, endDate)
|
|
sub := time.Now().Sub(endDateTime)
|
|
sub := time.Now().Sub(endDateTime)
|
|
renewalReason.ExpirationTimeExceeded = int(sub.Hours() / 24)
|
|
renewalReason.ExpirationTimeExceeded = int(sub.Hours() / 24)
|
|
- err = company.AddRenewalReason(&renewalReason)
|
|
|
|
|
|
+
|
|
|
|
+ var newId int64
|
|
|
|
+ newId, err = company.AddRenewalReason(&renewalReason)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "新增续约情况说明操作异常!"
|
|
br.Msg = "新增续约情况说明操作异常!"
|
|
br.ErrMsg = "新增续约情况说明操作异常,err:" + err.Error()
|
|
br.ErrMsg = "新增续约情况说明操作异常,err:" + err.Error()
|
|
@@ -8774,6 +8810,22 @@ func (this *CompanyController) AddRenewalReason() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if req.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
|
+ //权益客户新增历史备注总表
|
|
|
|
+ itemRecord := new(company.CompanyHistoryRemark)
|
|
|
|
+ itemRecord.CompanyId = req.CompanyId
|
|
|
|
+ itemRecord.Content = req.Remark
|
|
|
|
+ itemRecord.SysAdminId = sysUser.AdminId
|
|
|
|
+ itemRecord.SysAdminName = sysUser.RealName
|
|
|
|
+ itemRecord.CreateTime = time.Now().Local()
|
|
|
|
+ itemRecord.ModifyTime = time.Now().Local()
|
|
|
|
+ itemRecord.ShowTime = time.Now().Local()
|
|
|
|
+ itemRecord.ProductId = 2
|
|
|
|
+ itemRecord.TableName = "company_renewal_reason"
|
|
|
|
+ itemRecord.TableId = int(newId)
|
|
|
|
+ go services.AddCompanyHistoryRemark(itemRecord)
|
|
|
|
+ }
|
|
|
|
+
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|
|
br.Msg = "编辑成功"
|
|
br.Msg = "编辑成功"
|
|
@@ -9524,7 +9576,7 @@ func (this *CompanyController) DelRemark() {
|
|
_ = services.AddCompanyOperationRecord(product.CompanyId, product.SellerId, sysUser.AdminId, product.ProductId, sysUser.AdminId, product.CompanyName, product.ProductName, sysUser.RealName, "删除备注", "del_remark", content, sysUser.RealName, "", product.Status)
|
|
_ = services.AddCompanyOperationRecord(product.CompanyId, product.SellerId, sysUser.AdminId, product.ProductId, sysUser.AdminId, product.CompanyName, product.ProductName, sysUser.RealName, "删除备注", "del_remark", content, sysUser.RealName, "", product.Status)
|
|
|
|
|
|
if item.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
if item.ProductId == utils.COMPANY_PRODUCT_RAI_ID {
|
|
- go services.DelCompanyHistoryRemark("company_product_remark", req.RemarkId)
|
|
|
|
|
|
+ go services.DelCompanyHistoryRemark("company_product_remark", req.RemarkId) // 删除
|
|
}
|
|
}
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|