P4-2 脚本迁移线:全量改写产出 + facade 动词表运行时实现

任务1 全量改写执行:
- run_rewrite.py 对客户库缓存 1,427 条逐条改写,按 template_id+脚本序号落盘
  output/rewritten/(497 FULL_AUTO + 30 PARTIAL + 85 HARD + 815 NO_S3)
- 人工作业单 115 份(PARTIAL 30 + HARD 85),每份附原文/已改部分/余留模式/建议改法/工时口径
- 自动化率 81.2% 复现 C4 实测,0 误改

任务2 facade 动词表运行时:
- ScriptFacade 把 31 改写目标动词 + bindField 作为 Groovy 闭包注入 Bindings
  (PoC enableButton 模式扩展);服务端语义动词直接求值,UI 语义动词捕获为
  amis 事件动作指令 JSON(actionType/componentId/args)
- 保真层纪律:全在 com.eip4 现代层,com.dsasp 源码零改,ArchUnit 复跑通过
- ScriptExecuteController 提供 /api/script/execute 与 /api/script/execute-template

验证:
- 单测 17 方法逐动词覆盖,均经真实 Groovy 过保真层引擎,BUILD SUCCESS
- 集成 6 条真实 FULL_AUTO 改写脚本经 8086 执行,amis 指令协议合规
- 回归 PoC script-test 通过,ArchUnit 架构纪律通过

报告 tools/s3_rewriter/P4脚本迁移执行报告.md;新坑入 docs/迁移手册.md 5.39/9.3

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 16:10:22 +08:00
parent 3a13c50a01
commit aefb0e2eb9
1552 changed files with 41290 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 009c4f52-636a-4688-8148-75cabe83fd83
// template_name: 新开工项目安全计划申报单
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_PUB_SAFETYSTARTSTARGET_ID]);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 00e7a83b-dd1f-4d7a-a574-bc362bc785d2
// template_name: 项目安全费用登记
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_SAFETYFEEREGISTER_ID]);

View File

@@ -0,0 +1,17 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 00f6638e-72c7-4834-96ff-904935375951
// template_name: 薪资项目
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def yesDes = GetServicesFunction.getEnumerateItemDes("YESNO",1);
if(yesDes?.equals(item['ISDEFAULT'])){
enableButton("修改",false);
enableButton("删除",false);
}
def count = GetServicesFunction.findCount("select count(*) from hr_payschemeitemdetail where hr_payitemid = '"+item['HR_PAYITEM_ID']+"'");
if(count &gt; 0){
enableButton("修改",false);
enableButton("删除",false);
}

View File

@@ -0,0 +1,8 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 017d6c4c-d84f-40c3-bf70-73e83c41fc23
// template_name: 人事变动-离职
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["HR_LOGDIMISSION_ID":HR_LOGDIMISSION_ID]);
page.noSearch(false);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 021e3ba7-e03a-412a-9f0e-c20ef440a885
// template_name: 办公用品领用申请(按库领用)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["OA_OFFICE_COLLARAPPLY_ID":OA_OFFICE_COLLARAPPLY_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,8 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 021e3ba7-e03a-412a-9f0e-c20ef440a885
// template_name: 办公用品领用申请(按库领用)
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
addSubTableButton("GOODSDETAIL", "SELECT", 0);
bindField("OLD_STORE_ID",getFieldValue("STORE_ID"));

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 023fe74b-3d5b-4551-ac90-b8b4e6341bd0
// template_name: 项目报销确认选择框
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["OA_REIMBURSEMENTAPPLY_ID":OA_REIMBURSEMENTAPPLY_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 023fe74b-3d5b-4551-ac90-b8b4e6341bd0
// template_name: 项目报销确认选择框
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item['CONFIRMATIONPEOPLE'] != null){//所选凭证已经是确认状态!
enableButton("确认",false);//确认不可用
}else{//所选凭证已经是未确认状态!
enableButton("取消确认",false);//取消确认不可用
}

View File

@@ -0,0 +1,26 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0267be11-591a-4533-b7cc-079cef81086e
// template_name: 填写人员证书转出申请
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def userID = getFieldValue("ROLLOUTUSE");
def cardList = [];
//查询此人的证书集合
def list = GetServicesFunction.listSelectResult(['USERID':userID],"VIEW_HR_PERSONNELCERTIFICATION");
if(list!=null &amp;&amp; list.size()&gt;0){
//循环list取出证书信息
list.each{
def newMap = [:];
newMap["VIEW_HR_PERSONNELCERTIFICATION_ID"]=it.get_Value("VIEW_HR_PERSONNELCERTIFICATION_ID");
newMap["CARDNAME"]=it.get_Value("CARDNAME");
newMap["PROFESSIONALS"]=it.get_Value("PROFESSIONALS");
newMap["CARDTYPE"]=it.get_Value("CARDTYPE");
cardList+=newMap;
}
}
bindField("CARDS",cardList);

View File

@@ -0,0 +1,18 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 031d16c6-1944-47c9-98b7-08e40404f0b7
// template_name: 加班登记
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
/* *****************以下脚本绑定加班类型下拉框***************** */
//绑定之前,清空下拉框
bindField("OVERTIMETYPE",null);
clearFieldData("OVERTIMETYPE");
def polist = GetServicesFunction.listSelectResult(["CODEVALUE":new CustomSearchConditional("P.CODEVALUE&gt;=41 AND P.CODEVALUE&lt;=60 AND P.SYS_ENUMERATETYPE_ID = 'HR_CHECKATTENDANCESTATE'")],"SYS_ENUMERATE");
addFieldOption("OVERTIMETYPE", "请选择", "请选择");
//循环polist,为下拉框绑值
for(list in polist){
addFieldOption("OVERTIMETYPE", list.get_Value("CODEVALUE"), list.get_Value("CODEDES"));
}

View File

@@ -0,0 +1,18 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 031d16c6-1944-47c9-98b7-08e40404f0b7
// template_name: 加班登记
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//初始状态下,备案、作废按钮可用
if(item["OVERTIMESTATE"]==null){
enableButton("备案",true);
enableButton("作废",true);
}else if(item["OVERTIMESTATE"]=="已备案"){//“已备案”状态下,作废按钮可用
enableButton("备案",false);
enableButton("作废",true);
}else if(item["OVERTIMESTATE"]=="已作废"){//“已作废”状态下,所有按钮不可用
enableButton("备案",false);
enableButton("作废",false);
}

View File

@@ -0,0 +1,25 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 031d16c6-1944-47c9-98b7-08e40404f0b7
// template_name: 加班登记
// seq : 3
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
/* *****************以下脚本绑定加班类型下拉框***************** */
def recordValue = getFieldValue("OVERTIMETYPE");
//绑定之前,清空下拉框
bindField("OVERTIMETYPE",null);
clearFieldData("OVERTIMETYPE");
def polist = GetServicesFunction.listSelectResult(["CODEVALUE":new CustomSearchConditional("P.CODEVALUE&gt;=41 AND P.CODEVALUE&lt;=60 AND P.SYS_ENUMERATETYPE_ID = 'HR_CHECKATTENDANCESTATE'")],"SYS_ENUMERATE");
//循环polist,为下拉框绑值
for(list in polist){
addFieldOption("OVERTIMETYPE", list.get_Value("CODEVALUE"), list.get_Value("CODEDES"));
}
//设置默认值
if(recordValue!=null){
bindField("OVERTIMETYPE",recordValue);
}

View File

@@ -0,0 +1,11 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 03c5fc8f-e6c9-4e3d-b3a1-3be73cf053b0
// template_name: 劳务分包合同终止
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item['CONTRACTSTATUS'] =='签订' || item['CONTRACTSTATUS'] =='结算'){//所选凭证已经是确认状态!
enableButton("取消终止",false);//确认不可用
}else{//所选凭证已经是未确认状态!
enableButton("终止合同",false);//取消确认不可用
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 04da8989-3627-4360-9834-bb55178546dd
// template_name: 查看单位信息
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setGroupReadOnly(true);

View File

@@ -0,0 +1,25 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0567316f-6a71-47f6-a669-eb8c91670e45
// template_name: 车辆维修保养登记
// seq : 1
// label : PARTIAL
// 余留模式 : 残留字段句柄链(未覆盖动词)
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
def value = event.getProperty().getValue();
def isRepair = group.getField("ISREPAIR");
setFieldVisible("NEXTDATE", false);
setFieldRequired("NEXTDATE", false);
if(value == 0){
setFieldCaption("REPAIRDATE", "保养日期");
setFieldCaption("REPAIRREMARK", "保养情况");
setFieldVisible("NEXTDATE", true);
setFieldRequired("NEXTDATE", true);
setFieldRequiredError("NEXTDATE", "下次保养日期为必填项!");
}else if(value == 1){
setFieldCaption("REPAIRDATE", "维修日期");
setFieldCaption("REPAIRREMARK", "维修情况");
setFieldValue("NEXTDATE", null);
}

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 062041e3-0862-49b1-a304-34c873ac5b9e
// template_name: 单个员工排班
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("RUNDATE",getFieldValue("STARTDATE"));
bindField("RUNDATE",getFieldValue("ENDDATE"));

View File

@@ -0,0 +1,23 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0670aaf9-a045-450d-9ebc-06f3ac36ca19
// template_name: 投标关系(所有)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def pojo = GetServicesFunction.loadPOJO(PM_BIDRELATIONSHIP_ID,"PM_BIDRELATIONSHIP",false);
def companyid = pojo.get_Value("COMPANYID");
def projectid = pojo.get_Value("PROJECTID");
def sql = "select PM_BIDDERSPERFORMANCEID,PM_BIDDERSPERFORMANCEID as PM_BIDDERSPERFORMANCEID_DISPLAY__ from PM_PUBLICOFBID_SPERFORMANCE where PM_PUBLICOFBIDID = '"+projectid+"'";
def listPojo = GetServicesFunction.listSelectResultBySql([:],"PM_PUBLICOFBID_SPERFORMANCE",sql,["PM_BIDDERSPERFORMANCEID"]);
def lastList = [];
if(listPojo != null){
for(int i=0;i&lt;listPojo.size();i++){
lastList.add(listPojo[i].get_Value("PM_BIDDERSPERFORMANCEID"));
}
page.setDataFilter(["PM_BIDDERSPERFORMANCE_ID":lastList,"PM_BIDCOMPANYID":companyid]);
}else{
page.setDataFilter(["PM_BIDDERSPERFORMANCE_ID":"ddddddddddd"]);
// page.setDataFilter(["PM_BIDDERSPERFORMANCE_ID":lastList,"PM_BIDCOMPANYID":companyid]);
}

View File

@@ -0,0 +1,16 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 069325dd-9ede-4dbe-9149-c02a5992b951
// template_name: 成本分析表-项目汇总(统计至核算对象)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import com.dsasp.server.common.dataDic.bean.CustomSearchConditional;
def projectid = getFieldValue("PROJECTID");
def searchMap = ["PROJECTID":projectid];
setFieldFilter("MREPORTINTERVALID", searchMap);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0697af60-7c07-48ac-944c-91ca754290a4
// template_name: 分公司审核
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("APPROVALTYPE", 0);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0697af60-7c07-48ac-944c-91ca754290a4
// template_name: 分公司审核
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_COMPLETIONMATEAPPROVAL_ID]);

View File

@@ -0,0 +1,14 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 06e27e60-8755-4e67-9de6-36ece947969e
// template_name: 投标保证金登记(通用)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def value = GetDefaultValueFunction.getCurrentUserOrgId();
def org = GetServicesFunction.loadPOJO(value,"SYS_ORG",false)
if(org != null){
setFieldValue("PAYMONEYUNIT", org?.get_Value("NAME"));
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 06e27e60-8755-4e67-9de6-36ece947969e
// template_name: 投标保证金登记(通用)
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["PM_TENDERBONDREGISTER_ID":PM_TENDERBONDREGISTER_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 07eef963-fd17-42a5-997c-219f0ec18cff
// template_name: 工程选择框-选择已实施工程(全部)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap = ["UNITTYPE":7];//建设单位
setFieldFilter("BUILDCOMPANY", searchMap);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 081c1fef-9b3c-489f-b467-b866ace68ca5
// template_name: 施工方案审批
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["SCHEMEID":PM_PUB_CONSTRUCTIONSCHEMEAPPROVAL_ID]);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 081c1fef-9b3c-489f-b467-b866ace68ca5
// template_name: 施工方案审批
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["PM_PUB_CONSTRUCTIONSCHEMEAPPROVAL_ID":PM_PUB_CONSTRUCTIONSCHEMEAPPROVAL_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 087739c4-3dee-4bac-b031-772497addc6b
// template_name: 部版安管人员证书
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap=[:];
searchMap["SYS_ENUMERATETYPE_ID"] = 'HR_EMPLOYEE_STATUS';
setFieldFilter("JOBSTATUSS", searchMap);

View File

@@ -0,0 +1,27 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 087739c4-3dee-4bac-b031-772497addc6b
// template_name: 部版安管人员证书
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def list = new DateTime[2];
def time1 = GetDefaultValueFunction.currentDate();
//def time2 = GetValueFunction.lastDateOfMonth(GetDefaultValueFunction.currentDate());
list[0]=time1;
//list[1] = time2;
bindField("VALIDDATE",list);
def searchMap=[:];
def solvelist=[];
searchMap["SYS_ENUMERATETYPE_ID"] = 'HR_EMPLOYEE_STATUS';
//searchMap["CODEDES"]=["处理中","已派工"];
searchMap["CODEVALUE"]=[1,4,5];
def list2 = GetServicesFunction.listSelectResult(searchMap,"SYS_ENUMERATE");
if(list2!=null &amp;&amp; list2.size()&gt;0){
list2.each{
solvelist.add(it.get_ID());
}
}
bindField("JOBSTATUSS",solvelist);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 093627bf-d7e2-460b-b00c-5a49fb9ac671
// template_name: 发文拟稿归档表单
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setGroupReadOnly(true)

View File

@@ -0,0 +1,10 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 093cd444-7bff-4f47-ad30-3b9187ce8c4a
// template_name: 培训计划
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
//添加需求选择按钮
addSubTableButton("PLANEMP", "SELECT_REQUIRE", 0);
//添加用户选择按钮
addSubTableButton("PLANEMP", "SELECT_USER", 1);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 093cd444-7bff-4f47-ad30-3b9187ce8c4a
// template_name: 培训计划
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["HR_TRAIN_PLAN_ID":HR_TRAIN_PLAN_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,10 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 09615ad0-ca21-44a2-a569-dfb7323b439d
// template_name: 项目部未关联人工
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
//数据过滤-只查询审批状态为通过的工作内容
def searchMap = [:];
searchMap["STATUS"] = 3;
setFieldFilter("ARTIFICIALPLANID", searchMap);

View File

@@ -0,0 +1,8 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 09aaa5dd-56d3-4364-a5ad-e77480d4d0a9
// template_name: 总包合同登记(五建定制-列表模板)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setFieldReadOnly("PM_PROJECTID", true);
//setFieldReadOnly("TYPE",true);

View File

@@ -0,0 +1,12 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 09aaa5dd-56d3-4364-a5ad-e77480d4d0a9
// template_name: 总包合同登记(五建定制-列表模板)
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def list = getFieldValue("ORGIDLIST");
Console.debug(list);
def searchMap = [:];
searchMap["FILIALE"] = list;//分公司
setFieldFilter("PM_PROJECTID", searchMap);

View File

@@ -0,0 +1,8 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 09aaa5dd-56d3-4364-a5ad-e77480d4d0a9
// template_name: 总包合同登记(五建定制-列表模板)
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//bindField("TYPE",5);
//setFieldReadOnly("TYPE",true);

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 09aaa5dd-56d3-4364-a5ad-e77480d4d0a9
// template_name: 总包合同登记(五建定制-列表模板)
// seq : 4
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item["PUTONRECORD"] == "是"){
enableButton("取消备案",true);
enableButton("备案",false);
}else if(item["PUTONRECORD"] == "否"){
enableButton("取消备案",false);
enableButton("备案",true);
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 09ae6635-4888-4083-8c36-48290040aba7
// template_name: 劳务人员合同登记
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("ISSIGNIN",1);

View File

@@ -0,0 +1,19 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0af7b134-7975-462f-bfa2-268e5201d8ce
// template_name: 实名制人员月考勤报表
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import com.dsasp.server.common.dataDic.bean.CustomSearchConditional;
def searchMap = [:];
def sql = "";
def projectId = getFieldValue("GBPROJECTID");
if(projectId != null &amp;&amp; projectId != '') {
def project = GetServicesFunction.loadPOJO(projectId,"GB_PROJECTINFO",false);
def prjnumber = project.get_Value("PRJNUMBER");
// def sql = " p.prjnumber = '" + prjnumber "'";
searchMap["PRJNUMBER"] = prjnumber;
}
setFieldFilter("WORKERID", searchMap);

View File

@@ -0,0 +1,14 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0b03414d-af19-4533-b0db-c385b8fa67f2
// template_name: 领用申请用品明细选择框
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import org.joda.time.DateTime
def nowDate = GetDefaultValueFunction.currentDate();
def beforeDate = GetValueFunction.addMonths(nowDate,-3);//显示三个月的记录
def values = new DateTime[2];
values[0] = beforeDate;
values[1] = nowDate;
setFieldValue("APPLYDATE", values);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0b2c7a3f-4a8c-48b7-9f4d-239e36a29c72
// template_name: 物资供应商信息-集采供应商
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("IFJC",1);

View File

@@ -0,0 +1,22 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0b2c7a3f-4a8c-48b7-9f4d-239e36a29c72
// template_name: 物资供应商信息-集采供应商
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def loadPo = GetServicesFunction.loadPOJO(item["VIEW_PM_MATERIALSUPPLIER_ID"],"PM_MATERIALSUPPLIER",false);
if(loadPo != null){
def eligibility = loadPo.get_Value("ELIGIBILITY").toString();
//供应商状态(1:待调查;2:未评审;3:评审中;4:合格;5:不合格;6:黑名)
if(!"4".equals(eligibility) &amp;&amp; !"5".equals(eligibility) &amp;&amp; !"6".equals(eligibility)){//"只有状态为“合格”、“不合格”或“黑名”的记录才能复评!"
enableButton("复评",false);
}
if("3".equals(eligibility) || "6".equals(eligibility)){
enableButton("加入黑名单",false);
}
}else{
enableButton("复评",false);
enableButton("加入黑名单",false);
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0b2c7a3f-4a8c-48b7-9f4d-239e36a29c72
// template_name: 物资供应商信息-集采供应商
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["MATERIALNAME":VIEW_PM_MATERIALSUPPLIER_ID]);

View File

@@ -0,0 +1,12 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0b2e5f73-98c9-4f59-a9cc-0bc1cd87d201
// template_name: 物资合同终止(五建定制)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def list = getFieldValue("ORGIDLIST");
Console.debug(list);
def searchMap = [:];
searchMap["FILIALE"] = list;//分公司
setFieldFilter("PM_PROJECTID", searchMap);

View File

@@ -0,0 +1,18 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0b2e5f73-98c9-4f59-a9cc-0bc1cd87d201
// template_name: 物资合同终止(五建定制)
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//获取选中列的实体
def po = GetServicesFunction.loadPOJO(item["PM_MATERIALCONTRACTREGISTER_ID"],"PM_MATERIALCONTRACTREGISTER",false)
if(po!=null){
def CONTRACTSTATUS = po?.get_Value("CONTRACTSTATUS");
if(CONTRACTSTATUS == 2){//所选合同是终止状态
enableButton("终止合同",false);//终止按钮不可用
}else{//所选合同是登记或者结算状态
enableButton("取消终止",false);//取消终止按钮不可用
}}else{
enableButton("终止合同",false);
enableButton("取消终止",false);
}

View File

@@ -0,0 +1,38 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0baf0faa-342d-4bac-bdf7-bc14479ba29e
// template_name: 月待核验及竣工面积
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
//在下拉列表框调用removeAllItems()方法前,应清空下拉列表中的值,之后赋值才能生效
def yearvalue = getFieldValue('YEAR');
def monthvalue = getFieldValue('MONTH');
bindField("YEAR",null);
bindField("MONTH",null);
//--设置年份下拉框默认值--
//获取组件(年份)
clearFieldData("YEAR");
def currentYear = GetDefaultValueFunction.currentYear();
//设置开始年份和结束年份
def startYear = currentYear - 10;
def endYear = currentYear + 11;
for(i in startYear..&lt;endYear){
addFieldOption("YEAR", i, i.toString());
}
//--设置月份下拉框默认值--
clearFieldData("MONTH");
def currentMonth = GetDefaultValueFunction.currentMonth();
for(j in 1..12){
addFieldOption("MONTH", j, j.toString());
}
bindField("YEAR",yearvalue);
bindField("MONTH",monthvalue);

View File

@@ -0,0 +1,36 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0baf0faa-342d-4bac-bdf7-bc14479ba29e
// template_name: 月待核验及竣工面积
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
//在下拉列表框调用removeAllItems()方法前,应清空下拉列表中的值,之后赋值才能生效
bindField("YEAR",null);
bindField("MONTH",null);
//--设置年份下拉框默认值--
//获取组件(年份)
clearFieldData("YEAR");
def currentYear = GetDefaultValueFunction.currentYear();
//设置开始年份和结束年份
def startYear = currentYear - 10;
def endYear = currentYear + 11;
for(i in startYear..&lt;endYear){
addFieldOption("YEAR", i, i.toString());
}
//--设置月份下拉框默认值--
clearFieldData("MONTH");
def currentMonth = GetDefaultValueFunction.currentMonth();
for(j in 1..12){
addFieldOption("MONTH", j, j.toString());
}
setFieldConvertedValue("YEAR", currentYear);
setFieldConvertedValue("MONTH", currentMonth);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0baf0faa-342d-4bac-bdf7-bc14479ba29e
// template_name: 月待核验及竣工面积
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_MONTHWAITCHECKPROJECT_ID]);

View File

@@ -0,0 +1,24 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0bdeae44-1dfe-430f-a30c-6a1fc620b059
// template_name: 投标单位业绩(所有)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def sql = "select PM_PUBLICOFBIDID,PM_PUBLICOFBIDID as PM_PUBLICOFBIDID_DISPLAY__ from PM_PUBLICOFBID_SPERFORMANCE where PM_BIDDERSPERFORMANCEID = '"+PM_BIDDERSPERFORMANCE_ID+"'";
def listPojo = GetServicesFunction.listSelectResultBySql([:],"PM_PUBLICOFBID_SPERFORMANCE",sql,["PM_PUBLICOFBIDID"]);
def lastList = [];
def search = [:];
if(listPojo != null){
for(int i=0;i&lt;listPojo.size();i++){
lastList.add(listPojo[i].get_Value("PM_PUBLICOFBIDID"));
}
page.setDataFilter(["PM_PUBLICOFBID_ID":lastList,"PM_BIDDERSPERFORMANCEID":PM_BIDDERSPERFORMANCE_ID]);
}else{
page.setDataFilter(["PM_PUBLICOFBID_ID":"ddddddddddd"]);
// search["PM_PUBLICOFBID_ID","ddddddddddd"]
}
//search["PM_BIDDERSPERFORMANCEID",PM_BIDDERSPERFORMANCE_ID]
////page.setDataFilter(["AAA_ID":"88888888888888888888888888888888888888888888888888"]);
////page.setDataFilter(["PM_BIDDERSPERFORMANCEID":PM_BIDDERSPERFORMANCE_ID]);
//page.setDataFilter(search);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0c0729e4-a10c-4548-8a54-09128446d53c
// template_name: 机械供应商信息的添加页面2
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setGroupReadOnly(true)

View File

@@ -0,0 +1,11 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0c7f9c4e-3db3-4a96-8f93-a2fca241200d
// template_name: 项目部竣工验收
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item['REFORM'] != null &amp;&amp; item['REFORM'].equals("是")) {
enableButton("查看整改情况",true);
} else {
enableButton("查看整改情况",false);
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0c7f9c4e-3db3-4a96-8f93-a2fca241200d
// template_name: 项目部竣工验收
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_COMPLETEDPROJECTACCEPTANCE_ID]);

View File

@@ -0,0 +1,16 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0ca71a91-a815-4185-ad8b-c41d384106bf
// template_name: 成本记账
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item["ISCHECKACCOUNTS"]=="是"){
enableButton("记账",false);
enableButton("取消记账",false);
}else if(item["ISCHECKACCOUNTS"]=="否" &amp;&amp; item["ISFACTTALLY"]=="是"){
enableButton("记账",false);
enableButton("取消记账",true);
}else{
enableButton("记账",true);
enableButton("取消记账",false);
}

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0cb12254-a539-4784-8d20-495320753f51
// template_name: 用户证书选择框(有权限控制)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def list = new DateTime[2];
def time1 = GetDefaultValueFunction.currentDate();
def time2 =null;
list[0]=time1;
list[1] = time2;
bindField("VALIDDATE",list);

View File

@@ -0,0 +1,15 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d1e0747-d4ae-429d-8eb5-52b517a5e734
// template_name: 专业分包实际成本
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item["ISACCOUNTS"]=="是"){
enableButton("修改",false);
enableButton("删除",false);
}else{
enableButton("修改",true);
enableButton("删除",true);
}

View File

@@ -0,0 +1,16 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def projectId = item["GB_PROJECTINFO_ID"];
def list = GetServicesFunction.listSelectResult(["GB_PROJECTINFOID":projectId],"GB_SENNOR",["SYNCPLAT"]);
def flag = false;
if(list != null &amp;&amp; list.size() &gt; 0){
def syncplat = list.get(0).get_Value("SYNCPLAT");
if(syncplat != null)
flag = true;
}
enableButton("批量上传扬尘数据",flag);

View File

@@ -0,0 +1,20 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def project = GetServicesFunction.loadPOJO(GB_PROJECTINFO_ID,"GB_PROJECTINFO",false);
def prjnumber = project.get_Value("PRJNUMBER");
def sql = " p.prjnumber = '" + prjnumber + "' and p.isactive = 1";
def sec = new CustomSearchConditional(sql);
def workers = GetServicesFunction.listSelectResult(["GB_PRJ_WORKER_ID":sec],"GB_PRJ_WORKER",["ZJHM"]);
def zjhms = "(''";
workers?.each{
def zjhm = it.get_Value("ZJHM");
zjhms += ",'" + zjhm + "'";
}
zjhms += ")";
page.setDataFilter(["ZJHMS":zjhms]);

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["GB_PROJECTINFO_ID":GB_PROJECTINFO_ID]);
GetServicesFunction.excuteFlow(["GB_PROJECTINFO_ID":GB_PROJECTINFO_ID],"GB_KQTEMPCOUNT_UPLOADQRCODE");
page.noSearch(false);

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 4
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//page.setReceiveMap(["GB_PROJECTINFOID":GB_PROJECTINFO_ID]);
def po = GetServicesFunction.loadPOJO(GB_PROJECTINFO_ID,"GB_PROJECTINFO",false);
page.setDataFilter(["PRJNUMBER":po.get_Value("PRJNUMBER"),"PROJECTID":GB_PROJECTINFO_ID,"GB_PROJECTINFOID":GB_PROJECTINFO_ID]);
page.setReceiveMap(["PRJNUMBER":po.get_Value("PRJNUMBER"),"PROJECTID":GB_PROJECTINFO_ID,"GB_PROJECTINFOID":GB_PROJECTINFO_ID])

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 5
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//page.setDataFilter(["GB_PROJECTINFOID":GB_PROJECTINFO_ID]);
//page.setReceiveMap(["GB_PROJECTINFOID":GB_PROJECTINFO_ID]);
def po = GetServicesFunction.loadPOJO(GB_PROJECTINFO_ID,"GB_PROJECTINFO",false);
page.setDataFilter(["PRJNUMBER":po.get_Value("PRJNUMBER"),"DATANUMBER":po.get_Value("DATANUMBER"),"GB_PROJECTINFO_ID":GB_PROJECTINFO_ID]);
page.setReceiveMap(["PRJNUMBER":po.get_Value("PRJNUMBER"),"DATANUMBER":po.get_Value("DATANUMBER"),"GB_PROJECTINFO_ID":GB_PROJECTINFO_ID])

View File

@@ -0,0 +1,11 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 6
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def po = GetServicesFunction.loadPOJO(GB_PROJECTINFO_ID,"GB_PROJECTINFO",false);
page.setDataFilter(["PRJNUMBER":po.get_Value("PRJNUMBER"),"DATANUMBER":po.get_Value("DATANUMBER"),"GB_PROJECTINFO_ID":GB_PROJECTINFO_ID]);
page.setReceiveMap(["PRJNUMBER":po.get_Value("PRJNUMBER"),"DATANUMBER":po.get_Value("DATANUMBER"),"GB_PROJECTINFO_ID":GB_PROJECTINFO_ID])

View File

@@ -0,0 +1,10 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d674631-7a53-44b0-bb41-6aa201ede8ec
// template_name: 实名制项目基础信息
// seq : 7
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//page.setDefaultSearch(["GB_PROJECTINFOID":GB_PROJECTINFO_ID]);
page.setDataFilter(["GB_PROJECTINFOID":GB_PROJECTINFO_ID,"PROJECTID":GB_PROJECTINFO_ID]);
page.setReceiveMap(["GB_PROJECTINFOID":GB_PROJECTINFO_ID])

View File

@@ -0,0 +1,8 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d9eac07-1978-4abb-ab1f-f1561f9bd902
// template_name: 福利保险结算单
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setFieldVisible("BEGINDATE", false);

View File

@@ -0,0 +1,14 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d9eac07-1978-4abb-ab1f-f1561f9bd902
// template_name: 福利保险结算单
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def year = getFieldValue("BEGINYEAR");
def month = getFieldValue("BEGINMONTH");
if(year!=null&amp;&amp;month!=null){
bindField("BEGINDATE",(year*100+month));
}

View File

@@ -0,0 +1,21 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0d9eac07-1978-4abb-ab1f-f1561f9bd902
// template_name: 福利保险结算单
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def idlist = getFieldValue("WELFARECATEGORYIDS");
def text = "";
if(idlist!=null &amp;&amp; idlist.size()&gt;0){
for(i in 0..&lt;idlist.size()){
if(i==0){
text += "'"+idlist[i]+"'";
}else{
text += ",'"+idlist[i]+"'";
}
}
}
bindField("WELFARECATEGORYID",text);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0dab3418-8233-4f90-896e-f087b943a393
// template_name: 员工档案-五建定制
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setShowPdf(true)

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0dab3418-8233-4f90-896e-f087b943a393
// template_name: 员工档案-五建定制
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap=[:];
searchMap["SYS_ENUMERATETYPE_ID"] = 'HR_EMPLOYEE_STATUS';
setFieldFilter("JOBSTATUSS", searchMap);

View File

@@ -0,0 +1,18 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0dab3418-8233-4f90-896e-f087b943a393
// template_name: 员工档案-五建定制
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def searchMap=[:];
def solvelist=[];
searchMap["SYS_ENUMERATETYPE_ID"] = 'HR_EMPLOYEE_STATUS';
//searchMap["CODEDES"]=["处理中","已派工"];
searchMap["CODEVALUE"]=[1,4,5];
def list = GetServicesFunction.listSelectResult(searchMap,"SYS_ENUMERATE");
if(list!=null &amp;&amp; list.size()&gt;0){
list.each{
solvelist.add(it.get_ID());
}
}
bindField("JOBSTATUSS",solvelist);

View File

@@ -0,0 +1,27 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0dab3418-8233-4f90-896e-f087b943a393
// template_name: 员工档案-五建定制
// seq : 4
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
import com.vaadin.server.VaadinService;
import com.dsasp.client.viewframework.util.ImageUrlUtil;
//def map = GetServicesFunction.executeQueryForMap("select filepath,filename from sys_doc where businesskey = '"+HR_EMPLOYEE_ID+"'");
//def searchmap = [:];
//searchmap["FILEPATH"] = map["filepath"];
//def path = ImageUrlUtil.getUrl(searchmap);
//def path1 = "http://localhost:8080";//VaadinService.getCurrentRequest().getRemoteAddr();
//def path2 = VaadinService.getCurrentRequest().getRemotePort();
///path = GetValueFunction.concat(path1,path2);
//path = GetValueFunction.concat(path1,path);
page.setDataFilter(["HR_EMPLOYEE_ID":HR_EMPLOYEE_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0db338e8-5de2-4a83-b86a-ac08c939bbca
// template_name: 项目部污染源管理
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_PROJECTPOLLUTIONLISTITEM_ID]);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0e54cebd-a2eb-4c6d-b927-17ccb906fddb
// template_name: 新闻管理归档表单
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setGroupReadOnly(true);

View File

@@ -0,0 +1,33 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 0f00e2e5-7360-47ed-b580-e1c1df685b65
// template_name: (分)公司、项目薪资分析表
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
if(getFieldValue("YEAR") == null &amp;&amp; getFieldValue("MONTH") == null){
clearFieldData("YEAR");
currentYear = GetDefaultValueFunction.currentYear();
lastYear = currentYear - 7;
nextYear = currentYear + 8;
for(i in lastYear..&lt;currentYear){
addFieldOption("YEAR", i, i.toString());
}
for(j in currentYear..nextYear){
addFieldOption("YEAR", j, j.toString());
}
clearFieldData("MONTH");
for(k in 1..12){
addFieldOption("MONTH", k, k.toString());
}
bindField("YEAR",GetDefaultValueFunction.currentYear());
bindField("MONTH",GetDefaultValueFunction.currentMonth());
}

View File

@@ -0,0 +1,18 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 10ee75e7-0d90-493b-b9a3-6bbbbe214127
// template_name: 项目开票申请(通用)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def ordersStatus = GetServicesFunction.getEnumerateItemValue("WFSTATUS",item['STATUS']);
if(ordersStatus == 3){
enableButton("作废",true);
}else if(ordersStatus == 6){
enableButton("作废",false);
enableButton("修改",false);
enableButton("删除",false);
enableButton("提交审批",false);
}else{
enableButton("作废",false);
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 10ee75e7-0d90-493b-b9a3-6bbbbe214127
// template_name: 项目开票申请(通用)
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
addSubTableButton("EXTERNALS", "EXTERNALSELECT", 0);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 10ee75e7-0d90-493b-b9a3-6bbbbe214127
// template_name: 项目开票申请(通用)
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_INVOICEAPPLY_ID]);

View File

@@ -0,0 +1,16 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 11094651-961f-4452-ada2-aef018ce8a36
// template_name: 成本分析-机械(统计至核算对象)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import com.dsasp.server.common.dataDic.bean.CustomSearchConditional;
def projectid = getFieldValue("PROJECTID");
def searchMap = ["PROJECTID":projectid];
setFieldFilter("MREPORTINTERVALID", searchMap);

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 11363b77-f431-492e-9c85-97d1a9b5c359
// template_name: 进项税抵扣调整(不同工程间抵扣)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import com.dsasp.server.common.dataDic.bean.CustomSearchConditional;
def searchMap = [:];
def strSql = "P.PM_PROJECT_ID not in (select PM_PROJECT_ID from PM_PROJECT where parentid is not null)";
searchMap["PM_PROJECT_ID"]=new CustomSearchConditional(strSql);
setFieldFilter("PROJECTID", searchMap);

View File

@@ -0,0 +1,13 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 11363b77-f431-492e-9c85-97d1a9b5c359
// template_name: 进项税抵扣调整(不同工程间抵扣)
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import com.dsasp.server.common.dataDic.bean.CustomSearchConditional;
def searchMap = [:];
def strSql = "P.PM_PROJECT_ID not in (select PM_PROJECT_ID from PM_PROJECT where parentid is not null)";
searchMap["PM_PROJECT_ID"]=new CustomSearchConditional(strSql);
setFieldFilter("INPROJECTID", searchMap);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 11363b77-f431-492e-9c85-97d1a9b5c359
// template_name: 进项税抵扣调整(不同工程间抵扣)
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["PM_INPUTTAXINVOICE_EACHDEDUCT_ID":PM_INPUTTAXINVOICE_EACHDEDUCT_ID]);

View File

@@ -0,0 +1,16 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 11b66410-e20a-4d08-b01d-344b1e6f65dd
// template_name: 物资供应商调查(五建定制)-暂时不用
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
clearFieldData("ELIGIBILITY");
//2:未评审、3:评审中、4:合格、5:不合格、6:黑名
addFieldOption("ELIGIBILITY", "请选择", "请选择");
addFieldOption("ELIGIBILITY", 2, "未评审");
addFieldOption("ELIGIBILITY", 3, "评审中");
addFieldOption("ELIGIBILITY", 4, "合格");
addFieldOption("ELIGIBILITY", 5, "不合格");
addFieldOption("ELIGIBILITY", 6, "黑名");

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 14a0f2e3-77b0-4433-a8b8-b7fc63ba0813
// template_name: 劳务队组名录-去除劳务公司-五建定制
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["LABOURNAME":VIEW_PM_LABORTEAM_ID]);

View File

@@ -0,0 +1,14 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 153857ac-5d70-4dc8-882d-1b2b8027be56
// template_name: 竣工项目收付款信息表(项目)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap = new HashMap();
def strSql = " P.PROJECTSTAGE = 100 AND PROJECTNAME NOT LIKE '14年新签合同补录%'";
searchMap = ["PROJECTSTAGE":new CustomSearchConditional(strSql)];
//searchMap["FILIALE"] = GetDefaultValueFunction.getCurrentUserOrgId();//本组织
setFieldFilter("PROJECTID", searchMap);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1760c344-641e-4dea-80c6-952a8e86e06a
// template_name: 紧急放行
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["PM_EMERGENCYRELEASE_ID":PM_EMERGENCYRELEASE_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,12 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1760c344-641e-4dea-80c6-952a8e86e06a
// template_name: 紧急放行
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def map =[:];
//设置过滤条件(客户类型:物资供应商)
map["UNITTYPE"] = 2;
map["ELIGIBILITY"] = 4;
setFieldFilter("SUPPLIERID", map);

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1760c344-641e-4dea-80c6-952a8e86e06a
// template_name: 紧急放行
// seq : 3
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap=[:];
searchMap["PROJECTID"] = getFieldValue("PROJECTID");//单项工程ID
setFieldFilter("UNITPROJECTID", searchMap);

View File

@@ -0,0 +1,34 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 17a7176a-0003-4e85-a7b2-003d1c03acae
// template_name: 新APP应用管理(更新包)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
def x;
def y;
def z;
def id = "";
def company = getFieldValue("COMPANY");
def method = getFieldValue("METHOD");
def sql = "select * from NEWAPP_UPDATE where COMPANY = "+company+" order by CREATETIME DESC";
def po = GetServicesFunction.listSelectResultBySql([:],"NEWAPP_UPDATE",sql,["ID"]);
if(po&amp;&amp;po.size()&gt;0){
id = po.get(0).get_Value("ID");
x = id.substring(0,id.indexOf("."));
y = id.substring(id.indexOf(".")+1,id.lastIndexOf("."));
z = id.substring(id.lastIndexOf(".")+1,id.size());
if(method == 1){
z = z.toInteger()+1;//GetValueFunction.toInteger(z)+1;
}else if(method == 2){
y = y.toInteger()+1;
};
id = x+"."+y+"."+z;
}else{
x=1;
y=0;
z=1;
id = x+"."+y+"."+z;
}
bindField("ID",id)

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 18c1490a-6a21-4cde-97a5-86c31de456c0
// template_name: 新物资确认
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("STATE",1); //1:已确认;2:待确认;3:淘汰

View File

@@ -0,0 +1,17 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 18c1490a-6a21-4cde-97a5-86c31de456c0
// template_name: 新物资确认
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("MATERIALID",getFieldValue("PM_MATERIALREPOSITORY_ID"));
bindField("MATERIALNAMETEMP",getFieldValue("MATERIALNAME"));
bindField("SPECIFICATIONSTEMP",getFieldValue("SPECIFICATIONS"));
bindField("MATERIALCODE",null);
bindField("MATERIALNAME",null);
bindField("SPECIFICATIONS",null);
bindField("UNIT",null);
bindField("RESOURCETYPEID",null);
bindField("REMARK",null);
bindField("DOCUMENT",null);
bindField("IMPORTUPPERLIMIT",null);

View File

@@ -0,0 +1,12 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 18fb15c9-160d-4bc3-b013-859d793ac8ba
// template_name: 总包合同评审(五建定制-列表模板)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def list = getFieldValue("ORGIDLIST");
Console.debug(list);
def searchMap = [:];
searchMap["FILIALE"] = list;//分公司
setFieldFilter("PM_PROJECTID", searchMap);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 18fb15c9-160d-4bc3-b013-859d793ac8ba
// template_name: 总包合同评审(五建定制-列表模板)
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_CONTRACTUALREVIEW_ID]);

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 18fb15c9-160d-4bc3-b013-859d793ac8ba
// template_name: 总包合同评审(五建定制-列表模板)
// seq : 3
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//bindField("TYPE",5);
setFieldReadOnly("TYPE",true);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 191cfb4b-0ef4-4d1a-822e-dac767689405
// template_name: 单位信息确认(内部定制)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setFieldFilter("UNITTYPE", ["EXTENDATTRIBUTEONE" : 0, "SYS_ENUMERATETYPE_ID" : "UNITTYPE"]);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 193ef769-a04d-4d77-9fec-a7d9ff802c83
// template_name: 公司审核
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["ID":PM_COMPLETIONMATEAPPROVAL_ID]);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 193ef769-a04d-4d77-9fec-a7d9ff802c83
// template_name: 公司审核
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
bindField("APPROVALTYPE", 1);

View File

@@ -0,0 +1,16 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 19482910-7cf7-44fe-9612-bc9859bfe9d9
// template_name: 成本分析-人工(统计至核算对象)
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
import com.dsasp.server.common.dataDic.bean.CustomSearchConditional;
def projectid = getFieldValue("PROJECTID");
def searchMap = ["PROJECTID":projectid];
setFieldFilter("MREPORTINTERVALID", searchMap);

View File

@@ -0,0 +1,11 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 195c3bae-cba7-4660-984c-998209224f12
// template_name: 报销申请
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item['STATUS'] =="通过"){
enableButton("打印报销申请单",true);
}else{
enableButton("打印报销申请单",false);
}

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 195c3bae-cba7-4660-984c-998209224f12
// template_name: 报销申请
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
page.setDataFilter(["OA_REIMBURSEMENTAPPLY_ID":OA_REIMBURSEMENTAPPLY_ID,"COMPANY":GetDefaultValueFunction.getConfigValue("com.dsasp.server.organize.COMPANY")]);

View File

@@ -0,0 +1,32 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 195c3bae-cba7-4660-984c-998209224f12
// template_name: 报销申请
// seq : 3
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def type = getFieldValue("APPROVALTYPE");
if(type==null){
type = 1;
}
//排除“项目付款的审批类型”
def smap=[:];
smap["EXTENDATTRIBUTEONE"] = 2;
smap["SYS_ENUMERATETYPE_ID"] = "REIMBURSEMENT_APPROVALTYPE";
def typelist = GetServicesFunction.listSelectResult(smap,"SYS_ENUMERATE");
if(typelist!=null &amp;&amp; typelist.size()&gt;0){
for(i in 0..&lt;typelist.size()){
def po = typelist[i]
getFieldDataSource("APPROVALTYPE")?.removeItem(po.get_Value("CODEVALUE"));
}
}
//绑定默认
bindField("APPROVALTYPE",type);

View File

@@ -0,0 +1,19 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1a2efaf3-4177-48b7-b7e5-0e141da045c1
// template_name: 机械合同终止(五建定制)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//获取选中列的实体
def OTHERCONTRACTREGISTER = GetServicesFunction.loadPOJO(item["PM_MACHINECONTRACTREGISTER_ID"],"PM_MACHINECONTRACTREGISTER",false)
if(OTHERCONTRACTREGISTER!=null){
def CONTRACTSTATUS = OTHERCONTRACTREGISTER?.get_Value("CONTRACTSTATUS");
if(CONTRACTSTATUS == 2){//所选合同是终止状态
enableButton("终止合同",false);//终止按钮不可用
}else{//所选合同是登记或者结算状态
enableButton("取消终止",false);//取消终止按钮不可用
}
}else{
enableButton("终止合同",false);
enableButton("取消终止",false);
}

View File

@@ -0,0 +1,12 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1a2efaf3-4177-48b7-b7e5-0e141da045c1
// template_name: 机械合同终止(五建定制)
// seq : 2
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def list = getFieldValue("ORGIDLIST");
Console.debug(list);
def searchMap = [:];
searchMap["FILIALE"] = list;//分公司
setFieldFilter("PROJECTID", searchMap);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1a35cb86-7473-4c8a-a43a-e223e719cb28
// template_name: 单位信息确认
// seq : 1
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
setFieldFilter("UNITTYPE", ["EXTENDATTRIBUTEONE" : 0, "SYS_ENUMERATETYPE_ID" : "UNITTYPE"]);

View File

@@ -0,0 +1,58 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 1a48f81b-e212-4af8-ac2f-f90ec0f3c7c3
// template_name: 建造师执业资格证
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item["USERMODETEXT"]=="已注销"){
enableButton("修改",false);
enableButton("借用登记",false);
enableButton("归还登记",false);
enableButton("继续教育",false);
enableButton("添加",true);
enableButton("删除",true);
enableButton("查看",true);
}else if(item["USERMODETEXT"]=="已转出"){
enableButton("修改",false);
enableButton("借用登记",false);
enableButton("归还登记",false);
enableButton("继续教育",false);
enableButton("添加",true);
enableButton("删除",true);
enableButton("查看",true);
}else if(item["USERMODETEXT"]=="使用中"){
enableButton("修改",true);
enableButton("借用登记",false);
enableButton("归还登记",true);
enableButton("继续教育",true);
enableButton("添加",true);
enableButton("删除",false);
enableButton("查看",true);
}else if(item["USERMODETEXT"]=="空闲"){
enableButton("修改",true);
enableButton("借用登记",true);
enableButton("归还登记",false);
enableButton("继续教育",true);
enableButton("添加",true);
enableButton("删除",true);
enableButton("查看",true);
}else{
enableButton("修改",true);
enableButton("借用登记",false);
enableButton("归还登记",false);
enableButton("继续教育",false);
enableButton("添加",true);
enableButton("删除",false);
enableButton("查看",true);
}
def dow = GetDefaultValueFunction.getConfigValue("com.dsasp.pm.projectbasemanager.ISUSERCARDWINDOW")== null?1:Integer.parseInt(GetDefaultValueFunction.getConfigValue("com.dsasp.pm.projectbasemanager.ISUSERCARDWINDOW"));
if(dow==1){//1:启用(通过招投标和总包合同备案控制证书状态)。
enableButton("借用登记",false);
enableButton("归还登记",false);
}

Some files were not shown because too many files have changed in this diff Show More