8 changed files with 199 additions and 19 deletions
@ -0,0 +1,46 @@ |
|||
package com.acupuncture.web.controller.web; |
|||
|
|||
import com.acupuncture.common.annotation.Anonymous; |
|||
import com.acupuncture.common.core.domain.BaseDto; |
|||
import com.acupuncture.common.core.domain.JsonResponse; |
|||
import com.acupuncture.system.domain.vo.FmsFollowupDto; |
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
import com.acupuncture.system.service.FmsFollowupQueueService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
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.annotation.Resource; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.web.controller.web |
|||
* @Date 2025/2/10 16:59 |
|||
* @description: |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "随访相关") |
|||
@RestController |
|||
@RequestMapping("/followup") |
|||
public class FmsFollowupQueueController { |
|||
|
|||
@Resource |
|||
private FmsFollowupQueueService fmsFollowupQueueService; |
|||
|
|||
@ApiOperation("查询公共队列") |
|||
@PostMapping("/commonQueue") |
|||
public JsonResponse<PageInfo<FmsFollowupVo.QueueResult>> queryCommonQueue(@RequestBody @Validated BaseDto<FmsFollowupDto.QueueQuery> dto) { |
|||
if (dto.getPageNum() > 0) { |
|||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|||
} |
|||
return JsonResponse.ok(new PageInfo<>(fmsFollowupQueueService.queryCommonQueue(dto.getParam().getName()))); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.acupuncture.system.domain.vo; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.domain.vo |
|||
* @Date 2025/2/10 17:02 |
|||
* @description: |
|||
*/ |
|||
public class FmsFollowupDto { |
|||
|
|||
@Data |
|||
public static class QueueQuery { |
|||
@ApiModelProperty("队列名称") |
|||
private String name; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.acupuncture.system.domain.vo; |
|||
|
|||
import com.acupuncture.system.domain.po.FmsFollowupQueue; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.domain.vo |
|||
* @Date 2025/2/10 16:42 |
|||
* @description: |
|||
*/ |
|||
public class FmsFollowupVo { |
|||
|
|||
@Data |
|||
public static class QueueResult{ |
|||
@ApiModelProperty("") |
|||
private Long id; |
|||
@ApiModelProperty("队列名称") |
|||
private String name; |
|||
@ApiModelProperty("随访方式(0电话随访;1入户随访;2到院随访)") |
|||
private Byte followupMethod; |
|||
@ApiModelProperty("随访类型(0单次;1周期)") |
|||
private Byte followupType; |
|||
@ApiModelProperty("随访频次(cron表达式)") |
|||
private String frequency; |
|||
@ApiModelProperty("随访总月数") |
|||
private Integer followupMonth; |
|||
@ApiModelProperty("负责医生名称") |
|||
private String personInCharge; |
|||
@ApiModelProperty("负责医生账号") |
|||
private String personInChargeUsername; |
|||
@ApiModelProperty("队列状态(0启用; 1禁用)") |
|||
private Byte status; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.acupuncture.system.persist.dao; |
|||
|
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.persist.dao |
|||
* @Date 2025/2/10 16:51 |
|||
* @description: |
|||
*/ |
|||
public interface FmsFollowupDao { |
|||
|
|||
List<FmsFollowupVo.QueueResult> queryCommonQueue(@Param("name") String name); |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.acupuncture.system.service; |
|||
|
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.service |
|||
* @Date 2025/2/10 16:41 |
|||
* @description: |
|||
*/ |
|||
public interface FmsFollowupQueueService { |
|||
|
|||
/** |
|||
* 查询公共队列 |
|||
* @return |
|||
*/ |
|||
List<FmsFollowupVo.QueueResult> queryCommonQueue(String name); |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.acupuncture.system.service.impl; |
|||
|
|||
import com.acupuncture.system.domain.vo.FmsFollowupVo; |
|||
import com.acupuncture.system.persist.dao.FmsFollowupDao; |
|||
import com.acupuncture.system.service.FmsFollowupQueueService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zzc |
|||
* @Package com.acupuncture.system.service.impl |
|||
* @Date 2025/2/10 16:41 |
|||
* @description: |
|||
*/ |
|||
@Service |
|||
public class FmsFollowupQueueServiceImpl implements FmsFollowupQueueService { |
|||
|
|||
@Resource |
|||
private FmsFollowupDao fmsFollowupDao; |
|||
|
|||
@Override |
|||
public List<FmsFollowupVo.QueueResult> queryCommonQueue(String name) { |
|||
return fmsFollowupDao.queryCommonQueue(name); |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
<?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.acupuncture.system.persist.dao.FmsFollowupDao"> |
|||
|
|||
<select id="queryCommonQueue" resultType="com.acupuncture.system.domain.vo.FmsFollowupVo$QueueResult"> |
|||
select |
|||
id, |
|||
name, |
|||
followup_method as followupMethod, |
|||
followup_type as followupType, |
|||
frequency, |
|||
followup_month as followupMonth, |
|||
person_in_charge as personInCharge, |
|||
person_in_charge_username as personInChargeUsername, |
|||
status, |
|||
create_by as createBy |
|||
from |
|||
fms_followup_queue |
|||
<where> |
|||
<if test="name != null and name != ''"> |
|||
and name like concat('%', #{name}, '%') |
|||
</if> |
|||
</where> |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue