| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | |
| | | |
| | | private final CommonFileMapper commonFileMapper; |
| | | |
| | | private final SupplierManageMapper supplierManageMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | |
| | |
| | | //录入人 |
| | | SysUser sysUser = userMapper.selectUserById(purchaseLedgerDto.getRecorderId()); |
| | | |
| | | SupplierManage supplierManage = supplierManageMapper.selectById(purchaseLedgerDto.getSupplierId()); |
| | | |
| | | // DTO转Entity |
| | | PurchaseLedger purchaseLedger = new PurchaseLedger(); |
| | | BeanUtils.copyProperties(purchaseLedgerDto, purchaseLedger); |
| | | purchaseLedger.setTenantId(salesLedger.getTenantId()); |
| | | purchaseLedger.setSalesContractNo(salesLedger.getSalesContractNo()); |
| | | purchaseLedger.setSupplierName(supplierManage.getSupplierName()); |
| | | purchaseLedger.setRecorderId(purchaseLedgerDto.getRecorderId()); |
| | | purchaseLedger.setRecorderName(sysUser.getNickName()); |
| | | purchaseLedger.setBusinessPersonId(purchaseLedgerDto.getBusinessPersonId()); |
| | |
| | | @Override |
| | | public List getPurchasesNo() { |
| | | LambdaQueryWrapper<PurchaseLedger> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.select(PurchaseLedger::getId, PurchaseLedger::getPurchaseContractNumber); |
| | | queryWrapper.select(PurchaseLedger::getId, PurchaseLedger::getPurchaseContractNumber,PurchaseLedger::getSupplierId); |
| | | |
| | | // 获取原始查询结果 |
| | | List<Map<String, Object>> result = purchaseLedgerMapper.selectMaps(queryWrapper); |