Bladeren bron

排程数据组装优化

fangpy 11 maanden geleden
bovenliggende
commit
9240c85eab

+ 5 - 1
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsBlankOrderDao.java

@@ -31,7 +31,11 @@ public interface ApsBlankOrderDao extends BaseMapper<ApsBlankOrderDo> {
             "where a.DELETED='0' and a.ID in (${ids}) ORDER BY b.PLANENDDATE ASC")
     List<AspCheckItemsDo> eqAscs(@Param("ids") String ids);
 
-    @Select("select a.*,b.DELIVERYDATE,b.DELIVERYTIME from aps_blank_order a LEFT JOIN aps_production_order b on a.PRODUCTIONORDERID=b.ID where a.PRODUCTIONORDERID=#{orderId} and a.DELETED='0' and b.DELETED='0'")
+    @Select("select DISTINCT a.*,b.DELIVERYDATE,b.DELIVERYTIME from aps_blank_order a LEFT JOIN aps_production_order b on a.PRODUCTIONORDERID=b.ID " +
+            "LEFT JOIN aps_process_operation c on c.BLANKID=a.ID " +
+            "where a.PRODUCTIONORDERID=#{orderId} " +
+            "and (c.LOCKMARK='n' or c.LOCKMARK is null) " +
+            "and a.DELETED='0' and b.DELETED='0' and c.DELETED='0'")
     List<ApsBlankOrderVo> getByOrderId(@Param("orderId") String orderId);
 
     @Select("select a.*,b.DELIVERYDATE,b.DELIVERYTIME from aps_blank_order a LEFT JOIN aps_production_order b on a.PRODUCTIONORDERID=b.ID \n" +