|
|
@ -599,12 +599,12 @@ func (impl *SerialOrderDAOImplement) SelectSerialOrderIdBySyncKey(syncKeyLi []st |
|
|
|
* @Reference LAPP_ACURA_MOM_BACKEND/dao/om/SerialOrderDAO.UpdateBackFlushFlag |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func (impl *SerialOrderDAOImplement) UpdateBackFlushFlag(start string, end string, serialOrderIdLi []string) (int64, error) { |
|
|
|
where := fmt.Sprintf("%s = ? and %s >= ? and %s <= ?", |
|
|
|
func (impl *SerialOrderDAOImplement) UpdateBackFlushFlag(serialOrderIdLi []string) (int64, error) { |
|
|
|
where := fmt.Sprintf("%s = ? and %s = ?", |
|
|
|
meta.SerialOrder_PlantNr.ColumnName, |
|
|
|
meta.SerialOrder_CreateTime.ColumnName, |
|
|
|
meta.SerialOrder_CreateTime.ColumnName) |
|
|
|
parameters := []interface{}{impl.plantNr, start, end} |
|
|
|
meta.SerialOrder_BackFlushFlag.ColumnName, |
|
|
|
) |
|
|
|
parameters := []interface{}{impl.plantNr, 0} |
|
|
|
inStr := fmt.Sprintf(" and %s in ( ", meta.SerialOrder_SerialOrderId.ColumnName) |
|
|
|
for index, serialOrderId := range serialOrderIdLi { |
|
|
|
if index != 0 { |
|
|
@ -613,6 +613,7 @@ func (impl *SerialOrderDAOImplement) UpdateBackFlushFlag(start string, end strin |
|
|
|
inStr += `'` + serialOrderId + `'` |
|
|
|
} |
|
|
|
inStr += " ) " |
|
|
|
where += inStr |
|
|
|
updateMap := make(map[string]bool) |
|
|
|
updateMap[meta.SerialOrder_BackFlushFlag.Name] = true |
|
|
|
count, err := impl.session.Table(impl.meta.TableName).Where(where, parameters...).Cols(meta.SerialOrder_BackFlushFlag.ColumnName).Update(&updateMap) |
|
|
|