Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
|
6f0176d2d3 | 2 months ago |
|
34fb245ed0 | 8 months ago |
|
9fe4786fdd | 8 months ago |
|
1f7070c611 | 2 years ago |
|
884052dc1d | 2 years ago |
|
cf8841a775 | 2 years ago |
|
dee3855003 | 2 years ago |
|
bc855b294b | 2 years ago |
@ -1,15 +1,17 @@
|
||||
/weaver-develop.iml
|
||||
/weaver-hrm-organization.iml
|
||||
/out/
|
||||
.idea/
|
||||
/.idea/
|
||||
|
||||
HELP.md
|
||||
target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
|
||||
/test
|
||||
/src/test
|
||||
/src/rebel.xml
|
||||
/src/META-INF
|
||||
/WEB-INF/config
|
||||
|
||||
/log
|
||||
/log
|
||||
|
||||
/weaver-develop.iml
|
||||
|
@ -1,8 +0,0 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="weaver-develop:jar">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/weaver_develop_jar</output-path>
|
||||
<root id="archive" name="weaver-develop.jar">
|
||||
<element id="module-output" name="weaver-develop" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="classbean">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../../../../weaver/ecology/classbean" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: test.MainTest
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.api.liante.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/02/07
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/liante/workflowfield")
|
||||
public class WorkflowFieldController extends com.engine.liante.controller.WorkflowFieldController{
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.engine.liante.controller;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.liante.service.WorkflowFieldService;
|
||||
import com.engine.liante.service.impl.WorkflowFieldServiceImpl;
|
||||
import com.engine.liante.util.ResponseResult;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/02/07
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class WorkflowFieldController {
|
||||
private WorkflowFieldService getWorkflowFieldService(User user) {
|
||||
return ServiceUtil.getService(WorkflowFieldServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getSalaryStandards")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getSalaryStandards(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getWorkflowFieldService(user)::getSalaryStandards, params);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.engine.liante.exception;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2023/2/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class CustomizeRunTimeException extends RuntimeException{
|
||||
|
||||
public CustomizeRunTimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CustomizeRunTimeException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CustomizeRunTimeException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.engine.liante.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/02/07
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface WorkflowFieldService {
|
||||
/**
|
||||
* 获取薪资标准
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getSalaryStandards(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.engine.liante.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.liante.service.WorkflowFieldService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/02/07
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class WorkflowFieldServiceImpl extends Service implements WorkflowFieldService {
|
||||
@Override
|
||||
public Map<String, Object> getSalaryStandards(Map<String, Object> params) {
|
||||
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
String id = Util.null2String(params.get("id"));
|
||||
String tableName = Util.null2String(params.get("tableName"));
|
||||
String relateField = Util.null2String(params.get("relateField"));
|
||||
if(StringUtils.isBlank(relateField)){
|
||||
relateField="id";
|
||||
}
|
||||
String fields = Util.null2String(params.get("fields"));
|
||||
if (StringUtils.isBlank(id) || StringUtils.isBlank(tableName) || StringUtils.isBlank(fields)) {
|
||||
return dataMap;
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select " + fields + " from " + tableName + " where " + relateField + " = ?", id);
|
||||
if (rs.next()) {
|
||||
String[] split = fields.split(",");
|
||||
for (String field : split) {
|
||||
dataMap.put(field, rs.getString(tableName,field,true,true));
|
||||
}
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.engine.liante.util;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2023/2/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class ExceptionUtil {
|
||||
public static String getRealMessage(Throwable e) {
|
||||
while (e != null) {
|
||||
Throwable cause = e.getCause();
|
||||
if (cause == null) {
|
||||
return e.getMessage();
|
||||
}
|
||||
e = cause;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package test;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/9
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class MainTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue