Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/haizhentong
| | |
| | | "/aiCallback/reportReturn","/t-sys-activity/list","/t-sys-activity/pageList","/t-sys-activity/getDetailById", |
| | | "/t-sys-banner/pageList","/t-sys-banner/list","/t-sys-product-introduction/pageList", |
| | | "/t-sys-product-introduction/list","/t-sys-product-introduction/getDetailById","/t-sys-config/getDetailById", |
| | | "/t-sys-educational-info/list","/t-sys-educational-info/getDetailById","/t-sys-educational-info/pageList", |
| | | "/t-sys-educational-info/list","/t-sys-educational-info/getDetailById","/t-sys-educational-info/pageList", |
| | | "/t-sys-live/list","/t-sys-live/getDetailById","/t-sys-live/pageList", |
| | | "/open/**","/cos/get/**","/openIdByJsCode","/t-sys-order/**" |
| | | ).permitAll() |
| | | // 静态资源,可匿名访问 |
| | |
| | | @TableField("end_time") |
| | | private LocalDateTime endTime; |
| | | |
| | | @NotNull(message = "预计时长不能为空") |
| | | @ApiModelProperty(value = "预计时长") |
| | | @TableField("expected_duration") |
| | | private Integer expectedDuration; |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | |
| | | import com.ruoyi.system.export.TCrmClinicAuditExport; |
| | | import com.ruoyi.system.export.TCrmClinicListExport; |
| | | import com.ruoyi.system.mapper.TCrmClinicMapper; |
| | | import com.ruoyi.system.mapper.TCrmClinicPointsMapper; |
| | | import com.ruoyi.system.model.TCrmClinic; |
| | | import com.ruoyi.system.model.TCrmClinicPoints; |
| | | import com.ruoyi.system.model.TErpProcurement; |
| | | import com.ruoyi.system.query.TCrmClinicQuery; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | |
| | | private ISysUserService sysUserService; |
| | | @Autowired |
| | | private TErpProcurementService erpProcurementService; |
| | | @Autowired |
| | | private TCrmClinicPointsMapper crmClinicPointsMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TCrmClinicVO> pageList(TCrmClinicQuery query) { |
| | |
| | | .in(TErpProcurement::getClinicId, clinicIds) |
| | | .in(TErpProcurement::getStatus, Arrays.asList(3,4,5)) |
| | | .likeRight(TErpProcurement::getCreateTime, monthDate)); |
| | | |
| | | List<TCrmClinicPoints> points = crmClinicPointsMapper.selectList(new LambdaQueryWrapper<TCrmClinicPoints>().in(TCrmClinicPoints::getClinicId, clinicIds).ge(TCrmClinicPoints::getExpireTime, new Date()).last(" and points > use_points ORDER BY create_time ASC")); |
| | | |
| | | for (TCrmClinicVO tCrmClinicVO : list) { |
| | | List<TErpProcurement> procurementList = procurements.stream().filter(procurement -> procurement.getClinicId().equals(tCrmClinicVO.getId())).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(procurementList)){ |
| | | tCrmClinicVO.setMonthPurchaseAmount(procurementList.stream().map(TErpProcurement::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | } |
| | | |
| | | if(Objects.nonNull(tCrmClinicVO.getMonthPurchaseAmount()) && tCrmClinicVO.getMonthPurchaseAmount().compareTo(tCrmClinicVO.getLowProcurementMoney())>0){ |
| | | if(Objects.nonNull(tCrmClinicVO.getMonthPurchaseAmount()) && tCrmClinicVO.getMonthPurchaseAmount().compareTo(tCrmClinicVO.getLowProcurementMoney())>-1){ |
| | | tCrmClinicVO.setPerformanceStatus(2); |
| | | } |
| | | // 计算可用积分 |
| | | List<TCrmClinicPoints> pointsList = points.stream().filter(item -> item.getClinicId().equals(tCrmClinicVO.getId())).collect(Collectors.toList()); |
| | | // 可用积分 |
| | | int userPoints = pointsList.stream().mapToInt(item -> item.getPoints() - item.getUsePoints()).sum(); |
| | | tCrmClinicVO.setUserPoints(userPoints); |
| | | |
| | | } |
| | | pageInfo.setRecords(list); |
| | |
| | | .in(TErpProcurement::getClinicId, clinicIds) |
| | | .in(TErpProcurement::getStatus, Arrays.asList(3,4,5)) |
| | | .likeRight(TErpProcurement::getCreateTime, monthDate)); |
| | | |
| | | List<TCrmClinicPoints> points = crmClinicPointsMapper.selectList(new LambdaQueryWrapper<TCrmClinicPoints>().in(TCrmClinicPoints::getClinicId, clinicIds).ge(TCrmClinicPoints::getExpireTime, new Date()).last(" and points > use_points ORDER BY create_time ASC")); |
| | | |
| | | for (TCrmClinicListExport crmClinicListExport : list) { |
| | | List<TErpProcurement> procurementList = procurements.stream().filter(procurement -> procurement.getClinicId().equals(crmClinicListExport.getId())).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(procurementList)){ |
| | |
| | | crmClinicListExport.setPerformanceStatus(2); |
| | | } |
| | | |
| | | // 计算可用积分 |
| | | List<TCrmClinicPoints> pointsList = points.stream().filter(item -> item.getClinicId().equals(crmClinicListExport.getId())).collect(Collectors.toList()); |
| | | // 可用积分 |
| | | int userPoints = pointsList.stream().mapToInt(item -> item.getPoints() - item.getUsePoints()).sum(); |
| | | crmClinicListExport.setUserPoints(userPoints); |
| | | |
| | | } |
| | | return list; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "诊所名称") |
| | | private String clinicName; |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String nickName; |
| | | |
| | | } |
| | |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | |
| | | and tep.supplier_id = #{query.supplierId} |
| | | </if> |
| | | <if test="query.personChargeName != null and query.personChargeName != ''"> |
| | | and tep.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | and tcc.person_charge_name like concat('%',#{query.personChargeName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tep.phone like concat('%',#{query.phone},'%') |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id,clinic_id, inspection_info, team_code, team_name, device_code, device_name, person_name, |
| | | id, app_user_id,clinic_id, inspection_info,inspection_type, team_code, team_name, device_code, device_name, person_name, |
| | | person_sex, person_age, person_phone, person_height, person_weight, check_time, pdf_url, health_index, |
| | | constitution_names, symptom_name, tongue_feature,face_feature, disease_risks,is_pay, create_time, update_time, |
| | | create_by, update_by, disabled, create_id |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TSysInspectionVO"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_sys_inspection |
| | | tsi.id, tsi.app_user_id,tsi.clinic_id, tsi.inspection_info,tsi.inspection_type, tsi.team_code, tsi.team_name, |
| | | tsi.device_code, tsi.device_name, tsi.person_name, |
| | | tsi.person_sex, tsi.person_age, tsi.person_phone, tsi.person_height, tsi.person_weight, tsi.check_time, tsi.pdf_url, tsi.health_index, |
| | | tsi.constitution_names, tsi.symptom_name, tsi.tongue_feature,tsi.face_feature, tsi.disease_risks,tsi.is_pay, tsi.create_time, tsi.update_time, |
| | | tsi.create_by, tsi.update_by, tsi.disabled, tsi.create_id,tau.nick_name as nickName |
| | | FROM t_sys_inspection tsi |
| | | left join t_app_user tau on tsi.app_user_id = tau.id |
| | | <where> |
| | | <if test="query.appUserId != null and query.appUserId != ''"> |
| | | and app_user_id = #{query.appUserId} |
| | | and tsi.app_user_id = #{query.appUserId} |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | AND tsi.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | ORDER BY tsi.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | AND date_format(start_time,'%y%m%d %H%i%s') <= date_format(NOW(),'%y%m%d %H%i%s') |
| | | AND date_format(end_time,'%y%m%d %H%i%s') >= date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 3"> |
| | | AND date_format(end_time,'%y%m%d %H%i%s') < date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | AND date_format(end_time,'%y%m%d %H%i%s') > date_format(NOW(),'%y%m%d %H%i%s') |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | <if test="query.liveStatus == null"> |