Просмотр исходного кода

上传签约信息,需要转换居委会CODE,传递基卫的居委会CODE

huangwenjie 7 лет назад
Родитель
Сommit
ae0c1c69af

+ 17 - 0
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/dao/CountryDao.java

@ -0,0 +1,17 @@
package com.yihu.wlyy.sign.dao;
import com.yihu.wlyy.sign.entity.Country;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Trick on 2017/7/20.
 */
public interface CountryDao extends PagingAndSortingRepository<Country, Long> {
    @Query("from Country c where c.street=?1 AND (c.jwCode IS NOT NULL OR c.jwCode <> '')")
    List<Country> findByStreet(String street);
    Country findByCode(String code);
}

+ 78 - 0
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/entity/Country.java

@ -0,0 +1,78 @@
package com.yihu.wlyy.sign.entity;
import com.yihu.wlyy.sign.common.model.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 居委会
 * @author huangwenjie
 * @date 2017/10/26 12:55
 */
@Entity
@Table(name = "dm_country")
public class Country extends IdEntity {
	private String  province;
	private String  city;
	private String  town;
	private String  street ;
	private String  code;
	private String  name;
	private String  jwCode;
	
	public String getProvince() {
		return province;
	}
	
	public void setProvince(String province) {
		this.province = province;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getCity() {
		return city;
	}
	
	public void setCity(String city) {
		this.city = city;
	}
	
	public String getTown() {
		return town;
	}
	
	public void setTown(String town) {
		this.town = town;
	}
	
	public String getStreet() {
		return street;
	}
	
	public void setStreet(String street) {
		this.street = street;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getJwCode() {
		return jwCode;
	}
	
	public void setJwCode(String jwCode) {
		this.jwCode = jwCode;
	}
}

+ 14 - 1
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/SignZYService.java

@ -5,6 +5,7 @@ import com.yihu.wlyy.sign.common.SystemConfig;
import com.yihu.wlyy.sign.common.util.*;
import com.yihu.wlyy.sign.dao.*;
import com.yihu.wlyy.sign.entity.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.data.domain.PageRequest;
@ -75,6 +76,9 @@ public class SignZYService {
    @Autowired
    private SignFamilyServerService signFamilyServerService;
    
    @Autowired
    private CountryDao countryDao;
    /**
     * 获取机构映射
@ -1406,7 +1410,16 @@ public class SignZYService {
                    params.put("SICK_PHONE", patient.getMobile() == null ? "" : patient.getMobile());   //联系电话
                    params.put("SICK_COUNTY", patient.getTown() == null ? "" : patient.getTown());    //行政区
                    params.put("SICK_COUNTRY", patient.getStreet() == null ? "" : patient.getStreet());    //街道
                    params.put("SICK_VILLAGE", patient.getSickVillage() == null ? "" : patient.getSickVillage());    //居委会
                    
                    if(StringUtils.isNoneBlank(patient.getSickVillage())){
                        //居委会需要转换成基卫的居委会CODE
                        Country country = countryDao.findByCode(patient.getSickVillage());
                        params.put("SICK_VILLAGE", country.getJwCode());    //居委会
                    }else{
                        params.put("SICK_VILLAGE", "");    //居委会
                    }
                    
                    
                    params.put("SICK_ADDRESS",  patient.getAddress() == null ? "" : patient.getAddress());    //地址
                } else {

+ 40 - 0
patient-co/patient-co-wlyy/doc/技术文档/es/随访记录详情新增索引.txt

@ -0,0 +1,40 @@
创建索引
POST  http://172.19.103.68:9200/wlyy_followup
查询索引
GET http://172.19.103.68:9200/wlyy_followup/
给索引加mapping
POST http://172.19.103.68:9200/wlyy_followup/wlyy_followup_content/_mapping
{
    "wlyy_followup_content": {
        "properties": {
            "followup_id": {
                "type": "string",
                "index": "not_analyzed"
            },
            "followup_project": {
                "type": "string",
                "index": "not_analyzed"
            },
            "followup_key": {
                "type": "string",
                "index": "not_analyzed"
            },
            "followup_value": {
                "type": "string",
                "index": "not_analyzed"
            },
            "create_time": {
                "type": "string",
                "index": "not_analyzed"
            }
        }
    }
}
增加索引搜索大小
PUT  http://172.19.103.68:9200/wlyy_followup/_settings
{
  "index": {
    "max_result_window": 500000
  }
}