79 lines
3.3 KiB
Java
79 lines
3.3 KiB
Java
|
|
package weaver.formmode.customjavacode.modeexpand;
|
|||
|
|
|
|||
|
|
import weaver.conn.RecordSet;
|
|||
|
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
|||
|
|
import weaver.general.Util;
|
|||
|
|
import weaver.hrm.User;
|
|||
|
|
import weaver.soa.workflow.request.RequestInfo;
|
|||
|
|
|
|||
|
|
import java.util.HashMap;
|
|||
|
|
import java.util.Map;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 教育经历 新建、编辑保存 调用
|
|||
|
|
*
|
|||
|
|
* 修改时
|
|||
|
|
* 类名要与文件名保持一致
|
|||
|
|
* class文件存放位置与路径保持一致。
|
|||
|
|
* 请把编译后的class文件,放在对应的目录中才能生效
|
|||
|
|
* 注意 同一路径下java名不能相同。
|
|||
|
|
* @author Administrator
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
public class JyjlExpandTemplate extends AbstractModeExpandJavaCodeNew {
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
|||
|
|
Map<String, String> result = new HashMap<String, String>();
|
|||
|
|
RecordSet rs = new RecordSet();
|
|||
|
|
RecordSet rs1 = new RecordSet();
|
|||
|
|
RecordSet rst = new RecordSet();
|
|||
|
|
try {
|
|||
|
|
User user = (User)param.get("user");
|
|||
|
|
int billid = -1;//数据id
|
|||
|
|
int modeid = -1;//模块id
|
|||
|
|
RequestInfo requestInfo = (RequestInfo)param.get("RequestInfo");
|
|||
|
|
if(requestInfo!=null){
|
|||
|
|
billid = Util.getIntValue(requestInfo.getRequestid());
|
|||
|
|
modeid = Util.getIntValue(requestInfo.getWorkflowid());
|
|||
|
|
if(billid>0&&modeid>0){
|
|||
|
|
//------请在下面编写业务逻辑代码------
|
|||
|
|
rs.executeQuery("select * from uf_jxjl where sfzgxl='0' and id = ?",billid);
|
|||
|
|
if(rs.next()) {
|
|||
|
|
//姓名
|
|||
|
|
String xm = Util.null2String(rs.getString("xm"));
|
|||
|
|
//学历
|
|||
|
|
String xl = Util.null2String(rs.getString("xl1"));
|
|||
|
|
//学习专业
|
|||
|
|
String xxzy = Util.null2String(rs.getString("xxzy"));
|
|||
|
|
//院校类别
|
|||
|
|
String yxlb = Util.null2String(rs.getString("yxlb"));
|
|||
|
|
//毕业院校
|
|||
|
|
String byyx = Util.null2String(rs.getString("byyx"));
|
|||
|
|
|
|||
|
|
//更新人员卡片,个人信息,最高学历、最高学历/学位专业、毕业院校类型、最高学历(学位)毕业学校
|
|||
|
|
rst.executeUpdate("update cus_fielddata set field43='"+xl+"',field15='"+xxzy+"',field16='"+yxlb+"',field46='"+byyx+"' where scope='HrmCustomFieldByInfoType' and scopeid='1' and id=?",xm);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
rs1.executeQuery("select * from uf_jxjl where sfzgxw='0' and id = ?",billid);
|
|||
|
|
if(rs1.next()) {
|
|||
|
|
//姓名
|
|||
|
|
String xm = Util.null2String(rs1.getString("xm"));
|
|||
|
|
//学位
|
|||
|
|
String xw = Util.null2String(rs.getString("xw"));
|
|||
|
|
|
|||
|
|
//更新人员卡片,个人信息,学位信息
|
|||
|
|
rst.executeUpdate("update cus_fielddata set field44='"+xw+"' where scope='HrmCustomFieldByInfoType' and scopeid='1' and id=?",xm);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
} catch (Exception e) {
|
|||
|
|
result.put("errmsg","自定义出错信息");
|
|||
|
|
result.put("flag", "false");
|
|||
|
|
}
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|