| | |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.bouncycastle.jcajce.provider.digest.MD2; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflowFormData", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOaWorkflowFormData(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "flowId", required = false) String flowId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | | @RequestParam(value = "createUserName", required = false) String createUserName, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | @RequestParam(value = "flowId", required = false) String flowId, |
| | | @RequestParam(value = "id", required = false) String id, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | | @RequestParam(value = "createUserName", required = false) String createUserName, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("page",page); |
| | | paramIn.put("row",row); |
| | | paramIn.put("createUserName",createUserName); |
| | | paramIn.put("endTime",endTime); |
| | | paramIn.put("startTime",startTime); |
| | | paramIn.put("flowId",flowId); |
| | | paramIn.put("storeId",storeId); |
| | | paramIn.put("page", page); |
| | | paramIn.put("row", row); |
| | | paramIn.put("createUserName", createUserName); |
| | | paramIn.put("endTime", endTime); |
| | | paramIn.put("startTime", startTime); |
| | | paramIn.put("flowId", flowId); |
| | | paramIn.put("storeId", storeId); |
| | | paramIn.put("id", id); |
| | | return getOaWorkflowFormBMOImpl.queryOaWorkflowFormData(paramIn); |
| | | } |
| | | |
| | | /** |
| | | * 保存流程数据 |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /oaWorkflow/saveOaWorkflowFormData |
| | | * @path /app/oaWorkflow/saveOaWorkflowFormData |
| | | */ |
| | | @RequestMapping(value = "/saveOaWorkflowFormData", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveOaWorkflowFormData(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "flowId", "flowId不能为空"); |
| | | List<String> columns = new ArrayList<>(); |
| | | List<String> values = new ArrayList<>(); |
| | | for (String key : reqJson.keySet()) { |
| | | if ("flowId".equals(key)) { |
| | | continue; |
| | | } |
| | | columns.add(key); |
| | | values.add(reqJson.getString(key)); |
| | | } |
| | | reqJson.put("columns", columns.toArray(new String[columns.size()])); |
| | | reqJson.put("values", values.toArray(new String[values.size()])); |
| | | reqJson.put("storeId", storeId); |
| | | reqJson.put("userId", userId); |
| | | return getOaWorkflowFormBMOImpl.saveOaWorkflowFormData(reqJson); |
| | | } |
| | | |
| | | /** |
| | | * 查询待办 |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /oaWorkflow/queryOaWorkflowUserTaskFormData |
| | | * @path /app/oaWorkflow/queryOaWorkflowUserTaskFormData |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflowUserTaskFormData", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOaWorkflowUserTaskFormData(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestParam(value = "flowId", required = false) String flowId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | | @RequestParam(value = "createUserName", required = false) String createUserName, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | JSONObject paramIn = new JSONObject(); |
| | | paramIn.put("page", page); |
| | | paramIn.put("row", row); |
| | | paramIn.put("createUserName", createUserName); |
| | | paramIn.put("endTime", endTime); |
| | | paramIn.put("startTime", startTime); |
| | | paramIn.put("flowId", flowId); |
| | | paramIn.put("storeId", storeId); |
| | | paramIn.put("userId", userId); |
| | | return getOaWorkflowFormBMOImpl.queryOaWorkflowUserTaskFormData(paramIn); |
| | | } |
| | | |
| | | /** |
| | | * 查询已办 |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /oaWorkflow/queryOaWorkflowUserHisTaskFormData |
| | | * @path /app/oaWorkflow/queryOaWorkflowUserHisTaskFormData |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflowUserHisTaskFormData", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOaWorkflowUserHisTaskFormData(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestParam(value = "flowId", required = false) String flowId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | | @RequestParam(value = "createUserName", required = false) String createUserName, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | JSONObject paramIn = new JSONObject(); |
| | | paramIn.put("page", page); |
| | | paramIn.put("row", row); |
| | | paramIn.put("createUserName", createUserName); |
| | | paramIn.put("endTime", endTime); |
| | | paramIn.put("startTime", startTime); |
| | | paramIn.put("flowId", flowId); |
| | | paramIn.put("storeId", storeId); |
| | | paramIn.put("userId", userId); |
| | | return getOaWorkflowFormBMOImpl.queryOaWorkflowUserHisTaskFormData(paramIn); |
| | | } |
| | | |
| | | /** |
| | | * 保存流程数据 |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /oaWorkflow/auditOaWorkflow |
| | | * @path /app/oaWorkflow/auditOaWorkflow |
| | | */ |
| | | @RequestMapping(value = "/auditOaWorkflow", method = RequestMethod.POST) |
| | | public ResponseEntity<String> auditOaWorkflow(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "flowId", "flowId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "id", "id不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "taskId", "任务不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "auditMessage", "审核意见不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "auditCode", "审核状态不能为空"); |
| | | reqJson.put("storeId", storeId); |
| | | reqJson.put("userId", userId); |
| | | return getOaWorkflowFormBMOImpl.auditOaWorkflow(reqJson); |
| | | } |
| | | } |