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());