流程提交时签章提醒
parent
7db3854537
commit
13e630f450
@ -0,0 +1,7 @@
|
||||
package com.api.signature;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
@Path("/docSign")
|
||||
public class GetDocSignatureWebAction extends com.engine.haojing.web.GetDocSignatureWebAction {
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.engine.signature;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
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.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GetDocSignatureWebAction {
|
||||
|
||||
@GET
|
||||
@Path("/list")
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
public String getDocSignatureByUserId(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
try {
|
||||
User user = HrmUserVarify.getUser (request , response);
|
||||
RecordSet rs = new RecordSet();
|
||||
String sql = "SELECT a.markName, b.imagefileid, b.imagefilename FROM DocSignature a, ImageFile b where a.imagefileid = b.imagefileid " +
|
||||
"and a.hrmresid = " + user.getUID();
|
||||
rs.execute(sql);
|
||||
List<Map<String, Object>> dataList = new ArrayList<>();
|
||||
if (rs.next()) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("markName", Util.null2String(rs.getString("markName")));
|
||||
data.put("imagefileid", Util.null2String(rs.getString("imagefileid")));
|
||||
data.put("imagefilename", Util.null2String(rs.getString("imagefilename")));
|
||||
dataList.add(data);
|
||||
}
|
||||
apidatas.put("api_status", true);
|
||||
apidatas.put("counts", dataList.size());
|
||||
apidatas.put("datas", dataList);
|
||||
} catch (Exception e) {
|
||||
apidatas.put("api_status", false);
|
||||
}
|
||||
return JSON.toJSONString(apidatas);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue