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