Commit f0722540 authored by liboyang's avatar liboyang

Merge remote-tracking branch 'origin/dev' into dev

parents f0b80b2c 0e133045
......@@ -103,7 +103,8 @@ public class ReadExcelApi {
fileNameDicEntity.setUploadDate(simpleDateFormat.format(new Date()));
fileNameDicEntity.setFormStartTime(replaceDate(startDate));
fileNameDicEntity.setFormDeadline(replaceDate(endDate));
long l = fileNameDicService.saveFileNameDic(fileNameDicEntity);
fileNameDicEntity.setState((long)0);
fileNameDicService.saveFileNameDic(fileNameDicEntity);
//保存个人邮寄信息
List<PersonPostEntity> entityList = new ArrayList<>();
for (int i = 0; i < list1.size(); i++) {
......@@ -136,10 +137,8 @@ public class ReadExcelApi {
personPostEntity.setLatticeMouthInformation((String) list2.get(19));
personPostEntity.setNatureOfTheInternal((String) list2.get(20));
personPostEntity.setNatureOfTheInformation((String) list2.get(21));
System.out.println(list2.get(23).toString());
System.out.println(list2.get(23).toString().length());
personPostEntity.setFirstWhite(list2.get(22).toString().substring(5,24) );
personPostEntity.setFileId(l);
personPostEntity.setFileId(fileNameDicEntity.getFileId());
entityList.add(personPostEntity);
}
personPostService.savePersonPost(entityList);
......
......@@ -90,11 +90,9 @@ public class TaskListApi {
* @return
*/
@RequestMapping("queryByCountyAtACCU")
public String queryByCountyAtACCU(@RequestParam("state") String state, HttpServletResponse resp){
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(taskListService.selectByCountyAtACCU(state));
return yxjsonResponse.toJSONString();
public List<Object> queryByCountyAtACCU(@RequestParam("state") String state, HttpServletResponse resp){
List<Object> objects = taskListService.selectByCountyAtACCU(state);
return objects;
}
}
......@@ -18,9 +18,9 @@ public interface FileNameDicMapper {
* @param fileNameDicEntity
* @return
*/
@Insert("INSERT INTO FILE_NAME_DIC (FILE_NAME,UPLOAD_DATE,FORM_START_TIME,FORM_DEADLINE) VALUES (#{fileName},#{uploadDate},#{formStartTime},#{formDeadline})")
@Options(useGeneratedKeys=true, keyProperty="fileId", keyColumn="file_Id")
public long saveFileNameDic(FileNameDicEntity fileNameDicEntity);
@Insert("INSERT INTO FILE_NAME_DIC (FILE_NAME,UPLOAD_DATE,FORM_START_TIME,FORM_DEADLINE,state) VALUES (#{fileName},#{uploadDate},#{formStartTime},#{formDeadline},#{state})")
@Options(useGeneratedKeys=true, keyProperty="fileId", keyColumn="FILE_ID")
public void saveFileNameDic(FileNameDicEntity fileNameDicEntity);
/**
* 更新个人邮寄字典表的解析状态
......
......@@ -13,9 +13,9 @@ import java.util.List;
@Mapper
public interface PersonPostMapper {
@Update("insert into PERSON_POST " +
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE) " +
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,FILE_ID) " +
"values " +
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite})")
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#{fileId})")
public boolean savePersonPost(PersonPostEntity personPostEntity);
@Update("update prepro_person p set IS_POST=9 where p.JMSFZSLH in ( select p.JMSFZSLH from prepro_person p left join files files on p.file_id=files.ID \n" +
......
......@@ -14,7 +14,7 @@ public interface FileNameDicService {
* @param fileNameDicEntity
* @return
*/
public long saveFileNameDic(FileNameDicEntity fileNameDicEntity);
public void saveFileNameDic(FileNameDicEntity fileNameDicEntity);
/**
* 查询个人邮寄信息字典表
......
......@@ -22,9 +22,8 @@ public class FileNameDicServiceImpl implements FileNameDicService {
private PersonPostMapper personPostMapper;
@Override
public long saveFileNameDic(FileNameDicEntity fileNameDicEntity) {
long fileId = fileNameDicMapper.saveFileNameDic(fileNameDicEntity);
return fileId;
public void saveFileNameDic(FileNameDicEntity fileNameDicEntity) {
fileNameDicMapper.saveFileNameDic(fileNameDicEntity);
}
@Override
......
......@@ -85,17 +85,49 @@ public class TaskListServiceImpl implements TaskListService {
Integer invalid_count = Integer.valueOf(o.get("INVALID_COUNT") + "");
invalid_count+=Integer.valueOf(countyMap.get("countyInvalidCount").toString());
countyMap.put(o.get("COUNTYNAME")+"",countyList);
countyMap.put("countyCode",o.get("ADMINISTRATIVE_CODE"));
countyMap.put("groupCount",countyList.size());
countyMap.put("countyValidCount",valid_count);
countyMap.put("countyInvalidCount",invalid_count);
}else {
List<Map<String,Object>> countyList = new ArrayList<>();
countyList.add(o);
countyMap.put(o.get("COUNTYNAME")+"",countyList);
countyMap.put("groupList",countyList);
countyMap.put("countyCode",o.get("ADMINISTRATIVE_CODE"));
countyMap.put("groupCount",countyList.size());
countyMap.put("countyValidCount",Integer.valueOf(o.get("VALID_COUNT")+""));
countyMap.put("countyInvalidCount",Integer.valueOf(o.get("INVALID_COUNT")+""));
}
countyMap.put("countyList",o);
countyMap.put("countyName",o.get("COUNTYNAME"));
countyMap.put("saveDate",o.get("SUBMIT_DATE"));
countyMap.remove(o.get("COUNTYNAME"));
List<Map<String,Object>> mapList1 = (List<Map<String,Object>>)countyMap.get("groupList");
if (mapList1.size()==1){
countyMap.put("groupNum",mapList1.get(0).get("GROUP_NO"));
}else {
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < mapList1.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if (((( mapList1.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((mapList1.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(Integer.parseInt(((( mapList1.get(i)).get("GROUP_NO")) + "").substring(1, ((( mapList1.get(i)).get("GROUP_NO")) + "").length())));
}
} else {
if (((( mapList1.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(Integer.parseInt(((( mapList1.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMap.put("groupNum",createGroupNo(c, nsList));
}
countyMap.remove("groupList");
typeList.add(countyMap);
}
typeMapList.put("typeName",type);
......@@ -106,12 +138,41 @@ public class TaskListServiceImpl implements TaskListService {
}
System.out.println(maps.toString()+"---------");
return list;
}
private String createGroupNo(List<Integer> c, List<Integer> nsList) {
try {
String groupNo = "";
c.add(nsList.get(0));
for (int i = 0; i < nsList.size() - 1; ++i) {
if (nsList.get(i) + 1 == nsList.get(i + 1)) {
c.add(nsList.get(i + 1));
} else {
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
}
c.clear();
c.add(nsList.get(i + 1));
}
}
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
}
return groupNo;
} catch (Exception e) {
}
return "";
}
}
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