From 3d0d4d32562a91ccd2b3c002f4f51d0e59869587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E5=9B=BD=E4=B8=9C?= Date: Tue, 3 Jan 2023 09:07:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=B0=8F=E6=95=B0=E7=82=B9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/user/ListDetailMapper.xml | 7 +++++-- .../src/main/java/com/rzyc/service/PcBusinessService.java | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/inventory-dao/src/main/resources/mapper/user/ListDetailMapper.xml b/inventory-dao/src/main/resources/mapper/user/ListDetailMapper.xml index 72c24ed..ab941a8 100644 --- a/inventory-dao/src/main/resources/mapper/user/ListDetailMapper.xml +++ b/inventory-dao/src/main/resources/mapper/user/ListDetailMapper.xml @@ -446,7 +446,8 @@ - SELECT * FROM ListDetail ld WHERE ld.`ListDetailId` = #{listDetailId} + SELECT ld.*,ot.Subject taskName FROM ListDetail ld + left join oatask ot on ld.task_id = ot.OATaskId + WHERE ld.`ListDetailId` = #{listDetailId} diff --git a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java index d641266..c3589af 100644 --- a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java +++ b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java @@ -832,7 +832,7 @@ public class PcBusinessService extends BaseController { - public SingleResult entPostListPercentStatistic(String enterpriseId,String listId,Integer year){ + public SingleResult entPostListPercentStatistic(String enterpriseId,String listId,Integer year)throws Exception{ SingleResult singleResult = new SingleResult(); HashMap map = new HashMap(); long total = entPostTaskMapper.selectEntPostTaskTotal(enterpriseId,listId,year); @@ -840,10 +840,13 @@ public class PcBusinessService extends BaseController { EntPostTaskStatistic entPostTaskStatistic = entPostTaskMapper.selectEntPostTaskByState(enterpriseId,listId,year); if (null != entPostTaskStatistic){ double finishPercent = Arith.div(entPostTaskStatistic.getFinished(),total) * 100; + finishPercent = TypeConversion.decimalFormat(finishPercent,2); map.put("finished",finishPercent); double unfinishedPercent = Arith.div(entPostTaskStatistic.getOvertime(),total) * 100; + unfinishedPercent = TypeConversion.decimalFormat(unfinishedPercent,2); map.put("unfinished",unfinishedPercent); double haveInHand = Arith.div(entPostTaskStatistic.getHaveInHand(),total) * 100; + haveInHand = TypeConversion.decimalFormat(haveInHand,2); map.put("haveInHand",haveInHand); //数量 map.put("finishNumber",entPostTaskStatistic.getFinished());