Merge remote-tracking branch 'origin/dev_New' into dev_New
| | |
| | | private Long tenantId; |
| | | |
| | | /** |
| | | * 审æ¹ç±»å |
| | | * 审æ¹ç±»å 1-å
¬åºç®¡ç 2-请å管ç 3-åºå·®ç®¡ç 4-æ¥é管ç 5-éè´å®¡æ¹ 6-æ¥ä»·å®¡æ¹ 7-åè´§å®¡æ¹ |
| | | */ |
| | | private Integer approveType; |
| | | |
| | |
| | | /** |
| | | * éä»¶ææè·¯å¾æåç§° |
| | | */ |
| | | @Excel(name = "éä»¶ææè·¯å¾æåç§°") |
| | | // @Excel(name = "éä»¶ææè·¯å¾æåç§°") |
| | | private String attachmentMaterials; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "仿¬¾æ¹å¼") |
| | | private String paymentMethod; |
| | | @ApiModelProperty("审æ¹ç¶æ 1-å¾
å®¡æ ¸ï¼2-审æ¹ä¸ï¼3-审æ¹éè¿ï¼4-审æ¹å¤±è´¥,5è¡¨ç¤ºæ¯æ¨¡æ¿") |
| | | @Excel(name = "审æ¹ç¶æ", readConverterExp = "1=å¾
å®¡æ ¸,2=审æ¹ä¸,3=审æ¹éè¿,4=审æ¹å¤±è´¥") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "模æ¿åç§°") |
| | |
| | | List<SysUser> sysUsers = sysUserMapper.selectList(new LambdaQueryWrapper<SysUser>().in(SysUser::getNickName, |
| | | salesLedgerImportDtoList.stream().map(PurchaseLedgerImportDto::getRecorderName).collect(Collectors.toList()))); |
| | | for (PurchaseLedgerImportDto salesLedgerImportDto : salesLedgerImportDtoList) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, salesLedgerImportDto.getPurchaseContractNumber()) |
| | | .last("limit 1")); |
| | | if(purchaseLedger != null){ |
| | | continue; |
| | | } |
| | | PurchaseLedger salesLedger = new PurchaseLedger(); |
| | | BeanUtils.copyProperties(salesLedgerImportDto, salesLedger); |
| | | // éè¿ä¾åºååç§°æ¥è¯¢ID |
| | |
| | | @Log(title = "éå®å°è´¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SalesLedgerDto salesLedgerDto) { |
| | | List<SalesLedger> list = salesLedgerService.selectSalesLedgerList(salesLedgerDto); |
| | | Page page = new Page(-1,-1); |
| | | IPage<SalesLedger> salesLedgerIPage = listPage(page, salesLedgerDto); |
| | | ExcelUtil<SalesLedger> util = new ExcelUtil<SalesLedger>(SalesLedger.class); |
| | | if(salesLedgerIPage == null){ |
| | | util.exportExcel(response, new ArrayList<>(), "éå®å°è´¦æ°æ®"); |
| | | return; |
| | | } |
| | | List<SalesLedger> list = salesLedgerIPage.getRecords(); |
| | | util.exportExcel(response, list, "éå®å°è´¦æ°æ®"); |
| | | } |
| | | |
| | |
| | | SalesQuotationDto afterSalesService = new SalesQuotationDto(); |
| | | IPage<SalesQuotationDto> listPage = salesQuotationService.listPage(page, afterSalesService); |
| | | ExcelUtil<SalesQuotationDto> util = new ExcelUtil<SalesQuotationDto>(SalesQuotationDto.class); |
| | | util.exportExcel(response, listPage.getRecords() , "åé¦ç»è®°"); |
| | | util.exportExcel(response, listPage.getRecords() , "é宿¥ä»·"); |
| | | } |
| | | |
| | | |
| | |
| | | @Excel(name = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * å货车çå· |
| | | */ |
| | | @Excel(name = "å货车çå·") |
| | | @TableField(exist = false) |
| | | private String shippingCarNumber; |
| | | |
| | | /** |
| | | * åè´§æ¥æ |
| | | */ |
| | | @Excel(name = "åè´§æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date shippingDate; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | |
| | | @TableField(exist = false) |
| | | private String shippingCarNumber; |
| | | |
| | | @ApiModelProperty("å¿«éå
¬å¸") |
| | | @TableField(exist = false) |
| | | private String expressCompany; |
| | | |
| | | @ApiModelProperty("å¿«éåå·") |
| | | @TableField(exist = false) |
| | | private String expressNumber; |
| | | |
| | | /** |
| | | * åè´§æ¥æ |
| | | */ |
| | |
| | | import com.ruoyi.sales.dto.StatisticsTableDto; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | public AjaxResult total() { |
| | | List<SalesLedger> salesLedgers = salesLedgerMapper.selectList(null); |
| | | if(CollectionUtils.isEmpty(salesLedgers)) return AjaxResult.success(salesLedgers); |
| | |
| | | map.put("shipRate", "0%"); |
| | | if(CollectionUtils.isEmpty(salesLedgerProducts)) return AjaxResult.success(map); |
| | | // åè´§æ°é |
| | | long count = salesLedgerProducts.stream() |
| | | .filter(salesLedgerProduct -> salesLedgerProduct.getApproveStatus().equals(2)) |
| | | .count(); |
| | | long count = shippingInfoMapper.selectCount(new LambdaQueryWrapper<ShippingInfo>() |
| | | .in(ShippingInfo::getSalesLedgerProductId, salesLedgerProducts.stream().map(SalesLedgerProduct::getId).collect(Collectors.toList())) |
| | | .eq(ShippingInfo::getStatus,"å·²åè´§")); |
| | | map.put("shipRate", String.format("%.2f", count * 100.0 / salesLedgerProducts.size()) + "%"); |
| | | return AjaxResult.success(map); |
| | | } |
| | |
| | | item.setShippingDate(shippingInfo.getShippingDate()); |
| | | item.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | item.setShippingStatus(shippingInfo.getStatus()); |
| | | item.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | item.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | }); |
| | | // å¼ç¥¨ |
| | |
| | | List<SysUser> sysUsers = sysUserMapper.selectList(new LambdaQueryWrapper<SysUser>().in(SysUser::getNickName, |
| | | salesLedgerImportDtoList.stream().map(SalesLedgerImportDto::getEntryPerson).collect(Collectors.toList()))); |
| | | for (SalesLedgerImportDto salesLedgerImportDto : salesLedgerImportDtoList) { |
| | | SalesLedger salesLedger1 = salesLedgerMapper.selectOne(new LambdaQueryWrapper<SalesLedger>() |
| | | .eq(SalesLedger::getSalesContractNo, salesLedgerImportDto.getSalesContractNo()) |
| | | .last("LIMIT 1")); |
| | | if(salesLedger1 != null){ |
| | | continue; |
| | | } |
| | | SalesLedger salesLedger = new SalesLedger(); |
| | | BeanUtils.copyProperties(salesLedgerImportDto, salesLedger); |
| | | salesLedger.setExecutionDate(DateUtils.toLocalDate(salesLedgerImportDto.getExecutionDate())); |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | @Override |
| | | public boolean delete(Long id) { |
| | | SalesQuotation salesQuotation = salesQuotationMapper.selectById(id); |
| | | if(salesQuotation==null) return false; |
| | | salesQuotationMapper.deleteById(id); |
| | | salesQuotationProductMapper.delete(new LambdaQueryWrapper<SalesQuotationProduct>().eq(SalesQuotationProduct::getSalesQuotationId, id)); |
| | | // å 餿¥ä»·å®¡æ¹ |
| | | ApproveProcess one = approveProcessService.getOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveType, 6) |
| | | .eq(ApproveProcess::getApproveReason, salesQuotation.getQuotationNo())); |
| | | if(one != null){ |
| | | approveProcessService.delByIds(Collections.singletonList(one.getId())); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | T1.attachment_materials, |
| | | T1.tenant_id, |
| | | T1.contract_amount, |
| | | T1.contract_amount as noInvoiceAmountTotal, |
| | | T1.execution_date, |
| | | T2.nick_name AS entry_person_name, |
| | | T1.payment_method |
| | |
| | | <if test="req.shippingCarNumber != null and req.shippingCarNumber != ''"> |
| | | AND s.shipping_car_number LIKE CONCAT('%',#{req.shippingCarNumber},'%') |
| | | </if> |
| | | <if test="req.shippingNo != null and req.shippingNo != ''"> |
| | | AND s.shipping_no LIKE CONCAT('%',#{req.shippingNo},'%') |
| | | </if> |
| | | <if test="req.expressNumber != null and req.expressNumber != ''"> |
| | | AND s.express_number LIKE CONCAT('%',#{req.expressNumber},'%') |
| | | </if> |
| | | order by create_time DESC |
| | | </select> |
| | | <select id="listAll" resultType="com.ruoyi.sales.pojo.ShippingInfo"> |
| | | SELECT |