2
3
lining преди 6 години
родител
ревизия
a9478a0dc3

+ 11 - 3
src/dashoo.cn/backend/api/business/oilsupplier/annualaudit/annualauditService.go

@@ -164,10 +164,18 @@ func (s *OilAnnualAuditService) GetProcessInfoWithOrderBytbl(oilAnnualAuditName
 	sqlCount += ` where ` + where
 
 	var sql string
-	sql = `select SupplierName, Id, `
-	sql += ` Status, SupplierTypeName SupplierTypeCode, `
-	sql += ` WorkflowId, '3' as Type, CreateOn`
+	sql = `select a.SupplierName, a.Id, `
+	sql += ` a.Status, a.SupplierTypeName SupplierTypeCode, `
+	sql += ` a.WorkflowId, '3' as Type, a.CreateOn, a.AccessCardNo, a.ModifiedOn as AddinTime, u.Realname AS ContactName, u.Telephone AS Mobile,`
+	sql += ` CASE WHEN uu.IsCompanyUser = 1 THEN c.CheckUnitName
+			WHEN uu.IsCompanyUser = 0 THEN uu.Unit
+ 			ELSE ''
+ 			END AS RecUnitName`
 	sql += ` from ` + oilAnnualAuditName + ` a `
+	sql += ` LEFT JOIN Base_User u ON a.CreateUserId = u.Id`
+	sql += ` Left join OilSupplier s on a.SupplierId = s.Id
+			 left join Base_User uu on s.CreateUserId = uu.Id
+			 left join OilCorporateInfo c on s.CreateUserId = c.UserId`
 	sql += ` where ` + where
 	if asc {
 		sql += ` order by ` + orderby + ` ASC `

+ 11 - 3
src/dashoo.cn/backend/api/business/oilsupplier/infochange/infochangeService.go

@@ -247,10 +247,18 @@ func (s *InfoChangeService) GetProcessInfoWithOrderBytbl(tableName string, pageI
 	sqlCount += ` where ` + where
 
 	var sql string
-	sql = `select SupplierName, Id, `
-	sql += ` Status, `
-	sql += ` WorkflowId, '4' as Type, CreateOn`
+	sql = `select a.SupplierName, a.Id, `
+	sql += ` a.Status, `
+	sql += ` a.WorkflowId, '4' as Type, a.CreateOn, a.AccessCardNo, a.ModifiedOn as AddinTime, u.Realname AS ContactName, u.Telephone AS Mobile, `
+	sql += ` CASE WHEN uu.IsCompanyUser = 1 THEN c.CheckUnitName
+ 				WHEN uu.IsCompanyUser = 0 THEN uu.Unit
+ 				ELSE ''
+ 				END AS RecUnitName`
 	sql += ` from ` + tableName + ` a `
+	sql += ` LEFT JOIN Base_User u ON a.CreateUserId = u.Id`
+	sql += ` Left join OilSupplier s on a.SupplierId = s.Id
+			left join Base_User uu on s.CreateUserId = uu.Id
+			left join OilCorporateInfo c on s.CreateUserId = c.UserId `
 	sql += ` where ` + where
 	if asc {
 		sql += ` order by ` + orderby + ` ASC `

+ 17 - 3
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplierService.go

@@ -245,11 +245,25 @@ func (s *OilSupplierService) GetProcessInfoWithOrderBytbl(supplierTableName, sup
 	sqlCount += ` where ` + where
 
 	var sql string
-	sql = `select a.SupplierName, b.Id, b.AccessCardNo, b.CreateOn, b.AddinTime, b.RecUnitName, a.ContactName, a.Mobile, `
+	sql = `select a.SupplierName, b.Id, b.AccessCardNo, b.CreateOn, b.ModifiedOn As AddinTime, a.ContactName, a.Mobile, `
 	sql += ` b.Status, b.SupplierTypeCode, `
-	sql += ` b.WorkflowId, b.ProcessKey, '1' as Type, b.CreateOn`
+	sql += ` b.WorkflowId, b.ProcessKey, '1' as Type, b.CreateOn,`
+	sql += ` case when u.IsCompanyUser = 1 then c.CheckUnitName
+				when u.IsCompanyUser = 0 then u.Unit
+				else ''
+			end As RecUnitName,`
+	sql += ` case when u.IsCompanyUser = 1 then c.CreateBy
+ 				when u.IsCompanyUser = 0 then u.Realname
+ 				else ''
+ 				end As ContactName,`
+	sql += ` case when u.IsCompanyUser = 1 then c.UserTelephone
+ 				when u.IsCompanyUser = 0 then u.Telephone
+ 				else ''
+				end As Mobile`
 	sql += ` from ` + supplierTableName + ` a `
-	sql += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
+	sql += ` left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id`
+	sql += ` Left join Base_User u on a.CreateUserId = u.Id `
+	sql += ` left join OilCorporateInfo c on a.CreateUserId = c.UserId`
 	sql += ` where ` + where
 	if asc {
 		sql += ` order by ` + orderby + ` ASC `

+ 11 - 3
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertappend/oilsuppliercertappendService.go

@@ -170,10 +170,18 @@ func (s *OilSupplierCertAppendService) GetProcessInfoWithOrderBytbl(supplierCert
 	sqlCount += ` where ` + where
 
 	var sql string
-	sql = `select SupplierName, Id, `
-	sql += ` Status, AppendType SupplierTypeCode, `
-	sql += ` WorkflowId, ProcessKey, '2' as Type, CreateOn`
+	sql = `select a.SupplierName, a.Id, `
+	sql += ` a.Status, a.AppendType SupplierTypeCode, `
+	sql += ` a.WorkflowId, a.ProcessKey, '2' as Type, a.CreateOn, a.AccessCardNo, a.ModifiedOn as AddinTime, u.Realname AS ContactName, u.Telephone AS Mobile,`
+	sql += ` case when uu.IsCompanyUser = 1 then c.CheckUnitName
+ 				when uu.IsCompanyUser = 0 then uu.Unit
+ 				else ''
+ 			end As RecUnitName `
 	sql += ` from ` + supplierCertAppendName + ` a `
+	sql += ` LEFT JOIN Base_User u ON a.CreateUserId = u.Id`
+	sql += ` Left join OilSupplier s on a.SupplierId = s.Id
+			 left join Base_User uu on s.CreateUserId = uu.Id
+			 left join OilCorporateInfo c on s.CreateUserId = c.UserId`
 	sql += ` where ` + where
 	if asc {
 		sql += ` order by ` + orderby + ` ASC `

+ 5 - 4
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -40,6 +40,7 @@ type UpInfoSearch struct {
 
 type Processinfo struct {
 	Id                  int
+	AccessCardNo        string
 	WorkflowId          string
 	ProcessKey          string
 	SupplierName        string
@@ -335,17 +336,17 @@ func (this *SelectController) GetProcessAuditList() {
 		whereapp := "1=1"
 		//企业用户必须加创建人条件
 		if this.User.IsCompanyUser == 1 {
-			whereapp = whereapp + " and CreateUserId = '" + this.User.Id + "'"
+			whereapp = whereapp + " and a.CreateUserId = '" + this.User.Id + "'"
 		}
 		if supplierTypeCode != "" {
-			whereapp = whereapp + " and AppendType like '%" + supplierTypeCode + "%'"
+			whereapp = whereapp + " and a.AppendType like '%" + supplierTypeCode + "%'"
 		}
 		if supplierName != "" {
-			whereapp = whereapp + " and SupplierName like '%" + supplierName + "%'"
+			whereapp = whereapp + " and a.SupplierName like '%" + supplierName + "%'"
 		}
 		var list []Processinfo//[]suppliercertappend.OilSupplierCertAppend
 		svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-		total = total + svc.GetProcessInfoWithOrderBytbl(OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &list, whereapp)
+		total = total + svc.GetProcessInfoWithOrderBytbl(OilSupplierCertAppendName, page.CurrentPage, page.Size, "a.Id", asc, &list, whereapp)
 		processinfolist = append(processinfolist, list...)
 		//datainfo.Items = processinfolist
 	}

+ 3 - 1
src/dashoo.cn/frontend_web/src/pages/select/processselect/index.vue

@@ -439,7 +439,7 @@
         })
       },
 
-      exportExcel() {
+      exportExcel () {
         let tablename = "#rebateSetTable" + this.tabinx
         /* generate workbook object from table */
         let wb = XLSX.utils.table_to_book(
@@ -592,6 +592,8 @@
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
           return '----'
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return '----'
         } else if (val === '5000-01-01T23:59:59+08:00') {
           return '永久'
         } else {