|
@@ -254,7 +254,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o |
|
@@ -254,7 +254,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o |
254
|
if m.Id == 0 {
|
254
|
if m.Id == 0 {
|
255
|
m.Id = idworker.NextId()
|
255
|
m.Id = idworker.NextId()
|
256
|
newSelfCheckData = append(newSelfCheckData, m)
|
256
|
newSelfCheckData = append(newSelfCheckData, m)
|
257
|
- } else if _, ok := oldSelfCheckMap[m.Id]; ok {
|
257
|
+ }
|
|
|
258
|
+ if _, ok := oldSelfCheckMap[m.Id]; ok {
|
258
|
updateSelfCheck = append(updateSelfCheck, m)
|
259
|
updateSelfCheck = append(updateSelfCheck, m)
|
259
|
delete(oldSelfCheckMap, m.Id)
|
260
|
delete(oldSelfCheckMap, m.Id)
|
260
|
}
|
261
|
}
|
|
@@ -271,7 +272,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o |
|
@@ -271,7 +272,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o |
271
|
if mm.Id == 0 {
|
272
|
if mm.Id == 0 {
|
272
|
mm.Id = idworker.NextId()
|
273
|
mm.Id = idworker.NextId()
|
273
|
newSelfCheckData = append(newSelfCheckData, mm)
|
274
|
newSelfCheckData = append(newSelfCheckData, mm)
|
274
|
- } else if _, ok := oldSelfCheckMap[m.Id]; ok {
|
275
|
+ }
|
|
|
276
|
+ if _, ok := oldSelfCheckMap[m.Id]; ok {
|
275
|
updateSelfCheck = append(updateSelfCheck, mm)
|
277
|
updateSelfCheck = append(updateSelfCheck, mm)
|
276
|
delete(oldSelfCheckMap, mm.Id)
|
278
|
delete(oldSelfCheckMap, mm.Id)
|
277
|
}
|
279
|
}
|