Compare commits

...

3 Commits

  1. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java
  2. 1
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsTreatmentDto.java
  3. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java
  4. 8
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/FmsFollowupDao.java
  5. 2
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminFmsFollowupQueueServiceImpl.java
  6. 2
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/FmsFollowupServiceImpl.java
  7. 28
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java
  8. 12
      acupuncture-system/src/main/resources/mapper/dao/FmsFollowupDao.xml
  9. 6
      acupuncture-system/src/main/resources/mapper/dao/PmsTreatmentDao.xml

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java

@ -127,6 +127,8 @@ public class FmsFollowupDto {
@ApiModelProperty("0 无队列") @ApiModelProperty("0 无队列")
private Integer haveQueue; private Integer haveQueue;
private Long tenantId; private Long tenantId;
private String phone;
private String name;
private String dataScore; private String dataScore;

1
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsTreatmentDto.java

@ -134,6 +134,7 @@ public class PmsTreatmentDto {
private Integer endAge; private Integer endAge;
private String sourceId; private String sourceId;
private String phone; private String phone;
private String name;
private Long tenantId; private Long tenantId;
} }

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java

@ -184,6 +184,8 @@ public class ScreeningDto {
@ApiModelProperty("问卷详情id") @ApiModelProperty("问卷详情id")
private Long detailId; private Long detailId;
private Long tenantId; private Long tenantId;
private String phone;
private String name;
} }
@Data @Data

8
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/FmsFollowupDao.java

@ -40,12 +40,16 @@ public interface FmsFollowupDao {
List<FmsFollowupVo.FollowupPatient> queryPatient(@Param("id") Long id, List<FmsFollowupVo.FollowupPatient> queryPatient(@Param("id") Long id,
@Param("taskFlag") Byte taskFlag, @Param("taskFlag") Byte taskFlag,
@Param("haveQueue")Integer haveQueue, @Param("haveQueue")Integer haveQueue,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId,
@Param("phone") String phone,
@Param("name") String name);
List<FmsFollowupVo.FollowupPatient> adminQueryPatient(@Param("id") Long id, List<FmsFollowupVo.FollowupPatient> adminQueryPatient(@Param("id") Long id,
@Param("taskFlag") Byte taskFlag, @Param("taskFlag") Byte taskFlag,
@Param("haveQueue")Integer haveQueue, @Param("haveQueue")Integer haveQueue,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId,
@Param("phone") String phone,
@Param("name") String name);
/** /**
* 查询随访任务 * 查询随访任务

2
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminFmsFollowupQueueServiceImpl.java

@ -73,7 +73,7 @@ public class AdminFmsFollowupQueueServiceImpl implements AdminFmsFollowupQueueSe
@Override @Override
public List<FmsFollowupVo.FollowupPatient> adminQueryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) { public List<FmsFollowupVo.FollowupPatient> adminQueryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) {
List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.adminQueryPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId()); List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.adminQueryPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId(), dto.getPhone(), dto.getName());
if (CollectionUtil.isNotEmpty(followupPatients)) { if (CollectionUtil.isNotEmpty(followupPatients)) {
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue"); List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
for (FmsFollowupVo.FollowupPatient followupPatient : followupPatients) { for (FmsFollowupVo.FollowupPatient followupPatient : followupPatients) {

2
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/FmsFollowupServiceImpl.java

@ -87,7 +87,7 @@ public class FmsFollowupServiceImpl implements FmsFollowupService {
@Override @Override
public List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) { public List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) {
List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.queryPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId()); List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.queryPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId(), dto.getPhone(), dto.getName());
if (CollectionUtil.isNotEmpty(followupPatients)) { if (CollectionUtil.isNotEmpty(followupPatients)) {
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue"); List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
for (FmsFollowupVo.FollowupPatient followupPatient : followupPatients) { for (FmsFollowupVo.FollowupPatient followupPatient : followupPatients) {

28
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java

@ -451,7 +451,11 @@ public class ScreeningServiceImpl implements IScreeningService {
return; return;
} }
PmsPatientExample pmsPatientExample = new PmsPatientExample(); PmsPatientExample pmsPatientExample = new PmsPatientExample();
pmsPatientExample.createCriteria().andNameEqualTo(scrScreeningDetail.getAnswer()).andPhoneEqualTo(scrScreeningDetail1.getAnswer()); if (StrUtil.isEmpty(param.getName()) && StrUtil.isEmpty(param.getPhone())) {
pmsPatientExample.createCriteria().andNameEqualTo(scrScreeningDetail.getAnswer()).andPhoneEqualTo(scrScreeningDetail1.getAnswer());
}else {
pmsPatientExample.createCriteria().andNameEqualTo(param.getName()).andPhoneEqualTo(param.getPhone());
}
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample); List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample);
if (CollectionUtil.isEmpty(pmsPatients)) { if (CollectionUtil.isEmpty(pmsPatients)) {
PmsPatient pmsPatient = new PmsPatient(); PmsPatient pmsPatient = new PmsPatient();
@ -477,6 +481,28 @@ public class ScreeningServiceImpl implements IScreeningService {
pmsPatient.setDelFlag((byte) 0); pmsPatient.setDelFlag((byte) 0);
pmsPatient.setCreateTime(new Date()); pmsPatient.setCreateTime(new Date());
pmsPatientMapper.insertSelective(pmsPatient); pmsPatientMapper.insertSelective(pmsPatient);
}else {
PmsPatient pmsPatient = pmsPatients.get(0);
pmsPatient.setPhone(scrScreeningDetail1.getAnswer());
pmsPatient.setName(scrScreeningDetail.getAnswer());
if (ObjectUtil.isNotNull(map.get("SCWJ-BIRTH"))) {
pmsPatient.setBirthDate(DateUtil.parse(map.get("SCWJ-BIRTH").getAnswer()));
}
if (ObjectUtil.isNotNull(map.get("SCWJ-SEX"))) {
pmsPatient.setGender(map.get("SCWJ-SEX").getAnswer().equals("男") ? (byte) 0 : (byte) 1);
}
pmsPatient.setTenantId(detail.getTenantId());
pmsPatient.setPinyinSimple(PinyinUtil.getFirstLetter(pmsPatient.getName(), ""));
pmsPatient.setPinyinFull(PinyinUtil.getPinyin(pmsPatient.getName()));
if (ObjectUtil.isNotNull(map.get("SCWJ-XBS"))) {
pmsPatient.setCurrentIllnessHistory(map.get("SCWJ-XBS").getAnswer());
}
if (ObjectUtil.isNotNull(map.get("SCWJ-XBS-QT"))) {
pmsPatient.setCurrentIllnessHistory(map.get("SCWJ-XBS-QT").getAnswer());
}
pmsPatient.setSource((byte) 0);
pmsPatient.setUpdateTime(new Date());
pmsPatientMapper.updateByPrimaryKeySelective(pmsPatient);
} }
} }
} }

12
acupuncture-system/src/main/resources/mapper/dao/FmsFollowupDao.xml

@ -151,6 +151,12 @@
<if test="taskFlag != null"> <if test="taskFlag != null">
AND r.task_flag = #{taskFlag} AND r.task_flag = #{taskFlag}
</if> </if>
<if test="phone != null and phone != ''">
AND r.phone =#{phone}
</if>
<if test="name != null and name != ''">
AND r.name =#{name}
</if>
group by r.patient_id, r.tenant_id group by r.patient_id, r.tenant_id
order by r.create_time desc order by r.create_time desc
</select> </select>
@ -238,6 +244,12 @@
<if test="taskFlag != null"> <if test="taskFlag != null">
AND r.task_flag = #{taskFlag} AND r.task_flag = #{taskFlag}
</if> </if>
<if test="phone != null and phone != ''">
AND r.phone =#{phone}
</if>
<if test="name != null and name != ''">
AND r.name =#{name}
</if>
group by r.patient_id, r.tenant_id group by r.patient_id, r.tenant_id
order by r.create_time desc order by r.create_time desc
</select> </select>

6
acupuncture-system/src/main/resources/mapper/dao/PmsTreatmentDao.xml

@ -66,6 +66,9 @@
<if test="query.doctor != null and query.doctor != ''"> <if test="query.doctor != null and query.doctor != ''">
AND doctor = #{query.doctor} AND doctor = #{query.doctor}
</if> </if>
<if test="query.name != null and query.name != ''">
AND name = #{query.name}
</if>
order by create_time desc order by create_time desc
</select> </select>
@ -137,6 +140,9 @@
<if test="query.doctor != null and query.doctor != ''"> <if test="query.doctor != null and query.doctor != ''">
AND t.doctor = #{query.doctor} AND t.doctor = #{query.doctor}
</if> </if>
<if test="query.name != null and query.name != ''">
AND t.name = #{query.name}
</if>
order by t.create_time desc order by t.create_time desc
</select> </select>

Loading…
Cancel
Save