Browse Source

Merge branch 'master' of http://192.168.1.41:3000/caipin/construction_management

# Conflicts:
#	dao/safe_audit_dao.go
#	web/viewmodels/safe.go
caipin 4 years ago
parent
commit
d25cb44ff9
3 changed files with 8 additions and 7 deletions
  1. 2 2
      dao/safe_audit_dao.go
  2. 1 0
      services/safe_service.go
  3. 5 5
      web/viewmodels/safe.go

+ 2 - 2
dao/safe_audit_dao.go

@@ -2,7 +2,7 @@
  * @description: 安全巡检数据库操作相关
  * @description: 安全巡检数据库操作相关
  * @Author: LanJianRong
  * @Author: LanJianRong
  * @Date: 2020-11-20
  * @Date: 2020-11-20
- * @FilePath: \construction_management\dao\safe_audit_dao.go
+ * @FilePath: \construction_management\dao\safe_dao.go
  */
  */
 
 
 package dao
 package dao
@@ -70,7 +70,7 @@ func (d *SafeAuditDao) GetAuditorsWithOwner(id int, times int, cur_uid int) []vi
 		fmt.Println(err)
 		fmt.Println(err)
 	}
 	}
 	auditors = append(auditors, auditor)
 	auditors = append(auditors, auditor)
-	d.engine.Sql("select pa.`name`,pa.`account_group`, pa.`position`,ca.`audit_id`, ca.`progress` from `cm_project_account` as pa, `cm_safe_audit` as ca where ca.`safe_id` = ? and ca.`times` = ? and ca.audit_id = pa.id order by `audit_order`", id, times).Find(&auditors)
+	d.engine.Sql("select pa.`name`, pa.`position`,ca.`audit_id`, ca.`audit_order`, ca.`progress` from `cm_project_account` as pa, `cm_safe_audit` as ca where ca.`safe_id` = ? and ca.`times` = ? and ca.audit_id = pa.id order by `audit_order`", id, times).Find(&auditors)
 
 
 	return auditors
 	return auditors
 }
 }

+ 1 - 0
services/safe_service.go

@@ -131,6 +131,7 @@ func (s *safeService) GetDetail(id int, pid int) viewmodels.SafeDetail {
 		auditorVM.AuditId = auditId
 		auditorVM.AuditId = auditId
 		auditorVM.Name = item.Name
 		auditorVM.Name = item.Name
 		auditorVM.Position = item.Position
 		auditorVM.Position = item.Position
+		auditorVM.AuditOrder = item.AuditOrder
 		auditorVM.Progress = item.Progress
 		auditorVM.Progress = item.Progress
 
 
 		encryptAuditors = append(encryptAuditors, auditorVM)
 		encryptAuditors = append(encryptAuditors, auditorVM)

+ 5 - 5
web/viewmodels/safe.go

@@ -73,11 +73,11 @@ type SafeFile struct {
 	CreateTime  time.Time `from:"create_time" json:"createTime"`
 	CreateTime  time.Time `from:"create_time" json:"createTime"`
 }
 }
 type Auditors struct {
 type Auditors struct {
-	Name         string `from:"name" json:"name"`
-	Progress     string `from:"progress" json:"progress"`
-	AuditId      string `from:"audit_id" json:"audit_id"`
-	Position     string `from:"position" json:"position"`
-	AccountGroup string `from:"accountGroup" json:"accountGroup"`
+	Name       string `from:"name" json:"name"`
+	Progress   string `from:"progress" json:"progress"`
+	AuditId    string `from:"audit_id" json:"audit_id"`
+	Position   string `from:"position" json:"position"`
+	AuditOrder int    `from:"audit_order" json:"audit_order"`
 }
 }
 
 
 type SafeListAuditRecord struct {
 type SafeListAuditRecord struct {