| | |
| | | |
| | | // 查询销售前十占比 |
| | | List<SupplierSalesStatisticsGoodsTypeVO> supplierSalesStatisticsGoodsTypeVOS = erpProcurementService.supplierSalesStatisticsGoodsType(crmSupplier.getId(), startTime, endTime); |
| | | // 判断集合是否大于9 |
| | | if(supplierSalesStatisticsGoodsTypeVOS.size() > 9){ |
| | | // 其余的添加到其他 |
| | | List<SupplierSalesStatisticsGoodsTypeVO> otherList = supplierSalesStatisticsGoodsTypeVOS.subList(9, supplierSalesStatisticsGoodsTypeVOS.size()); |
| | | SupplierSalesStatisticsGoodsTypeVO other = new SupplierSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(SupplierSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | supplierSalesStatisticsGoodsTypeVOS.add(other); |
| | | supplierSalesStatisticsGoodsTypeVOS = supplierSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | | } |
| | | supplierSalesStatisticsVO.setSupplierSalesStatisticsGoodsTypeVOS(supplierSalesStatisticsGoodsTypeVOS); |
| | | // 查询30天销售统计 |
| | | List<SupplierSalesStatisticsGoodsCountVO> supplierSalesStatisticsGoodsCountVOS; |
| | |
| | | |
| | | // 查询销售前十占比 |
| | | List<ClinicSalesStatisticsGoodsTypeVO> clinicSalesStatisticsGoodsTypeVOS = sysOrderService.supplierSalesStatisticsGoodsType(crmClinic.getId(), startTime, endTime); |
| | | // 判断集合是否大于9 |
| | | if(clinicSalesStatisticsGoodsTypeVOS.size() > 9){ |
| | | // 其余的添加到其他 |
| | | List<ClinicSalesStatisticsGoodsTypeVO> otherList = clinicSalesStatisticsGoodsTypeVOS.subList(9, clinicSalesStatisticsGoodsTypeVOS.size()); |
| | | ClinicSalesStatisticsGoodsTypeVO other = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVOS.add(other); |
| | | clinicSalesStatisticsGoodsTypeVOS = clinicSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | | } |
| | | clinicSalesStatisticsVO.setClinicSalesStatisticsGoodsTypeVOS(clinicSalesStatisticsGoodsTypeVOS); |
| | | // 查询30天销售统计 |
| | | List<ClinicSalesStatisticsGoodsCountVO> clinicSalesStatisticsGoodsCountVOS; |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(LocalDate.now().minusMonths(6)); |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (int i = 0; i < 6; i++) { |
| | | list.add(i); |
| | | } |
| | | System.out.println(list.subList(2,list.size())); |
| | | System.out.println(list.subList(0,2 )); |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.model.TCrmClinic; |
| | | import com.ruoyi.system.model.TCrmSupplier; |
| | | import com.ruoyi.system.query.ClinicProcurementReportQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.ClinicProcurementReportVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Api(tags = "财务报表") |
| | | @RestController |
| | | @RequestMapping("/financial-statements") |
| | | public class FinancialStatementsController { |
| | | |
| | | private final TErpProcurementService erpProcurementService; |
| | | private final TokenService tokenService; |
| | | private final ISysUserService sysUserService; |
| | | private final TCrmSupplierService crmSupplierService; |
| | | private final TCrmClinicService crmClinicService; |
| | | private final TSysAppUserService sysAppUserService; |
| | | private final TCrmClinicPointsService crmClinicPointsService; |
| | | private final TSysOrderService sysOrderService; |
| | | |
| | | @Autowired |
| | | public FinancialStatementsController(TErpProcurementService erpProcurementService, TokenService tokenService, ISysUserService sysUserService, TCrmSupplierService crmSupplierService, TCrmClinicService crmClinicService, TSysAppUserService sysAppUserService, TCrmClinicPointsService crmClinicPointsService, TSysOrderService sysOrderService) { |
| | | this.erpProcurementService = erpProcurementService; |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | | this.crmSupplierService = crmSupplierService; |
| | | this.crmClinicService = crmClinicService; |
| | | this.sysAppUserService = sysAppUserService; |
| | | this.crmClinicPointsService = crmClinicPointsService; |
| | | this.sysOrderService = sysOrderService; |
| | | } |
| | | |
| | | /** |
| | | * 诊所采购报表 |
| | | */ |
| | | @ApiOperation(value = "诊所采购报表-平台-供应商-诊所共用") |
| | | @PostMapping(value = "/clinicProcurementReport") |
| | | public R<PageInfo<ClinicProcurementReportVO>> clinicProcurementReport(@RequestBody ClinicProcurementReportQuery query) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | if (Objects.equals(roleType, 4)) { |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setSupplierId(crmSupplier.getId()); |
| | | } |
| | | if (Objects.equals(roleType, 5)) { |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setClinicId(crmClinic.getId()); |
| | | } |
| | | |
| | | PageInfo<ClinicProcurementReportVO> pageInfo = erpProcurementService.clinicProcurementReport(query); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | @Log(title = "财务报表-诊所采购报表导出-诊所", businessType = BusinessType.EXPORT) |
| | | @ApiOperation(value = "诊所采购报表导出-诊所") |
| | | @PostMapping("/exportProcurementReportClinic") |
| | | public void exportProcurementReportClinic(@RequestBody ClinicProcurementReportQuery query){ |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | if (Objects.equals(roleType, 4)) { |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setSupplierId(crmSupplier.getId()); |
| | | } |
| | | if (Objects.equals(roleType, 5)) { |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setClinicId(crmClinic.getId()); |
| | | } |
| | | List<ProcurementReportClinicExport> procurementReportClinicExports = erpProcurementService.exportProcurementReportClinic(query); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ProcurementReportClinicExport.class, procurementReportClinicExports); |
| | | 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(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Log(title = "财务报表-诊所采购报表导出-供应商", businessType = BusinessType.EXPORT) |
| | | @ApiOperation(value = "诊所采购报表导出-供应商") |
| | | @PostMapping("/exportProcurementReportSupplier") |
| | | public void exportProcurementReportSupplier(@RequestBody ClinicProcurementReportQuery query){ |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | if (Objects.equals(roleType, 4)) { |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setSupplierId(crmSupplier.getId()); |
| | | } |
| | | if (Objects.equals(roleType, 5)) { |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setClinicId(crmClinic.getId()); |
| | | } |
| | | List<ProcurementReportSupplierExport> procurementReportSupplierExports = erpProcurementService.exportProcurementReportSupplier(query); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ProcurementReportSupplierExport.class, procurementReportSupplierExports); |
| | | 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(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Log(title = "财务报表-诊所采购报表导出-平台", businessType = BusinessType.EXPORT) |
| | | @ApiOperation(value = "诊所采购报表导出-平台") |
| | | @PostMapping("/exportProcurementReportPlatform") |
| | | public void exportProcurementReportPlatform(@RequestBody ClinicProcurementReportQuery query){ |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | query.setRoleType(roleType); |
| | | if (Objects.equals(roleType, 4)) { |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setSupplierId(crmSupplier.getId()); |
| | | } |
| | | if (Objects.equals(roleType, 5)) { |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setClinicId(crmClinic.getId()); |
| | | } |
| | | List<ProcurementReportPlatformExport> procurementReportPlatformExports = erpProcurementService.exportProcurementReportPlatform(query); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ProcurementReportPlatformExport.class, procurementReportPlatformExports); |
| | | 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(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | public R<List<TSysActivity>> list() { |
| | | return R.ok(sysActivityService.list(Wrappers.lambdaQuery(TSysActivity.class).orderByDesc(TSysActivity::getCreateTime))); |
| | | } |
| | | /** |
| | | * 获取热门活动管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取热门活动列表-banner使用") |
| | | @PostMapping(value = "/listBanner") |
| | | public R<List<TSysActivity>> listBanner() { |
| | | return R.ok(sysActivityService.list(Wrappers.lambdaQuery(TSysActivity.class) |
| | | .eq(TSysActivity::getStatus,1) |
| | | .eq(TSysActivity::getShowType,1) |
| | | .orderByDesc(TSysActivity::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加热门活动管理 |
| | |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysActivity; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.query.TSysEducationalInfoQuery; |
| | | import com.ruoyi.system.service.TSysEducationalInfoService; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取教育资讯管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取教育资讯列表-banner使用") |
| | | @PostMapping(value = "/listBanner") |
| | | public R<List<TSysEducationalInfo>> listBanner() { |
| | | return R.ok(sysEducationalInfoService.list(Wrappers.lambdaQuery(TSysEducationalInfo.class) |
| | | .eq(TSysEducationalInfo::getStatus,1) |
| | | .eq(TSysEducationalInfo::getShowType,1) |
| | | .orderByDesc(TSysEducationalInfo::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加教育资讯管理 |
| | | */ |
| | | @Log(title = "教育资讯信息-新增教育资讯", businessType = BusinessType.INSERT) |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.model.TSysLive; |
| | | import com.ruoyi.system.model.TSysProductIntroduction; |
| | | import com.ruoyi.system.query.TSysLiveQuery; |
| | |
| | | public R<List<TSysLive>> list() { |
| | | return R.ok(sysLiveService.list(Wrappers.lambdaQuery(TSysLive.class).orderByDesc(TSysLive::getCreateTime))); |
| | | } |
| | | /** |
| | | * 获取直播管理管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取直播管理列表-banner使用") |
| | | @PostMapping(value = "/listBanner") |
| | | public R<List<TSysLive>> listBanner() { |
| | | return R.ok(sysLiveService.list(Wrappers.lambdaQuery(TSysLive.class) |
| | | .orderByDesc(TSysLive::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加直播管理管理 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取产品介绍管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取产品介绍列表-banner使用") |
| | | @PostMapping(value = "/listBanner") |
| | | public R<List<TSysProductIntroduction>> listBanner() { |
| | | return R.ok(sysProductIntroductionService.list(Wrappers.lambdaQuery(TSysProductIntroduction.class) |
| | | .eq(TSysProductIntroduction::getStatus,1) |
| | | .eq(TSysProductIntroduction::getShowType,1) |
| | | .orderByDesc(TSysProductIntroduction::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加产品介绍管理 |
| | | */ |
| | | @Log(title = "产品介绍信息-新增产品介绍", businessType = BusinessType.INSERT) |
| | |
| | | if(code != 200){ |
| | | return R.fail("单点登录失败"); |
| | | } |
| | | code = aiUtil.initUser(userId, sysAppUser.getNickName(), sysAppUser.getSex(), DateUtils.localDateTimeToString(sysAppUser.getBirthTime())).getCode(); |
| | | code = aiUtil.initUser(userId, sysAppUser.getNickName(), sysAppUser.getSex(), sysAppUser.getBirthTime().toString()).getCode(); |
| | | if(code != 200){ |
| | | return R.fail("初始化用户失败"); |
| | | } |
| New file |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.utils.util.ObsUploadUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * <p> |
| | | * obs文件上传 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-09-11 |
| | | */ |
| | | @Api(tags = "obs文件上传") |
| | | @RestController |
| | | @RequestMapping("/obs-upload") |
| | | public class TSysObsUploadController { |
| | | /** |
| | | * obs文件上传 |
| | | */ |
| | | @ApiOperation(value = "obs文件上传") |
| | | @PostMapping(value = "/upload", headers = "content-type=multipart/form-data") |
| | | public R<String> upload(@RequestParam(value = "file") MultipartFile file) { |
| | | try { |
| | | String url = ObsUploadUtil.obsUpload(file); |
| | | return R.ok(url); |
| | | } catch (IOException e) { |
| | | return R.fail("上传失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| 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; |
| | | |
| | | @Data |
| | | @ApiModel(value = "诊所采购报表ProcurementReportClinicExport") |
| | | public class ProcurementReportClinicExport implements Serializable { |
| | | private String id; |
| | | @Excel(name = "采购单号", width = 20) |
| | | private String procurementCode; |
| | | @Excel(name = "采购金额", width = 20) |
| | | private BigDecimal payMoney; |
| | | @Excel(name = "采购药品数", width = 20) |
| | | private Integer procurementGoodsNum; |
| | | @Excel(name = "采购供应商", width = 20) |
| | | private String supplierName; |
| | | @Excel(name = "采购时间", width = 20) |
| | | private String payTimeStr; |
| | | @Excel(name = "状态", width = 20,replace = {"草稿_1","待支付_2","待发货_3","已发货_4","已入库_5","已取消_6"}) |
| | | private Integer status; |
| | | private LocalDateTime payTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.export; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | 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; |
| | | |
| | | @Data |
| | | @ApiModel(value = "平台采购报表ProcurementReportPlatformExport") |
| | | public class ProcurementReportPlatformExport implements Serializable { |
| | | private String id; |
| | | @Excel(name = "诊所名称", width = 20) |
| | | private String clinicName; |
| | | @Excel(name = "采购供应商", width = 20) |
| | | private String supplierName; |
| | | @Excel(name = "采购单号", width = 20) |
| | | private String procurementCode; |
| | | @Excel(name = "采购时间", width = 20) |
| | | private String payTimeStr; |
| | | @Excel(name = "采购金额", width = 20) |
| | | private BigDecimal payMoney; |
| | | @Excel(name = "状态", width = 20,replace = {"草稿_1","待支付_2","待发货_3","已发货_4","已入库_5","已取消_6"}) |
| | | private Integer status; |
| | | private LocalDateTime payTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.export; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | 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; |
| | | |
| | | @Data |
| | | @ApiModel(value = "供应商采购报表ProcurementReportSupplierExport") |
| | | public class ProcurementReportSupplierExport implements Serializable { |
| | | private String id; |
| | | @Excel(name = "诊所名称", width = 20) |
| | | private String clinicName; |
| | | @Excel(name = "管理员", width = 20) |
| | | private String personChargeName; |
| | | @Excel(name = "联系电话", width = 20) |
| | | private String phone; |
| | | @Excel(name = "采购单号", width = 20) |
| | | private String procurementCode; |
| | | @Excel(name = "采购时间", width = 20) |
| | | private String payTimeStr; |
| | | @Excel(name = "采购金额", width = 20) |
| | | private BigDecimal payMoney; |
| | | @Excel(name = "供应商获得金额", width = 20) |
| | | private BigDecimal money; |
| | | @Excel(name = "平台分佣金额", width = 20) |
| | | private BigDecimal supplierMoney; |
| | | @Excel(name = "状态", width = 20,replace = {"草稿_1","待支付_2","待发货_3","已发货_4","已入库_5","已取消_6"}) |
| | | private Integer status; |
| | | private LocalDateTime payTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | 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.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.vo.*; |
| | |
| | | @Param("endTime")String endTime, |
| | | @Param("goodsName")String goodsName); |
| | | |
| | | /** |
| | | * 诊所采购报表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ClinicProcurementReportVO> clinicProcurementReport(@Param("query")ClinicProcurementReportQuery query, @Param("pageInfo")PageInfo<ClinicProcurementReportVO> pageInfo); |
| | | |
| | | /** |
| | | * 诊所采购报表导出 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ProcurementReportClinicExport> exportProcurementReportClinic(@Param("query")ClinicProcurementReportQuery query); |
| | | |
| | | /** |
| | | * 供应商-诊所采购报表导出 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ProcurementReportSupplierExport> exportProcurementReportSupplier(@Param("query")ClinicProcurementReportQuery query); |
| | | |
| | | /** |
| | | * 平台-诊所采购报表导出 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ProcurementReportPlatformExport> exportProcurementReportPlatform(@Param("query")ClinicProcurementReportQuery query); |
| | | List<TErpProcurementGoods> branchAdminStatisticsThree(@Param("clinicIds") List<String> clinicIds); |
| | | |
| | | } |
| | |
| | | @TableField("nick_name") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | @TableField("avatar") |
| | | private String avatar; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | @TableField("phone") |
| | | private String phone; |
| | |
| | | @TableField("banner_name") |
| | | private String bannerName; |
| | | |
| | | @ApiModelProperty(value = "类型 1=首页 2=商城") |
| | | @ApiModelProperty(value = "类型 1=内部 2=外部") |
| | | @TableField("banner_type") |
| | | private Integer bannerType; |
| | | |
| | |
| | | @TableField("sort_by") |
| | | private String sortBy; |
| | | |
| | | @ApiModelProperty(value = "跳转类型 1=AI问诊 2=资讯 3=直播 4=产品 5=活动") |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "内容id 资讯 直播 产品 活动") |
| | | @TableField("content_id") |
| | | private String contentId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.model.TimeRangeQueryBody; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "诊所采购报表ClinicProcurementReportQuery") |
| | | public class ClinicProcurementReportQuery extends TimeRangeQueryBody { |
| | | |
| | | @ApiModelProperty(value = "采购单号") |
| | | private String procurementCode; |
| | | |
| | | @ApiModelProperty(value = "供应商名称") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty(value = "诊所名称") |
| | | private String clinicName; |
| | | |
| | | @ApiModelProperty(value = "状态 1=草稿 2=待支付 3=待发货 4=已发货 5=已入库 6=已取消") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "管理员") |
| | | private String personChargeName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "诊所id 前端忽略") |
| | | private String clinicId; |
| | | @ApiModelProperty(value = "供应商id 前端忽略") |
| | | private String supplierId; |
| | | @ApiModelProperty(value = "前端忽略") |
| | | private Integer roleType; |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.system.dto.AddProcurementDto; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.model.TErpGoods; |
| | | import com.ruoyi.system.model.TErpProcurement; |
| | | import com.ruoyi.system.model.TErpProcurementGoods; |
| | | import com.ruoyi.system.query.ClinicProcurementReportQuery; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.vo.*; |
| | |
| | | */ |
| | | List<TErpProcurementGoods> branchAdminStatisticsThree(List<String> clinicIds); |
| | | |
| | | |
| | | /** |
| | | * 诊所采购报表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<ClinicProcurementReportVO> clinicProcurementReport(ClinicProcurementReportQuery query); |
| | | |
| | | /** |
| | | * 诊所采购报表导出 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ProcurementReportClinicExport> exportProcurementReportClinic(ClinicProcurementReportQuery query); |
| | | |
| | | /** |
| | | * 供应商采购报表导出 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ProcurementReportSupplierExport> exportProcurementReportSupplier(ClinicProcurementReportQuery query); |
| | | |
| | | /** |
| | | * 平台采购报表导出 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | List<ProcurementReportPlatformExport> exportProcurementReportPlatform(ClinicProcurementReportQuery query); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.system.dto.AddProcurementDto; |
| | | import com.ruoyi.system.export.ProcurementReportClinicExport; |
| | | import com.ruoyi.system.export.ProcurementReportPlatformExport; |
| | | import com.ruoyi.system.export.ProcurementReportSupplierExport; |
| | | import com.ruoyi.system.mapper.*; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.ClinicProcurementReportQuery; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpProcurementQuery; |
| | | import com.ruoyi.system.service.TErpGoodsService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.net.ssl.SSLContext; |
| | |
| | | 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; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | return this.baseMapper.branchAdminStatisticsThree(clinicIds); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<ClinicProcurementReportVO> clinicProcurementReport(ClinicProcurementReportQuery query) { |
| | | PageInfo<ClinicProcurementReportVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<ClinicProcurementReportVO> list = this.baseMapper.clinicProcurementReport(query, pageInfo); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return pageInfo; |
| | | } |
| | | List<String> procurementIds = list.stream().map(TErpProcurement::getId).collect(Collectors.toList()); |
| | | List<TErpProcurementGoods> erpProcurementGoods = erpProcurementGoodsMapper.selectList(new QueryWrapper<TErpProcurementGoods>().lambda().in(TErpProcurementGoods::getProcurementId, procurementIds)); |
| | | for (ClinicProcurementReportVO clinicProcurementReportVO : list) { |
| | | List<TErpProcurementGoods> procurementGoods = erpProcurementGoods.stream().filter(tErpProcurementGoods -> tErpProcurementGoods.getProcurementId().equals(clinicProcurementReportVO.getId())).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(procurementGoods)){ |
| | | int sum = procurementGoods.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum(); |
| | | clinicProcurementReportVO.setProcurementGoodsNum(sum); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public List<ProcurementReportClinicExport> exportProcurementReportClinic(ClinicProcurementReportQuery query) { |
| | | List<ProcurementReportClinicExport> list = this.baseMapper.exportProcurementReportClinic(query); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<String> procurementIds = list.stream().map(ProcurementReportClinicExport::getId).collect(Collectors.toList()); |
| | | List<TErpProcurementGoods> erpProcurementGoods = erpProcurementGoodsMapper.selectList(new QueryWrapper<TErpProcurementGoods>().lambda().in(TErpProcurementGoods::getProcurementId, procurementIds)); |
| | | for (ProcurementReportClinicExport procurementReportClinicExport : list) { |
| | | List<TErpProcurementGoods> procurementGoods = erpProcurementGoods.stream().filter(tErpProcurementGoods -> tErpProcurementGoods.getProcurementId().equals(procurementReportClinicExport.getId())).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(procurementGoods)){ |
| | | int sum = procurementGoods.stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum(); |
| | | procurementReportClinicExport.setProcurementGoodsNum(sum); |
| | | } |
| | | if(Objects.nonNull(procurementReportClinicExport.getPayTime())){ |
| | | String payTimeStr = new SimpleDateFormat("yyyy-MM-dd").format(procurementReportClinicExport.getPayTime()); |
| | | procurementReportClinicExport.setPayTimeStr(payTimeStr); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<ProcurementReportSupplierExport> exportProcurementReportSupplier(ClinicProcurementReportQuery query) { |
| | | List<ProcurementReportSupplierExport> list = this.baseMapper.exportProcurementReportSupplier(query); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | for (ProcurementReportSupplierExport procurementReportSupplierExport : list) { |
| | | if(Objects.nonNull(procurementReportSupplierExport.getPayTime())){ |
| | | String payTimeStr = new SimpleDateFormat("yyyy-MM-dd").format(procurementReportSupplierExport.getPayTime()); |
| | | procurementReportSupplierExport.setPayTimeStr(payTimeStr); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<ProcurementReportPlatformExport> exportProcurementReportPlatform(ClinicProcurementReportQuery query) { |
| | | List<ProcurementReportPlatformExport> list = this.baseMapper.exportProcurementReportPlatform(query); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | for (ProcurementReportPlatformExport procurementReportPlatformExport : list) { |
| | | if(Objects.nonNull(procurementReportPlatformExport.getPayTime())){ |
| | | String payTimeStr = new SimpleDateFormat("yyyy-MM-dd").format(procurementReportPlatformExport.getPayTime()); |
| | | procurementReportPlatformExport.setPayTimeStr(payTimeStr); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TErpProcurement; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | | @Data |
| | | @ApiModel(value = "诊所采购报表ClinicProcurementReportVO") |
| | | public class ClinicProcurementReportVO extends TErpProcurement { |
| | | |
| | | @ApiModelProperty(value = "采购药品数") |
| | | private Integer procurementGoodsNum=0; |
| | | @ApiModelProperty(value = "采购供应商") |
| | | private String supplierName; |
| | | @ApiModelProperty(value = "采购诊所") |
| | | private String clinicName; |
| | | } |
| | |
| | | #{item} |
| | | </foreach> |
| | | </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, |
| | | 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 |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | <select id="exportProcurementReportClinic" |
| | | resultType="com.ruoyi.system.export.ProcurementReportClinicExport"> |
| | | 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, |
| | | 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 |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | <select id="exportProcurementReportSupplier" |
| | | resultType="com.ruoyi.system.export.ProcurementReportSupplierExport"> |
| | | 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, |
| | | 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 |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | <select id="exportProcurementReportPlatform" |
| | | resultType="com.ruoyi.system.export.ProcurementReportPlatformExport"> |
| | | 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, |
| | | 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 |
| | | left join t_crm_clinic tcc on tep.clinic_id = tcc.id |
| | | <where> |
| | | <if test="query.procurementCode != null and query.procurementCode != ''"> |
| | | and tep.procurement_code like concat('%',#{query.procurementCode},'%') |
| | | </if> |
| | | <if test="query.supplierName != null and query.supplierName != ''"> |
| | | and tcs.supplier_name like concat('%',#{query.supplierName},'%') |
| | | </if> |
| | | <if test="query.clinicName != null and query.clinicName != ''"> |
| | | and tcc.clinic_name like concat('%',#{query.clinicName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | and tep.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND tep.pay_time >= #{query.startTime} |
| | | AND tep.pay_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tep.clinic_id = #{query.clinicId} |
| | | </if> |
| | | <if test="query.supplierId != null and query.supplierId != ''"> |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | AND tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by tep.pay_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TSysAppUser"> |
| | | <id column="id" property="id" /> |
| | | <result column="nick_name" property="nickName" /> |
| | | <result column="avatar" property="avatar" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="birth_time" property="birthTime" /> |
| | | <result column="sex" property="sex" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, nick_name, phone, birth_time, sex, open_id,chronic_disease_id,status,last_reminder_time, |
| | | id, nick_name,avatar, phone, birth_time, sex, open_id,chronic_disease_id,status,last_reminder_time, |
| | | office_open_id,clinic_id, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TSysAppUserVO"> |
| | | select tsau.id, tsau.nick_name, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | select tsau.id, tsau.nick_name,tsau.avatar, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled, tsi.lastInspectionTime |
| | | from t_sys_app_user tsau |
| | |
| | | ORDER BY tsau.create_time DESC |
| | | </select> |
| | | <select id="pageChronicDiseaseUserList" resultType="com.ruoyi.system.vo.TSysAppUserVO"> |
| | | select tsau.id, tsau.nick_name, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | select tsau.id, tsau.nick_name,tsau.avatar, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled |
| | | from t_sys_app_user tsau |
| | |
| | | ORDER BY tsau.create_time DESC |
| | | </select> |
| | | <select id="exportList" resultType="com.ruoyi.system.export.TSysAppUserListExport"> |
| | | select tsau.id, tsau.nick_name, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | select tsau.id, tsau.nick_name,tsau.avatar, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled |
| | | from t_sys_app_user tsau |
| | |
| | | ORDER BY tsau.create_time DESC |
| | | </select> |
| | | <select id="exportListClinic" resultType="com.ruoyi.system.export.TSysAppUserClinicExport"> |
| | | select tsau.id, tsau.nick_name, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | select tsau.id, tsau.nick_name,tsau.avatar, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled |
| | | from t_sys_app_user tsau |
| | |
| | | ORDER BY tsau.create_time DESC |
| | | </select> |
| | | <select id="exportListAppUser" resultType="com.ruoyi.system.export.TSysAppUserExport"> |
| | | select tsau.id, tsau.nick_name, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | select tsau.id, tsau.nick_name,tsau.avatar, tsau.phone, tsau.birth_time, tsau.sex, tsau.open_id,tsau.office_open_id, |
| | | tsau.chronic_disease_id,tsau.status,tsau.last_reminder_time,tsau.clinic_id, tsau.create_time, |
| | | tsau.update_time, tsau.create_by,tsau.update_by, tsau.disabled, tsi.lastInspectionTime |
| | | from t_sys_app_user tsau |
| | |
| | | <result column="pictures" property="pictures" /> |
| | | <result column="url_link" property="urlLink" /> |
| | | <result column="sort_by" property="sortBy" /> |
| | | <result column="jump_type" property="jumpType" /> |
| | | <result column="content_id" property="contentId" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, banner_name, banner_type, pictures, url_link, sort_by, create_time, update_time, create_by, update_by, disabled |
| | | id, banner_name, banner_type, pictures, url_link, sort_by,jump_type, content_id, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TSysBanner"> |
| | | select |