Przeglądaj źródła

Merge branch 'dev' of yeshijie/wlyy2.0 into dev

叶仕杰 4 lat temu
rodzic
commit
8ad1aafb6d

+ 4 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java

@ -84,9 +84,11 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "获取居民信息")
    public Envelop getPatientById(
            @ApiParam(name = "id", value = "居民id")
            @RequestParam(value = "id", required = true) String id) {
            @RequestParam(value = "id", required = true) String id,
            @ApiParam(name = "isCapacity", value = "是否返回能力评估,1返回其他值不返回,默认不返回", required = false)
            @RequestParam(value = "isCapacity", required = false) String isCapacity) {
        try{
            return success("获取成功",patientService.findPatientById(id));
            return success("获取成功",patientService.findPatientById(id,isCapacity));
        }catch (Exception e){
            e.printStackTrace();
            return failed("获取失败",-1);

+ 13 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/patient/CarePatientService.java

@ -5,11 +5,13 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
import com.yihu.jw.care.service.common.DictService;
import com.yihu.jw.care.service.sign.CapacityAssessmentRecordService;
import com.yihu.jw.care.service.sign.ServicePackageService;
import com.yihu.jw.care.util.ConstantUtil;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.entity.care.sign.CapacityAssessmentRecordDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.service.BasePatientMedicardCardService;
import com.yihu.jw.restmodel.web.PageEnvelop;
@ -17,7 +19,6 @@ import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Service;
@ -54,6 +55,8 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
    private WlyyPatientLabelDao patientLabelDao;
    @Autowired
    private DictService dictService;
    @Autowired
    private CapacityAssessmentRecordService capacityAssessmentRecordService;
    /**
     * 签约记录
@ -97,7 +100,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
     * @param patientId
     * @return
     */
    public JSONObject findPatientById(String patientId) throws Exception{
    public JSONObject findPatientById(String patientId,String isCapacity) throws Exception{
        JSONObject res = new JSONObject();
        BasePatientDO patientDO = patientDao.findById(patientId);
        patientDO.setArchiveStatusName(dictService.fingByNameAndCode(ConstantUtil.DICT_ARCHIVESTATUS,String.valueOf(patientDO.getArchiveStatus())));
@ -120,7 +123,15 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
            signRecordDO.setHelperList(helperList);
            signRecordDO.setPackageList(packageList);
            res.put("signRecordDO",signRecordDO);
            if("1".equals(isCapacity)){
                //能力评估
                CapacityAssessmentRecordDO recordDO = capacityAssessmentRecordService.findAssessmentByPatientId(patientId);
                res.put("capAssRecordDO",recordDO);
            }
        }
        return res;
    }

+ 3 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/CapacityAssessmentRecordService.java

@ -82,7 +82,9 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
     * @return
     */
    public CapacityAssessmentRecordDO findAssessmentByPatientId(String patient)  {
        return capacityAssessmentRecordDao.findByPatient(patient);
        CapacityAssessmentRecordDO recordDO = capacityAssessmentRecordDao.findByPatient(patient);
        recordDO.setLevelConclusionName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getLevelConclusion())));
        return recordDO;
    }
    /**