lanjianrong 4 년 전
부모
커밋
2d2bcf044d
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      dao/approver_dao.go
  2. 1 1
      dao/safe_audit_dao.go

+ 2 - 2
dao/approver_dao.go

@@ -504,7 +504,7 @@ func (d *ApproverDao) PassHandler(auditType string, id int, uid int, auditId int
 					return err
 				}
 
-				newRectifiedTime, _ := time.Parse("2006-01-02 15:04:05", rectifiedTime)
+				newRectifiedTime, _ := time.Parse(conf.SysTimeform, rectifiedTime)
 				// 将整改单的状态->完成,并且填入整改日期
 				rectification := &models.CmRectification{
 					BidsectionId:  safe.BidsectionId,
@@ -648,7 +648,7 @@ func (d *ApproverDao) PassHandler(auditType string, id int, uid int, auditId int
 
 				// 将整改单的状态->完成,并且填入整改日期
 
-				newRectifiedTime, err := time.Parse("2006-01-02 15:04:05", rectifiedTime)
+				newRectifiedTime, err := time.Parse(conf.SysTimeform, rectifiedTime)
 				if err != nil {
 					session.Rollback()
 					return err

+ 1 - 1
dao/safe_audit_dao.go

@@ -83,7 +83,7 @@ func (d *SafeAuditDao) FindById(id int) (*models.CmSafeAudit, error) {
 // 查找最新的整改单列表
 func (d *SafeAuditDao) GetRectifications(bid int, pid int, dataId int, dataType int) ([]viewmodels.CheckOrderVM, error) {
 	data := make([]viewmodels.CheckOrderVM, 0)
-	err := d.engine.Sql("select cm.`content` as opinion, cm.`rectified_time` as `create_time`, pa.`name` from `cm_rectification` as cm left join `cm_project_account` as pa on pa.`id` = cm.`account_id` cm.`bidsection_id` = ? and cm.`project_id` = ? and cm.`data_id` = ? and cm.`data_type` = ? ", bid, pid, dataId, dataType).Find(&data)
+	err := d.engine.Sql("select cm.`content` as opinion, cm.`rectified_time` as `create_time`, pa.`name` from `cm_rectification` as cm left join `cm_project_account` as pa on pa.`id` = cm.`account_id` where cm.`bidsection_id` = ? and cm.`project_id` = ? and cm.`data_id` = ? and cm.`data_type` = ? ", bid, pid, dataId, dataType).Find(&data)
 	return data, err
 }