| | |
| | | <result property="EntourageState" column="EntourageState" /> |
| | | </resultMap> |
| | | |
| | | <!-- 查询指定日期范围的转运单数据 --> |
| | | <!-- 查询指定日期范围的转运单数据(Keyset游标分页,走主键索引,彻底规避超时) --> |
| | | <select id="selectTransferOrders" resultMap="TransferOrderResult"> |
| | | SELECT |
| | | SELECT TOP (${pageSize}) |
| | | a.ServiceOrdID, |
| | | a.Old_ServiceOrdID_TXT, |
| | | a.ServiceOrdNo, |
| | |
| | | a.ServiceOrdPtServices, |
| | | a.ServiceOrdPtInServices, |
| | | a.ServiceOrdPtName, |
| | | b.DispatchOrdState, |
| | | b.DispatchOrdNo, |
| | | b.DispatchOrdClass, |
| | | a.ServiceOrdClass |
| | | FROM ServiceOrder as a |
| | | left JOIN DispatchOrd b on a.ServiceOrdID = b.ServiceOrdIDDt |
| | | b.DispatchOrdClass |
| | | FROM ServiceOrder AS a |
| | | LEFT JOIN DispatchOrd b ON a.ServiceOrdID = b.ServiceOrdIDDt |
| | | WHERE a.ServiceOrdState <= 3 |
| | | AND a.ServiceOrd_CC_Time > #{startDate} and a.ServiceOrd_CC_Time < #{endDate} |
| | | |
| | | AND a.ServiceOrd_CC_Time > #{startDate} |
| | | AND a.ServiceOrd_CC_Time < #{endDate} |
| | | AND a.ServiceOrdID > #{lastId} |
| | | ORDER BY a.ServiceOrdID |
| | | </select> |
| | | |
| | | <!-- 根据服务单ID和调度单ID查询转运单数据 --> |