|
|
@ -402,15 +402,16 @@ func (impl *CustOrderDAOImplement) SelectWorkLineTaskBeyondStatus(startTime time |
|
|
|
meta.CustOrderQty_CustOrderId.ColumnName) |
|
|
|
data := make([]model.CustOrderData, 0) |
|
|
|
session := impl.session.Table(impl.meta.TableName).Join("INNER", meta.CustOrderStatus.TableName, condition).Join("INNER", meta.CustOrderQty.TableName, qtyCondition) |
|
|
|
where := fmt.Sprintf("%s = ? and %s = ? and %s >= ? and ((%s >= ? and %s <= ? ) or (%s >= ? and %s <= ?))", |
|
|
|
where := fmt.Sprintf("%s = ? and %s = ? and %s >= ? and %s < ? and ((%s >= ? and %s <= ? ) or (%s >= ? and %s <= ?))", |
|
|
|
meta.CustOrder_PlantNr.ColumnName, |
|
|
|
meta.CustOrder_WorkLineId.ColumnName, |
|
|
|
meta.CustOrderStatus_Status.ColumnName, |
|
|
|
meta.CustOrderStatus_Status.ColumnName, |
|
|
|
meta.CustOrder_PlanStartTime.ColumnName, |
|
|
|
meta.CustOrder_PlanStartTime.ColumnName, |
|
|
|
meta.CustOrder_PlanEndTime.ColumnName, |
|
|
|
meta.CustOrder_PlanEndTime.ColumnName) |
|
|
|
parameters := []interface{}{impl.plantNr, workLineId, status, start, end, start, end} |
|
|
|
parameters := []interface{}{impl.plantNr, workLineId, status, common.WO_STATUS_FINISHED, start, end, start, end} |
|
|
|
err = session.Where(where, parameters...).Asc(meta.CustOrder_PlanStartTime.SortColumnName).Find(&data) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -446,7 +447,7 @@ func (impl *CustOrderDAOImplement) SelectWorkLineTaskEqualStatus(startTime time. |
|
|
|
meta.CustOrderQty_CustOrderId.ColumnName) |
|
|
|
data := make([]model.CustOrderData, 0) |
|
|
|
session := impl.session.Table(impl.meta.TableName).Join("INNER", meta.CustOrderStatus.TableName, condition).Join("INNER", meta.CustOrderQty.TableName, qtyCondition) |
|
|
|
where := fmt.Sprintf("%s = ? and %s = ? and %s = ? and (%s >= ? and %s <= ? ) or (%s >= ? and %s <= ?)", |
|
|
|
where := fmt.Sprintf("%s = ? and %s = ? and %s = ? and ((%s >= ? and %s <= ? ) or (%s >= ? and %s <= ?))", |
|
|
|
meta.CustOrder_PlantNr.ColumnName, |
|
|
|
meta.CustOrder_WorkLineId.ColumnName, |
|
|
|
meta.CustOrderStatus_Status.ColumnName, |
|
|
|