Commit 87e097d8 authored by suichenguang's avatar suichenguang

测试接口

parent 431ee011
package com.yxproject.start.api.fakeApi;
import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("CreatePackageApi")
public class CreatePackageApi {
/**
* 打包日志数据查询
* @param newPackageName 新包名
* @param idCard 身份证号
* @param createDate 生成时间
* @param readCounty 上传地区
* @return result
*/
public String selectPackageData(@Param("newPackageName")String newPackageName,@Param("idCard")String idCard,@Param("createDate")String createDate,@Param("readCounty")String readCounty){
List<JSONObject> countyList = new ArrayList<>();
JSONObject jsonStr1 = new JSONObject();
jsonStr1.put("newPackageName","123420190302001");
jsonStr1.put("createDate","20190302");
jsonStr1.put("cardCount",300);
jsonStr1.put("readCountyCode","110012");
jsonStr1.put("readCountyName","朝阳区");
countyList.add(jsonStr1);
JSONObject jsonStr2 = new JSONObject();
jsonStr1.put("newPackageName","123420190302023");
jsonStr1.put("createDate","20190302");
jsonStr1.put("cardCount",260);
jsonStr1.put("readCountyCode","110013");
jsonStr1.put("readCountyName","海淀区");
countyList.add(jsonStr2);
JSONObject jsonStr3 = new JSONObject();
jsonStr1.put("newPackageName","123420190302003");
jsonStr1.put("createDate","20190302");
jsonStr1.put("cardCount",410);
jsonStr1.put("readCountyCode","110022");
jsonStr1.put("readCountyName","东城区");
countyList.add(jsonStr3);
JSONObject jsonStr4 = new JSONObject();
jsonStr1.put("newPackageName","123420190302007");
jsonStr1.put("createDate","20190302");
jsonStr1.put("cardCount",270);
jsonStr1.put("readCountyCode","110012");
jsonStr1.put("readCountyName","朝阳区");
countyList.add(jsonStr4);
JSONObject jsonStr5 = new JSONObject();
jsonStr1.put("newPackageName","123420190302016");
jsonStr1.put("createDate","20190302");
jsonStr1.put("cardCount",280);
jsonStr1.put("readCountyCode","110018");
jsonStr1.put("readCountyName","大兴区");
countyList.add(jsonStr5);
JSONObject jsonStr6 = new JSONObject();
jsonStr1.put("newPackageName","123420190302031");
jsonStr1.put("createDate","20190302");
jsonStr1.put("cardCount",600);
jsonStr1.put("readCountyCode","110011");
jsonStr1.put("readCountyName","西城区");
countyList.add(jsonStr6);
return countyList.toString();
}
}
package com.yxproject.start.api.fakeApi;
import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("ParsingLogApi")
public class ParsingLogApi {
/**
* 解析日志
* @param date
* @param oldPackageData
* @return
*/
@RequestMapping("selectParsingLog")
public String selectParsingLog(@Param("date")String date,@Param("oldPackageData")String oldPackageData){
List<JSONObject> countyList = new ArrayList<>();
JSONObject jsonStr1 = new JSONObject();
jsonStr1.put("oldPackageName","123420190302001");
jsonStr1.put("count",330);
jsonStr1.put("fileName","格口信息.xls");
jsonStr1.put("parsingDate","20190302");
jsonStr1.put("commonCardCount",200);
jsonStr1.put("postCardCount",100);
JSONObject jsonStr2 = new JSONObject();
jsonStr2.put("oldPackageName","123420190302002");
jsonStr2.put("count",260);
jsonStr2.put("fileName","格口信息.xls");
jsonStr2.put("parsingDate","20190302");
jsonStr2.put("commonCardCount",210);
jsonStr2.put("postCardCount",50);
JSONObject jsonStr3 = new JSONObject();
jsonStr3.put("oldPackageName","123420190302003");
jsonStr3.put("count",380);
jsonStr3.put("fileName","格口信息.xls");
jsonStr3.put("parsingDate","20190302");
jsonStr3.put("commonCardCount",120);
jsonStr3.put("postCardCount",260);
JSONObject jsonStr4 = new JSONObject();
jsonStr4.put("oldPackageName","123420190302004");
jsonStr4.put("count",330);
jsonStr4.put("fileName","格口信息.xls");
jsonStr4.put("parsingDate","20190302");
jsonStr4.put("commonCardCount",120);
jsonStr4.put("postCardCount",210);
JSONObject jsonStr5 = new JSONObject();
jsonStr5.put("oldPackageName","123420190302005");
jsonStr5.put("count",470);
jsonStr5.put("fileName","格口信息.xls");
jsonStr5.put("parsingDate","20190302");
jsonStr5.put("commonCardCount",220);
jsonStr5.put("postCardCount",250);
countyList.add(jsonStr1);
countyList.add(jsonStr2);
countyList.add(jsonStr3);
countyList.add(jsonStr4);
countyList.add(jsonStr5);
return countyList.toString();
}
}
......@@ -7,6 +7,12 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("selectXMLApi")
public class filmPrintingApi {
/**
*查询任务单信息
* @param date
* @param gongxu
* @return result
*/
@RequestMapping("selectFilmPrinting")
public String selectFilmPrinting(@Param("date")String date,@Param("gongxu")String gongxu){
String result = "[\n" +
......
......@@ -24,10 +24,10 @@ public class readCardApi {
List<JSONObject> countyList = new ArrayList<>();
JSONObject jsonStr1 = new JSONObject();
jsonStr1.put("name","周");
jsonStr1.put("name","周**");
jsonStr1.put("sex","男");
jsonStr1.put("nation","汉族");
jsonStr1.put("birthday","19930207");
jsonStr1.put("birthday","19830207");
jsonStr1.put("address","北京市海淀区马连洼学府路202号");
jsonStr1.put("idNumber",idCard);
jsonStr1.put("issuingAuthority","马连洼派出所");
......
......@@ -20,10 +20,7 @@ public class selectPostData {
@RequestMapping("selectPost")
public String selectPost(@RequestBody String jsonStr){
List<JSONObject> postList = new ArrayList<>();
JSONObject jsonStr1 = new JSONObject();
jsonStr1.put("formNo","6614038");
jsonStr1.put("waybillNumber","2102968392945");
......
package com.yxproject.start.api.fakeApi;
import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("sortingGroupListApi")
public class sortingGroupListApi {
/**
* 分拣任务单中的组号查询
* @param readXMLDate
* @param state
* @return
*/
@RequestMapping("sortingGroupList")
public String sortingGroupList(@Param("readXMLDate")String readXMLDate,@Param("state")String state){
List<JSONObject> countyList = new ArrayList<>();
JSONObject jsonStr1 = new JSONObject();
jsonStr1.put("readDate","20190301");
jsonStr1.put("packageCount",300);
jsonStr1.put("cardCount",28000);
jsonStr1.put("commonCardCount",16000);
jsonStr1.put("postCardCount",12000);
countyList.add(jsonStr1);
JSONObject jsonStr2 = new JSONObject();
jsonStr2.put("readDate","20190302");
jsonStr2.put("packageCount",260);
jsonStr2.put("cardCount",26500);
jsonStr2.put("commonCardCount",16500);
jsonStr2.put("postCardCount",10000);
countyList.add(jsonStr2);
JSONObject jsonStr3 = new JSONObject();
jsonStr3.put("readDate","20190302");
jsonStr3.put("packageCount",330);
jsonStr3.put("cardCount",22000);
jsonStr3.put("commonCardCount",11500);
jsonStr3.put("postCardCount",10500);
countyList.add(jsonStr3);
JSONObject jsonStr4 = new JSONObject();
jsonStr4.put("readDate","20190303");
jsonStr4.put("packageCount",300);
jsonStr4.put("cardCount",28000);
jsonStr4.put("commonCardCount",16000);
jsonStr4.put("postCardCount",12000);
countyList.add(jsonStr4);
JSONObject jsonStr5 = new JSONObject();
jsonStr5.put("readDate","20190303");
jsonStr5.put("packageCount",430);
jsonStr5.put("cardCount",56000);
jsonStr5.put("commonCardCount",33000);
jsonStr5.put("postCardCount",23000);
countyList.add(jsonStr5);
JSONObject jsonStr6 = new JSONObject();
jsonStr6.put("readDate","20190303");
jsonStr6.put("packageCount",310);
jsonStr6.put("cardCount",29000);
jsonStr6.put("commonCardCount",16000);
jsonStr6.put("postCardCount",13000);
countyList.add(jsonStr6);
return countyList.toString();
}
}
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