优化单据明细接口
This commit is contained in:
@@ -468,12 +468,15 @@ public class DepotHeadService {
|
||||
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
|
||||
List<DepotHeadVo4List> list = null;
|
||||
try{
|
||||
Map<Long,String> personMap = personService.getPersonMap();
|
||||
Map<Long,String> accountMap = accountService.getAccountMap();
|
||||
list = depotHeadMapperEx.getDetailByNumber(number);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
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);
|
||||
@@ -496,11 +499,17 @@ public class DepotHeadService {
|
||||
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);
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user