Commit 3250c9ae by java-李谡

修改航线论证列表展示,修改手机号码归属地查询服务

parent b3b9aa50
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
LEFT JOIN foc_airline_verified s ON a.id = s.verif_id LEFT JOIN foc_airline_verified s ON a.id = s.verif_id
LEFT JOIN foc_verify_change t ON a.id = t.verif_id LEFT JOIN foc_verify_change t ON a.id = t.verif_id
AND t.field_value = 'startTime' AND t.field_value = 'startTime'
AND t.del_flag = '2' AND t.del_flag = '0'
WHERE a.id = #{verifId} WHERE a.id = #{verifId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -28,15 +28,14 @@ ...@@ -28,15 +28,14 @@
<select id="getList" resultType="com.ejweb.modules.verify.entity.AirlineVerifyEntity"> <select id="getList" resultType="com.ejweb.modules.verify.entity.AirlineVerifyEntity">
SELECT SELECT
<include refid="airlineVerifyColumns"/> <include refid="airlineVerifyColumns"/>
,p.node_date ,p.end_time
FROM FROM
foc_airline_verify a foc_airline_verify a
LEFT JOIN foc_aircraft_type t ON a.aircraft_type = t.id LEFT JOIN foc_aircraft_type t ON a.aircraft_type = t.id
LEFT JOIN foc_airports d ON d.airport_iata = a.depIata LEFT JOIN foc_airports d ON d.airport_iata = a.depIata
LEFT JOIN foc_airports r ON r.airport_iata = a.arrIata LEFT JOIN foc_airports r ON r.airport_iata = a.arrIata
LEFT JOIN foc_verify_process p ON p.verif_id = a.id LEFT JOIN foc_airline_verified p ON p.verif_id = a.id
WHERE p.node_name='截止反馈时间' WHERE a.del_flag = #{DEL_FLAG_NORMAL}
and a.del_flag = #{DEL_FLAG_NORMAL}
<if test="depIata != null and depIata != ''"> <if test="depIata != null and depIata != ''">
AND (a.id in ( AND (a.id in (
......
...@@ -9,12 +9,16 @@ import java.io.IOException; ...@@ -9,12 +9,16 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Cell;
...@@ -58,10 +62,8 @@ public class ImportExcel { ...@@ -58,10 +62,8 @@ public class ImportExcel {
/** /**
* 构造函数 * 构造函数
* *
* @param path * @param path 导入文件,读取第一个工作表
* 导入文件,读取第一个工作表 * @param headerNum 标题行号,数据行号=标题行号+1
* @param headerNum
* 标题行号,数据行号=标题行号+1
* @throws InvalidFormatException * @throws InvalidFormatException
* @throws IOException * @throws IOException
*/ */
...@@ -72,10 +74,8 @@ public class ImportExcel { ...@@ -72,10 +74,8 @@ public class ImportExcel {
/** /**
* 构造函数 * 构造函数
* *
* @param path * @param path 导入文件对象,读取第一个工作表
* 导入文件对象,读取第一个工作表 * @param headerNum 标题行号,数据行号=标题行号+1
* @param headerNum
* 标题行号,数据行号=标题行号+1
* @throws InvalidFormatException * @throws InvalidFormatException
* @throws IOException * @throws IOException
*/ */
...@@ -86,12 +86,9 @@ public class ImportExcel { ...@@ -86,12 +86,9 @@ public class ImportExcel {
/** /**
* 构造函数 * 构造函数
* *
* @param path * @param path 导入文件
* 导入文件 * @param headerNum 标题行号,数据行号=标题行号+1
* @param headerNum * @param sheetIndex 工作表编号
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
* @throws InvalidFormatException * @throws InvalidFormatException
* @throws IOException * @throws IOException
*/ */
...@@ -102,12 +99,9 @@ public class ImportExcel { ...@@ -102,12 +99,9 @@ public class ImportExcel {
/** /**
* 构造函数 * 构造函数
* *
* @param path * @param path 导入文件对象
* 导入文件对象 * @param headerNum 标题行号,数据行号=标题行号+1
* @param headerNum * @param sheetIndex 工作表编号
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
* @throws InvalidFormatException * @throws InvalidFormatException
* @throws IOException * @throws IOException
*/ */
...@@ -118,12 +112,9 @@ public class ImportExcel { ...@@ -118,12 +112,9 @@ public class ImportExcel {
/** /**
* 构造函数 * 构造函数
* *
* @param file * @param file 导入文件对象
* 导入文件对象 * @param headerNum 标题行号,数据行号=标题行号+1
* @param headerNum * @param sheetIndex 工作表编号
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
* @throws InvalidFormatException * @throws InvalidFormatException
* @throws IOException * @throws IOException
*/ */
...@@ -135,12 +126,9 @@ public class ImportExcel { ...@@ -135,12 +126,9 @@ public class ImportExcel {
/** /**
* 构造函数 * 构造函数
* *
* @param path * @param path 导入文件对象
* 导入文件对象 * @param headerNum 标题行号,数据行号=标题行号+1
* @param headerNum * @param sheetIndex 工作表编号
* 标题行号,数据行号=标题行号+1
* @param sheetIndex
* 工作表编号
* @throws InvalidFormatException * @throws InvalidFormatException
* @throws IOException * @throws IOException
*/ */
...@@ -203,10 +191,8 @@ public class ImportExcel { ...@@ -203,10 +191,8 @@ public class ImportExcel {
/** /**
* 获取单元格值 * 获取单元格值
* *
* @param row * @param row 获取的行
* 获取的行 * @param column 获取单元格列号
* @param column
* 获取单元格列号
* @return 单元格值 * @return 单元格值
*/ */
public Object getCellValue(Row row, int column) { public Object getCellValue(Row row, int column) {
...@@ -215,11 +201,21 @@ public class ImportExcel { ...@@ -215,11 +201,21 @@ public class ImportExcel {
Cell cell = row.getCell(column); Cell cell = row.getCell(column);
if (cell != null) { if (cell != null) {
if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
// 处理日期格式、时间格式
if (HSSFDateUtil.isCellDateFormatted(cell)) {
SimpleDateFormat sdf = null;
if (cell.getCellStyle().getDataFormat() == HSSFDataFormat
.getBuiltinFormat("h:mm")) {
sdf = new SimpleDateFormat("HH:mm");
}
Date date = cell.getDateCellValue();
val = sdf.format(date);
} else {
val = cell.getNumericCellValue(); val = cell.getNumericCellValue();
}
} else if (cell.getCellType() == Cell.CELL_TYPE_STRING) { } else if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
val = cell.getStringCellValue(); val = cell.getStringCellValue();
} else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) { } else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
// val = cell.getCellFormula();
try { try {
val = String.valueOf(cell.getStringCellValue()); val = String.valueOf(cell.getStringCellValue());
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
...@@ -240,10 +236,8 @@ public class ImportExcel { ...@@ -240,10 +236,8 @@ public class ImportExcel {
/** /**
* 获取导入数据列表 * 获取导入数据列表
* *
* @param cls * @param cls 导入对象类型
* 导入对象类型 * @param groups 导入分组
* @param groups
* 导入分组
*/ */
public <E> List<E> getDataList(Class<E> cls, int... groups) throws InstantiationException, IllegalAccessException { public <E> List<E> getDataList(Class<E> cls, int... groups) throws InstantiationException, IllegalAccessException {
List<Object[]> annotationList = Lists.newArrayList(); List<Object[]> annotationList = Lists.newArrayList();
...@@ -261,13 +255,13 @@ public class ImportExcel { ...@@ -261,13 +255,13 @@ public class ImportExcel {
for (int efg : ef.groups()) { for (int efg : ef.groups()) {
if (g == efg) { if (g == efg) {
inGroup = true; inGroup = true;
annotationList.add(new Object[] { ef, f }); annotationList.add(new Object[]{ef, f});
break; break;
} }
} }
} }
} else { } else {
annotationList.add(new Object[] { ef, f }); annotationList.add(new Object[]{ef, f});
} }
} }
} }
...@@ -285,13 +279,13 @@ public class ImportExcel { ...@@ -285,13 +279,13 @@ public class ImportExcel {
for (int efg : ef.groups()) { for (int efg : ef.groups()) {
if (g == efg) { if (g == efg) {
inGroup = true; inGroup = true;
annotationList.add(new Object[] { ef, m }); annotationList.add(new Object[]{ef, m});
break; break;
} }
} }
} }
} else { } else {
annotationList.add(new Object[] { ef, m }); annotationList.add(new Object[]{ef, m});
} }
} }
} }
...@@ -299,7 +293,9 @@ public class ImportExcel { ...@@ -299,7 +293,9 @@ public class ImportExcel {
Collections.sort(annotationList, new Comparator<Object[]>() { Collections.sort(annotationList, new Comparator<Object[]>() {
public int compare(Object[] o1, Object[] o2) { public int compare(Object[] o1, Object[] o2) {
return new Integer(((ExcelField) o1[0]).sort()).compareTo(new Integer(((ExcelField) o2[0]).sort())); return new Integer(((ExcelField) o1[0]).sort()).compareTo(new Integer(((ExcelField) o2[0]).sort()));
}; }
;
}); });
// log.debug("Import column count:"+annotationList.size()); // log.debug("Import column count:"+annotationList.size());
// Get excel data // Get excel data
...@@ -373,7 +369,7 @@ public class ImportExcel { ...@@ -373,7 +369,7 @@ public class ImportExcel {
if ("get".equals(mthodName.substring(0, 3))) { if ("get".equals(mthodName.substring(0, 3))) {
mthodName = "set" + StringUtils.substringAfter(mthodName, "get"); mthodName = "set" + StringUtils.substringAfter(mthodName, "get");
} }
Reflections.invokeMethod(e, mthodName, new Class[] { valType }, new Object[] { val }); Reflections.invokeMethod(e, mthodName, new Class[]{valType}, new Object[]{val});
} }
} }
sb.append(val + ", "); sb.append(val + ", ");
......
...@@ -34,7 +34,7 @@ public class PhoneAreaUtil { ...@@ -34,7 +34,7 @@ public class PhoneAreaUtil {
if(StringUtils.isBlank(mobile)) if(StringUtils.isBlank(mobile))
return null; return null;
HCFetcher fetcher = HCFetcher.getInstance(); HCFetcher fetcher = HCFetcher.getInstance();
FetchEntity entity = fetcher.get(GConstants.getValue("cx.shouji.360.cn", "https://cx.shouji.360.cn/phonearea.php")+"?number="+mobile); FetchEntity entity = fetcher.get(GConstants.getValue("cx.shouji.360.cn", "http://cx.shouji.360.cn/phonearea.php")+"?number="+mobile);
if(entity != null && entity.isSuccess()){ if(entity != null && entity.isSuccess()){
String txt = entity.getContent("UTF-8"); String txt = entity.getContent("UTF-8");
......
...@@ -85,6 +85,8 @@ public class AirlineVerifyService extends BaseService<AirlineVerifyDao>{ ...@@ -85,6 +85,8 @@ public class AirlineVerifyService extends BaseService<AirlineVerifyDao>{
AssessmentDao riskDao; AssessmentDao riskDao;
@Autowired @Autowired
VerifyConditionDao verifyConditionDao; VerifyConditionDao verifyConditionDao;
@Autowired
VerifyProcessDao processDao;
public PageEntity<AirlineVerifyEntity> getAirlineVerifyList(AirlineVerifyBean bean) { public PageEntity<AirlineVerifyEntity> getAirlineVerifyList(AirlineVerifyBean bean) {
PageInfo<AirlineVerifyEntity> pageInfo = null; PageInfo<AirlineVerifyEntity> pageInfo = null;
// 必须紧贴dao的查询方法 // 必须紧贴dao的查询方法
......
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