Commit 49181791 authored by suichenguang's avatar suichenguang

测试接口

parent f85f3ad6
...@@ -74,7 +74,6 @@ public class AdminApi { ...@@ -74,7 +74,6 @@ public class AdminApi {
flag = userInfoService.addUser(userInfo, Integer.parseInt(jsonObject.getString("roleId"))); flag = userInfoService.addUser(userInfo, Integer.parseInt(jsonObject.getString("roleId")));
if (flag) { if (flag) {
map.put("resultMsg", "添加成功"); map.put("resultMsg", "添加成功");
} else { } else {
map.put("resultMsg", "添加失败"); map.put("resultMsg", "添加失败");
} }
......
...@@ -46,10 +46,12 @@ public class ReadExcelApi { ...@@ -46,10 +46,12 @@ public class ReadExcelApi {
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean ReadPersonPost(HttpServletResponse resp, HttpServletRequest requ) { public boolean ReadPersonPost(HttpServletResponse resp, HttpServletRequest requ) {
System.out.println("进入api");
YXJSONResponse yxresp = new YXJSONResponse(); YXJSONResponse yxresp = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8");
String filename = ""; String filename = "";
DiskFileItemFactory factory = new DiskFileItemFactory(); DiskFileItemFactory factory = new DiskFileItemFactory();
// 设置缓冲区的大小为100KB,如果不指定,那么缓冲区的大小默认是10KB // 设置缓冲区的大小为100KB,如果不指定,那么缓冲区的大小默认是10KB
factory.setSizeThreshold(1024 * 100); factory.setSizeThreshold(1024 * 100);
ServletFileUpload upload = new ServletFileUpload(factory); ServletFileUpload upload = new ServletFileUpload(factory);
...@@ -76,13 +78,13 @@ public class ReadExcelApi { ...@@ -76,13 +78,13 @@ public class ReadExcelApi {
try { try {
// 如果fileitem中封装的是普通输入项的数据 // 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件 // 如果fileitem中封装的是上传文件
// 得到上传的文件名称 // 得到上传的文件名称
filename = item.getName(); filename = item.getName();
File file = null; File file = null;
try { try {
// 如果fileitem中封装的是普通输入项的数据 // 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件 // 如果fileitem中封装的是上传文件
// 得到上传的文件名称 // 得到上传的文件名称
filename = item.getName(); filename = item.getName();
if (filename == null || filename.trim().equals("")) { if (filename == null || filename.trim().equals("")) {
......
...@@ -5,6 +5,7 @@ import com.yxproject.start.entity.TaskList.CountGajgEntity; ...@@ -5,6 +5,7 @@ import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity; import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.service.TaskListService; import com.yxproject.start.service.TaskListService;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -77,4 +78,68 @@ public class TaskListApi { ...@@ -77,4 +78,68 @@ public class TaskListApi {
return true; return true;
} }
/**
* 根据上传时间查询数据(用于生成任务单)
* @param date
* @return
*/
@RequestMapping("selectByDate")
public String selectByDate(@Param("date") String date){
String result = "[\n" +
" {\n" +
" typeCode: '1',\n" +
" typeName: '普通证',\n" +
" typeSum: 300,\n" +
" isActive: 'true',\n" +
" countyList: [\n" +
" {\n" +
" taskId: '20190228001',\n" +
" county: '西城区',\n" +
" groupNo: '00234653-03687587',\n" +
" valid: 240,\n" +
" invalid: 0\n" +
" },\n" +
" {\n" +
" taskId: '20190228001',\n" +
" county: '东城区',\n" +
" groupNo: '00234653-03687587',\n" +
" valid: 240,\n" +
" invalid: 0\n" +
" },\n" +
" {\n" +
" taskId: '20190228001',\n" +
" county: '海淀区',\n" +
" groupNo: '00234653-03687587',\n" +
" valid: 240,\n" +
" invalid: 0\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" typeCode: '9',\n" +
" typeName: '邮寄证',\n" +
" typeSum: 500,\n" +
" isActive: 'false',\n" +
" countyList: [\n" +
" {\n" +
" taskId: '20190228001',\n" +
" county: '朝阳区',\n" +
" groupNo: '00234653-03687587',\n" +
" valid: 240,\n" +
" invalid: 0\n" +
" },\n" +
" {\n" +
" taskId: '20190228001',\n" +
" county: '昌平区',\n" +
" groupNo: '00234653-03687587',\n" +
" valid: 240,\n" +
" invalid: 0\n" +
" }\n" +
" ]\n" +
" }\n" +
"]";
return result;
}
} }
package com.yxproject.start.mapper;
/**
* 废证
* @param
* @return
*/
public interface CrippledCardMapper {
}
package com.yxproject.start.mapper;
/**
* 退证
*/
public interface ExitCardMapper {
}
package com.yxproject.start.mapper;
/**
* 快证
*/
public interface FastCardMapper {
}
package com.yxproject.start.mapper;
/**
* 交接单
*/
public interface HandoverSheetMapper {
}
package com.yxproject.start.mapper;
/**
* 余证mapper
*/
public interface NeedlessCredMapper {
}
package com.yxproject.start.mapper;
/**
* 查询证件信息
*/
public interface QueryCardMapper {
}
package com.yxproject.start.mapper;
/**
* 身份证详单
*/
public interface SaveCardDetailListMapper {
}
...@@ -91,5 +91,11 @@ public interface TaskListMapper { ...@@ -91,5 +91,11 @@ public interface TaskListMapper {
public List<CountCountyEntity> selectTaskByCounty(@Param("submitDate") String submitDate,@Param("taskState")String taskState); public List<CountCountyEntity> selectTaskByCounty(@Param("submitDate") String submitDate,@Param("taskState")String taskState);
/**
* 生成快证任务单
*/
@Update("")
public boolean createFastCard (@Param("acceptNo")String accept);
} }
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