This commit is contained in:
parent
389022e0ea
commit
c3cb3105fd
|
|
@ -80,10 +80,10 @@ public class SalaryFormulaController {
|
|||
return new ResponseResult<String, ArrayList>(user).run(getSalaryFormulaWrapper(user)::datasourceList);
|
||||
}
|
||||
|
||||
@GET
|
||||
@POST
|
||||
@Path("/checkSql")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String save(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
public String checkFormula(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryFormulaSaveParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
String result = "";
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
|
@ -94,15 +94,15 @@ public class SalaryFormulaController {
|
|||
String datasourceId = request.getParameter("datasourceId");
|
||||
RecordSetDataSource rs = new RecordSetDataSource(datasourceId);
|
||||
log.info("sql run{},datasourceId:{},sqlReturnKey:{}", sql, datasourceId, sqlReturnKey);
|
||||
map.put("sql",sql);
|
||||
map.put("sqlReturnKey",sqlReturnKey);
|
||||
map.put("datasourceId",datasourceId);
|
||||
map.put("sql", sql);
|
||||
map.put("sqlReturnKey", sqlReturnKey);
|
||||
map.put("datasourceId", datasourceId);
|
||||
if (rs.executeSql(sql)) {
|
||||
if (rs.next()) {
|
||||
result = rs.getString(sqlReturnKey);
|
||||
}
|
||||
}
|
||||
map.put("result",result);
|
||||
map.put("result", result);
|
||||
} catch (Exception e) {
|
||||
log.error("sql error", e);
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue