| | |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.other.pojo.TempFile; |
| | | import com.ruoyi.procurementrecord.dto.Details; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementAddDto; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerDto; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | return purchaseLedgerMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | } |
| | | // 执行插入操作 |
| | | if (!insertList.isEmpty()) { |
| | | List<Details> details = new ArrayList<>(); |
| | | for (SalesLedgerProduct salesLedgerProduct : insertList) { |
| | | salesLedgerProduct.setType(type); |
| | | Date entryDate = purchaseLedger.getEntryDate(); |
| | |
| | | LocalDateTime localDateTime = entryDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
| | | salesLedgerProduct.setRegisterDate(localDateTime); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | Details details1 = new Details(); |
| | | details1.setId(salesLedgerProduct.getId().intValue()); |
| | | details1.setInboundQuantity(salesLedgerProduct.getQuantity()); |
| | | details1.setWarnNum(salesLedgerProduct.getWarnNum()); |
| | | details.add(details1); |
| | | } |
| | | // 新增采购入库 |
| | | ProcurementAddDto dto = new ProcurementAddDto(); |
| | | dto.setDetails(details); |
| | | dto.setNickName("孙再红"); |
| | | procurementRecordService.add(dto); |
| | | } |
| | | |
| | | // 计算总含税金额 |