|
|
@ -31,7 +31,7 @@ func (impl *WorkLineWorkShiftSpecialTimeDAOImplement) InsertOne(entity *model.Wo |
|
|
|
|
|
|
|
//删除指定键的WorkLineWorkShiftSpecialTime
|
|
|
|
func (impl *WorkLineWorkShiftSpecialTimeDAOImplement) DeleteOne(workLineId string, workDay string, pos int, begTime grmi.DateTime) error { |
|
|
|
_, err := impl.session.Table(meta.WorkLineWorkShiftSpecialTime.TableName).ID(core.PK{impl.plantNr, workLineId, workDay, pos, begTime}).Delete(meta.WorkLineWorkShiftSpecialTime.Indicator) |
|
|
|
_, err := impl.session.Table(meta.WorkLineWorkShiftSpecialTime.TableName).ID(core.PK{impl.plantNr, workLineId, workDay, pos, begTime.Restore()}).Delete(meta.WorkLineWorkShiftSpecialTime.Indicator) |
|
|
|
if err != nil { |
|
|
|
return grmi.NewDataBaseError(err) |
|
|
|
} |
|
|
@ -42,7 +42,7 @@ func (impl *WorkLineWorkShiftSpecialTimeDAOImplement) DeleteOne(workLineId strin |
|
|
|
//查找指定键的WorkLineWorkShiftSpecialTime
|
|
|
|
func (impl *WorkLineWorkShiftSpecialTimeDAOImplement) SelectOne(workLineId string, workDay string, pos int, begTime grmi.DateTime) (*model.WorkLineWorkShiftSpecialTime, error) { |
|
|
|
var data model.WorkLineWorkShiftSpecialTime |
|
|
|
ok, err := impl.session.Table(meta.WorkLineWorkShiftSpecialTime.TableName).ID(core.PK{impl.plantNr, workLineId, workDay, pos, begTime}).Get(&data) |
|
|
|
ok, err := impl.session.Table(meta.WorkLineWorkShiftSpecialTime.TableName).ID(core.PK{impl.plantNr, workLineId, workDay, pos, begTime.Restore()}).Get(&data) |
|
|
|
if err != nil { |
|
|
|
return nil, grmi.NewDataBaseError(err) |
|
|
|
} |
|
|
|