Browse Source

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

liubing 3 years ago
parent
commit
cd2c055038

+ 2 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/activity/ChildActivityEndpoint.java

@ -32,10 +32,11 @@ public class ChildActivityEndpoint  extends EnvelopRestEndpoint {
    public PageEnvelop childActivityRegistrationList(
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = false) String patient,
            @ApiParam(name = "activityType", value = "活动类型 1小鬼来当家 2秋游去 3我喜欢我自己 4乡村音乐") @RequestParam(value = "activityType", required = false) String status,
            @ApiParam(name = "orgCode", value = "orgCode", required = false, defaultValue = "orgCode") @RequestParam(value = "orgCode") String orgCode,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1") @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15") @RequestParam(value = "size") int size) {
        try{
            return activityRegistrationService.childActivityRegistrationList(patient, status, page, size);
            return activityRegistrationService.childActivityRegistrationList(patient, status,orgCode, page, size);
        }catch (Exception e){
            return failedPageEnvelopException2(e);
        }

+ 4 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/activity/ChildActivityRegistrationService.java

@ -66,7 +66,7 @@ public class ChildActivityRegistrationService {
     * @param page
     * @param size
     */
    public PageEnvelop childActivityRegistrationList(String patient,String activityType, int page, int size){
    public PageEnvelop childActivityRegistrationList(String patient,String activityType,String orgCode, int page, int size){
        String sql = "SELECT a.id,a.activity_type activityType,a.patient,p.name,p.sex,p.idcard,p.photo,org.code,org.name orgName,DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') create_time from base_child_activity_registration a " +
                "LEFT JOIN base_org org on a.org_code = org.code ,base_patient p " +
                "WHERE a.patient = p.id";
@ -81,6 +81,9 @@ public class ChildActivityRegistrationService {
        if(StringUtils.isNotBlank(activityType)){
            filter += " and a.activity_type = '"+activityType+"' ";
        }
        if (StringUtils.isNotBlank(orgCode)){
            filter += " and a.org_code = '"+orgCode+"' ";
        }
        Long count = jdbcTemplate.queryForObject(sqlCount+filter,Long.class);
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql+filter);
        for (Map<String,Object> map:result){

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

@ -40,6 +40,8 @@ public class OnlineContactService extends BaseJpaService<BasePatientDO, BasePati
    private ServicePackageService servicePackageService;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Autowired
    private BasePatientDao patientDao;
    public JSONObject getOnLineObj(String patient){
@ -144,8 +146,8 @@ public class OnlineContactService extends BaseJpaService<BasePatientDO, BasePati
            tmpObj.put("avatar",tmp.get("photo"));
            tmpObj.put("userType","1");
            tmpObj.put("doctorId",tmp.get("doctor"));
            tmp.put("doctorLevel",tmp.get("doctorLevel"));
            tmpObj.put("relationName","助老员");
            tmpObj.put("doctorLevel",tmp.get("doctorLevel"));
            tmpObj.put("relationName",null==tmp.get("doctorLevel")?"":"1".equals(tmp.get("doctorLevel").toString())?"社区医生":"助老员");
            doctorResult.add(tmpObj);
        }
@ -158,6 +160,10 @@ public class OnlineContactService extends BaseJpaService<BasePatientDO, BasePati
                for (int i=0;i<participantsTimeArray.size();i++){
                    JSONObject tmpObj = participantsTimeArray.getJSONObject(i);
                    String id =  tmpObj.getString("id");
                    BasePatientDO patientDO = patientDao.findById(id);
                    if (patientDO.getArchiveType()==3){
                        continue;
                    }
                    if (!id.equals(patient)&&familyIds.contains(id)){
                        tmp.put("avatar",tmp.getString("photo"));
                        tmp.put("patientId",id);