|
|
@ -8,8 +8,10 @@ import ( |
|
|
|
"LAPP_GAAS_GFrame_BACKEND/grmi" |
|
|
|
meta "LAPP_GAAS_GFrame_BACKEND/meta/qm" |
|
|
|
model "LAPP_GAAS_GFrame_BACKEND/models/qm" |
|
|
|
"LAPP_GAAS_GFrame_BACKEND/services/common" |
|
|
|
"LAPP_GAAS_GFrame_BACKEND/web/models" |
|
|
|
"fmt" |
|
|
|
"strconv" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
@ -321,7 +323,7 @@ func (impl *DefectRecordServiceImplement) Insert(user *models.Usertab, entities |
|
|
|
return grmi.NewBusinessError(fmt.Sprintf("没有找到缺陷分组(%s)和缺陷原因(%s)的关联!", entity.DefectGrpId, entity.DefectReasonId)) |
|
|
|
} |
|
|
|
entity.Qty = 1 |
|
|
|
entity.Status = "26" |
|
|
|
entity.Status = strconv.Itoa(common.ORDER_STATUS_RELEASED) |
|
|
|
entity.ViewCode = entity.AreaId |
|
|
|
entity.ViewDescr = view.Descr |
|
|
|
entity.ViewPicture = view.Picture |
|
|
@ -460,11 +462,11 @@ func (impl *DefectRecordServiceImplement) Rework(user *models.Usertab, recNr int |
|
|
|
return grmi.NewBusinessError("不存在指定记录!") |
|
|
|
} |
|
|
|
|
|
|
|
if record.Status != "26" { |
|
|
|
if record.Status != strconv.Itoa(common.ORDER_STATUS_RELEASED) { |
|
|
|
return grmi.NewBusinessError("状态错误!") |
|
|
|
} |
|
|
|
|
|
|
|
record.Status = "80" |
|
|
|
record.Status = strconv.Itoa(common.ORDER_STATUS_CLOSED) |
|
|
|
record.InspectTime = grmi.DateTime(time.Now()) |
|
|
|
record.Inspector = user.Userid |
|
|
|
err = dao.UpdateOne(record) |
|
|
|