Commit bb10bde1 by 罗绍泽

乱码

parent ecd68c96
......@@ -19,6 +19,20 @@
</td>
</tr>
<tr>
<td style="width: 10%" class="tableStyleLable">
<span>英文名称:</span>
</td>
<td style="width: 40%">
<input class="easyui-textbox" id="NAME_EN" name="FIELD_NAME_EN" data-options="required:true" style="width:98%" value="${is_row.NAME_EN}"/>
</td>
<td style="width: 10%" class="tableStyleLable">
<span>英文简称:</span>
</td>
<td style="width: 40%">
<input class="easyui-textbox" id="NAME_ABBR" name="FIELD_NAME_ABBR" data-options="required:true" style="width:98%" value="${is_row.NAME_ABBR}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>上级单位:</span>
</td>
......
......@@ -85,6 +85,7 @@ public class PushDataUtils {
dataMap.put("DELETE_FLAG", data.get("DELETE_FLAG"));
dataMap.put("PARENT_UNITID", data.get("PARENT_UNITID"));
dataMap.put("UNIT_PATH", data.get("UNIT_PATH"));
dataMap.put("NAME_EN", data.get("NAME_EN"));dataMap.put("NAME_ABBR", data.get("NAME_ABBR"));
// List<Map<String,Object>> listData = new ArrayList<Map<String,Object>>();
// listData.add(dataMap);
JSONObject jsonObject = new JSONObject();
......
......@@ -832,6 +832,7 @@ public class actAction extends BasicAction {
th.start();*/
PushDataUtils pd = new PushDataUtils();
String jsondata = pd.getPushUnitData(data);
System.out.println("-------data"+jsondata);
//推送加密字段判断
if(url.get("PUSH_ENCRYPT") == null || url.get("PUSH_ENCRYPT").toString().equals("0")){
//不加密
......@@ -857,12 +858,18 @@ public class actAction extends BasicAction {
(String)url.get("PUSH_PASS"), jsondata,
(String)url.get("PUSH_UNIT_URL"),
(String)url.get("PUSH_ENCODE"));
System.out.println("输出: 推送的url:"+url.get("PUSH_URL"));
System.out.println("输出: 推送的url:"+url.get("PUSH_UNIT_URL"));
Map<String, Object> m = null;
int is_name=0;
if (ret != null && ret.trim().length() > 0) {
m = jsonFormatMap.getMap(ret);
if(m.get("NAME") instanceof Integer){
is_name = (Integer)m.get("NAME");
}else{
is_name = Integer.valueOf((String) m.get("NAME"));
}
if (m != null && m.get("NAME") != null && Integer.parseInt((String) m.get("NAME")) > 0) {
}
if (m != null && m.get("NAME") != null && is_name > 0) {
System.out.println("用户[" + url.get("EMNAME") + "]推送成功!");
// 将成功记录插入表
Map<String, Object> pushData = new HashMap<String, Object>();
......@@ -1293,13 +1300,6 @@ public class actAction extends BasicAction {
String uploadold=request.getParameter("uploadold");
if(new File(uploadpath+File.separator+uploadnew).exists()==false){
uploadpath = request.getSession().getServletContext().getRealPath(uploadpath);
try {
// uploadold = new String(uploadold.getBytes("iso8859-1"), "utf-8");
uploadold = new String((uploadold).getBytes("gbk"),"iso8859-1");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
FileUtil fileUtil = new FileUtil();
//文件存放目录
FileObject baseDir = fileUtil.getFile(uploadpath);
......@@ -1313,6 +1313,7 @@ public class actAction extends BasicAction {
e.printStackTrace();
}
//设置response
response.setCharacterEncoding("utf-8");
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment; filename=\""+uploadold+"\"");
......@@ -1333,13 +1334,6 @@ public class actAction extends BasicAction {
String uploadold=request.getParameter("uploadold");
if(new File(uploadpath+File.separator+uploadnew).exists()==false){
uploadpath = request.getSession().getServletContext().getRealPath(uploadpath);
try {
// uploadold = new String(uploadold.getBytes("iso8859-1"), "utf-8");
uploadold = new String((uploadold).getBytes("gbk"),"iso8859-1");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
//查对照数据
UnitBusiness business = BusinessManager.getBusiness(UnitBusiness.class);
List<Map<String, Object>> list = business.list_unit_ldap_deletekey();
......@@ -1399,6 +1393,7 @@ public class actAction extends BasicAction {
e.printStackTrace();
}
//设置response
response.setCharacterEncoding("utf-8");
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment; filename=\""+uploadold+"\"");
......
......@@ -1303,10 +1303,16 @@ public class actAction extends BasicAction {
(String)url.get("PUSH_ENCODE"));
System.out.println("输出: 推送的url:"+url.get("PUSH_URL"));
Map<String, Object> m = null;
int is_name=0;
if (ret != null && ret.trim().length() > 0) {
m = jsonFormatMap.getMap(ret);
if(m.get("NAME") instanceof Integer){
is_name = (Integer)m.get("NAME");
}else{
is_name = Integer.valueOf((String) m.get("NAME"));
}
}
if (m != null && m.get("NAME") != null && Integer.parseInt((String) m.get("NAME")) > 0) {
if (m != null && m.get("NAME") != null && is_name > 0) {
System.out.println("用户[" + url.get("EMNAME") + "]推送成功!");
// 将成功记录插入表
Map<String, Object> pushData = new HashMap<String, Object>();
......@@ -1756,13 +1762,6 @@ public class actAction extends BasicAction {
String uploadold=request.getParameter("uploadold");
if(new File(uploadpath+File.separator+uploadnew).exists()==false){
uploadpath = request.getSession().getServletContext().getRealPath(uploadpath);
try {
// uploadold = new String(uploadold.getBytes("iso8859-1"), "utf-8");
uploadold = new String((uploadold).getBytes("gbk"),"iso8859-1");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
FileUtil fileUtil = new FileUtil();
//文件存放目录
......@@ -1777,6 +1776,7 @@ public class actAction extends BasicAction {
e.printStackTrace();
}
//设置response
response.setCharacterEncoding("utf-8");
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment; filename=\""+uploadold+"\"");
......
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