From 8087fdcde740976fc9ddf259f6eb979dafa9ec04 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Sat, 21 May 2022 09:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E8=AE=A1=E5=88=92=E6=8E=92=E4=BA=A7?= =?UTF-8?q?=20=20=E6=97=A5=E8=AE=A1=E5=88=92=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/letian/config/ShiroConfig.java | 2 +- .../modules/base/entity/NewScheduledData.java | 18 ++++++++++++++++++ .../base/service/Impl/BoardServiceImpl.java | 6 +++--- src/main/resources/mapper/base/BoardDao.xml | 17 +++++++++-------- .../mapper/production/PalletMapper.xml | 4 ++-- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/letian/config/ShiroConfig.java b/src/main/java/com/letian/config/ShiroConfig.java index 6830109..45bbb0a 100644 --- a/src/main/java/com/letian/config/ShiroConfig.java +++ b/src/main/java/com/letian/config/ShiroConfig.java @@ -55,7 +55,7 @@ public class ShiroConfig { filterMap.put("/captcha.jpg", "anon"); filterMap.put("/aaa.txt", "anon"); filterMap.put("/login", "anon"); - filterMap.put("/board", "anon"); + filterMap.put("/board/**", "anon"); filterMap.put("/js/**", "anon"); filterMap.put("/css/**", "anon"); filterMap.put("/pda/**", "anon"); diff --git a/src/main/java/com/letian/modules/base/entity/NewScheduledData.java b/src/main/java/com/letian/modules/base/entity/NewScheduledData.java index aa91ee4..fca7a89 100644 --- a/src/main/java/com/letian/modules/base/entity/NewScheduledData.java +++ b/src/main/java/com/letian/modules/base/entity/NewScheduledData.java @@ -5,7 +5,9 @@ public class NewScheduledData { private String site; private Float qtyRequired; private Float qtyReported; + private Float qtyApprove; private Float qtyPercent; + private Float approvePercent; private String resourceDesc; private String seqno; private String orderno; @@ -154,4 +156,20 @@ public class NewScheduledData { public void setStrDate(String strDate) { this.strDate = strDate; } + + public Float getQtyApprove() { + return qtyApprove; + } + + public void setQtyApprove(Float qtyApprove) { + this.qtyApprove = qtyApprove; + } + + public Float getApprovePercent() { + return approvePercent; + } + + public void setApprovePercent(Float approvePercent) { + this.approvePercent = approvePercent; + } } diff --git a/src/main/java/com/letian/modules/base/service/Impl/BoardServiceImpl.java b/src/main/java/com/letian/modules/base/service/Impl/BoardServiceImpl.java index b9efbc5..03e82ae 100644 --- a/src/main/java/com/letian/modules/base/service/Impl/BoardServiceImpl.java +++ b/src/main/java/com/letian/modules/base/service/Impl/BoardServiceImpl.java @@ -35,11 +35,11 @@ public class BoardServiceImpl implements BoardService { if(tableList.size()<=5){ return tableList; }else { - int max=tableList.size()/5; - if(number>max){ + int max=(tableList.size()+4)/5; + if(number>=max){ number=0; } - if(number==max){ + if((number+1)==max){ List result=new ArrayList<>(); for (int i = 0; i +5*number< tableList.size(); i++) { result.add(tableList.get(i +5*number)); diff --git a/src/main/resources/mapper/base/BoardDao.xml b/src/main/resources/mapper/base/BoardDao.xml index a58eb7d..d620133 100644 --- a/src/main/resources/mapper/base/BoardDao.xml +++ b/src/main/resources/mapper/base/BoardDao.xml @@ -2,12 +2,12 @@ select Round(SUM(SR.QtyRequired),3) as QtyRequired,Round(SUM(SR.QtyReported),3) as QtyReported, - Round(Round(SUM(SR.QtyRequired),3)-Round(SUM(SR.QtyReported),3),3) as QtyUnReported + Round(Round(SUM(SR.QtyRequired),3)-Round(SUM(SR.QtyReported),3),3) as QtyUnReported, + Round(Round(SUM(SR.QtyReported),3) *100 /case when Round(SUM(SR.QtyRequired),3) =0 then 1 else Round(SUM(SR.QtyRequired),3) end ,1) as qtyPercent from SOScheduledRouting SR where S_ScheduledDate=#{date} @@ -26,7 +27,7 @@ ,R.ResourceID,R.ResourceDesc from WorkCenterResource R LEFT JOIN SOScheduledRouting SR on SR.Site=R.Site and SR.S_ResourceID=R.ResourceID - + and SR.S_ScheduledDate=#{date} GROUP BY R.ResourceID,R.ResourceDesc ORDER BY R.ResourceID diff --git a/src/main/resources/mapper/production/PalletMapper.xml b/src/main/resources/mapper/production/PalletMapper.xml index 8fe5702..263dfcd 100644 --- a/src/main/resources/mapper/production/PalletMapper.xml +++ b/src/main/resources/mapper/production/PalletMapper.xml @@ -176,11 +176,11 @@