From 9fb970fd7c43af971b8dc6d71e50c61013ceeab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Wed, 5 May 2021 22:35:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E6=8D=AE=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/depotHead/DepotHeadService.java | 67 +++++++++++-------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java index 9dcae76d..ef1628bc 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java @@ -468,39 +468,48 @@ public class DepotHeadService { List resList = new ArrayList(); List list = null; try{ + Map personMap = personService.getPersonMap(); + Map accountMap = accountService.getAccountMap(); list = depotHeadMapperEx.getDetailByNumber(number); + if (null != list) { + for (DepotHeadVo4List dh : list) { + if(accountMap!=null && StringUtil.isNotEmpty(dh.getAccountIdList()) && StringUtil.isNotEmpty(dh.getAccountMoneyList())) { + String accountStr = accountService.getAccountStrByIdAndMoney(accountMap, dh.getAccountIdList(), dh.getAccountMoneyList()); + dh.setAccountName(accountStr); + } + if(dh.getAccountIdList() != null) { + String accountidlistStr = dh.getAccountIdList().replace("[", "").replace("]", "").replaceAll("\"", ""); + dh.setAccountIdList(accountidlistStr); + } + if(dh.getAccountMoneyList() != null) { + String accountmoneylistStr = dh.getAccountMoneyList().replace("[", "").replace("]", "").replaceAll("\"", ""); + dh.setAccountMoneyList(accountmoneylistStr); + } + if(dh.getOtherMoneyList() != null) { + String otherMoneyListStr = dh.getOtherMoneyList().replace("[", "").replace("]", "").replaceAll("\"", ""); + dh.setOtherMoneyList(otherMoneyListStr); + } + if(dh.getOtherMoneyItem() != null) { + String otherMoneyItemStr = dh.getOtherMoneyItem().replace("[", "").replace("]", "").replaceAll("\"", ""); + dh.setOtherMoneyItem(otherMoneyItemStr); + } + if(dh.getChangeAmount() != null) { + dh.setChangeAmount(dh.getChangeAmount().abs()); + } + if(dh.getTotalPrice() != null) { + dh.setTotalPrice(dh.getTotalPrice().abs()); + } + if(StringUtil.isNotEmpty(dh.getSalesMan())) { + dh.setSalesManStr(personService.getPersonByMapAndIds(personMap,dh.getSalesMan())); + } + dh.setOperTimeStr(getCenternTime(dh.getOperTime())); + dh.setMaterialsList(findMaterialsListByHeaderId(dh.getId())); + resList.add(dh); + } + } }catch(Exception e){ JshException.readFail(logger, e); } - if (null != list) { - for (DepotHeadVo4List dh : list) { - if(dh.getAccountIdList() != null) { - String accountidlistStr = dh.getAccountIdList().replace("[", "").replace("]", "").replaceAll("\"", ""); - dh.setAccountIdList(accountidlistStr); - } - if(dh.getAccountMoneyList() != null) { - String accountmoneylistStr = dh.getAccountMoneyList().replace("[", "").replace("]", "").replaceAll("\"", ""); - dh.setAccountMoneyList(accountmoneylistStr); - } - if(dh.getOtherMoneyList() != null) { - String otherMoneyListStr = dh.getOtherMoneyList().replace("[", "").replace("]", "").replaceAll("\"", ""); - dh.setOtherMoneyList(otherMoneyListStr); - } - if(dh.getOtherMoneyItem() != null) { - String otherMoneyItemStr = dh.getOtherMoneyItem().replace("[", "").replace("]", "").replaceAll("\"", ""); - dh.setOtherMoneyItem(otherMoneyItemStr); - } - if(dh.getChangeAmount() != null) { - dh.setChangeAmount(dh.getChangeAmount().abs()); - } - if(dh.getTotalPrice() != null) { - dh.setTotalPrice(dh.getTotalPrice().abs()); - } - dh.setOperTimeStr(getCenternTime(dh.getOperTime())); - dh.setMaterialsList(findMaterialsListByHeaderId(dh.getId())); - resList.add(dh); - } - } return resList; }