patch repo

This commit is contained in:
CaiHQ 2023-07-04 10:49:09 +08:00
parent 143ec1f17a
commit 4c895da128
4 changed files with 102 additions and 78 deletions

View File

@ -14,7 +14,7 @@ plugins {
id 'java'
id 'java-library'
}
version = "1.3.93"
version = "1.4.0"
group = 'org.bdware.sc.controlproxy'
tasks.withType(JavaCompile) {

View File

@ -5,48 +5,59 @@ module RepoDetail {
//这是search engine的接口为什么还没接上
//TODO TODO
export function getDoList(arg) {
print("GetDOList===========");
var ret = executeContract("Registry", "getDoList", arg);
if (arg.indexOf("shanxi/Repository")!=-1){
if (arg.indexOf("shanxi/Repository") != - 1){
var ret = {
};
ret.result = {
};
var data = [];
data.push({
"createTime":1676481531275, "owner":"\"大同市人力资源和社会保障局\"", "type":"CSV", "description":"\"大同市人力资源和社会保障局2022年取证补贴资金统计表\"", "schema":"{\"序号\":\"number\",\"项目名称\":\"string\",\"高标准农田建设项目\":\"number\",\"高效节水灌溉措施\":\"number\",\"总计\":\"number\",\"财政资金\":\"number\",\"自筹资金\":\"number\",\"其他资金\":\"number\",\"高标准农田建设地点\":\"string\",\"高效节水灌溉建设地点\":\"string\"}", "doId":"shanxi/Repository/6ca5a5e3-f2b4-43c3-bdcd-280889bbd12f"
"createTime":1676481531275, "owner":"大同市人力资源和社会保障局",
"type":"CSV",
"description":"大同市人力资源和社会保障局2022年取证补贴资金统计表",
"schema":"{\"序号\":\"number\",\"项目名称\":\"string\",\"高标准农田建设项目\":\"number\",\"高效节水灌溉措施\":\"number\",\"总计\":\"number\",\"财政资金\":\"number\",\"自筹资金\":\"number\",\"其他资金\":\"number\",\"高标准农田建设地点\":\"string\",\"高效节水灌溉建设地点\":\"string\"}",
"doId":"shanxi/Repository/6ca5a5e3-f2b4-43c3-bdcd-280889bbd12f"
});
data.push({
"createTime":1676481514049, "owner":"\"大同市农业局\"", "type":"CSV", "description":"\"大同市2021年第二批拟建高标准农田项目情况表\"", "schema":"", "doId":"shanxi/Repository/a1838f08-56d4-45ca-a9c4-afaa389b4b14"
"createTime":1676481514049,
"owner":"大同市农业局", "type":"CSV",
"description":"大同市2021年第二批拟建高标准农田项目情况表",
"schema":"",
"doId":"shanxi/Repository/a1838f08-56d4-45ca-a9c4-afaa389b4b14"
});
data.push({
"createTime":1676553567486, "owner":"\"大同市卫生健康委员会\"", "type":"CSV", "description":"\"2021大同市新冠疫苗接种门诊公示.xlsx\"", "schema":"{\"接种单位名称\":\"string\",\"接种单位详细地址\":\"string\",\"所属县区\":\"string\",\"所属街道\":\"string\",\"详细地址(必填)\":\"string\",\"法定代表人姓名\":\"string\",\"科室负责人姓名\":\"string\",\"科室联系电话\":\"number\",\"接种时间\":\"string\"}", "doId":"shanxi/Repository/57fedf56-5155-4ff6-aabe-a998869f46b1"
"createTime":1676553567486, "owner":"大同市卫生健康委员会", "type":"CSV", "description":"2021大同市新冠疫苗接种门诊公示.xlsx", "schema":"{\"接种单位名称\":\"string\",\"接种单位详细地址\":\"string\",\"所属县区\":\"string\",\"所属街道\":\"string\",\"详细地址(必填)\":\"string\",\"法定代表人姓名\":\"string\",\"科室负责人姓名\":\"string\",\"科室联系电话\":\"number\",\"接种时间\":\"string\"}", "doId":"shanxi/Repository/57fedf56-5155-4ff6-aabe-a998869f46b1"
});
data.push({
"createTime":1676553952316, "owner":"\"大同市科学技术局\"", "type":"CSV", "description":"\"2022年大同市科技计划立项资金表.xls\"", "schema":"{\"计划编号\":\"string\",\"项目名称\":\"string\",\"承担单位\":\"string\",\"项目负责人\":\"string\",\"起止年限\":\"string\",\"下达资金\":\"string\"}", "doId":"shanxi/Repository/49fadb30-ef5a-440e-9c28-be1a8fd1cafc"
"createTime":1676553952316, "owner":"大同市科学技术局", "type":"CSV", "description":"2022年大同市科技计划立项资金表.xls", "schema":"{\"计划编号\":\"string\",\"项目名称\":\"string\",\"承担单位\":\"string\",\"项目负责人\":\"string\",\"起止年限\":\"string\",\"下达资金\":\"string\"}", "doId":"shanxi/Repository/49fadb30-ef5a-440e-9c28-be1a8fd1cafc"
});
data.push({
"createTime":1676554675160, "owner":"\"大同市人力资源和社会保障局\"", "type":"CSV", "description":"\"2022年度大同市市直企业职业技能提升部分培训补贴资金统计表第一批)\"", "schema":"{\"企业名称\":\"string\",\"培训期号\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"补贴人数\":\"string\",\"培训补贴资金\":\"string\",\"单位补贴汇总\":\"string\",\"备注\":\"string\"}", "doId":"shanxi/Repository/4780c075-4608-48a0-9083-6c0a9a7f4357"
"createTime":1676554675160, "owner":"大同市人力资源和社会保障局", "type":"CSV", "description":"2022年度大同市市直企业职业技能提升部分培训补贴资金统计表第一批)", "schema":"{\"企业名称\":\"string\",\"培训期号\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"补贴人数\":\"string\",\"培训补贴资金\":\"string\",\"单位补贴汇总\":\"string\",\"备注\":\"string\"}", "doId":"shanxi/Repository/4780c075-4608-48a0-9083-6c0a9a7f4357"
});
data.push({
"createTime":1676558013851, "owner":"\"大同市财政局\"", "type":"CSV", "description":"\"提前下达2023年财政衔接推进乡村振兴补助资金预算指标分配表.xls\"", "schema":"{\"市县名\":\"string\",\"合计\":\"number\",\"巩固拓展脱贫攻坚成果和乡村振兴支出方向\":\"number\",\"少数民族发展支出方向\":\"number\",\"以工代赈支出方向\":\"number\",\"欠发达国有农场巩固提升支出方向\":\"number\",\"欠发达国有林场巩固提升支出方向\":\"number\",\"备注\":\"string\"}", "doId":"shanxi/Repository/9dc89e94-eba0-4683-bbe8-b9da8994d1c1"
"createTime":1676558013851, "owner":"大同市财政局", "type":"CSV", "description":"提前下达2023年财政衔接推进乡村振兴补助资金预算指标分配表.xls", "schema":"{\"市县名\":\"string\",\"合计\":\"number\",\"巩固拓展脱贫攻坚成果和乡村振兴支出方向\":\"number\",\"少数民族发展支出方向\":\"number\",\"以工代赈支出方向\":\"number\",\"欠发达国有农场巩固提升支出方向\":\"number\",\"欠发达国有林场巩固提升支出方向\":\"number\",\"备注\":\"string\"}", "doId":"shanxi/Repository/9dc89e94-eba0-4683-bbe8-b9da8994d1c1"
});
data.push({"createTime":1676558051018,"owner":"\"大同市财政局\"","type":"CSV","description":"\"拟注销失业登记的公示名单\"","schema":"{\"姓名\":\"string\",\"身份证号\":\"string\"}","doId":"shanxi/Repository/8f74e220-5409-493a-a852-ecbe48734c31"});
data.push({"createTime":1676558067499,"owner":"\"大同市卫生健康委\"","type":"CSV","description":"\"大同市中医医院2022年公开招聘编外聘用制工作人员岗位表\"","schema":"{\"招聘部门\":\"string\",\"招聘单位\":\"string\",\"招聘人数\":\"number\",\"年龄\":\"string\",\"学历\":\"string\",\"学位\":\"string\",\"专业\":\"string\",\"其它\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/90dfcb72-fad8-4f70-b672-e79416fd60ff"});
data.push({"createTime":1676558083728,"owner":"\"大同市卫生健康委\"","type":"CSV","description":"\"大同市中医医院2022年公开招聘编外聘用制工作人员岗位计划调整表.xls\"","schema":"{\"招聘单位\":\"string\",\"招聘岗位\":\"string\",\"岗位代码\":\"string\",\"年龄\":\"string\",\"学历\":\"string\",\"学位\":\"string\",\"专业\":\"string\",\"其它\":\"string\",\"原招聘人数\":\"string\",\"调整情况\":\"string\",\"调整后招聘人数\":\"string\"}","doId":"shanxi/Repository/f56094c4-0a41-430d-865e-70ce142a43e5"});
data.push({"createTime":1676558104281,"owner":"\"大同市人力资源和社会保障局\"","type":"CSV","description":"\"大同市代表队参加第三届全省职业技能大赛赛前培训补贴资金统计表\"","schema":"{\"序号\":\"string\",\"选手派出单位\":\"string\",\"参赛项目\":\"string\",\"参赛选手人数\":\"string\",\"指导老师人数\":\"string\",\"裁判老师人数\":\"string\",\"裁判人数\":\"string\",\"补贴标准(元)\":\"string\",\"补贴金额(元)\":\"string\",\"补贴金额小计(元)\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/24e8d16f-ac53-4bdb-88b6-c7d9993e48cf"});
data.push({"createTime":1676558121340,"owner":"\"大同市卫生健康委员会\"","type":"CSV","description":"\"大同市第四人民医院2022年公开招聘工作人员调整岗位计划表.xls\"","schema":"{\"招聘单位\":\"string\",\"招聘岗位\":\"string\",\"岗位代码\":\"string\",\"年龄\":\"string\",\"学历\":\"string\",\"学位\":\"string\",\"专业\":\"string\",\"其它\":\"string\",\"原计划招聘人数\":\"string\",\"岗位变更情况\":\"string\",\"调整后招聘人数\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/ca7bb2d5-3e8b-4f90-a698-0c10afe41574"});
data.push({"createTime":1676558261544,"owner":"\"大同市人力资源和社会保障局\"","type":"CSV","description":"\"市直2020度创业培训补贴20%资金统计表\"","schema":"{\"培训单位,联系人、电话、地点\":\"string\",\"期数\":\"string\",\"培训时间\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"合计人数\":\"string\",\"创业人数\":\"string\",\"补贴人数\":\"string\",\"培训补贴资金(元)\":\"string\"}","doId":"shanxi/Repository/21e4e085-aa88-40aa-b38e-6f1a00042141"});
data.push({"createTime":1676558289718,"owner":"\"大同市人力资源和社会保障局\"","type":"CSV","description":"\"市直2020度创业培训补贴20%资金统计表\"","schema":"{\"培训单位,联系人、电话、地点\":\"string\",\"期数\":\"string\",\"培训时间\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"合计人数\":\"string\",\"创业人数\":\"string\",\"补贴人数\":\"string\",\"培训补贴资金(元)\":\"string\"}","doId":"shanxi/Repository/e8e5eefc-e481-4e47-8222-7eb9b7c824ae"});
data.push({"createTime":1676558304736,"owner":"\"大同市人力资源和社会保障局\"","type":"CSV","description":"\"全民技能提升工程部分培训补贴资金统计表\"","schema":"{\"培训地点\":\"string\",\"期数\":\"string\",\"培训专业\":\"string\",\"培训时间\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"补贴人数\":\"string\",\"合计人数\":\"string\",\"补贴天数\":\"string\",\"培训补贴资金(元)\":\"string\",\"合计补贴资金(元)\":\"string\"}","doId":"shanxi/Repository/1d003549-ab2e-4cfb-8810-4a6b03518581"});
data.push({"createTime":1676558329896,"owner":"\"大同市人力资源和社会保障局\"","type":"CSV","description":"\"就业创业补贴项目清单\"","schema":"{\"项目\":\"string\",\"名称\":\"string\",\"享受对象\":\"string\",\"申请资料\":\"string\",\"执行标准\":\"string\",\"享受期限\":\"string\",\"政策依据\":\"string\",\"受理机构\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/869482df-8d5d-49fc-8559-ce14206c991d"});
data.push({"createTime":1676558352841,"owner":"\"大同市人力资源和社会保障局\"","type":"CSV","description":"\"惠民惠农“一卡通”政策清单公示\"","schema":"{\"序号\":\"string\",\"主管部门\":\"string\",\"补贴项目\":\"string\",\"政策级次\":\"string\",\"政策依据文件及文号\":\"string\",\"补贴对象\":\"string\",\"补助标准\":\"string\",\"申领流程\":\"string\",\"发放方式\":\"string\",\"发放时间\":\"string\",\"咨询电话\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/2949b9c7-b22b-46e5-8663-6d232471587e"});
data.push({"createTime":1676558365787,"owner":"\"大同市科学技术局\"","type":"CSV","description":"\"2020年大同市重点实验室认定名单公示\"","schema":"{\"序号\":\"string\",\"项目名称\":\"string\",\"依托单位\":\"string\"}","doId":"shanxi/Repository/b35b17c9-acf3-4511-bc3d-5561cb861cb6"});
data.push({"createTime":1676558388183,"owner":"\"大同市教育局\"","type":"CSV","description":"\"2022年大同市特岗教师招聘进入体检人员名单\"","schema":"{\"序号\":\"string\",\"地市\":\"string\",\"区县\":\"string\",\"学校\":\"string\",\"学段\":\"string\",\"学科\":\"string\",\"岗位数\":\"string\",\"笔试分数\":\"string\",\"姓名\":\"string\",\"性别\":\"string\",\"准考证号码\":\"string\",\"面试成绩\":\"string\",\"总成绩\":\"string\",\"是否进入体检\":\"string\"}","doId":"shanxi/Repository/41e32dd3-b231-4456-a814-186307d8157b"});
data.push({"createTime":1676558051018,"owner":"大同市财政局","type":"CSV","description":"拟注销失业登记的公示名单","schema":"{\"姓名\":\"string\",\"身份证号\":\"string\"}","doId":"shanxi/Repository/8f74e220-5409-493a-a852-ecbe48734c31"});
data.push({"createTime":1676558067499,"owner":"大同市卫生健康委","type":"CSV","description":"大同市中医医院2022年公开招聘编外聘用制工作人员岗位表","schema":"{\"招聘部门\":\"string\",\"招聘单位\":\"string\",\"招聘人数\":\"number\",\"年龄\":\"string\",\"学历\":\"string\",\"学位\":\"string\",\"专业\":\"string\",\"其它\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/90dfcb72-fad8-4f70-b672-e79416fd60ff"});
data.push({"createTime":1676558083728,"owner":"大同市卫生健康委","type":"CSV","description":"大同市中医医院2022年公开招聘编外聘用制工作人员岗位计划调整表.xls","schema":"{\"招聘单位\":\"string\",\"招聘岗位\":\"string\",\"岗位代码\":\"string\",\"年龄\":\"string\",\"学历\":\"string\",\"学位\":\"string\",\"专业\":\"string\",\"其它\":\"string\",\"原招聘人数\":\"string\",\"调整情况\":\"string\",\"调整后招聘人数\":\"string\"}","doId":"shanxi/Repository/f56094c4-0a41-430d-865e-70ce142a43e5"});
data.push({"createTime":1676558104281,"owner":"大同市人力资源和社会保障局","type":"CSV","description":"大同市代表队参加第三届全省职业技能大赛赛前培训补贴资金统计表","schema":"{\"序号\":\"string\",\"选手派出单位\":\"string\",\"参赛项目\":\"string\",\"参赛选手人数\":\"string\",\"指导老师人数\":\"string\",\"裁判老师人数\":\"string\",\"裁判人数\":\"string\",\"补贴标准(元)\":\"string\",\"补贴金额(元)\":\"string\",\"补贴金额小计(元)\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/24e8d16f-ac53-4bdb-88b6-c7d9993e48cf"});
data.push({"createTime":1676558121340,"owner":"大同市卫生健康委员会","type":"CSV","description":"大同市第四人民医院2022年公开招聘工作人员调整岗位计划表.xls","schema":"{\"招聘单位\":\"string\",\"招聘岗位\":\"string\",\"岗位代码\":\"string\",\"年龄\":\"string\",\"学历\":\"string\",\"学位\":\"string\",\"专业\":\"string\",\"其它\":\"string\",\"原计划招聘人数\":\"string\",\"岗位变更情况\":\"string\",\"调整后招聘人数\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/ca7bb2d5-3e8b-4f90-a698-0c10afe41574"});
data.push({"createTime":1676558261544,"owner":"大同市人力资源和社会保障局","type":"CSV","description":"市直2020度创业培训补贴20%资金统计表","schema":"{\"培训单位,联系人、电话、地点\":\"string\",\"期数\":\"string\",\"培训时间\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"合计人数\":\"string\",\"创业人数\":\"string\",\"补贴人数\":\"string\",\"培训补贴资金(元)\":\"string\"}","doId":"shanxi/Repository/21e4e085-aa88-40aa-b38e-6f1a00042141"});
data.push({"createTime":1676558289718,"owner":"大同市人力资源和社会保障局","type":"CSV","description":"市直2020度创业培训补贴20%资金统计表","schema":"{\"培训单位,联系人、电话、地点\":\"string\",\"期数\":\"string\",\"培训时间\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"合计人数\":\"string\",\"创业人数\":\"string\",\"补贴人数\":\"string\",\"培训补贴资金(元)\":\"string\"}","doId":"shanxi/Repository/e8e5eefc-e481-4e47-8222-7eb9b7c824ae"});
data.push({"createTime":1676558304736,"owner":"大同市人力资源和社会保障局","type":"CSV","description":"全民技能提升工程部分培训补贴资金统计表","schema":"{\"培训地点\":\"string\",\"期数\":\"string\",\"培训专业\":\"string\",\"培训时间\":\"string\",\"培训人数\":\"string\",\"合格人数\":\"string\",\"补贴人数\":\"string\",\"合计人数\":\"string\",\"补贴天数\":\"string\",\"培训补贴资金(元)\":\"string\",\"合计补贴资金(元)\":\"string\"}","doId":"shanxi/Repository/1d003549-ab2e-4cfb-8810-4a6b03518581"});
data.push({"createTime":1676558329896,"owner":"大同市人力资源和社会保障局","type":"CSV","description":"就业创业补贴项目清单","schema":"{\"项目\":\"string\",\"名称\":\"string\",\"享受对象\":\"string\",\"申请资料\":\"string\",\"执行标准\":\"string\",\"享受期限\":\"string\",\"政策依据\":\"string\",\"受理机构\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/869482df-8d5d-49fc-8559-ce14206c991d"});
data.push({"createTime":1676558352841,"owner":"大同市人力资源和社会保障局","type":"CSV","description":"惠民惠农“一卡通”政策清单公示","schema":"{\"序号\":\"string\",\"主管部门\":\"string\",\"补贴项目\":\"string\",\"政策级次\":\"string\",\"政策依据文件及文号\":\"string\",\"补贴对象\":\"string\",\"补助标准\":\"string\",\"申领流程\":\"string\",\"发放方式\":\"string\",\"发放时间\":\"string\",\"咨询电话\":\"string\",\"备注\":\"string\"}","doId":"shanxi/Repository/2949b9c7-b22b-46e5-8663-6d232471587e"});
data.push({"createTime":1676558365787,"owner":"大同市科学技术局","type":"CSV","description":"2020年大同市重点实验室认定名单公示","schema":"{\"序号\":\"string\",\"项目名称\":\"string\",\"依托单位\":\"string\"}","doId":"shanxi/Repository/b35b17c9-acf3-4511-bc3d-5561cb861cb6"});
data.push({"createTime":1676558388183,"owner":"大同市教育局","type":"CSV","description":"2022年大同市特岗教师招聘进入体检人员名单","schema":"{\"序号\":\"string\",\"地市\":\"string\",\"区县\":\"string\",\"学校\":\"string\",\"学段\":\"string\",\"学科\":\"string\",\"岗位数\":\"string\",\"笔试分数\":\"string\",\"姓名\":\"string\",\"性别\":\"string\",\"准考证号码\":\"string\",\"面试成绩\":\"string\",\"总成绩\":\"string\",\"是否进入体检\":\"string\"}","doId":"shanxi/Repository/41e32dd3-b231-4456-a814-186307d8157b"});
ret.result.data = data;
ret.result.total = data.length;
return ret;
}
return ret.result;
return "success";
}
export function getDoList2(arg) {
export function getDoList3(arg) {
arg = convertArgToJson(arg);
//if (arg.doId == null)
// return {
@ -57,22 +68,20 @@ module RepoDetail {
// "msg":"request to much!", "code":1
// };
var ret = [];
if (arg.count==undefined) arg.count = 10;
if (arg.offset==undefined) arg.offset = 0;
for (var i = arg.offset;
i<arg.offset/1.0+arg.count/1.0;
i++) {
if (arg.count == undefined) arg.count = 10;
if (arg.offset == undefined) arg.offset = 0;
for (var i = arg.offset; i < arg.offset / 1.0 + arg.count / 1.0; i ++) {
var fakeDo = {
};
fakeDo.doId = "bdware.ss/Repo1/abc"+i;
fakeDo.doId = "bdware.ss/Repo1/abc" + i;
fakeDo.originalData = {
doid:fakeDo.doId, info:"ddddd", tag: ["aaa", "bbb", "ccc"]
doid : fakeDo.doId, info : "ddddd", tag : ["aaa", "bbb", "ccc"]
}
fakeDo.enableIndex = true
ret.push(fakeDo);
}
return {
data: ret, total: 100
data : ret, total : 100
};
}
//TODO check arguments
@ -90,34 +99,31 @@ module RepoDetail {
//索引统计,暂时还没有。
export function getStaticIndex(arg) {
arg = convertArgToJson(arg);
if (arg.from==undefined)
if (arg.from == undefined)
return {
"msg":"missing arguments: from", "code":1
"msg" : "missing arguments: from", "code" : 1
};
if (arg.to==undefined)
if (arg.to == undefined)
return {
"msg":"missing arguments: to", "code":1
"msg" : "missing arguments: to", "code" : 1
};
if (arg.interval==undefined)
if (arg.interval == undefined)
return {
"msg":"missing arguments: interval", "code":1
"msg" : "missing arguments: interval", "code" : 1
};
switch(arg.tag) {
case "search":
case "index":
case "call":
return fakeList(from, to, interval);
case "search" :
case "index" :
case "call" : return fakeList(from, to, interval);
}
return {
"msg":"unreconized tag", "code":1
"msg" : "unreconized tag", "code" : 1
};
}
function fakeList(from, to, interval) {
var ret = [];
for (i = from;
i<to;
i++) {
ret.push(Math.floor(Math.random()*200+20));
for (i = from; i < to; i ++) {
ret.push(Math.floor(Math.random() * 200 + 20));
}
return ret;
}

View File

@ -6,51 +6,63 @@ module SearchModule {
//str.contains(arg..)
//输入参数doId如bdware.txte/Repo
//返回结果一个数组里面是doId"contains"这个参数的列表。
// res.addProperty("doCount", this.metaIndex.getDoCount());
export function getAllRepoCount() {
return executeContract("Registry", "getAllRepoCount", arg).result;
//return Global.allRepoCount;
var data = executeContract("Registry", "getPageInfo", arg).result.data;
return {
"code" : 0, "data" : data.repoCount
};
}
export function getAllUserCount() {
return executeContract("Registry", "getAllUserCount", arg).result;
//return Global.allRepoCount;
return {
"code" : 0, "data" : 472
};
}
export function getAllSearchCount() {
return executeContract("Registry", "getAllSearchCount", arg).result;
//return Global.allRepoCount;
var data = executeContract("Registry", "getPageInfo", arg).result.data;
return {
"code" : 0, "data" : data.searchCount
};
}
export function getAllUpdateCount() {
return executeContract("Registry", "getAllUpdateCount", arg).result;
//return Global.allRepoCount;
var data = executeContract("Registry", "getPageInfo", arg).result.data;
return {
"code" : 0, "data" : data.updateCount
};
}
export function getPageInfo(arg) {
var data = executeContract("Registry", "getPageInfo", arg).result.data;
return {
"code" : 0, "data" :data
};
}
export function getAllDoCount() {
return executeContract("Registry", "getAllDoCount", arg).result;
//return Global.allRepoCount;
var data = executeContract("Registry", "getPageInfo", arg).result.data;
return {
"code" : 0, "data" : data.doCount
};
}
//不确定
//{"open":51,"close":49}
//TODO???
export function getAllIndexCount() {
return executeContract("Registry", "getAllIndexCount", arg).result;
//return Global.allRepoCount;
var data = executeContract("Registry", "getPageInfo", arg).result.data;
return {
"code" : 0, "data" : data.updateCount
};
}
export function getDoCount(arg) {
var ret = executeContract("Registry", "getDoCount", arg);
if (arg.indexOf("shanxi/Repository")!=-1)
if (arg.indexOf("shanxi/Repository") != - 1)
ret.result.data.push({
"doId":"shanxi/Repository", "count":3
"doId" : "shanxi/Repository", "count" : 3
});
return ret.result;
//return {
//"data":[{
// "doId":"bdware.txte/Repo1","count":10}
// ,{
// "doId":"bdware.txte/Repo2","count":12}
// ]};
}
export function testCount(arg) {
return {
"data":"key"
"data" : "key"
};
}
@ -97,13 +109,19 @@ module SearchModule {
////{"params":[{"type":"owner","keyword":"说明"},{"type":"doid","keyword":"aibd"}],"count":"10","offset":"0"}
//返回:{"data":[{},{},{}],"count":3}
@ArgSchema({
"!params":[{
"!type":"string", "!keyword":"integer"
}], "count":"integer", "offset":"integer"
"!params" : [{
"!type" : "string", "!keyword" : "integer"
}], "count" : "integer", "offset" : "integer"
})
export function search(arg) {
arg = convertArgToJson(arg);
var res = executeContract("Registry", "searchByMultiTag", arg);
var req = {"id":"","attributes":{},"body":""};
for (var i=0;i<arg.params.length;i++){
req.attributes[arg.params[i].type] = arg.params[i].keyword;
}
req.attributes["offset"] = arg.offset;
req.attributes["count"] = arg.count;
var res = executeContract("Registry", "search", arg);
return res.result;
//ret=[];

View File

@ -32,10 +32,10 @@ module unions {
}
Global.unions = [];
Global.unions.push({
"name":"北大", "address":"ws://39.106.6.6:18010", "status":"在线", "contact":"网管1号", "email":"abc@pku.edu.cn"
"name":"太原节点", "address":"ws://39.106.6.6:18010", "status":"在线", "contact":"太原管理员", "email":"taiyuanadim@shanxi.com"
});
Global.unions.push({
"name":"大", "address":"ws://39.106.6.9:18010", "status":"在线", "contact":"网管1号", "email":"abc@pku.edu.cn"
"name":"大同节点", "address":"ws://39.106.6.9:18010", "status":"在线", "contact":"大同管理员", "email":"datongadmin@shanxi.com"
});
return {
"code":0
@ -51,7 +51,7 @@ module unions {
};
ret.controlAddress = "ws://192.168.1.1:18000";
ret.apiKey = "dafdsafdsa";
ret.unionName = "高校联盟";
ret.unionName = "山西能源联盟";
return ret;
}
@ArgSchema({