Commit 0e1e726e by gechengyang

A

parent a618453d
package org.sss.presentation.noui.controller;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class OfficeController extends AbstractCommonController {
//初始化
@ResponseBody
@RequestMapping(value = "/office/init", method = RequestMethod.POST)
public Object init(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/office/init";
return event(mappingUrl, INIT, dataMap, request, response);
}
//校验
@ResponseBody
@RequestMapping(value = "/office/check", method = RequestMethod.POST)
public Object change(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/office/check";
return event(mappingUrl, ON_CHECK, dataMap, request, response);
}
// Event 事件
}
\ No newline at end of file
package org.sss.presentation.noui.controller;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class PxiaddController extends AbstractCommonController {
//初始化
@ResponseBody
@RequestMapping(value = "/pxiadd/init", method = RequestMethod.POST)
public Object init(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiadd/init";
return event(mappingUrl, INIT, dataMap, request, response);
}
//校验
@ResponseBody
@RequestMapping(value = "/pxiadd/check", method = RequestMethod.POST)
public Object change(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiadd/check";
return event(mappingUrl, ON_CHECK, dataMap, request, response);
}
// Event 事件
@ResponseBody
@RequestMapping(value = "/pxiadd/sav", method = RequestMethod.POST)
public Object sav(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxiadd/_sav";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
@ResponseBody
@RequestMapping(value = "/pxiadd/upload", method = RequestMethod.POST)
public Object upload(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxiadd/_upload";
return event(mappingUrl, ON_STREAM_UPLOAD, dataMap, request, response);
}
}
\ No newline at end of file
package org.sss.presentation.noui.controller;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class PxiameController extends AbstractCommonController {
//初始化
@ResponseBody
@RequestMapping(value = "/pxiame/init", method = RequestMethod.POST)
public Object init(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiame/init";
return event(mappingUrl, INIT, dataMap, request, response);
}
//校验
@ResponseBody
@RequestMapping(value = "/pxiame/check", method = RequestMethod.POST)
public Object change(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiame/check";
return event(mappingUrl, ON_CHECK, dataMap, request, response);
}
// Event 事件
@ResponseBody
@RequestMapping(value = "/pxiame/sav", method = RequestMethod.POST)
public Object sav(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxiame/_sav";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
@ResponseBody
@RequestMapping(value = "/pxiame/upload", method = RequestMethod.POST)
public Object upload(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxiame/_upload";
return event(mappingUrl, ON_STREAM_UPLOAD, dataMap, request, response);
}
}
\ No newline at end of file
package org.sss.presentation.noui.controller;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class PxidelController extends AbstractCommonController {
//初始化
@ResponseBody
@RequestMapping(value = "/pxidel/init", method = RequestMethod.POST)
public Object init(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxidel/init";
return event(mappingUrl, INIT, dataMap, request, response);
}
//校验
@ResponseBody
@RequestMapping(value = "/pxidel/check", method = RequestMethod.POST)
public Object change(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxidel/check";
return event(mappingUrl, ON_CHECK, dataMap, request, response);
}
// Event 事件
@ResponseBody
@RequestMapping(value = "/pxidel/sav", method = RequestMethod.POST)
public Object sav(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxidel/_sav";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
}
\ No newline at end of file
......@@ -11,40 +11,17 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class PxiController extends AbstractCommonController {
// Event 事件
@ResponseBody
@RequestMapping(value = "/pxiadd/_save", method = RequestMethod.POST)
public Object save(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiadd/_save";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
// OnChange 事件
@ResponseBody
@RequestMapping(value = "/pxiadd/_onchange", method = RequestMethod.POST)
public Object onchange(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiadd/_onchange";
return event(mappingUrl, ON_CHANGE, dataMap, request, response);
}
// Event 事件
@ResponseBody
@RequestMapping(value = "/pxisel/_sel", method = RequestMethod.POST)
public Object sel(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxisel/_sel";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
// 初始化 事件
@Controller
public class PxiselController extends AbstractCommonController {
//初始化
@ResponseBody
@RequestMapping(value = "/pxiame/init", method = RequestMethod.POST)
@RequestMapping(value = "/pxisel/init", method = RequestMethod.POST)
public Object init(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiame/init";
String mappingUrl = "/pxisel/init";
return event(mappingUrl, INIT, dataMap, request, response);
}
//校验
@ResponseBody
@RequestMapping(value = "/pxisel/check", method = RequestMethod.POST)
public Object change(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
......@@ -52,10 +29,18 @@ public class PxiController extends AbstractCommonController {
return event(mappingUrl, ON_CHECK, dataMap, request, response);
}
// Event 事件
@ResponseBody
@RequestMapping(value = "/pxiadd/_upload", method = RequestMethod.POST)
public Object upload(HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "/pxiadd/_upload";
return event(mappingUrl, ON_STREAM_UPLOAD, null, request, response);
@RequestMapping(value = "/pxisel/sel", method = RequestMethod.POST)
public Object sel(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxisel/_sel";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
@ResponseBody
@RequestMapping(value = "/pxisel/del", method = RequestMethod.POST)
public Object del(@RequestBody Map<String, Object> dataMap, HttpServletRequest request, HttpServletResponse response) {
String mappingUrl = "pxisel/_del";
return event(mappingUrl, ON_CLICK, dataMap, request, response);
}
}
\ No newline at end of file
......@@ -45,9 +45,13 @@ public class NoUiPresentationUtil {
continue;
}
String url = alias.getRelPath(aliasKey);
if (StringUtils.isEmpty(url)) {
continue;
}
IBaseObject baseObject = null;
try {
System.out.println("url=" + url);
baseObject = context.getSession().getBaseObject(context.getRoot(), url);
if (null == baseObject) {
throw new NoUiException("not found url :" + url + " ,alias name is:" + aliasKey);
......@@ -229,7 +233,9 @@ public class NoUiPresentationUtil {
Map<String, Object> errorMap = gui.getError();
for (Map.Entry<String, Object> errorEntity : errorMap.entrySet()) {
String key = errorEntity.getKey();
errorMap.put(alias.getRevertRel().get(key), errorEntity.getValue());
String realKey = alias.getRevertRel().get(key);
if (!StringUtils.isEmpty(realKey))
errorMap.put(realKey, errorEntity.getValue());
}
return errorMap;
}
......
......@@ -8,10 +8,10 @@
<property name="hibernate.connection.autocommit">false</property>
<property name="use_outer_join">false</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.url">jdbc:oracle:thin:@172.17.2.4:1521:ORCL</property>
<property name="connection.url">jdbc:oracle:thin:@172.17.2.108:1521:xe</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.username">gcy</property>
<property name="connection.password">gcy</property>
<property name="connection.username">pxi</property>
<property name="connection.password">pxi</property>
<property name="connection.autocommit">false</property>
<property name="connection.autoReconnect">true</property>
<property name="connection.autoReconnectForPools">true</property>
......
_save=\\pxip\\sav
nam=\\pxip\\pxigrp\\rec\\nam
sex=\\pxip\\pxigrp\\rec\\sex
univer=\\pxip\\pxigrp\\rec\\univer
major=\\pxip\\pxigrp\\rec\\major
tel=\\pxip\\pxigrp\\rec\\tel
headimg=\\pxip\\pxigrp\\rec\\headimg
age=\\pxip\\pxigrp\\rec\\age
balance=\\pxip\\pxigrp\\rec\\balance
_upload=\\pxip\\upload
nam=\\pxigrp\\rec\\nam
sex=\\pxigrp\\rec\\sex
univer=\\pxigrp\\rec\\univer
major=\\pxigrp\\rec\\major
tel=\\pxigrp\\rec\\tel
headimg=\\pxigrp\\rec\\headimg
age=\\pxigrp\\rec\\age
balance=\\pxigrp\\rec\\balance
\ No newline at end of file
_sav=\\pxip\\sav
_save=\\pxip\\sav
nam=\\pxigrp\\rec\\nam
sex=\\pxigrp\\rec\\sex
univer=\\pxigrp\\rec\\univer
major=\\pxigrp\\rec\\major
tel=\\pxigrp\\rec\\tel
headimg=\\pxigrp\\rec\\headimg
age=\\pxigrp\\rec\\age
balance=\\pxigrp\\rec\\balance
\ No newline at end of file
nam=\\pxip\\pxigrp\\rec\\nam
sex=\\pxip\\pxigrp\\rec\\sex
univer=\\pxip\\pxigrp\\rec\\univer
major=\\pxip\\pxigrp\\rec\\major
tel=\\pxip\\pxigrp\\rec\\tel
headimg=\\pxip\\pxigrp\\rec\\headimg
age=\\pxip\\pxigrp\\rec\\age
balance=\\pxip\\pxigrp\\rec\\balance
_upload=\\pxip\\upload
_sav=\\pxip\\sav
nam=\\pxip\\pxigrp\\rec\\nam
sex=\\pxip\\pxigrp\\rec\\sex
univer=\\pxip\\pxigrp\\rec\\univer
major=\\pxip\\pxigrp\\rec\\major
tel=\\pxip\\pxigrp\\rec\\tel
_sav=\\pxip\\sav
_sel=\\pxip\\sel
pxilst=\\pxip\\pxilst
nam=\\pxip\\nam
major=\\pxip\\major
univer=\\pxip\\univer
sex=\\pxip\\sex
univer=\\pxip\\univer
major=\\pxip\\major
_sel=\\pxip\\sel
pxilst=\\pxip\\pxilst
_del=\\pxip\\del
......@@ -319,7 +319,7 @@ public class HttpTest {
try {
// "http://172.17.2.100:8080/oauth/token?username=user_1&password=123456&grant_type=password&client_id=client&client_secret=123456"
URL realUrl = new URL("http://localhost:8080/business/service/pxiadd/_save");
URL realUrl = new URL("http://localhost:8080/business/service/pxiadd/sav");
// URL realUrl = new
// URL("http://localhost:8080/healthServer/getMacSeq");
......@@ -341,14 +341,14 @@ public class HttpTest {
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
Map<String, Object> map = new HashMap<String, Object>();
map.put("nam", "gechengyang");
map.put("sex", "F");
map.put("univer", "湖北大学");
map.put("major", "计算机");
map.put("headimg", "NO IMAGE");
map.put("age", 20);
map.put("tel", "18912345678");
map.put("balance", 10000);
map.put("nam", "2121");
map.put("sex", "");
map.put("univer", "2121");
map.put("major", "2121");
map.put("headimg", "");
map.put("age", "21212");
map.put("tel", "1212");
map.put("balance", "");
Map<String, Object> map2 = new HashMap<String, Object>();
map2.put("data", map);
......
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