ソースを参照

改造新增随访接口

chenweida 7 年 前
コミット
922cbe4754

+ 3 - 3
common/common-entity/src/main/java/com/yihu/wlyy/entity/followup/Followup.java

@ -64,7 +64,7 @@ public class Followup extends IdEntity {
	// 签约类型 1三师 2家庭
	private Integer signType;
	// 行政团队
	private Long adminTeamCode;
	private String adminTeamCode;
	//签约表Code
	private String signCode;
	//关联的续方CODE
@ -242,11 +242,11 @@ public class Followup extends IdEntity {
		this.signType = signType;
	}
	public Long getAdminTeamCode() {
	public String getAdminTeamCode() {
		return adminTeamCode;
	}
	public void setAdminTeamCode(Long adminTeamCode) {
	public void setAdminTeamCode(String adminTeamCode) {
		this.adminTeamCode = adminTeamCode;
	}

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/concern/ConcernService.java

@ -184,4 +184,8 @@ public class ConcernService extends BaseService {
        Integer patients = concernDao.countAllPatientsByDoctorCode(doctorCode);
        return patients;
    }
    public ConcernDO getByDoctorAndPatient(String doctorCode, String patientCode) {
        return concernDao.findByPatientAndDoctor(patientCode,doctorCode);
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -1183,7 +1183,7 @@ public class ConsultTeamService extends ConsultService {
            followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
            followup.setCreateTime(new Date());
            followup.setCreater(doctorCode);
            followup.setAdminTeamCode(signFamily.getAdminTeamId());
            followup.setAdminTeamCode(signFamily.getAdminTeamId()+"");
            followup.setSignType(2);
            //保存质询code
            followup.setSignCode(patientService.getSignCodeByPatient(patient));

+ 9 - 15
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.config.es.ElasticFactory;
import com.yihu.wlyy.config.es.ElastricSearchSave;
import com.yihu.wlyy.entity.concern.ConcernDO;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.followup.Followup;
@ -24,6 +25,7 @@ import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.service.app.message.MessageService;
import com.yihu.wlyy.service.app.team.DrHealthTeamService;
import com.yihu.wlyy.service.common.account.PatientService;
@ -125,6 +127,8 @@ public class FollowUpService extends BaseService {
    private ElastricSearchSave elastricSearchSave;
    @Autowired
    private MessageService messageService;
    @Autowired
    private ConcernService concernService;
    /**
     * 转译随访信息
@ -378,13 +382,7 @@ public class FollowUpService extends BaseService {
            if (patient == null) {
                throw new Exception("not exit patient:" + patientCode + ".\r\n");
            }
            SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
            if (signFamily == null) {
                signFamily = signFamilyDao.findBySanshiPatient(patientCode);
                if (signFamily == null) {
                    throw new Exception("can not find patient's family sign info");
                }
            }
            ConcernDO concern =  concernService.getByDoctorAndPatient(doctorCode,patientCode);
            List<Followup> followupPlan = new ArrayList<>();
            for (Map<String, String> map : list) {
@ -410,7 +408,7 @@ public class FollowUpService extends BaseService {
                followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
                followup.setCreateTime(new Date());
                followup.setCreater(doctorCode);
                followup.setAdminTeamCode(signFamily.getAdminTeamId());
                followup.setAdminTeamCode(concern.getTeamCode());
                followup.setSignType(2);
                //新增签约保存CODE
@ -509,12 +507,8 @@ public class FollowUpService extends BaseService {
        if (patient == null) {
            throw new Exception("not exit patient:" + patientCode + ".\r\n");
        }
        SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
        if (signFamily == null) {
            signFamily = signFamilyDao.findBySanshiPatient(patientCode);
            if (signFamily == null)
                throw new Exception("can not find patient's family sign info");
        }
        ConcernDO concern =  concernService.getByDoctorAndPatient(doctorCode,patientCode);
        Followup followup = new Followup();
        Date followDate = DateUtil.strToDate(date);
@ -534,7 +528,7 @@ public class FollowUpService extends BaseService {
        followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
        followup.setCreateTime(new Date());
        followup.setCreater(doctorCode);
        followup.setAdminTeamCode(signFamily.getAdminTeamId());
        followup.setAdminTeamCode(concern.getTeamCode());
        followup.setSignType(2);
        //保存质询code
        followup.setSignCode(patientService.getSignCodeByPatient(patientCode));

+ 1 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java

@ -69,7 +69,7 @@ public class DoctorFollowUpController extends BaseController {
    @ResponseBody
    @ApiOperation(value = "查询居民随访列表")
    public String getListByPatientAndTeam(@RequestParam @ApiParam(value = "居民Code") String patient,
                                          @RequestParam @ApiParam(value = "团队code") Long teamCode,
                                          @RequestParam(required = false) @ApiParam(value = "团队code",required = false) Long teamCode,
                                          @RequestParam @ApiParam(value = "第几页") int page,
                                          @RequestParam @ApiParam(value = "页大小") int pagesize,
                                          @RequestParam(value = "type",required = false) @ApiParam(value = "类型:放空为全部,1计划,2记录",defaultValue = "0") String type) {
@ -77,9 +77,6 @@ public class DoctorFollowUpController extends BaseController {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray result = followUpService.getListByPatientAndTeam(patient, teamCode, page, pagesize,type);