Merge remote-tracking branch 'origin/master'
| | |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.export.PlatformLedgerReportExport; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportDetailExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.model.TCrmClinic; |
| | |
| | | import com.ruoyi.system.query.ClinicProcurementReportQuery; |
| | | import com.ruoyi.system.query.DetectionPaymentReportQuery; |
| | | import com.ruoyi.system.query.PerformanceReportQuery; |
| | | import com.ruoyi.system.query.ProcurementReportDetailQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.BranchPerformanceReportVO; |
| | | import com.ruoyi.system.vo.ClinicProcurementReportDetailVO; |
| | | import com.ruoyi.system.vo.ClinicProcurementReportVO; |
| | | import com.ruoyi.system.vo.DetectionPaymentReportVO; |
| | | import com.ruoyi.system.vo.SalespersonPerformanceReportVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.apache.http.entity.ContentType; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.*; |
| | | import java.net.URL; |
| | | import java.net.URLEncoder; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 诊所采购报表详情列表(商品维度) |
| | | */ |
| | | @ApiOperation(value = "【20260130】诊所采购报表详情列表") |
| | | @PostMapping(value = "/clinicProcurementReportDetail/{id}") |
| | | public R<List<ClinicProcurementReportDetailVO>> clinicProcurementReportDetail(@ApiParam(name = "id",value = "采购ID") @PathVariable String id) { |
| | | List<ClinicProcurementReportDetailVO> list = erpProcurementService.clinicProcurementReportDetail(id); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @Log(title = "财务报表-诊所采购报表详情导出", businessType = BusinessType.EXPORT) |
| | | @ApiOperation(value = "【20260130】诊所采购报表详情导出(支持多选)") |
| | | @PostMapping("/exportProcurementReportDetail") |
| | | public void exportProcurementReportDetail(@Valid @RequestBody ProcurementReportDetailQuery query){ |
| | | List<ProcurementReportDetailExport> list = erpProcurementService.exportProcurementReportDetail(query.getProcurementIds()); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ProcurementReportDetailExport.class, list); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | assert response != null; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | ServletOutputStream outputStream = null; |
| | | try { |
| | | String fileName = URLEncoder.encode("诊所采购报表详情.xls", "utf-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | outputStream = response.getOutputStream(); |
| | | workbook.write(outputStream); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.lkl.laop.sdk.request.V3LabsTransPreorderRequest; |
| | |
| | | import com.ruoyi.system.dto.DetailProcurementSendDto; |
| | | import com.ruoyi.system.dto.UpdateStatusProcurementDto; |
| | | import com.ruoyi.system.dto.UpdateStatusProcurementLastDto; |
| | | import com.ruoyi.system.export.WarehouseProcurementReportDetailExport; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.query.ProcurementReportDetailQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.*; |
| | | import com.ruoyi.system.export.ProcurementReportDetailExport; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import com.ruoyi.web.core.config.LakalaConfig; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 采购单详情列表(仓库角色专用) |
| | | */ |
| | | @ApiOperation(value = "【20260130】采购单详情列表--仓库角色专用") |
| | | @PostMapping(value = "/procurementReportDetail/{id}") |
| | | public R<List<ClinicProcurementReportDetailVO>> procurementReportDetail(@ApiParam(name = "id",value = "采购ID") @PathVariable String id) { |
| | | List<ClinicProcurementReportDetailVO> list = erpProcurementService.clinicProcurementReportDetail(id); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 采购单详情导出(仓库角色专用,支持多选) |
| | | */ |
| | | @Log(title = "采购管理-采购单详情导出", businessType = BusinessType.EXPORT) |
| | | @ApiOperation(value = "【20260130】采购单详情导出--仓库角色专用(支持多选)") |
| | | @PostMapping("/exportProcurementReportDetail") |
| | | public void exportProcurementReportDetail(@Valid @RequestBody ProcurementReportDetailQuery query) { |
| | | List<ProcurementReportDetailExport> list = erpProcurementService.exportProcurementReportDetail(query.getProcurementIds()); |
| | | List<WarehouseProcurementReportDetailExport> warehouseProcurementReportDetailExports = BeanUtil.copyToList(list, WarehouseProcurementReportDetailExport.class); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), WarehouseProcurementReportDetailExport.class, warehouseProcurementReportDetailExports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | assert response != null; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | ServletOutputStream outputStream = null; |
| | | try { |
| | | String fileName = URLEncoder.encode("采购单详情.xls", "utf-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | outputStream = response.getOutputStream(); |
| | | workbook.write(outputStream); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | package com.ruoyi.system.export; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 诊所采购报表详情导出(商品维度) |
| | | * |
| | | * @author mitao |
| | | * @since 2025-01-29 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "诊所采购报表详情导出ProcurementReportDetailExport") |
| | | public class ProcurementReportDetailExport implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Excel(name = "采购单号", width = 25) |
| | | private String procurementCode; |
| | | |
| | | @Excel(name = "采购供应商", width = 20) |
| | | private String supplierName; |
| | | |
| | | @Excel(name = "诊所ID", width = 20) |
| | | private String clinicId; |
| | | |
| | | @Excel(name = "采购诊所", width = 20) |
| | | private String clinicName; |
| | | |
| | | @Excel(name = "发起人", width = 15) |
| | | private String createBy; |
| | | |
| | | @Excel(name = "药品名称", width = 25) |
| | | private String goodsName; |
| | | |
| | | @Excel(name = "数量", width = 10) |
| | | private Integer purchaseCount; |
| | | |
| | | @Excel(name = "单位", width = 10) |
| | | private String unitName; |
| | | |
| | | @Excel(name = "国药准字号", width = 20) |
| | | private String quasiNumber; |
| | | |
| | | @Excel(name = "单价", width = 12) |
| | | private BigDecimal purchasePrice; |
| | | |
| | | @Excel(name = "总价", width = 12) |
| | | private BigDecimal totalPrice; |
| | | |
| | | @Excel(name = "平台分佣", width = 12) |
| | | private BigDecimal platformCommissionPrice; |
| | | |
| | | @Excel(name = "收件人", width = 15) |
| | | private String personChargeName; |
| | | |
| | | @Excel(name = "电话", width = 15) |
| | | private String phone; |
| | | |
| | | @Excel(name = "地址", width = 40) |
| | | private String address; |
| | | |
| | | @Excel(name = "发货状态", width = 12, replace = {"草稿_1", "待支付_2", "待发货_3", "已发货_4", "已入库_5", "已取消_6"}) |
| | | private Integer status; |
| | | |
| | | @Excel(name = "物流单号", width = 20) |
| | | private String logisticsNumber; |
| | | |
| | | @Excel(name = "采购时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Excel(name = "发货时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime sendTime; |
| | | |
| | | @Excel(name = "入库操作人", width = 15) |
| | | private String warehousingUserName; |
| | | |
| | | @Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime warehousingTime; |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.export; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 仓库角色采购报表详情导出(商品维度) |
| | | * |
| | | * @author mitao |
| | | * @since 2025-01-29 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "仓库角色采购报表详情导出ProcurementReportDetailExport") |
| | | public class WarehouseProcurementReportDetailExport implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Excel(name = "采购单号", width = 25) |
| | | private String procurementCode; |
| | | |
| | | @Excel(name = "采购诊所", width = 20) |
| | | private String clinicName; |
| | | |
| | | @Excel(name = "药品名称", width = 25) |
| | | private String goodsName; |
| | | |
| | | @Excel(name = "数量", width = 10) |
| | | private Integer purchaseCount; |
| | | |
| | | @Excel(name = "单位", width = 10) |
| | | private String unitName; |
| | | |
| | | @Excel(name = "国药准字号", width = 20) |
| | | private String quasiNumber; |
| | | |
| | | @Excel(name = "单价", width = 12) |
| | | private BigDecimal purchasePrice; |
| | | |
| | | @Excel(name = "总价", width = 12) |
| | | private BigDecimal totalPrice; |
| | | |
| | | @Excel(name = "收件人", width = 15) |
| | | private String personChargeName; |
| | | |
| | | @Excel(name = "电话", width = 15) |
| | | private String phone; |
| | | |
| | | @Excel(name = "地址", width = 40) |
| | | private String address; |
| | | |
| | | @Excel(name = "发货状态", width = 12, replace = {"草稿_1", "待支付_2", "待发货_3", "已发货_4", "已入库_5", "已取消_6"}) |
| | | private Integer status; |
| | | |
| | | @Excel(name = "物流单号", width = 20) |
| | | private String logisticsNumber; |
| | | |
| | | @Excel(name = "采购时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Excel(name = "发货时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime sendTime; |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.system.export.PlatformLedgerReportExport; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportDetailExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.model.TErpProcurement; |
| | | import com.ruoyi.system.model.TErpProcurementGoods; |
| | | import com.ruoyi.system.query.ClinicProcurementReportQuery; |
| | | import com.ruoyi.system.query.PerformanceReportQuery; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.vo.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @return |
| | | */ |
| | | List<SalespersonPerformanceReportVO> exportSalespersonPerformanceReport(@Param("query")PerformanceReportQuery query); |
| | | |
| | | /** |
| | | * 诊所采购报表详情列表(商品维度) |
| | | * |
| | | * @param id 查询参数(包含采购单ID) |
| | | * @return |
| | | */ |
| | | List<ClinicProcurementReportDetailVO> clinicProcurementReportDetail(@Param("id") String id); |
| | | |
| | | /** |
| | | * 诊所采购报表详情导出(商品维度) |
| | | * |
| | | * @param procurementIds 查询参数(包含采购单ID列表,支持多选) |
| | | * @return |
| | | */ |
| | | List<ProcurementReportDetailExport> exportProcurementReportDetail(@Param("procurementIds") List<String> procurementIds); |
| | | } |
| | |
| | | @TableField("qr_code") |
| | | private String qrCode; |
| | | |
| | | @ApiModelProperty(value = "省份") |
| | | @TableField("province_name") |
| | | private String provinceName; |
| | | |
| | | @ApiModelProperty(value = "省份code") |
| | | @TableField("province_code") |
| | | private String provinceCode; |
| | | |
| | | @ApiModelProperty(value = "城市") |
| | | @TableField("city_name") |
| | | private String cityName; |
| | | |
| | | @ApiModelProperty(value = "城市code") |
| | | @TableField("city_code") |
| | | private String cityCode; |
| | | |
| | | @ApiModelProperty(value = "区县名称") |
| | | @TableField("district_name") |
| | | private String districtName; |
| | | |
| | | @ApiModelProperty(value = "区县code") |
| | | @TableField("district_code") |
| | | private String districtCode; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 诊所采购报表详情查询参数 |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-01-29 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "诊所采购报表详情查询ProcurementReportDetailQuery") |
| | | public class ProcurementReportDetailQuery { |
| | | |
| | | @ApiModelProperty(value = "采购单ID列表(导出时使用,支持多选)") |
| | | @NotEmpty(message = "采购id不能为空") |
| | | private List<String> procurementIds; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.system.dto.AddProcurementDto; |
| | | import com.ruoyi.system.export.PlatformLedgerReportExport; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportDetailExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.model.TErpGoods; |
| | |
| | | import com.ruoyi.system.vo.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.math.BigDecimal; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<SalespersonPerformanceReportVO> exportSalespersonPerformanceReport(PerformanceReportQuery query); |
| | | |
| | | /** |
| | | * 诊所采购报表详情列表(商品维度) |
| | | * @param id 查询参数(包含采购单ID) |
| | | * @return |
| | | */ |
| | | List<ClinicProcurementReportDetailVO> clinicProcurementReportDetail(String id); |
| | | |
| | | /** |
| | | * 诊所采购报表详情导出(商品维度) |
| | | * |
| | | * @param procurementIds 查询参数(包含采购单ID列表,支持多选) |
| | | * @return |
| | | */ |
| | | List<ProcurementReportDetailExport> exportProcurementReportDetail(List<String> procurementIds); |
| | | } |
| | |
| | | import com.ruoyi.system.dto.AddProcurementDto; |
| | | import com.ruoyi.system.export.PlatformLedgerReportExport; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportDetailExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.mapper.*; |
| | |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TErpGoodsService; |
| | | import com.ruoyi.system.service.TErpProcurementGoodsService; |
| | | import com.ruoyi.system.service.TErpProcurementService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.*; |
| | | import lombok.SneakyThrows; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.conn.ClientConnectionManager; |
| | | import org.apache.http.conn.scheme.Scheme; |
| | | import org.apache.http.conn.scheme.SchemeRegistry; |
| | | import org.apache.http.conn.ssl.SSLSocketFactory; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.DefaultHttpClient; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.net.ssl.SSLContext; |
| | | import javax.net.ssl.TrustManager; |
| | | import javax.net.ssl.X509TrustManager; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.security.PrivateKey; |
| | | import java.security.cert.X509Certificate; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<ClinicProcurementReportDetailVO> clinicProcurementReportDetail(String id) { |
| | | return this.baseMapper.clinicProcurementReportDetail(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<ProcurementReportDetailExport> exportProcurementReportDetail(List<String> procurementIds) { |
| | | return this.baseMapper.exportProcurementReportDetail(procurementIds); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 诊所采购报表详情VO(商品维度) |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-01-29 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "诊所采购报表详情ClinicProcurementReportDetailVO") |
| | | public class ClinicProcurementReportDetailVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // ========== 采购单信息 ========== |
| | | |
| | | @ApiModelProperty(value = "采购单号") |
| | | private String procurementCode; |
| | | |
| | | @ApiModelProperty(value = "发起人") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "发货状态 1=草稿 2=待支付 3=待发货 4=已发货 5=已入库 6=已取消") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "物流单号") |
| | | private String logisticsNumber; |
| | | |
| | | @ApiModelProperty(value = "采购时间") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "发货时间") |
| | | private LocalDateTime sendTime; |
| | | |
| | | @ApiModelProperty(value = "入库操作人") |
| | | private String warehousingUserName; |
| | | |
| | | @ApiModelProperty(value = "操作时间(入库时间)") |
| | | private LocalDateTime warehousingTime; |
| | | |
| | | // ========== 商品信息 ========== |
| | | |
| | | @ApiModelProperty(value = "商品ID") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty(value = "药品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "采购供应商") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer purchaseCount; |
| | | |
| | | @ApiModelProperty(value = "单位") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty(value = "国药准字号") |
| | | private String quasiNumber; |
| | | |
| | | @ApiModelProperty(value = "单价(采购价)") |
| | | private BigDecimal purchasePrice; |
| | | |
| | | @ApiModelProperty(value = "总价") |
| | | private BigDecimal totalPrice; |
| | | |
| | | @ApiModelProperty(value = "平台分佣") |
| | | private BigDecimal platformCommissionPrice; |
| | | |
| | | // ========== 诊所信息 ========== |
| | | |
| | | @ApiModelProperty(value = "采购诊所") |
| | | private String clinicName; |
| | | |
| | | @ApiModelProperty(value = "收件人") |
| | | private String personChargeName; |
| | | |
| | | @ApiModelProperty(value = "电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | } |
| | |
| | | @ApiModelProperty(value = "诊所地址") |
| | | private String clinicAddress; |
| | | |
| | | @ApiModelProperty(value = "收件人") |
| | | private String personChargeName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "物流单号") |
| | | private String logisticsNo; |
| | | |
| | |
| | | tcc.id, tcc.branch_id, tcc.salesperson_id, tcc.warehouse_id,tcc.user_id, tcc.clinic_name, tcc.person_charge_name, |
| | | tcc.phone, tcc.low_procurement_money, tcc.clinic_address, tcc.qualification_picture, tcc.status,tcc.audit_remark, |
| | | tcc.create_time, tcc.update_time, tcc.create_by, tcc.update_by, tcc.disabled,tcc.performance_count, |
| | | tcc.send_message_count,tcc.qr_code, |
| | | tcc.send_message_count,tcc.qr_code,tcc.province_name,tcc.province_code,tcc.city_name,tcc.city_code,tcc.district_name,tcc.district_code, |
| | | tcb.branch_name, tcs.salesperson_name, tcw.warehouse_name |
| | | from t_crm_clinic tcc |
| | | left join t_crm_branch tcb on tcc.branch_id = tcb.id |
| | |
| | | tcc.id, tcc.branch_id, tcc.salesperson_id, tcc.warehouse_id,tcc.user_id, tcc.clinic_name, tcc.person_charge_name, |
| | | tcc.phone, tcc.low_procurement_money, tcc.clinic_address, tcc.qualification_picture, tcc.status,tcc.audit_remark, |
| | | tcc.create_time, tcc.update_time, tcc.create_by, tcc.update_by, tcc.disabled,tcc.performance_count, |
| | | tcc.province_name,tcc.province_code,tcc.city_name,tcc.city_code,tcc.district_name,tcc.district_code, |
| | | tcc.send_message_count,tcc.qr_code, |
| | | tcb.branch_name, tcs.salesperson_name, tcw.warehouse_name |
| | | from t_crm_clinic tcc |
| | |
| | | select t1.id, |
| | | t1.procurement_code, |
| | | t2.clinic_name, |
| | | t2.clinic_address, |
| | | t2.person_charge_name, |
| | | t2.phone, |
| | | CONCAT(IFNULL(t2.province_name,''), IFNULL(t2.city_name,''), IFNULL(t2.district_name,''), IFNULL(t2.clinic_address,'')) AS clinic_address, |
| | | t1.logistics_number as logisticsNo, |
| | | t1.send_time, |
| | | t1.clinic_id, |
| | |
| | | </select> |
| | | <select id="clinicProcurementReport" resultType="com.ruoyi.system.vo.ClinicProcurementReportVO"> |
| | | select tep.id, tep.procurement_code, tep.pay_money, tep.status,tep.pay_time,tep.clinic_id, tep.supplier_id, |
| | | tep.money,tep.supplier_money, |
| | | tep.money,tep.supplier_money,tep.create_by, |
| | | tcs.supplier_name as supplierName, tcc.clinic_name as clinicName,tcc.person_charge_name,tcc.phone |
| | | from t_erp_procurement tep |
| | | left join t_crm_supplier tcs on tep.supplier_id = tcs.id |
| | |
| | | order by tep.pay_time desc |
| | | </select> |
| | | |
| | | <!-- 诊所采购报表详情列表(商品维度) --> |
| | | <select id="clinicProcurementReportDetail" resultType="com.ruoyi.system.vo.ClinicProcurementReportDetailVO"> |
| | | SELECT |
| | | tep.procurement_code, |
| | | tep.create_by, |
| | | tep.status, |
| | | tep.logistics_number, |
| | | tep.create_time, |
| | | tep.send_time, |
| | | tep.warehousing_time, |
| | | su.nick_name AS warehousingUserName, |
| | | tepg.goods_id, |
| | | tepg.goods_name, |
| | | tepg.supplier_name, |
| | | tepg.purchase_count, |
| | | tepg.unit_name, |
| | | tepg.quasi_number, |
| | | tepg.purchase_price, |
| | | tepg.total_price, |
| | | tepg.platform_commission_price, |
| | | tcc.clinic_name, |
| | | tcc.person_charge_name, |
| | | tcc.phone, |
| | | CONCAT(IFNULL(tcc.province_name,''), IFNULL(tcc.city_name,''), IFNULL(tcc.district_name,''), IFNULL(tcc.clinic_address,'')) AS address |
| | | FROM t_erp_procurement_goods tepg |
| | | LEFT JOIN t_erp_procurement tep ON tepg.procurement_id = tep.id |
| | | LEFT JOIN t_crm_clinic tcc ON tep.clinic_id = tcc.id |
| | | LEFT JOIN sys_user su ON tep.warehousing_user_id = su.user_id |
| | | <where> |
| | | <if test="id != null and id != ''"> |
| | | AND tepg.procurement_id = #{id} |
| | | </if> |
| | | </where> |
| | | ORDER BY tepg.id ASC |
| | | </select> |
| | | |
| | | <!-- 诊所采购报表详情导出(商品维度,支持多选) --> |
| | | <select id="exportProcurementReportDetail" resultType="com.ruoyi.system.export.ProcurementReportDetailExport"> |
| | | SELECT |
| | | tep.procurement_code, |
| | | tep.create_by, |
| | | tep.status, |
| | | tep.logistics_number, |
| | | tep.create_time, |
| | | tep.send_time, |
| | | tep.warehousing_time, |
| | | tep.clinic_id, |
| | | su.nick_name AS warehousingUserName, |
| | | tepg.goods_name, |
| | | tepg.supplier_name, |
| | | tepg.purchase_count, |
| | | tepg.unit_name, |
| | | tepg.quasi_number, |
| | | tepg.purchase_price, |
| | | tepg.total_price, |
| | | tepg.platform_commission_price, |
| | | tcc.clinic_name, |
| | | tcc.person_charge_name, |
| | | tcc.phone, |
| | | CONCAT(IFNULL(tcc.province_name,''), IFNULL(tcc.city_name,''), IFNULL(tcc.district_name,''), IFNULL(tcc.clinic_address,'')) AS address |
| | | FROM t_erp_procurement_goods tepg |
| | | LEFT JOIN t_erp_procurement tep ON tepg.procurement_id = tep.id |
| | | LEFT JOIN t_crm_clinic tcc ON tep.clinic_id = tcc.id |
| | | LEFT JOIN sys_user su ON tep.warehousing_user_id = su.user_id |
| | | <where> |
| | | <if test="procurementIds != null and procurementIds.size() > 0"> |
| | | AND tepg.procurement_id IN |
| | | <foreach item="item" collection="procurementIds" separator="," open="(" close=")" index=""> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY tep.pay_time DESC, tepg.id ASC |
| | | </select> |
| | | |
| | | </mapper> |