|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.win.framework.common.pojo.CustomConditions; |
|
|
import com.win.framework.common.pojo.CustomConditions; |
|
|
import com.win.framework.common.pojo.PageResult; |
|
|
import com.win.framework.common.pojo.PageResult; |
|
|
import com.win.framework.mybatis.core.util.QueryWrapperUtils; |
|
|
import com.win.framework.mybatis.core.util.QueryWrapperUtils; |
|
|
|
|
|
import com.win.module.infra.api.config.ConfigApi; |
|
|
|
|
|
import com.win.module.infra.vo.ConfigInfoVO; |
|
|
import com.win.module.system.api.dict.DictDataApi; |
|
|
import com.win.module.system.api.dict.DictDataApi; |
|
|
import com.win.module.system.api.dict.dto.DictDataRespDTO; |
|
|
import com.win.module.system.api.dict.dto.DictDataRespDTO; |
|
|
import com.win.module.system.api.user.AdminUserApi; |
|
|
import com.win.module.system.api.user.AdminUserApi; |
|
@ -78,6 +80,8 @@ public class BalanceServiceImpl implements BalanceService { |
|
|
private LocationMapper locationMapper; |
|
|
private LocationMapper locationMapper; |
|
|
@Resource |
|
|
@Resource |
|
|
private BusinesstypeService businesstypeService; |
|
|
private BusinesstypeService businesstypeService; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private ConfigApi configApi; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -318,12 +322,28 @@ public class BalanceServiceImpl implements BalanceService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageResult<BalanceDO> getBalanceItemsPage(BalancePageReqVO pageVO) { |
|
|
public PageResult<BalanceDO> getBalanceItemsPage(BalancePageReqVO pageVO) { |
|
|
|
|
|
ConfigInfoVO configInfoVO = configApi.queryConfigInfoByKey("getBalanceItemsPage"); |
|
|
|
|
|
StringBuilder type = new StringBuilder(); |
|
|
|
|
|
String[] itemTypes = configInfoVO.getItemType().split(","); |
|
|
|
|
|
for(int i=0;i<itemTypes.length;i++) { |
|
|
|
|
|
type.append("'").append(itemTypes[i]).append("',"); |
|
|
|
|
|
} |
|
|
|
|
|
pageVO.setItemType(type.substring(0, type.length() - 1)); |
|
|
return balanceMapper.getBalanceItemsPage(pageVO); |
|
|
return balanceMapper.getBalanceItemsPage(pageVO); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageResult<BalanceDO> getSeniroBalanceItemsPage(CustomConditions conditions) { |
|
|
public PageResult<BalanceDO> getSeniroBalanceItemsPage(CustomConditions conditions) { |
|
|
return balanceMapper.selectSeniorItems(conditions); |
|
|
ConfigInfoVO configInfoVO = configApi.queryConfigInfoByKey("getBalanceItemsPage"); |
|
|
|
|
|
StringBuilder type = new StringBuilder(); |
|
|
|
|
|
String[] itemTypes = configInfoVO.getItemType().split(","); |
|
|
|
|
|
for(int i=0;i<itemTypes.length;i++) { |
|
|
|
|
|
type.append("'").append(itemTypes[i]).append("',"); |
|
|
|
|
|
} |
|
|
|
|
|
String itemType = type.substring(0, type.length() - 1); |
|
|
|
|
|
QueryWrapper<BalanceDO> queryWrapper = QueryWrapperUtils.structure(conditions); |
|
|
|
|
|
queryWrapper.inSql("item_code","select code from basic_itembasic where type in ("+itemType+")"); |
|
|
|
|
|
return balanceMapper.selectSeniorItems(conditions,queryWrapper); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|