|
|
@@ -625,45 +625,47 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
|
|
|
//panic("工作流异常,请联系管理员!" + res)
|
|
|
}
|
|
|
} else if payItem.PayType == "2" { //年审
|
|
|
- //TODO: 修改年审时间
|
|
|
- annualSvc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
- var annualEntities []annualaudit.OilAnnualAudit
|
|
|
- annWhere := " SupplierId = " + utils.ToStr(payItem.SupplierId) + " and CerId = " + utils.ToStr(payItem.SupplierCertId) + " and Status = '6'"
|
|
|
- svc.GetEntitysByWhere(OilAnnualAuditName, annWhere, &annualEntities)
|
|
|
- if len(annualEntities) > 0 {
|
|
|
- //更新年审表时间
|
|
|
- var annModel annualaudit.OilAnnualAudit
|
|
|
- annModel.Status = suppliercert.ALL_PASE_STATUS
|
|
|
- annModel.ApplyTime = annualEntities[0].ApplyTime.AddDate(1, 0, 0)
|
|
|
- annualSvc.UpdateEntityBywheretbl(OilAnnualAuditName, &annModel, []string{"ApplyTime", "Status"}, annWhere)
|
|
|
- //更新准入表时间
|
|
|
- var certmodel suppliercert.OilSupplierCert
|
|
|
- certmodel.ApplyTime = annualEntities[0].ApplyTime.AddDate(1, 0, 0)
|
|
|
- certmodel.InFlag = "1"
|
|
|
- svc.UpdateEntityByIdCols(strconv.Itoa(payItem.SupplierCertId), &certmodel, []string{"ApplyTime", "InFlag"})
|
|
|
+ //取出年审表信息
|
|
|
+ annualSrv := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
+ var annualEntity annualaudit.OilAnnualAudit
|
|
|
+ annualSrv.GetEntityById(payItem.SrcId, &annualEntity)
|
|
|
+
|
|
|
+ var ActiComplete workflow.ActiCompleteVM
|
|
|
+ ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
|
|
|
+ ActiComplete.BusinessKey = annualEntity.BusinessKey
|
|
|
+ ActiComplete.UserId = this.User.Id
|
|
|
+ ActiComplete.Result = "1"
|
|
|
+ ActiComplete.Remarks = "交费成功。"
|
|
|
+ ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
|
+
|
|
|
+ res := svcActiviti.TaskComplete(ActiComplete)
|
|
|
+ if res != "true" {
|
|
|
+ fmt.Println("工作流异常,请联系管理员!" + res)
|
|
|
+ //panic("工作流异常,请联系管理员!" + res)
|
|
|
}
|
|
|
} else if payItem.PayType == "3" { //增项
|
|
|
- appSvc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
- //更新准入项表
|
|
|
- accessWhere := " SupplierId = " + utils.ToStr(payItem.SupplierId) + " and SupplierCertId = " + utils.ToStr(payItem.SupplierCertId) + " and Type = '2'"
|
|
|
- var appendSubModel suppliercertsub.OilSupplierCertSub
|
|
|
- appendSubModel.Type = "3"
|
|
|
- appSvc.UpdateEntityBywheretbl(OilSupplierCertSubName, &appendSubModel, []string{"Type"}, accessWhere)
|
|
|
- //更新资质表
|
|
|
- appendFileWhere := " SupplierId = " + utils.ToStr(payItem.SupplierId) + " and SupType = 2"
|
|
|
- var appendSubFileModel supplierfile.OilSupplierFile
|
|
|
- appendSubFileModel.SupType = 3
|
|
|
- appSvc.UpdateEntityBywheretbl(OilSupplierCertSubName, &appendSubFileModel, []string{"SupType"}, appendFileWhere)
|
|
|
- //更新增项表
|
|
|
- appendWhere := " SupplierId = " + utils.ToStr(payItem.SupplierId) + " and SupplierCertId = " + utils.ToStr(payItem.SupplierCertId) + " and Status = '6'"
|
|
|
- var appendModel suppliercertappend.OilSupplierCertAppend
|
|
|
- appendModel.Status = suppliercert.ALL_PASE_STATUS
|
|
|
- appSvc.UpdateEntityBywheretbl(OilSupplierCertAppendName, &appendModel, []string{"Status"}, appendWhere)
|
|
|
+ //取出增项表信息
|
|
|
+ appendSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
+ var appendEntity suppliercertappend.OilSupplierCertAppend
|
|
|
+ appendSrv.GetEntityById(payItem.SrcId, &appendEntity)
|
|
|
+
|
|
|
+ var ActiComplete workflow.ActiCompleteVM
|
|
|
+ ActiComplete.ProcessKey = workflow.OIL_ENUSER_APPEND_APPLY
|
|
|
+ ActiComplete.BusinessKey = appendEntity.BusinessKey
|
|
|
+ ActiComplete.UserId = this.User.Id
|
|
|
+ ActiComplete.Result = "1"
|
|
|
+ ActiComplete.Remarks = "交费成功。"
|
|
|
+ ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
|
|
|
+
|
|
|
+ res := svcActiviti.TaskComplete(ActiComplete)
|
|
|
+ if res != "true" {
|
|
|
+ fmt.Println("工作流异常,请联系管理员!" + res)
|
|
|
+ //panic("工作流异常,请联系管理员!" + res)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 待开发票
|
|
|
-
|
|
|
+ // 待开发票记录
|
|
|
var suppentity supplier.OilSupplier
|
|
|
where := "Id=" + strconv.Itoa(supplierId)
|
|
|
svc.GetEntity(&suppentity, where)
|
|
|
@@ -684,22 +686,6 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
|
|
|
|
|
|
svc.InsertEntity(&invoiceInfo)
|
|
|
|
|
|
- userSvc := userRole.GetUserService(utils.DBE)
|
|
|
- paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
- financeRoleId := paramSvc.GetBaseparameterMessage("", "paramset", "FinanceRoleId")
|
|
|
- ids := userSvc.GetUserIdsByRoleId(financeRoleId)
|
|
|
- tempStr := strings.Join(ids, ",")
|
|
|
- uids := strings.Replace(tempStr, "uid_", "", -1)
|
|
|
- uids = strings.Trim(uids, ",")
|
|
|
-
|
|
|
- businessKey := strconv.Itoa(invoiceInfo.Id)
|
|
|
- result := "1"
|
|
|
- processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_VERIFY, businessKey, uids, result, "04", suppentity.SupplierName)
|
|
|
- invoiceInfo.WorkflowId = processInstanceId
|
|
|
- cols := []string{"WorkflowId"}
|
|
|
- svc.UpdateEntityByIdCols(invoiceInfo.Id, &invoiceInfo, cols)
|
|
|
-
|
|
|
-
|
|
|
//记录对账日志
|
|
|
paymentBankInfo := new(paymentbankinfo.OilPaymentBankInfo)
|
|
|
paymentBankInfo.BillIds = billParams.Ids
|