shuzhi
wangjie 2 years ago
parent 662603478c
commit ff9d6e6b69

@ -5,8 +5,12 @@ import com.engine.core.cfg.annotation.CommandDynamicProxy;
import com.engine.core.interceptor.AbstractCommandProxy;
import com.engine.core.interceptor.Command;
import com.engine.hrm.cmd.jobset.GetJobTitleListCmd;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import weaver.general.Util;
import java.util.List;
import java.util.Map;
/**
@ -20,14 +24,27 @@ import java.util.Map;
public class SzGetJobTitleListCmd extends AbstractCommandProxy<Map<String, Object>> {
@Override
public Map<String, Object> execute(Command<Map<String, Object>> targetCommand) {
Map<String, Object> result = nextExecute(targetCommand);
Map<String, Object> result = (Map)this.nextExecute(targetCommand);
String sessionKey = Util.null2String(result.get("sessionkey"));
String tableString = Util_TableMap.getVal(sessionKey);
tableString = tableString.replace("岗位简称", "岗位名称")
.replace("岗位全称", "职级名称")
.replace("所属职务", "职级代码")
.replace("职务类别", "序列");
tableString = tableString.replace("岗位简称", "岗位名称").replace("岗位全称", "职级名称").replace("所属职务", "职级代码").replace("职务类别", "序列");
try {
Document document = DocumentHelper.parseText(tableString);
Element rootElement = document.getRootElement();
Element head = rootElement.element("head");
List colList = head.elements();
Element col = DocumentHelper.createElement("col");
col.addAttribute("width", "20%");
col.addAttribute("text", "标识");
col.addAttribute("column", "id");
col.addAttribute("orderkey", "id");
colList.add(0, col);
tableString = document.asXML();
} catch (Exception var10) {
var10.getMessage();
}
Util_TableMap.setVal(sessionKey, tableString);
return result;
}

@ -55,6 +55,9 @@ public class SyncModeStaffJob extends BaseCronJob {
rs.executeUpdate("update uf_bzxxbd set zgrs = ? ,bzrs = ? ,kbrs = ? where id = ?", modeStaff.getNum(), modeStaff.getStaffNum(), modeStaff.getLackNum(), staffId);
}
}
sql = "update uf_bzxxbd set zgrs = 0, kbrs = bzrs where zgrs is null or zgrs = 0";
rs.execute(sql);
new BaseBean().writeLog("######编制数据同步服务,任务结束######");
}
}

Loading…
Cancel
Save