Merge branch 'jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' of http://182.92.166.109:3000/jihan/xinelu-api into jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支

 Conflicts:
	xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/consultationInfo/ConsultationInfoController.java
This commit is contained in:
haown 2023-10-24 14:32:54 +08:00
commit 17145f6242
25 changed files with 461 additions and 32 deletions

View File

@ -32,7 +32,7 @@ public class ResidentServiceApplyController extends BaseController {
@Resource
private IResidentServiceAppletService residentServiceAppletService;
@ApiOperation("提交服务申请")
@ApiOperation("提交服务预约")
@PostMapping("/save")
public R<?> save(@RequestBody ResidentServiceApplyBody body) {
if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) {
@ -45,14 +45,14 @@ public class ResidentServiceApplyController extends BaseController {
return R.ok();
}
@ApiOperation("取消服务申请")
@ApiOperation("取消服务预约")
@GetMapping("/cancel/{bookingNo}")
public R<?> cancel(@PathVariable String bookingNo) {
residentServiceAppletService.cancel(bookingNo);
return R.ok();
}
@ApiOperation("服务申请列表")
@ApiOperation("服务预约列表")
@PostMapping("/list")
public TableDataInfo performanceBookingList(@RequestBody ApplyQuery query) {
if (StringUtils.isBlank(query.getIdentity())) {
@ -67,7 +67,7 @@ public class ResidentServiceApplyController extends BaseController {
}
}
@ApiOperation("服务申请详情")
@ApiOperation("服务预约详情")
@GetMapping("/detail/{bookingNo}")
public R<ResidentServiceApplyVo> performanceBookingDetail(@PathVariable String bookingNo) {
return R.ok(residentServiceAppletService.detail(bookingNo));
@ -78,4 +78,19 @@ public class ResidentServiceApplyController extends BaseController {
public R<List<ScreeningProjectVo>> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) {
return R.ok(residentServiceAppletService.getForm(identity, projectName,region));
}
@ApiOperation("服务记录列表")
@PostMapping("/record")
public TableDataInfo performanceBookingRecord(@RequestBody ApplyQuery query) {
if (StringUtils.isBlank(query.getIdentity())) {
throw new ServiceException("居民身份证号不能为空");
}
try {
startPage();
return getDataTable(residentServiceAppletService.record(query));
} catch (Exception e) {
e.printStackTrace();
throw new ServiceException(e.getMessage());
}
}
}

View File

@ -203,10 +203,10 @@ public class SignInfoController extends BaseController {
return getDataTable(null, 0);
}
@ApiOperation("获取签约协议内容")
@GetMapping("/getContent/{orgNo}")
public R<ProtocolContentVo> getAreaById(@PathVariable String orgNo, @RequestHeader("region") String region) {
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + orgNo, null, String.class);
@ApiOperation(value = "获取签约协议模版内容", notes = "协议模版内容、机构公章照片base64、签约医生签名照片base64")
@GetMapping("/getContent/{userNo}")
public R<ProtocolContentVo> getAreaById(@PathVariable String userNo, @RequestHeader("region") String region) {
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + userNo, null, String.class);
JSONObject jsonObject = JSONObject.parseObject(result);
if ("0".equals(jsonObject.get("code"))) {
return R.fail(jsonObject.get("msg").toString());

View File

@ -89,6 +89,15 @@ public interface ResidentServiceApplyMapper {
* @return void
**/
void batchInsert(List<ResidentServiceApplyEntity> entity);
/**
* @Author mengkuiliang
* @Description 服务记录列表
* @Date 2023-10-13 013 14:01
* @Param [query]
* @return java.util.List<com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo>
**/
List<ResidentServiceApplyVo> getRecord(ApplyQuery query);
}

View File

@ -127,4 +127,10 @@ public class ApplyQuery {
*/
@ApiModelProperty(value = "数据范围过滤SQL", hidden = true)
private String dataScope;
/**
* 是否已评价1 2
*/
@ApiModelProperty(value = "是否已评价1 是 2 否)")
private String isEvaluate;
}

View File

@ -0,0 +1,91 @@
package com.xinelu.familydoctor.applet.pojo.vo;
import com.xinelu.common.core.domain.BaseDomain;
import com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author mengkuiliang
* @Description 服务评价对象
* @Date 2023-10-13 013 14:49
* @Param
* @return
**/
@Data
@ApiModel(value = "服务评价对象")
public class OrderEvaluateInfoVo extends BaseDomain {
/**
* 主键id
*/
private Long id;
/**
* 会员id
*/
@ApiModelProperty(value = "会员id")
private Long patientId;
/**
* 微信openid
*/
@ApiModelProperty(value = "微信openid")
private String openid;
/**
* 微信unionid
*/
@ApiModelProperty(value = "微信unionid")
private String unionid;
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号")
private String orderNo;
/**
* 服务编号
*/
@ApiModelProperty(value = "服务编号")
private String serviceCode;
/**
* 评价内容
*/
@ApiModelProperty(value = "评价内容")
private String evaluateContent;
/**
* 手机AppPHONE_APP微信小程序WE_CHAT_APPLET
*/
@ApiModelProperty(value = "手机AppPHONE_APP微信小程序WE_CHAT_APPLET")
private String evaluateChannel;
/**
* 预约服务满意度一般COMMONLY满意SATISFIED非常满意VERY_SATISFIED不满意()DISSATISFIED非常不满意(非常差)VERY_DISSATISFIED
*/
@ApiModelProperty(value = "预约服务满意度一般COMMONLY满意SATISFIED非常满意VERY_SATISFIED不满意(差)DISSATISFIED非常不满意(非常差)VERY_DISSATISFIED")
private String evaluateSatisfaction;
/**
* 商品订单综合评分取值1代表1颗星2代表两颗星3代表三颗星4代表四颗星5代表五颗星
*/
@ApiModelProperty(value = "商品订单综合评分取值1代表1颗星2代表两颗星3代表三颗星4代表四颗星5代表五颗星")
private Integer compositeScore;
/**
* 订单来源泉医模块SPRING_DOCTOR家医模块FAMILY_DOCTOR
*/
@ApiModelProperty(value = "订单来源泉医模块SPRING_DOCTOR家医模块FAMILY_DOCTOR")
private String orderSource;
/**
* 订单评价图片信息
*/
@ApiModelProperty(value = "订单评价图片信息")
private List<OrderEvaluatePictureInfo> orderEvaluatePictureInfoList;
}

View File

@ -43,4 +43,16 @@ public class ProtocolContentVo {
*/
@ApiModelProperty(value = "内容")
private String content;
/**
* 医生签名照片Base64
*/
@ApiModelProperty(value = "医生签名照片Base64")
private String doctorBase64;
/**
* 机构公章照片Base64
*/
@ApiModelProperty(value = "机构公章照片Base64")
private String orgBase64;
}

View File

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @Author mengkuiliang
@ -93,14 +94,14 @@ public class ResidentServiceApplyVo {
* 预约时间
*/
@ApiModelProperty("预约时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date bookingTime;
/**
* 申请时间
*/
@ApiModelProperty("申请时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date applyTime;
/**
@ -113,14 +114,14 @@ public class ResidentServiceApplyVo {
* 取消时间
*/
@ApiModelProperty("取消时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date cancelTime;
/**
* 完成时间
*/
@ApiModelProperty("完成时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date completeTime;
/**
@ -139,7 +140,7 @@ public class ResidentServiceApplyVo {
* 审批时间
*/
@ApiModelProperty("审批时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date approvalTime;
/**
@ -160,4 +161,10 @@ public class ResidentServiceApplyVo {
@ApiModelProperty("评价编号")
private String evaluateNo;
/**
* 服务评价对象
*/
@ApiModelProperty("服务评价对象")
OrderEvaluateInfoVo orderEvaluateInfo;
}

View File

@ -3,6 +3,7 @@ package com.xinelu.familydoctor.applet.pojo.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -61,4 +62,16 @@ public class SignInfoDataVo {
*/
@ApiModelProperty(value = "机构公章照片Base64")
private String orgBase64;
/**
* 服务包签约价格
*/
@ApiModelProperty(value = "服务包签约价格")
private BigDecimal packSignCost;
/**
* 签约周期
*/
@ApiModelProperty(value = "签约周期(年)")
private Integer signYears;
}

View File

@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

View File

@ -105,4 +105,13 @@ public interface IResidentServiceAppletService {
* @return java.lang.Object
**/
List<ScreeningProjectVo> getForm(String identity, String projectName, String region);
/**
* @Author mengkuiliang
* @Description 服务记录列表
* @Date 2023-10-13 013 13:41
* @Param [query]
* @return java.util.List<?>
**/
List<ResidentServiceApplyVo> record(ApplyQuery query);
}

View File

@ -88,6 +88,9 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
// 审批状态0:待批准 1:已同意 2:已拒绝
entity.setApprovalStatus("0");
entity.setBookingNo(IdUtils.simpleUUID());
if(StringUtils.isBlank(entity.getServiceWay())) {
entity.setServiceWay("2");
}
residentServiceApplyMapper.insert(entity);
}
@ -325,6 +328,24 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
}
return projectList;
}
/**
* @Author mengkuiliang
* @Description 服务记录列表
* @Date 2023-10-13 013 13:56
* @Param [query]
* @return java.util.List<com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo>
**/
@Override
public List<ResidentServiceApplyVo> record(ApplyQuery query) {
if (query.getStartDate() != null) {
query.setStartDate(DateUtils.parseDate(DateUtils.parseDateToStr("yyyy-MM-dd 00:00:00", query.getStartDate())));
}
if (query.getEndDate() != null) {
query.setEndDate(DateUtils.parseDate(DateUtils.parseDateToStr("yyyy-MM-dd 23:59:59", query.getEndDate())));
}
return residentServiceApplyMapper.getRecord(query);
}
}

View File

@ -32,6 +32,56 @@
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="ServiceApplyRecordMap" type="com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo">
<result property="bookingNo" column="booking_no" jdbcType="VARCHAR"/>
<result property="patientId" column="patient_id" jdbcType="VARCHAR"/>
<result property="residentName" column="resident_name" jdbcType="VARCHAR"/>
<result property="identity" column="identity" jdbcType="VARCHAR"/>
<result property="packageNo" column="package_no" jdbcType="VARCHAR"/>
<result property="packageName" column="package_name" jdbcType="VARCHAR"/>
<result property="formNo" column="form_no" jdbcType="VARCHAR"/>
<result property="formName" column="form_name" jdbcType="VARCHAR"/>
<result property="serviceWay" column="service_way" jdbcType="VARCHAR"/>
<result property="bookingTime" column="booking_time" jdbcType="TIMESTAMP"/>
<result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
<result property="bookingStatus" column="booking_status" jdbcType="VARCHAR"/>
<result property="cancelTime" column="cancel_time" jdbcType="TIMESTAMP"/>
<result property="completeTime" column="complete_time" jdbcType="TIMESTAMP"/>
<result property="approvalStatus" column="approval_status" jdbcType="VARCHAR"/>
<result property="refuseReason" column="refuse_reason" jdbcType="VARCHAR"/>
<result property="approvalTime" column="approval_time" jdbcType="TIMESTAMP"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<!-- 服务评价 -->
<association property="orderEvaluateInfo" notNullColumn="service_code" javaType="com.xinelu.familydoctor.applet.pojo.vo.OrderEvaluateInfoVo">
<result property="id" column="id"/>
<result property="openid" column="openid"/>
<result property="unionid" column="unionid"/>
<result property="orderNo" column="order_no"/>
<result property="serviceCode" column="service_code"/>
<result property="evaluateContent" column="evaluate_content"/>
<result property="evaluateChannel" column="evaluate_channel"/>
<result property="evaluateSatisfaction" column="evaluate_satisfaction"/>
<result property="compositeScore" column="composite_score"/>
<result property="orderSource" column="order_source"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<collection property="orderEvaluatePictureInfoList" notNullColumn="evaluate_picture_url" javaType="java.util.List" resultMap="OrderEvaluatePictureInfoMap"/>
</association>
</resultMap>
<!--评价图片-->
<resultMap type="com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo" id="OrderEvaluatePictureInfoMap">
<result property="id" column="id"/>
<result property="orderEvaluateId" column="order_evaluate_id"/>
<result property="evaluatePictureUrl" column="evaluate_picture_url"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="Base_Column_List">
id,booking_no,patient_id,
resident_name,identity,package_no,
@ -44,7 +94,7 @@
remark
</sql>
<sql id="Base_Column_List2">
<sql id="Base_Column_Service_Apply">
s.id,s.booking_no,s.patient_id,
s.resident_name,s.identity,s.package_no,
s.package_name,s.form_no,s.form_name,
@ -56,6 +106,16 @@
s.remark
</sql>
<sql id="Base_Column_Evaluate_Info">
oei.id, oei.openid, oei.unionid, oei.order_no, oei.service_code,
oei.evaluate_content, oei.evaluate_channel, oei.evaluate_satisfaction, oei.composite_score, oei.order_source,
oei.create_by, oei.create_time, oei.update_by, oei.update_time
</sql>
<sql id="Base_Column_Evaluate_Picture">
oepi.id, oepi.order_evaluate_id, oepi.evaluate_picture_url, oepi.create_by, oepi.create_time, oepi.update_by, oepi.update_time
</sql>
<sql id="Insert_Column_List">
booking_no,patient_id,
resident_name,identity,package_no,
@ -190,7 +250,7 @@
</update>
<select id="findByBody" resultType="com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo">
select <include refid="Base_Column_List2"></include>,p.address,p.phone
select <include refid="Base_Column_Service_Apply"></include>,p.address,p.phone
from resident_service_apply s
left join patient_info p on p.patient_code = s.patient_id
where 1=1
@ -248,6 +308,30 @@
select <include refid="Base_Column_List"></include> from resident_service_apply where booking_no = #{bookingNo}
</select>
<!-- 服务记录列表 -->
<select id="getRecord" resultMap="ServiceApplyRecordMap">
select <include refid="Base_Column_Service_Apply"></include>,
<include refid="Base_Column_Evaluate_Info"></include>,
<include refid="Base_Column_Evaluate_Picture"></include>
from resident_service_apply s
left join order_evaluate_info oei on oei.service_code = s.booking_no and oei.order_source = 'FAMILY_DOCTOR'
left join order_evaluate_picture_info oepi on oepi.order_evaluate_id = oei.id
where 1=1
<if test="identity != null and identity != ''">
and s.identity = #{identity}
</if>
<if test="startDate != null">
and s.booking_time >= #{startDate}
</if>
<if test="endDate != null">
and s.booking_time &lt;= #{endDate}
</if>
<choose>
<when test="isEvaluate == 1">and oei.id is not null</when>
<when test="isEvaluate == 2">and oei.id is null</when>
</choose>
</select>
<update id="updateEx">
update resident_service_apply
<set>

View File

@ -46,7 +46,6 @@ public class ConsultationInfoController extends BaseController {
/**
* 查询在线问诊-问诊信息列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(ConsultationInfoDTO consultationInfoDTO) {
startPage();
@ -54,11 +53,9 @@ public class ConsultationInfoController extends BaseController {
return getDataTable(list);
}
/**
* 获取在线问诊-问诊信息详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:query')")
@ApiOperation(value = "获取在线问诊-问诊信息详细信息")
@GetMapping(value = "/{id}")
public R<ConsultationInfoDTO> getInfo(@PathVariable("id") Long id) {
@ -68,7 +65,6 @@ public class ConsultationInfoController extends BaseController {
/**
* 新增在线问诊-问诊信息
*/
// @PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "在线问诊-问诊信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated(Insert.class) @RequestBody ConsultationInfoDTO consultationInfoDTO) {
@ -78,14 +74,12 @@ public class ConsultationInfoController extends BaseController {
/**
* 修改在线问诊-问诊信息(修改问诊状态)
*/
// @PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "在线问诊-问诊信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ConsultationInfo consultationInfo) {
return toAjax(consultationInfoService.updateConsultationInfo(consultationInfo));
}
/**
* 问诊资料上传接口
*/
@ -99,5 +93,4 @@ public class ConsultationInfoController extends BaseController {
}
return consultationInfoService.uploadConsultationFile(multipartFile);
}
}

View File

@ -46,7 +46,7 @@ public class NursingOrderController extends BaseController {
* 根据护理人id以及订单状态查询订单信息
*/
@MobileRequestAuthorization
@GetMapping("/goodsOrder")
@PostMapping("/goodsOrder")
public TableDataInfo goodsOrder(@RequestBody AppletGoodsOrderVO goodsOrderVO) {
startPage();
List<AppletGoodsOrderVO> goodsOrder = nursingOrderService.getGoodsOrder(goodsOrderVO);
@ -105,6 +105,6 @@ public class NursingOrderController extends BaseController {
if (Objects.isNull(nurseOrder) || Objects.isNull(nurseOrder.getParentId()) || StringUtils.isBlank(nurseOrder.getCardNo()) || StringUtils.isBlank(nurseOrder.getOrderStatus())) {
return getDataTable(new ArrayList<>());
}
return getDataTable(nursingOrderService.getAppletOrderList(nurseOrder));
return nursingOrderService.getAppletOrderList(nurseOrder);
}
}

View File

@ -4,9 +4,9 @@ package com.xinelu.applet.service.nursingorder;
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO;
import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
import com.xinelu.applet.vo.nursingorder.PatientOrder;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
import java.util.List;
@ -64,5 +64,5 @@ public interface INursingOrderService {
* @param nurseOrder nurseOrder
* @return AjaxResult
*/
List<PatientOrder> getAppletOrderList(NurseOrderDTO nurseOrder);
TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder);
}

View File

@ -2,6 +2,7 @@ package com.xinelu.applet.service.nursingorder.impl;
import com.alibaba.fastjson2.JSON;
import com.github.pagehelper.PageInfo;
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
import com.xinelu.applet.mapper.nursingorder.NursingOrderMapper;
import com.xinelu.applet.service.nursingorder.INursingOrderService;
@ -10,8 +11,10 @@ import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
import com.xinelu.applet.vo.nursingorder.PatientOrder;
import com.xinelu.applet.vo.nursingorder.PatientOrderVO;
import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO;
import com.xinelu.common.constant.HttpStatus;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.ConfirmRefundStatusEnum;
import com.xinelu.common.enums.GooodsOrderStatusEnum;
import com.xinelu.common.enums.OrderSourceEnum;
@ -135,7 +138,7 @@ public class NursingOrderServiceImpl implements INursingOrderService {
* @return AjaxResult
*/
@Override
public List<PatientOrder> getAppletOrderList(NurseOrderDTO nurseOrder) {
public TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder) {
List<PatientOrder> patientOrders = new ArrayList<>();
List<PatientOrder> appletOrderList = new ArrayList<>();
List<PatientOrder> goodsOrderAndConsultationOrder = new ArrayList<>();
@ -160,7 +163,7 @@ public class NursingOrderServiceImpl implements INursingOrderService {
}
String result = HttpUtils.sendGet(SpringUtils.getFdUrl(nurseOrder.getRegion()) + "/performance/recordV2/" + nurseOrder.getCardNo());
if (StringUtils.isBlank(result)) {
throw new ServiceException("获取微信小程序用户信息失败", 201);
throw new ServiceException("获取家医小程序用户订单信息失败", 201);
}
PatientOrderVO resultHttp = JSON.parseObject(result, PatientOrderVO.class);
if (Objects.nonNull(resultHttp) && CollectionUtils.isNotEmpty(resultHttp.getData()) && Objects.nonNull(resultHttp.getData().get(0).getOrderNo())) {
@ -182,10 +185,15 @@ public class NursingOrderServiceImpl implements INursingOrderService {
patientOrders.addAll(data);
}
}
TableDataInfo rspData = new TableDataInfo();
rspData.setTotal(new PageInfo(patientOrders).getTotal());
if (CollectionUtils.isNotEmpty(patientOrders)) {
Collections.sort(patientOrders, Comparator.comparing(PatientOrder::getCreateTime, (u1, u2) -> u2.compareTo(u1)));
patientOrders = patientOrders.stream().skip((nurseOrder.getPageNum() - 1) * nurseOrder.getPageSize()).limit(nurseOrder.getPageSize()).collect(Collectors.toList());
}
return patientOrders;
rspData.setRows(patientOrders);
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
return rspData;
}
}

View File

@ -160,6 +160,7 @@ public class PatientAndDiseaseVO implements Serializable {
private String disease;
private String signNo;
/**
* 基础疾病信息
*/

View File

@ -25,6 +25,7 @@
<result property="disablingReason" column="disabling_reason"/>
<result property="patientCode" column="patient_code"/>
<result property="disease" column="disease"/>
<result property="signNo" column="sign_no"/>
<collection property="patientDiseaseInfoList" javaType="java.util.List" resultMap="PatientDiseaseInfoResult"/>
</resultMap>
@ -83,6 +84,7 @@
pi.disabling_reason,
pi.patient_code,
pi.disease,
pi.sign_no,
pdi.id patientDiseaseId,
pdi.disease_id,
pdi.disease_name,

View File

@ -155,8 +155,8 @@
<if test="orderType != null and orderType != ''">
and gr.order_type = #{orderType}
</if>
<if test="orderTypeList != null and orderTypeList != ''">
gr.order_typ in
<if test="orderTypeList != null and orderTypeList.size > 0">
and gr.order_type in
<foreach collection="orderTypeList" item="orderTypeList" open="(" separator="," close=")">
#{orderTypeList}
</foreach>
@ -384,7 +384,7 @@
LEFT JOIN hospital_person_info hpi ON hpi.id = gor.hospital_person_id
LEFT JOIN order_evaluate_info nei ON nei.order_no = gor.order_no
where
<if test="orderStatusList != null and orderStatusList != ''">
<if test="orderTypeList != null and orderTypeList.size > 0">
gor.order_status in
<foreach collection="orderStatusList" item="orderStatusList" open="(" separator="," close=")">
#{orderStatusList}

View File

@ -0,0 +1,36 @@
package com.xinelu.manage.controller.evaluateresult;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.service.evaluateresult.EvaluateResultService;
import com.xinelu.manage.vo.evaluateresult.EvaluateResultVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* 筛查结果统计
*/
@RestController
@RequestMapping("/system/evaluateResult")
public class EvaluateResultController extends BaseController {
@Resource
private EvaluateResultService evaluateResultService;
/**
* 根据年龄端性别统计筛查结果
* @param ageA
* @param ageB
* @param sex
* @return
*/
@GetMapping("/list/{ageA}/{ageB}/{sex}")
public TableDataInfo list(@PathVariable("ageA") String ageA, @PathVariable("ageB") String ageB,@PathVariable("sex")String sex) {
startPage();
List<EvaluateResultVo> list = evaluateResultService.list(ageA,ageB,sex);
return getDataTable(list);
}
}

View File

@ -0,0 +1,18 @@
package com.xinelu.manage.mapper.evaluateresult;
import com.xinelu.manage.vo.evaluateresult.EvaluateResultVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface EvaluateResultMapper {
/**
* 根据年龄端性别统计筛查结果
* @param startTime
* @param endTime
* @param sex
*/
List<EvaluateResultVo> list(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("sex") String sex);
}

View File

@ -0,0 +1,17 @@
package com.xinelu.manage.service.evaluateresult;
import com.xinelu.manage.vo.evaluateresult.EvaluateResultVo;
import java.util.List;
import java.util.Map;
public interface EvaluateResultService {
/**
* 根据年龄端性别统计筛查结果
* @param ageA
* @param ageB
* @param sex
* @return
*/
List<EvaluateResultVo> list(String ageA, String ageB, String sex);
}

View File

@ -0,0 +1,44 @@
package com.xinelu.manage.service.evaluateresult.impl;
import com.xinelu.manage.mapper.evaluateresult.EvaluateResultMapper;
import com.xinelu.manage.service.evaluateresult.EvaluateResultService;
import com.xinelu.manage.vo.evaluateresult.EvaluateResultVo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class EvaluateResultServiceimpl implements EvaluateResultService {
@Resource
private EvaluateResultMapper evaluateResultMapper;
/**
* 根据年龄端性别统计筛查结果
* @param ageA
* @param ageB
* @param sex
* @return
*/
@Override
public List<EvaluateResultVo> list(String ageA, String ageB, String sex) {
String timeMinus = "-01"+"-01";
//开始时间
String startTime = calculateBirthYear(Integer.parseInt(ageB))+timeMinus;
//结束时间
String endTime = calculateBirthYear(Integer.parseInt(ageA))+timeMinus;
return evaluateResultMapper.list(startTime, endTime, sex);
}
/**
* 年龄转日期
* @param age
* @return
*/
public static int calculateBirthYear(int age) {
int currentYear = java.time.Year.now().getValue();
int birthYear = currentYear - age;
return birthYear;
}
}

View File

@ -0,0 +1,16 @@
package com.xinelu.manage.vo.evaluateresult;
import lombok.Data;
import java.io.Serializable;
@Data
public class EvaluateResultVo implements Serializable {
/**数量*/
private Integer count;
/**结果*/
private String evaluateResult;
}

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.evaluateresult.EvaluateResultMapper">
<resultMap type="com.xinelu.manage.vo.evaluateresult.EvaluateResultVo" id="EvaluateResult">
<result property="count" column="t"/>
<result property="evaluateResult" column="evaluate_result"/>
</resultMap>
<select id="list" parameterType="String" resultMap="EvaluateResult">
select count(1) t,er.evaluate_result
from patient_info pi
left join evaluate_record er
on pi.id = er.user_id
<where>
<if test="sex != null and sex != ''">
and pi.sex = #{sex}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
and pi.birth_date BETWEEN #{startTime} and #{endTime}
</if>
</where>
group by er.evaluate_result
</select>
</mapper>