初始化
parent
1d6c20d3d6
commit
3cd20c4c4e
@ -0,0 +1,54 @@
|
||||
package com.supervision.exception;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
public class IdentifyIntentException extends RuntimeException {
|
||||
/**
|
||||
* 异常编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 异常信息
|
||||
*/
|
||||
private final String message;
|
||||
|
||||
public IdentifyIntentException(Throwable cause) {
|
||||
super(cause);
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = null;
|
||||
|
||||
}
|
||||
|
||||
public IdentifyIntentException(Throwable cause, String message) {
|
||||
super(cause);
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = message;
|
||||
|
||||
}
|
||||
|
||||
public IdentifyIntentException(String message) {
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public IdentifyIntentException(String message, Integer code) {
|
||||
this.message = message;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public IdentifyIntentException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.supervision.exception;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
public class ItemExtractException extends RuntimeException {
|
||||
/**
|
||||
* 异常编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 异常信息
|
||||
*/
|
||||
private final String message;
|
||||
|
||||
public ItemExtractException(Throwable cause) {
|
||||
super(cause);
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = null;
|
||||
|
||||
}
|
||||
|
||||
public ItemExtractException(Throwable cause, String message) {
|
||||
super(cause);
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = message;
|
||||
|
||||
}
|
||||
|
||||
public ItemExtractException(String message) {
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ItemExtractException(String message, Integer code) {
|
||||
this.message = message;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public ItemExtractException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.supervision.ai;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.supervision.ai.dto.ChatReqDTO;
|
||||
import com.supervision.ai.dto.ChatResDTO;
|
||||
import com.supervision.ai.dto.MessageDTO;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class AiUtil {
|
||||
|
||||
private static final String API_KEY = "985ddf220e63f7f9fd3a038c93515724.7dKiAoSSm3JHqkTW";
|
||||
|
||||
private static final String TOKEN;
|
||||
|
||||
static {
|
||||
try {
|
||||
String[] split = API_KEY.split("\\.");
|
||||
String id = split[0];
|
||||
String secret = split[1];
|
||||
|
||||
long nowMillis = System.currentTimeMillis();
|
||||
long exp = nowMillis + (24 * 60 * 60 * 1000);
|
||||
|
||||
Map<String, Object> header = new HashMap<>();
|
||||
header.put("alg", "HS256");
|
||||
header.put("sign_type", "SIGN");
|
||||
|
||||
Map<String, Object> payload = new HashMap<>();
|
||||
payload.put("api_key", id);
|
||||
payload.put("exp", exp);
|
||||
payload.put("timestamp", nowMillis);
|
||||
|
||||
TOKEN = Jwts.builder()
|
||||
.setHeader(header)
|
||||
.setClaims(payload)
|
||||
.setExpiration(new Date(exp))
|
||||
.signWith(SignatureAlgorithm.HS256, secret.getBytes())
|
||||
.compact();
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Invalid apikey", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String chat(String message) {
|
||||
ChatReqDTO chatReqDTO = new ChatReqDTO();
|
||||
chatReqDTO.setModel("glm-3-turbo");
|
||||
MessageDTO messageDTO = new MessageDTO();
|
||||
messageDTO.setRole("user");
|
||||
messageDTO.setContent(message);
|
||||
chatReqDTO.setMessages(CollUtil.newArrayList(messageDTO));
|
||||
HttpResponse response = HttpRequest.post("https://open.bigmodel.cn/api/paas/v4/chat/completions")
|
||||
.body(JSONUtil.toJsonStr(chatReqDTO)).header("Authorization", TOKEN).execute();
|
||||
String body = response.body();
|
||||
ChatResDTO bean = JSONUtil.toBean(body, ChatResDTO.class);
|
||||
return bean.getChoices().stream().findFirst().orElseThrow(() -> new RuntimeException("获取政策文件失败")).getMessage().getContent();
|
||||
}
|
||||
|
||||
public static String chatByMessage(List<MessageDTO> messageList) {
|
||||
ChatReqDTO chatReqDTO = new ChatReqDTO();
|
||||
chatReqDTO.setModel("glm-3-turbo");
|
||||
chatReqDTO.setMessages(messageList);
|
||||
HttpResponse response = HttpRequest.post("https://open.bigmodel.cn/api/paas/v4/chat/completions")
|
||||
.body(JSONUtil.toJsonStr(chatReqDTO)).header("Authorization", TOKEN).execute();
|
||||
String body = response.body();
|
||||
ChatResDTO bean = JSONUtil.toBean(body, ChatResDTO.class);
|
||||
return bean.getChoices().stream().findFirst().orElseThrow(() -> new RuntimeException("获取政策文件失败")).getMessage().getContent();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.supervision.ai.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatReqDTO {
|
||||
|
||||
private String model;
|
||||
|
||||
private List<MessageDTO> messages;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.supervision.ai.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatResDTO {
|
||||
|
||||
private List<Choices> choices;
|
||||
private int created;
|
||||
private String id;
|
||||
private String model;
|
||||
private String request_id;
|
||||
private Usage usage;
|
||||
|
||||
@Data
|
||||
public static class Choices {
|
||||
private String finish_reason;
|
||||
private int index;
|
||||
private Message message;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Message {
|
||||
private String content;
|
||||
private String role;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Usage {
|
||||
private int completion_tokens;
|
||||
private int prompt_tokens;
|
||||
private int total_tokens;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.supervision.ai.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class IdentifyIntentDTO {
|
||||
|
||||
private String intent;
|
||||
|
||||
private String sentence;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.supervision.ai.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MessageDTO {
|
||||
|
||||
private String role;
|
||||
|
||||
private String content;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.supervision.enums;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum IdentifyIntentEnum {
|
||||
业务的受理条件("业务的受理条件", CollUtil.newArrayList("")),
|
||||
业务的办理流程("业务的办理流程", CollUtil.newArrayList("")),
|
||||
业务的材料清单("业务的材料清单", CollUtil.newArrayList("")),
|
||||
业务的设定依据("业务的设定依据", CollUtil.newArrayList("")),
|
||||
业务的实施依据("业务的实施依据", CollUtil.newArrayList("")),
|
||||
业务的办理途径("业务的办理途径", CollUtil.newArrayList("")),
|
||||
业务的办理窗口("业务的办理窗口", CollUtil.newArrayList(""));
|
||||
|
||||
private String intent;
|
||||
|
||||
private List<String> explainList;
|
||||
|
||||
IdentifyIntentEnum(String intent, List<String> explainList) {
|
||||
this.intent = intent;
|
||||
this.explainList = explainList;
|
||||
}
|
||||
|
||||
public String getIntent() {
|
||||
return intent;
|
||||
}
|
||||
|
||||
public List<String> getExplainList() {
|
||||
return explainList;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.supervision.handler;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.supervision.ai.AiUtil;
|
||||
import com.supervision.ai.dto.MessageDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 条件判断handler
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ConditionJudgeHandler {
|
||||
|
||||
public String conditionJudge(String question, Collection<String> candidateAnswerList, String userAnswer) {
|
||||
List<MessageDTO> messageList = new ArrayList<>();
|
||||
messageList.add(new MessageDTO("system", "你是一个条件判断模型且精通政务事项,我现在给你一个问题,给你候选答案,请你根据用户的实际回答,从候选答案中给我选择一个对应的候选答案.除了候选答案,什么其他的都不要说"));
|
||||
messageList.add(new MessageDTO("assistant", "好的"));
|
||||
messageList.add(new MessageDTO("user", StrUtil.format("问题:[{}]", question)));
|
||||
messageList.add(new MessageDTO("assistant", "继续"));
|
||||
messageList.add(new MessageDTO("user", StrUtil.format("候选答案:[{};未找到匹配答案]", StrUtil.join(";", candidateAnswerList))));
|
||||
messageList.add(new MessageDTO("assistant", "继续"));
|
||||
messageList.add(new MessageDTO("user", StrUtil.format("用户答案:[{}],现在请给我匹配的候选答案,其他什么都不要说.", userAnswer)));
|
||||
return AiUtil.chatByMessage(messageList);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.supervision.handler;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.supervision.ai.AiUtil;
|
||||
import com.supervision.ai.dto.MessageDTO;
|
||||
import com.supervision.exception.ItemExtractException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 意图提取Handler
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ItemExtractHandler {
|
||||
|
||||
public String itemExtract(String question) {
|
||||
List<MessageDTO> messageList = new ArrayList<>();
|
||||
messageList.add(new MessageDTO("system", "假设你是一个命名实体识别模型且精通社保实体识别." +
|
||||
"现在我会给你一个句子,请根据我的要求识别出句子中的实体数据在社保业务中属于哪一类业务事项,并给我事项名称,如果未找到事项,就回复:未找到;其他什么都不要说!"));
|
||||
messageList.add(new MessageDTO("assistant", "好的"));
|
||||
messageList.add(new MessageDTO("user", "句子是:" + question + ";请识别这句话中的社保业务事项"));
|
||||
String item = AiUtil.chatByMessage(messageList);
|
||||
if (StrUtil.equals("未找到", item)) {
|
||||
throw new ItemExtractException("未从问题中找到事项");
|
||||
}
|
||||
return item;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
# 插入一级树枝节点,退休
|
||||
insert vertex `item_branch` ( `item_name`) values "1":("退休");
|
||||
|
||||
# 插入二级树枝节点,城乡居保退休,企业职工退休
|
||||
insert vertex `item_branch` ( `item_name`) values "1-1":("城乡居保退休"),"1-2":("企业职工退休");
|
||||
|
||||
# 建立连接关系
|
||||
insert edge `dependence_edge`() values "1"->"1-1":(),"1"->"1-2":();
|
||||
|
||||
# 插入三级叶子节点,深圳城乡居民退休
|
||||
insert vertex `item_leaf` ( `item_name`) values "1-1-1":("深圳城乡居民退休");
|
||||
|
||||
# 建立连接关系,城乡居保退休下级节点深圳城乡居民退休和非深圳城乡居民退休
|
||||
insert edge `dependence_edge`() values "1-1"->"1-1-1":(),"1-1"->"1-1-2":();
|
||||
|
||||
# 插入办理条件节点
|
||||
insert vertex `process_condition` ( `detail`) values "1-1-1-1":("深圳城乡居民退休条件...内容待补充");
|
||||
# 插入叶子节点和办理条件节点之间的关系
|
||||
insert edge `process_condition_edge`() values "1-1-1"->"1-1-1-1":();
|
||||
|
||||
# 插入条件节点,深圳城乡居民退休条件
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-1-1-1":("城乡居民退休", "退休类型");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-1-1-1-1":("深圳户口", "户口所在地");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-1-1-1-1-1":("年满60岁", "年龄");
|
||||
# 建立连接关系,深圳城乡居民退休条件下的所有办理条件
|
||||
insert edge `condition_edge`() values "1-1-1-1"->"1-1-1-1-1":(),"1-1-1-1-1"->"1-1-1-1-1-1":(),"1-1-1-1-1-1"->"1-1-1-1-1-1-1":();
|
||||
|
||||
|
||||
# 插入三级叶子节点,非深圳城乡居民退休
|
||||
insert vertex `item_leaf` ( `item_name`) values "1-1-2":("非深圳城乡居民退休");
|
||||
# 建立连接关系,城乡居保退休下级节点非深圳城乡居民退休
|
||||
insert edge `dependence_edge`() values "1-1"->"1-1-2":();
|
||||
# 插入办理条件节点
|
||||
insert vertex `process_condition` ( `detail`) values "1-1-2-1":("非深圳城乡居民退休条件...内容待补充");
|
||||
# 插入叶子节点和办理条件节点之间的关系
|
||||
insert edge `process_condition_edge`() values "1-1-2"->"1-1-2-1":();
|
||||
# 插入条件节点,非深圳城乡居民退休
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-2-1-1":("城乡居民退休", "退休类型");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-2-1-1-1":("港澳台和外籍人员", "户口所在地");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-2-1-1-1-1":("年满60岁", "年龄");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-1-2-1-1-1-1-1":("非居民","缴费年限");
|
||||
# 建立连接关系,非深圳城乡居民退休条件下的所有办理条件
|
||||
insert edge `condition_edge`() values "1-1-2-1"->"1-1-2-1-1":(),"1-1-2-1-1"->"1-1-2-1-1-1":(),"1-1-2-1-1-1"->"1-1-2-1-1-1-1":(),"1-1-2-1-1-1-1"->"1-1-2-1-1-1-1-1":();
|
||||
|
||||
|
||||
|
||||
# 插入三级叶子节点,深圳企业职工退休,非深圳企业职工退休
|
||||
insert vertex `item_leaf` ( `item_name`) values "1-2-1":("深圳企业职工退休"),"1-2-2":("广东省其他地区企业职工退休"),"1-2-3":("省外户口企业职工退休"),"1-2-4":("港澳台和外籍人员企业职工退休");
|
||||
|
||||
# 建立连接关系,企业职工退休下级节点深圳企业职工退休/广东省其他地区企业职工退休/省外户口企业职工退休/港澳台和外籍人员企业职工退休
|
||||
insert edge `dependence_edge`() values "1-2"->"1-2-1":(),"1-2"->"1-2-2":(),"1-2"->"1-2-3":(),"1-2"->"1-2-4":();
|
||||
# 插入深圳企业职工办理条件节点
|
||||
insert vertex `process_condition` ( `detail`) values "1-2-1-1":("深圳企业职工退休条件...内容待补充");
|
||||
# 插入叶子节点和办理条件节点之间的关系
|
||||
insert edge `process_condition_edge`() values "1-2-1"->"1-2-1-1":();
|
||||
# 插入条件节点,深圳企业职工退休
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-1-1-1":("企业职工退休", "退休类型");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-1-1-1-1":("深圳户口", "户口所在地");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-1-1-1-1-1":("年满60岁", "年龄");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-1-1-1-1-1-1":("已转入", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-1-1-1-1-1-2":("无异地社保", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-1-1-1-1-1-1-1":("实际缴费年限+视同缴费年限满15年", "缴费年限");
|
||||
# 建立连接关系,深圳企业职工退休条件下的所有办理条件
|
||||
insert edge `condition_edge`() values "1-2-1-1"->"1-2-1-1-1":(),"1-2-1-1-1"->"1-2-1-1-1-1":(),"1-2-1-1-1-1"->"1-2-1-1-1-1-1":(),
|
||||
"1-2-1-1-1-1-1"->"1-2-1-1-1-1-1-1":(),"1-2-1-1-1-1-1-1"->"1-2-1-1-1-1-1-1-1":(),
|
||||
"1-2-1-1-1-1-1"->"1-2-1-1-1-1-1-2":(),"1-2-1-1-1-1-1-2"->"1-2-1-1-1-1-1-1-1":();
|
||||
|
||||
# 插入广东省其他地区企业职工办理条件节点
|
||||
insert vertex `process_condition` ( `detail`) values "1-2-2-1":("广东省其他地区企业职工退休条件...内容待补充");
|
||||
# 插入叶子节点和办理条件节点之间的关系
|
||||
insert edge `process_condition_edge`() values "1-2-2"->"1-2-2-1":();
|
||||
# 插入条件节点,广东省其他地区企业职工退休
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-2-1-1":("企业职工退休", "退休类型");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-2-1-1-1":("广东省其他地区", "户口所在地");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-2-1-1-1-1":("年满60岁", "年龄");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-2-1-1-1-1-1":("已转入", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-2-1-1-1-1-2":("无异地社保", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-2-1-1-1-1-1-1":("实际缴费年限+视同缴费年限满15年", "缴费年限");
|
||||
# 建立连接关系,广东省其他地区企业职工退休条件下的所有办理条件
|
||||
insert edge `condition_edge`() values "1-2-2-1"->"1-2-2-1-1":(),"1-2-2-1-1"->"1-2-2-1-1-1":(),"1-2-2-1-1-1"->"1-2-2-1-1-1-1":(),
|
||||
"1-2-2-1-1-1-1"->"1-2-2-1-1-1-1-1":(),"1-2-2-1-1-1-1-1"->"1-2-2-1-1-1-1-1-1":(),
|
||||
"1-2-2-1-1-1-1"->"1-2-2-1-1-1-1-2":(),"1-2-2-1-1-1-1-2"->"1-2-2-1-1-1-1-1-1":();
|
||||
|
||||
# 插入省外户口企业职工办理条件节点
|
||||
insert vertex `process_condition` ( `detail`) values "1-2-3-1":("省外户口企业职工退休条件...内容待补充");
|
||||
# 插入叶子节点和办理条件节点之间的关系
|
||||
insert edge `process_condition_edge`() values "1-2-3"->"1-2-3-1":();
|
||||
# 插入条件节点,省外户口企业职工退休
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-3-1-1":("企业职工退休", "退休类型");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-3-1-1-1":("省外户口", "户口所在地");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-3-1-1-1-1":("年满60岁", "年龄");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-3-1-1-1-1-1":("已转入", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-3-1-1-1-1-2":("无异地社保", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-3-1-1-1-1-1-1":("实际缴费年限+视同缴费年限满15年", "缴费年限");
|
||||
|
||||
# 建立连接关系,省外户口企业职工退休条件下的所有办理条件
|
||||
insert edge `condition_edge`() values "1-2-3-1"->"1-2-3-1-1":(),"1-2-3-1-1"->"1-2-3-1-1-1":(),"1-2-3-1-1-1"->"1-2-3-1-1-1-1":(),
|
||||
"1-2-3-1-1-1-1"->"1-2-3-1-1-1-1-1":(),"1-2-3-1-1-1-1-1"->"1-2-3-1-1-1-1-1-1":(),
|
||||
"1-2-3-1-1-1-1"->"1-2-3-1-1-1-1-2":(),"1-2-3-1-1-1-1-2"->"1-2-3-1-1-1-1-1-1":();
|
||||
|
||||
# 插入港澳台和外籍人员企业职工办理条件节点
|
||||
insert vertex `process_condition` ( `detail`) values "1-2-4-1":("港澳台和外籍人员企业职工退休条件...内容待补充");
|
||||
# 插入叶子节点和办理条件节点之间的关系
|
||||
insert edge `process_condition_edge`() values "1-2-4"->"1-2-4-1":();
|
||||
# 插入条件节点,港澳台和外籍人员企业职工退休
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-4-1-1":("企业职工退休", "退休类型");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-4-1-1-1":("港澳台和外籍人员", "户口所在地");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-4-1-1-1-1":("年满60岁", "年龄");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-4-1-1-1-1-1":("已转入", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-4-1-1-1-1-2":("无异地社保", "异地社保转入情况");
|
||||
insert vertex `condition` ( `condition`, `entity_type`) values "1-2-4-1-1-1-1-1-1":("实际缴费年限+视同缴费年限满15年", "缴费年限");
|
||||
# 建立连接关系,港澳台和外籍人员企业职工退休条件下的所有办理条件
|
||||
insert edge `condition_edge`() values "1-2-4-1"->"1-2-4-1-1":(),"1-2-4-1-1"->"1-2-4-1-1-1":(),"1-2-4-1-1-1"->"1-2-4-1-1-1-1":(),
|
||||
"1-2-4-1-1-1-1"->"1-2-4-1-1-1-1-1":(),"1-2-4-1-1-1-1-1"->"1-2-4-1-1-1-1-1-1":(),
|
||||
"1-2-4-1-1-1-1"->"1-2-4-1-1-1-1-2":(),"1-2-4-1-1-1-1-2"->"1-2-4-1-1-1-1-1-1":();
|
||||
|
||||
|
Loading…
Reference in New Issue