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,10 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 1
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//bindField("EMPLOYEE",VIEW_HR_EMPLOYEE_ID);
setFieldReadOnly("EMPLOYEE", true);

View File

@@ -0,0 +1,7 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 2
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
setFieldReadOnly("EMPLOYEE", true);

View File

@@ -0,0 +1,566 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 3
// label : HARD
// 硬 S3 原因 : 动态创建 Vaadin 组件; UI.getCurrent()
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.UI;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Notification.Type;
import com.vaadin.ui.Window;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.Property.ValueChangeEvent;
import com.dsasp.server.common.viewframework.service.PageTemplateService;
import com.dsasp.server.common.core.service.SpringBeanOsgiServices;
import com.dsasp.client.viewframework.listener.ConfirmDialogListener;
final abccards = group.getField("ABCCARDS");
final Button abcupdatebut = new Button("修改");
final Button abcshowbut = new Button("查看");
final Object abctable = abccards?.table;
abctable?.setImmediate(true);
final Window abceditWindow = abccards?.editWindow;
final FieldGroup abcfieldGroup = abccards?.fieldGroup;
final Button abcsaveButton = abccards?.saveButton;
final Button abcsaveContinueButton = abccards?.saveContinueButton;
final Button jzsupdatebut = new Button("修改");
final Button jzsshowbut = new Button("查看");
final jzscards = group.getField("JZSCARDS");
final Object jzstable = jzscards?.table;
jzstable?.setImmediate(true);
final Window jzseditWindow = jzscards?.editWindow;
final FieldGroup jzsfieldGroup = jzscards?.fieldGroup;
final Button jzssaveButton = jzscards?.saveButton;
final Button jzssaveContinueButton = jzscards?.saveContinueButton;
final Button zcupdatebut = new Button("修改");
final Button zcshowbut = new Button("查看");
final zccards = group.getField("ZCCARDS");
final Object zctable = zccards?.table;
zctable?.setImmediate(true);
final Window zceditWindow = zccards?.editWindow;
final FieldGroup zcfieldGroup = zccards?.fieldGroup;
final Button zcsaveButton = zccards?.saveButton;
final Button zcsaveContinueButton = zccards?.saveContinueButton;
final Button jsgrupdatebut = new Button("修改");
final Button jsgrshowbut = new Button("查看");
final jsgrcards = group.getField("JSGRCARDS");
final Object jsgrtable = jsgrcards?.table;
jsgrtable?.setImmediate(true);
final Window jsgreditWindow = jsgrcards?.editWindow;
final FieldGroup jsgrfieldGroup = jsgrcards?.fieldGroup;
final Button jsgrsaveButton = jsgrcards?.saveButton;
final Button jsgrsaveContinueButton = jsgrcards?.saveContinueButton;
final Button mupdatebut = new Button("修改");
final Button mshowbut = new Button("查看");
final mcards = group.getField("MCARDS");
final Object mtable = mcards?.table;
mtable?.setImmediate(true);
final Window meditWindow = mcards?.editWindow;
final FieldGroup mfieldGroup = mcards?.fieldGroup;
final Button msaveButton = mcards?.saveButton;
final Button msaveContinueButton = mcards?.saveContinueButton;
final Button otherupdatebut = new Button("修改");
final Button othershowbut = new Button("查看");
final othercards = group.getField("OTHERCARDS");
final Object othertable = othercards?.table;
othertable?.setImmediate(true);
final Window othereditWindow = othercards?.editWindow;
final FieldGroup otherfieldGroup = othercards?.fieldGroup;
final Button othersaveButton = othercards?.saveButton;
final Button othersaveContinueButton = othercards?.saveContinueButton;
//ABC修改
abcupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = abctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = abccards?.getSelectValue("HR_SAFETYCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_SAFETYCARD",true);
abceditWindow.setCaption(abcupdatebut.getCaption());
UI.getCurrent().addWindow(abceditWindow);
abcfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : abcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
abcfieldGroup.getItemDataSource().getItemProperty(abcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
abcsaveContinueButton.setVisible(false);
}
});
//ABC查看
abcshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = abctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = abccards?.getSelectValue("HR_SAFETYCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_SAFETYCARD",true);
abceditWindow.setCaption(abcshowbut.getCaption());
UI.getCurrent().addWindow(abceditWindow);
//窗体赋值
for(Field f : abcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
abcfieldGroup.getItemDataSource().getItemProperty(abcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(abcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
abcfieldGroup.setReadOnly(true);
abcsaveButton.setVisible(false);
abcsaveContinueButton.setVisible(false);
}
});
abccards?.addButton(abcupdatebut,"update.png",2);
abccards?.addButton(abcshowbut,"ckobu.png",4);
abcupdatebut.setVisible(abccards?.getModifyButton().isVisible());
abccards?.showModifyButton(false);
abccards?.getDetailButton().setVisible(false);
//建造师修改
jzsupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jzstable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jzscards?.getSelectValue("HR_CONSTRUCTORCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_CONSTRUCTORCARD",true);
jzseditWindow.setCaption(jzsupdatebut.getCaption());
UI.getCurrent().addWindow(jzseditWindow);
jzsfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : jzsfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
if(jzsfieldGroup.getPropertyId(f).equals("PROFESSIONALS")){
def list = pojo.get_Value(jzsfieldGroup.getPropertyId(f));
def newlist=[];
if(list!=null &amp;&amp; list.size()&gt;0){
list.each{
def submap = it.toMap();
newlist.add(submap);
}
}
((AbstractField)f).setConvertedValue(newlist);
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(newlist);
}else{
((AbstractField)f).setConvertedValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
}
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jzssaveContinueButton.setVisible(false);
}
});
//建造师查看
jzsshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jzstable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jzscards?.getSelectValue("HR_CONSTRUCTORCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_CONSTRUCTORCARD",true);
jzseditWindow.setCaption(jzsshowbut.getCaption());
UI.getCurrent().addWindow(jzseditWindow);
//窗体赋值
for(Field f : jzsfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
if(jzsfieldGroup.getPropertyId(f).equals("PROFESSIONALS")){
def list = pojo.get_Value(jzsfieldGroup.getPropertyId(f));
def newlist=[];
if(list!=null &amp;&amp; list.size()&gt;0){
list.each{
def submap = it.toMap();
newlist.add(submap);
}
}
((AbstractField)f).setConvertedValue(newlist);
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(newlist);
}else{
((AbstractField)f).setConvertedValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
jzsfieldGroup.getItemDataSource().getItemProperty(jzsfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jzsfieldGroup.getPropertyId(f)));
}
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jzsfieldGroup.setReadOnly(true);
jzssaveButton.setVisible(false);
jzssaveContinueButton.setVisible(false);
}
});
jzscards?.addButton(jzsupdatebut,"update.png",2);
jzscards?.addButton(jzsshowbut,"ckobu.png",4);
jzsupdatebut.setVisible(jzscards?.getModifyButton().isVisible());
jzscards?.showModifyButton(false);
jzscards?.getDetailButton().setVisible(false);
//职称修改
zcupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = zctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = zccards?.getSelectValue("HR_POSITIONALTITLES_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_POSITIONALTITLES",true);
zceditWindow.setCaption(zcupdatebut.getCaption());
UI.getCurrent().addWindow(zceditWindow);
zcfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : zcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
zcfieldGroup.getItemDataSource().getItemProperty(zcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
zcsaveContinueButton.setVisible(false);
}
});
//职称修改
zcshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = zctable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = zccards?.getSelectValue("HR_POSITIONALTITLES_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_POSITIONALTITLES",true);
zceditWindow.setCaption(zcshowbut.getCaption());
UI.getCurrent().addWindow(zceditWindow);
//窗体赋值
for(Field f : zcfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
zcfieldGroup.getItemDataSource().getItemProperty(zcfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(zcfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
zcfieldGroup.setReadOnly(true);
zcsaveButton.setVisible(false);
zcsaveContinueButton.setVisible(false);
}
});
zccards?.addButton(zcupdatebut,"update.png",2);
zccards?.addButton(zcshowbut,"ckobu.png",4);
zcupdatebut.setVisible(zccards?.getModifyButton().isVisible());
zccards?.showModifyButton(false);
zccards?.getDetailButton().setVisible(false);
//技术工人修改
jsgrupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jsgrtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jsgrcards?.getSelectValue("HR_WORKERSCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_WORKERSCARD",true);
jsgreditWindow.setCaption(jsgrupdatebut.getCaption());
UI.getCurrent().addWindow(jsgreditWindow);
jsgrfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : jsgrfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
jsgrfieldGroup.getItemDataSource().getItemProperty(jsgrfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jsgrsaveContinueButton.setVisible(false);
}
});
//
jsgrshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = jsgrtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = jsgrcards?.getSelectValue("HR_WORKERSCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_WORKERSCARD",true);
jsgreditWindow.setCaption(jsgrshowbut.getCaption());
UI.getCurrent().addWindow(jsgreditWindow);
//窗体赋值
for(Field f : jsgrfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
jsgrfieldGroup.getItemDataSource().getItemProperty(jsgrfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(jsgrfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
jsgrfieldGroup.setReadOnly(true);
jsgrsaveButton.setVisible(false);
jsgrsaveContinueButton.setVisible(false);
}
});
jsgrcards?.addButton(jsgrupdatebut,"update.png",2);
jsgrcards?.addButton(jsgrshowbut,"ckobu.png",4);
jsgrupdatebut.setVisible(jsgrcards?.getModifyButton().isVisible());
jsgrcards?.showModifyButton(false);
jsgrcards?.getDetailButton().setVisible(false);
//十大员修改
mupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = mtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = mcards?.getSelectValue("HR_MEMBERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_MEMBERCARD",true);
meditWindow.setCaption(mupdatebut.getCaption());
UI.getCurrent().addWindow(meditWindow);
mfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : mfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
mfieldGroup.getItemDataSource().getItemProperty(mfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
msaveContinueButton.setVisible(false);
}
});
//
mshowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = mtable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = mcards?.getSelectValue("HR_MEMBERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_MEMBERCARD",true);
meditWindow.setCaption(mshowbut.getCaption());
UI.getCurrent().addWindow(meditWindow);
//窗体赋值
for(Field f : mfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
mfieldGroup.getItemDataSource().getItemProperty(mfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(mfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
mfieldGroup.setReadOnly(true);
msaveButton.setVisible(false);
msaveContinueButton.setVisible(false);
}
});
mcards?.addButton(mupdatebut,"update.png",2);
mcards?.addButton(mshowbut,"ckobu.png",4);
mupdatebut.setVisible(mcards?.getModifyButton().isVisible());
mcards?.showModifyButton(false);
mcards?.getDetailButton().setVisible(false);
//其他证书修改
otherupdatebut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = othertable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = othercards?.getSelectValue("HR_OTHERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_OTHERCARD",true);
othereditWindow.setCaption(otherupdatebut.getCaption());
UI.getCurrent().addWindow(othereditWindow);
otherfieldGroup.setReadOnly(false);
//窗体赋值
for(Field f : otherfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
otherfieldGroup.getItemDataSource().getItemProperty(otherfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
othersaveContinueButton.setVisible(false);
}
});
//
othershowbut?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
def id = othertable?.getValue();
if (id == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def hr_id = othercards?.getSelectValue("HR_OTHERCARD_ID");
final pojo = GetServicesFunction.loadPOJO(hr_id,"HR_OTHERCARD",true);
othereditWindow.setCaption(othershowbut.getCaption());
UI.getCurrent().addWindow(othereditWindow);
//窗体赋值
for(Field f : otherfieldGroup.getFields()){
boolean oldReadOnly = ((AbstractField)f).getPropertyDataSource().isReadOnly()||((AbstractField)f).isReadOnly();
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(false);
((AbstractField)f).setReadOnly(false);
}
((AbstractField)f).setConvertedValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
otherfieldGroup.getItemDataSource().getItemProperty(otherfieldGroup.getPropertyId(f)).setValue(pojo.get_Value(otherfieldGroup.getPropertyId(f)));
if(oldReadOnly){
((AbstractField)f).getPropertyDataSource().setReadOnly(true);
((AbstractField)f).setReadOnly(true);
}
}
otherfieldGroup.setReadOnly(true);
othersaveButton.setVisible(false);
othersaveContinueButton.setVisible(false);
}
});
othercards?.addButton(otherupdatebut,"update.png",2);
othercards?.addButton(othershowbut,"ckobu.png",4);
otherupdatebut.setVisible(othercards?.getModifyButton().isVisible());
othercards?.showModifyButton(false);
othercards?.getDetailButton().setVisible(false);

View File

@@ -0,0 +1,30 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 4
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
/* *****************以下脚本绑定附件类型下拉框***************** */
//绑定之前,清空下拉框
bindField("CARDTYPE",null);
clearFieldData("CARDTYPE");
//为附件类型下拉框绑定值
addFieldOption("CARDTYPE", 1, "建造师注册证");
addFieldOption("CARDTYPE", 3, "ABC三类人员证");
addFieldOption("CARDTYPE", 4, "技术工人证");
addFieldOption("CARDTYPE", 5, "十大员证");
addFieldOption("CARDTYPE", 6, "职称");
addFieldOption("CARDTYPE", 7, "其他证书");
addFieldOption("CARDTYPE", 8, "劳动合同");
addFieldOption("CARDTYPE", 9, "教育经历");
addFieldOption("CARDTYPE", 10, "工作经历");
addFieldOption("CARDTYPE", 11, "培训经历");
//绑定默认
bindField("CARDTYPE",1);

View File

@@ -0,0 +1,18 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 5
// 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,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 6
// label : FULL_AUTO
// 处置 : 全自动改写完成,直接入 P4 转换流水线
def searchMap=[:];
searchMap["SYS_ENUMERATETYPE_ID"] = 'HR_EMPLOYEE_STATUS';
setFieldFilter("JOBSTATUSS", searchMap);

View File

@@ -0,0 +1,9 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 7
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
//绑定默认
bindField("SERIALNO",getFieldValue("ACCOUNT"));

View File

@@ -0,0 +1,17 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : 4230b669-a107-4ffb-9aae-e814560d8c6e
// template_name: 员工档案(带证书)
// seq : 8
// label : NO_S3
// 处置 : 无 S3 模式,原样进 P4
if(item["JOBSTATUS"] == "在职" || item["JOBSTATUS"] == "退休留用"){
enableButton("离职",true);
}else{
enableButton("离职",false);
}
if(item["JOBSTATUS"] == "在职"){
enableButton("退休",true);
}else{
enableButton("退休",false);
}