|
|
@@ -674,9 +674,9 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
|
|
|
for _, payItem := range paymentInfos {
|
|
|
supplierId = payItem.SupplierId
|
|
|
srcIds = srcIds + "," + strconv.Itoa(payItem.Id)
|
|
|
- if payItem.Id == 11697 || payItem.Id == 11698 {
|
|
|
- continue
|
|
|
- }
|
|
|
+ //if payItem.Id == 11697 || payItem.Id == 11698 {
|
|
|
+ // continue
|
|
|
+ //}
|
|
|
if payItem.PayType == "1" { //准入申请
|
|
|
//取出准入表信息
|
|
|
certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
@@ -773,37 +773,40 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
|
|
|
where := "Id=" + strconv.Itoa(supplierId)
|
|
|
svc.GetEntity(&suppentity, where)
|
|
|
|
|
|
- var invoiceInfo invoiceinfo.OilInvoiceInfo
|
|
|
- invoiceInfo.SrcIds = strings.Trim(srcIds, ",")
|
|
|
- invoiceInfo.Amount = billParams.ReceiveAmount
|
|
|
- invoiceInfo.BankSerialNum = billParams.BankSerialNum
|
|
|
- invoiceInfo.IsInvoice = "0"
|
|
|
- invoiceInfo.SupplierId = supplierId
|
|
|
- invoiceInfo.SupplierName = suppentity.SupplierName
|
|
|
- invoiceInfo.CommercialNo = suppentity.CommercialNo
|
|
|
- invoiceInfo.Address = strings.Replace(suppentity.AllAddress, "/", "", -1) + suppentity.Address
|
|
|
- invoiceInfo.BankAccount = suppentity.BankAccount
|
|
|
- invoiceInfo.DepositBank = suppentity.DepositBank
|
|
|
- invoiceInfo.Email = suppentity.EMail
|
|
|
- invoiceInfo.Remark = billParams.Remark
|
|
|
- invoiceInfo.CreateOn = time.Now()
|
|
|
-
|
|
|
- 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)
|
|
|
+ if billParams.ReceiveAmount > 0 {
|
|
|
+ var invoiceInfo invoiceinfo.OilInvoiceInfo
|
|
|
+ invoiceInfo.SrcIds = strings.Trim(srcIds, ",")
|
|
|
+ invoiceInfo.Amount = billParams.ReceiveAmount
|
|
|
+ invoiceInfo.BankSerialNum = billParams.BankSerialNum
|
|
|
+ invoiceInfo.IsInvoice = "0"
|
|
|
+ invoiceInfo.SupplierId = supplierId
|
|
|
+ invoiceInfo.SupplierName = suppentity.SupplierName
|
|
|
+ invoiceInfo.CommercialNo = suppentity.CommercialNo
|
|
|
+ invoiceInfo.Address = strings.Replace(suppentity.AllAddress, "/", "", -1) + suppentity.Address
|
|
|
+ invoiceInfo.BankAccount = suppentity.BankAccount
|
|
|
+ invoiceInfo.DepositBank = suppentity.DepositBank
|
|
|
+ invoiceInfo.Email = suppentity.EMail
|
|
|
+ invoiceInfo.Remark = billParams.Remark
|
|
|
+ invoiceInfo.CreateOn = time.Now()
|
|
|
+
|
|
|
+ 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)
|