generated from dxfeng/secondev-chapanda-feishu
66 lines
2.5 KiB
Java
66 lines
2.5 KiB
Java
|
|
package weaver.formmode.recruit.modeexpand.interview;
|
||
|
|
|
||
|
|
import org.apache.commons.lang3.StringUtils;
|
||
|
|
import weaver.conn.RecordSet;
|
||
|
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||
|
|
import weaver.general.Util;
|
||
|
|
import weaver.hrm.User;
|
||
|
|
import weaver.soa.workflow.request.MainTableInfo;
|
||
|
|
import weaver.soa.workflow.request.Property;
|
||
|
|
import weaver.soa.workflow.request.RequestInfo;
|
||
|
|
|
||
|
|
import java.util.HashMap;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author:dxfeng
|
||
|
|
* @createTime: 2024/09/24
|
||
|
|
* @version: 1.0
|
||
|
|
*/
|
||
|
|
public class EditInterviewEvaluateExpand extends AbstractModeExpandJavaCodeNew {
|
||
|
|
@Override
|
||
|
|
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||
|
|
Map<String, String> result = new HashMap<>();
|
||
|
|
RecordSet rs = new RecordSet();
|
||
|
|
try {
|
||
|
|
//数据id
|
||
|
|
int billId;
|
||
|
|
//模块id
|
||
|
|
int modeId;
|
||
|
|
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||
|
|
User user = (User) params.get("user");
|
||
|
|
if (requestInfo != null) {
|
||
|
|
billId = Util.getIntValue(requestInfo.getRequestid());
|
||
|
|
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||
|
|
if (billId > 0 && modeId > 0) {
|
||
|
|
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||
|
|
Property[] properties = mainTableInfo.getProperty();
|
||
|
|
Map<String, Object> mainDataMap = new HashMap<>(16);
|
||
|
|
for (Property property : properties) {
|
||
|
|
mainDataMap.put(property.getName(), property.getValue());
|
||
|
|
}
|
||
|
|
String msid = Util.null2String(mainDataMap.get("msid"));
|
||
|
|
String jg = Util.null2String(mainDataMap.get("jg"));
|
||
|
|
rs.executeQuery("select * from uf_jcl_mspjfk where msid = ? and id != ? and jg is not null", msid, billId);
|
||
|
|
boolean hasEvaluate = rs.next() || StringUtils.isNotBlank(jg);
|
||
|
|
|
||
|
|
if (hasEvaluate) {
|
||
|
|
// 更新为已反馈
|
||
|
|
rs.executeUpdate("update uf_jcl_ms set zt = 2 where id = ? ", msid);
|
||
|
|
} else {
|
||
|
|
// 更新为未反馈
|
||
|
|
rs.executeUpdate("update uf_jcl_ms set zt = 0 where id = ? ", msid);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
} catch (Exception e) {
|
||
|
|
rs.writeLog(e);
|
||
|
|
result.put("errmsg", e.getMessage());
|
||
|
|
result.put("flag", "false");
|
||
|
|
}
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
}
|