Ver código fonte

排程添加逾期过滤

yzc 1 ano atrás
pai
commit
0010576a6d

+ 5 - 0
hx-mes/src/main/java/com/fjhx/mes/service/production/impl/ProduceOrderServiceImpl.java

@@ -197,6 +197,11 @@ public class ProduceOrderServiceImpl extends ServiceImpl<ProduceOrderMapper, Pro
         //过滤已投产的数据
         wrapper.isNotNull("po.produce_time");
 
+        //是否逾期过滤
+        if (ObjectUtil.isNotEmpty(dto.getIsOverdue())) {
+            wrapper.eq("IF(IFNULL(po.finish_time,NOW())>po.delivery_period,1,0)", dto.getIsOverdue());
+        }
+
         //权限过滤:生产排程-子公司看自己,总公司看全部
         Long companyId = SecurityUtils.getCompanyId();
         if (!Objects.equals(companyId, 100L)) {