LAPTOP-KB9HII50\70708 1 rok temu
rodzic
commit
7bdf54dc3f

+ 2 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/consult/controller/ConsultController.java

@ -103,9 +103,9 @@ public class ConsultController extends EnvelopRestEndpoint {
     */
    @PostMapping(value = "finish")
    @ApiOperation("修改状态为1的咨询记录为结束")
    public Envelop finish(@RequestParam(required = true) String code) {
    public Envelop finish(@RequestParam(required = true) String code,@RequestParam(required = true) Integer endType) {
        try {
            int row = consultTeamService.finishConsult(code, getRepUID(), 1);
            int row = consultTeamService.finishConsult(code, getRepUID(), endType);
            if (row > 0) {
                return Envelop.getSuccess("操作成功!");
            }else if(row == -2) {

+ 21 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationManageService.java

@ -7,6 +7,7 @@ import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.servicePackage.ServiceItemPlanDO;
import com.yihu.jw.entity.care.device.DevicePatientHealthIndex;
import com.yihu.jw.entity.door.SignFamily;
import com.yihu.jw.entity.followup.Followup;
import com.yihu.jw.entity.specialist.RehabilitationServiceItemDO;
@ -181,7 +182,7 @@ public class RehabilitationManageService {
        String relationType = detailDO.getHospitalServiceItemId();
        Integer plan_start_time_type = detailDO.getTimeType();//计划开始时间类型
        String server_count = detailDO.getServerCount();//服务次数
        if(StringUtils.isBlank(server_count)){
        if(StringUtils.isBlank(server_count)&&!"3".equals(relationType)){
            return planDOList;
        }
        String planDetailId = detailDO.getId();
@ -1385,6 +1386,25 @@ public class RehabilitationManageService {
            detailDO.setCompleteTime(completeTime);
            detailDO.setPlanTime(planTime);
            detailDO.setName(serviceItemMap.get(key));
            if("3".equals(key)){
                PatientRehabilitationPlanDO patientRehabilitationPlanDO = patientRehabilitationPlanDao.findById(planId).orElse(null);
                String patient = patientRehabilitationPlanDO.getPatient();
                String sqlTotal = "select count(*) as total from wlyy_patient_health_index p " +
                        "where p.user ='" + patient + "' and p.type IN(1,2) ";//and p.record_date >= '"+createTime+"'
                Integer signCount = jdbcTemplate.queryForObject(sqlTotal,Integer.class);
                detailDO.setSignCount(signCount);
                if(signCount>0){
                    String sqlTemp = "select p.* from wlyy_patient_health_index p where p.user ='" + patient + "' and p.type IN(1,2) order by p.record_date desc limit 0,1 ";
                    List<DevicePatientHealthIndex> indexList = jdbcTemplate.query(sqlTemp,new BeanPropertyRowMapper<>(DevicePatientHealthIndex.class));
                    if(indexList.size()>0){
                        DevicePatientHealthIndex index = indexList.get(0);
                        detailDO.setSignType(index.getType());
                        detailDO.setValue1(index.getValue1());
                        detailDO.setValue2(index.getValue2());
                        detailDO.setValue3(index.getValue3());
                    }
                }
            }
        }
        return detailDOList;
    }