绩效POC
parent
140e728865
commit
c764c45c76
@ -0,0 +1,60 @@
|
||||
package weaver.interfaces.poc.action;
|
||||
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.interfaces.workflow.action.Action;
|
||||
import weaver.soa.workflow.request.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/05/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class UpdatePerformanceLevelsAction implements Action {
|
||||
@Override
|
||||
public String execute(RequestInfo requestInfo) {
|
||||
BaseBean baseBean = new BaseBean();
|
||||
try {
|
||||
Map<String, String> mainDataMap = new HashMap<>();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
// 绩效活动
|
||||
String jxhd = mainDataMap.get("jxhd");
|
||||
|
||||
DetailTableInfo detailTableInfo = requestInfo.getDetailTableInfo();
|
||||
// 明细表二
|
||||
DetailTable detailTable1 = detailTableInfo.getDetailTable(1);
|
||||
String updateSql = "update uf_khfa set khdj = ? where requestId is null and jxhd = ? and khzzdf = ? and xm = ?";
|
||||
RecordSet rs = new RecordSet();
|
||||
Row[] rows = detailTable1.getRow();
|
||||
for (Row row : rows) {
|
||||
Map<String, String> detailMap = new HashMap<>();
|
||||
Cell[] cells = row.getCell();
|
||||
for (Cell cell : cells) {
|
||||
detailMap.put(cell.getName(), cell.getValue());
|
||||
}
|
||||
String khzzdf = detailMap.get("khzzdf");
|
||||
String xm = detailMap.get("ryxm");
|
||||
String khdj = detailMap.get("khdj");
|
||||
baseBean.writeLog("khdj==" + khdj);
|
||||
baseBean.writeLog("jxhd==" + jxhd);
|
||||
baseBean.writeLog("khzzdf==" + khzzdf);
|
||||
baseBean.writeLog("xm==" + xm);
|
||||
// 更新考核方案表登记
|
||||
rs.executeUpdate(updateSql, khdj, jxhd, khzzdf, xm);
|
||||
}
|
||||
return SUCCESS;
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog(e);
|
||||
return FAILURE_AND_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue