|
@ -20,7 +20,9 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@ -44,6 +46,19 @@ public class FamilyMemberService extends BaseService {
|
|
|
@Autowired
|
|
|
JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
Map<Integer,String> relations = new HashMap<>();
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init(){
|
|
|
relations.put(0,"其他");
|
|
|
relations.put(1,"父亲");
|
|
|
relations.put(2,"母亲");
|
|
|
relations.put(3,"老公");
|
|
|
relations.put(4,"老婆");
|
|
|
relations.put(5,"儿子");
|
|
|
relations.put(6,"女儿");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 添加家庭成员
|
|
|
*
|
|
@ -268,9 +283,10 @@ public class FamilyMemberService extends BaseService {
|
|
|
obj.put("mobile", map.get("mobile"));
|
|
|
obj.put("address", StringUtils.isEmpty(String.valueOf(map.get("address"))) ? "" : map.get("address"));
|
|
|
obj.put("familyRelation", map.get("family_relation"));
|
|
|
obj.put("familyRelationName", relations.get(map.get("family_relation")));
|
|
|
|
|
|
if (!StringUtils.isEmpty(doctorCode)) {
|
|
|
obj.put("relaholder", map.get("family_relation"));
|
|
|
obj.put("relaholder", relations.get(map.get("family_relation")));
|
|
|
obj.put("addressCode", "");
|
|
|
obj.put("addressName", StringUtils.isEmpty(String.valueOf(map.get("address"))) ? "" : map.get("address"));
|
|
|
obj.put("status", status);
|