完善SQL
parent
aef54944c7
commit
4707dd82f4
|
@ -2,8 +2,10 @@ package com.four;
|
|||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableFeignClients
|
||||
public class InterrogationApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(InterrogationApp.class);
|
||||
|
|
|
@ -32,16 +32,16 @@ public class RegistrationInformationController {
|
|||
private HttpServletRequest request;
|
||||
|
||||
/**
|
||||
* 查询到所有科室
|
||||
* 查询全部科室
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/ShowDepartmentAll")
|
||||
public Result<List<SymptomsDrugs>> ShowDepartmentAll() {
|
||||
log.info("功能名称:查询所有科室,请求URI:{},请求方法:{}", request.getRequestURI(),
|
||||
@GetMapping("/ShowSymptomsDrug")
|
||||
public Result<List<SymptomsDrugs>> ShowSymptomsDrug(){
|
||||
log.info("功能名称:查询全部科室,请求URI:{},请求方法:{}",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
List<SymptomsDrugs> list = registrationInformationService.ShowDepartmentAll();
|
||||
log.info("功能名称:查询所有科室,请求URI:{},请求方法:{},返回结果:{}", request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(list));
|
||||
List<SymptomsDrugs> list=registrationInformationService.ShowSymptomsDrug();
|
||||
log.info("功能名称:查询全部科室,请求URI:{},请求方法:{},返回结果:{}",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(list));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.four.patient.feign;
|
||||
|
||||
import com.four.common.duck.Result;
|
||||
import com.four.common.duck.communitypatients.SymptomsDrugs;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient("dimensional-health-homePage")
|
||||
public interface SymptomsDrugsFeign {
|
||||
/**
|
||||
* 查询全部科室
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/know/findSymptomDrugsAll")
|
||||
public Result<List<SymptomsDrugs>> findSymptomDrugsAll();
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package com.four.patient.service.Impl;
|
||||
|
||||
import com.four.common.duck.Result;
|
||||
import com.four.common.duck.communitypatients.SymptomsDrugs;
|
||||
import com.four.common.duck.response.ResponseRegistrationInformation;
|
||||
import com.four.patient.feign.SymptomsDrugsFeign;
|
||||
import com.four.patient.mapper.RegistrationInformationMapper;
|
||||
import com.four.patient.service.RegistrationInformationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -15,12 +17,11 @@ public class RegistrationInformationServiceImpl implements RegistrationInformati
|
|||
@Autowired
|
||||
private RegistrationInformationMapper registrationInformationMapper;
|
||||
|
||||
@Autowired
|
||||
private SymptomsDrugsFeign symptomsDrugsFeign;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<SymptomsDrugs> ShowDepartmentAll() {
|
||||
List<SymptomsDrugs> symptomsDrugsList = registrationInformationMapper.ShowDepartmentAll();
|
||||
return symptomsDrugsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResponseRegistrationInformation> ShowRegistrationInformationAllPrice(Long medicalDepartmentId) {
|
||||
|
@ -46,5 +47,12 @@ public class RegistrationInformationServiceImpl implements RegistrationInformati
|
|||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SymptomsDrugs> ShowSymptomsDrug() {
|
||||
Result<List<SymptomsDrugs>> symptomDrugsAll = symptomsDrugsFeign.findSymptomDrugsAll();
|
||||
List<SymptomsDrugs> symptomsDrugsList = symptomDrugsAll.getData();
|
||||
return symptomsDrugsList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import java.util.List;
|
|||
public interface RegistrationInformationService {
|
||||
|
||||
|
||||
List<SymptomsDrugs> ShowDepartmentAll();
|
||||
|
||||
List<ResponseRegistrationInformation> ShowRegistrationInformationAllPrice(Long medicalDepartmentId);
|
||||
|
||||
|
@ -19,4 +18,6 @@ public interface RegistrationInformationService {
|
|||
List<ResponseRegistrationInformation> ShowRegistrationInformationAll(Long medicalDepartmentId);
|
||||
|
||||
|
||||
List<SymptomsDrugs> ShowSymptomsDrug();
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
values (
|
||||
<if test="null!=giverId and ''!=giverId">#{giverId},</if>
|
||||
<if test="null!=giftId and ''!=giftId">#{giftId},</if>
|
||||
#{giftGivingTime})
|
||||
#{giftGivingTime}
|
||||
)
|
||||
</insert>
|
||||
<update id="updPatientMoney">
|
||||
update sys_user set
|
||||
|
@ -42,7 +43,7 @@
|
|||
from gift
|
||||
<where>
|
||||
<if test="null!=gift_id and ''!=gift_id">
|
||||
gift_id = #{giftId}
|
||||
and gift_id = #{giftId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@ -50,7 +51,7 @@
|
|||
select user_id from registration_information
|
||||
<where>
|
||||
<if test="null!=registration_information_id and ''!=registration_information_id">
|
||||
registration_information_id=#{registrationInformationId}
|
||||
and registration_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<include refid="selectGiftRecord"></include>
|
||||
<where>
|
||||
<if test="null!=registrationInformationId and ''!=registrationInformationId">
|
||||
registration_information_id=#{registrationInformationId}
|
||||
and registration_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<include refid="SelectHistoricalDoctor"></include>
|
||||
<where>
|
||||
<if test="null!=registrationInformationId and ''!=registrationInformationId">
|
||||
registartion_information_id=#{registrationInformationId}
|
||||
and registartion_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<include refid="selectPatientDoctor"></include>
|
||||
<where>
|
||||
<if test="null!=registrationInformationId and ''!=registrationInformationId">
|
||||
registration_information_id=#{registrationInformationId}
|
||||
and registration_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<include refid="selectRegistrationInformation"></include>
|
||||
<where>
|
||||
<if test="null!=medicalDepartmentId and ''!=medicalDepartmentId">
|
||||
r.medical_department_id = #{medicalDepartmentId}
|
||||
and r.medical_department_id = #{medicalDepartmentId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY r.consulting_price DESC
|
||||
|
@ -59,7 +59,7 @@
|
|||
<include refid="selectRegistrationInformation"></include>
|
||||
<where>
|
||||
<if test="null!=medicalDepartmentId and ''!=medicalDepartmentId">
|
||||
r.medical_department_id = #{medicalDepartmentId}
|
||||
and r.medical_department_id = #{medicalDepartmentId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY r.number_patients_served DESC
|
||||
|
@ -68,22 +68,16 @@
|
|||
<include refid="selectRegistrationInformation"></include>
|
||||
<where>
|
||||
<if test="null!=medicalDepartmentId and ''!=medicalDepartmentId">
|
||||
r.medical_department_id = #{medicalDepartmentId}
|
||||
and r.medical_department_id = #{medicalDepartmentId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY r.praise DESC
|
||||
</select>
|
||||
<select id="ShowDepartmentAll" resultType="com.four.common.duck.communitypatients.SymptomsDrugs">
|
||||
select symptoms_drugs.id,
|
||||
symptoms_drugs.name
|
||||
from symptoms_drugs
|
||||
where pid = 1
|
||||
</select>
|
||||
<select id="ShowRegistrationInformationAll" resultMap="ResponseRegistrationInformation">
|
||||
<include refid="selectRegistrationInformation"></include>
|
||||
<where>
|
||||
<if test="null!=medicalDepartmentId and ''!=medicalDepartmentId">
|
||||
r.medical_department_id=#{medicalDepartmentId}
|
||||
and r.medical_department_id=#{medicalDepartmentId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY .consulting_price,r.number_patients_served,r.praise DESC
|
||||
|
|
Loading…
Reference in New Issue