فهرست منبع

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

叶仕杰 4 سال پیش
والد
کامیت
9b0b76171b

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/care/label/PatientLabelDO.java

@ -12,7 +12,7 @@ import java.util.Date;
 */
@Entity
@Table(name = "wlyy_patient_label")
public class PatientLabelDO extends UuidIdentityEntity {
public class WlyyPatientLabelDO extends UuidIdentityEntity {
    // 标签code
    private String labelCode;
    // 标签名称

+ 5 - 6
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/label/PatientLabelDao.java

@ -1,7 +1,6 @@
package com.yihu.jw.care.dao.label;
import com.yihu.jw.entity.care.label.PatientLabelDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareItemDictDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
@ -12,12 +11,12 @@ import java.util.List;
/**
 * Created by yeshijie on 2021/4/7.
 */
public interface PatientLabelDao extends PagingAndSortingRepository<PatientLabelDO, String>, JpaSpecificationExecutor<PatientLabelDO> {
public interface WlyyPatientLabelDao extends PagingAndSortingRepository<WlyyPatientLabelDO, String>, JpaSpecificationExecutor<WlyyPatientLabelDO> {
    @Modifying
    @Query("delete PatientLabelDO a where a.patient=?1")
    @Query("delete WlyyPatientLabelDO a where a.patient=?1")
    int deleteByPatient(String patient) throws Exception;
    @Query("from PatientLabelDO w where  w.patient=?1 ")
    List<PatientLabelDO> findByPatient(String patient);
    @Query("from WlyyPatientLabelDO w where  w.patient=?1 ")
    List<WlyyPatientLabelDO> findByPatient(String patient);
}

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

@ -2,7 +2,7 @@ package com.yihu.jw.care.endpoint.patient;
import com.yihu.jw.care.aop.ServicesAuth;
import com.yihu.jw.care.aop.ServicesAuthAOP;
import com.yihu.jw.care.dao.label.PatientLabelDao;
import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
import com.yihu.jw.care.service.patient.CarePatientService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
@ -28,7 +28,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private CarePatientService patientService;
    @Autowired
    private PatientLabelDao patientLabelDao;
    private WlyyPatientLabelDao patientLabelDao;
    @Autowired
    ServicesAuthAOP servicesAuthAOP;

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

@ -3,13 +3,13 @@ package com.yihu.jw.care.service.patient;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.dao.label.PatientLabelDao;
import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
import com.yihu.jw.care.service.common.DictService;
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.PatientLabelDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.service.BasePatientMedicardCardService;
import com.yihu.jw.restmodel.web.PageEnvelop;
@ -49,7 +49,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
    @Autowired
    private ServicePackageService servicePackageService;
    @Autowired
    private PatientLabelDao patientLabelDao;
    private WlyyPatientLabelDao patientLabelDao;
    @Autowired
    private DictService dictService;
@ -176,9 +176,9 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
    public void updPatientLabel(String jsonData,String patientId) throws Exception{
        patientLabelDao.deleteByPatient(patientId);
        JSONArray jsonArray = JSON.parseArray(jsonData);
        List<PatientLabelDO> labelDOList = new ArrayList<>();
        List<WlyyPatientLabelDO> labelDOList = new ArrayList<>();
        for (int i=0;i<jsonArray.size();i++){
            PatientLabelDO labelDO = JSONObject.parseObject(jsonArray.getJSONObject(i).toJSONString(), PatientLabelDO.class);
            WlyyPatientLabelDO labelDO = JSONObject.parseObject(jsonArray.getJSONObject(i).toJSONString(), WlyyPatientLabelDO.class);
            labelDO.setPatient(patientId);
            labelDO.setCzrq(new Date());
            labelDOList.add(labelDO);

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

@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.care.dao.label.PatientLabelDao;
import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
import com.yihu.jw.care.dao.sign.*;
import com.yihu.jw.care.service.common.DictService;
import com.yihu.jw.care.util.ConstantUtil;
@ -14,7 +14,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.care.label.PatientLabelDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.entity.care.sign.*;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
@ -63,7 +63,7 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
    @Autowired
    private CapacityAssessmentSocialAbilityDao CASocialAbilityDao;
    @Autowired
    private PatientLabelDao patientLabelDao;
    private WlyyPatientLabelDao patientLabelDao;
    @Autowired
    private DictService dictService;
    @Autowired
@ -180,9 +180,10 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
            //生成居民标签
            patientLabelDao.deleteByPatient(recordDO.getPatient());
            PatientLabelDO patientLabelDO = new PatientLabelDO();
            WlyyPatientLabelDO patientLabelDO = new WlyyPatientLabelDO();
            patientLabelDO.setCzrq(new Date());
            patientLabelDO.setLabelType("1");
            patientLabelDO.setPatient(recordDO.getPatient());
            patientLabelDO.setLabelCode(String.valueOf(recordDO.getLevelConclusion()));
            patientLabelDO.setLabelName(dictService.fingByNameAndCode(ConstantUtil.DICT_SERVICE_TYPE,patientLabelDO.getLabelCode()));
            patientLabelDao.save(patientLabelDO);