Commit 2ba9179c authored by 赵啸非's avatar 赵啸非

添加材料数量统计

parent ee4aeda8
......@@ -154,6 +154,31 @@ public class HomeController extends BaseJsonBodyController {
return ret;
}
@PostMapping({"depts"})
@UnAuth
public Rest<Object> depts(@RequestBody HomeQueryPdu queryPdu) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
String busiDesc = "查询站点部门";
int code = VALUE_RESULT_SUCCESS;
try {
if (queryPdu.getSiteId() != null) {
Map<String, String> deptMap = matterService.find(new MatterQuery().siteId(queryPdu.getSiteId())).stream().collect(Collectors.toMap(x -> x.getDeptCode(), y -> y.getDeptName(), (o, n) -> n));
model.put("deptMap", deptMap);
}
model.put("deptMap", new HashMap<>());
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) {
code = VALUE_RESULT_FAILURE;
this.doException(this.request, busiDesc, model, var9);
}
ret.setCode(code);
ret.setData(model);
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
@PostMapping({"info"})
@UnAuth
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment