From 6b054b04c2d6699fe7adb1633e8a92a0d126554c Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Sun, 21 Aug 2022 10:07:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/pdm/service/impl/DailyplanServiceImpl.java | 12 ++++++++++-- .../src/views/wms/pdm/produce/producetask/index.vue | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java index 5ccf700c..a91bff21 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java @@ -73,7 +73,11 @@ public class DailyplanServiceImpl implements DailyplanService { String plan_finish_date = jo.getString("plan_finish_date"); Date date2 = DateUtil.parse(plan_finish_date); long days = (int) DateUtil.between(date2,date, DateUnit.DAY); - jo.put("day_num",days); + if(date2.getTime() >= date.getTime()){ + jo.put("day_num",days); + }else{ + jo.put("day_num",-days); + } ja.add(jo); } jret.put("content",ja); @@ -108,7 +112,11 @@ public class DailyplanServiceImpl implements DailyplanService { String plan_finish_date = jo.getString("plan_finish_date"); Date date2 = DateUtil.parse(plan_finish_date); long days = (int) DateUtil.between(date2,date, DateUnit.DAY); - jo.put("day_num",days); + if(date2.getTime() >= date.getTime()){ + jo.put("day_num",days); + }else{ + jo.put("day_num",-days); + } ja.add(jo); } return ja; diff --git a/mes/qd/src/views/wms/pdm/produce/producetask/index.vue b/mes/qd/src/views/wms/pdm/produce/producetask/index.vue index c6f0a9be..e0f7ae8a 100644 --- a/mes/qd/src/views/wms/pdm/produce/producetask/index.vue +++ b/mes/qd/src/views/wms/pdm/produce/producetask/index.vue @@ -179,7 +179,7 @@