Commit 3a5f07c4 authored by suichenguang's avatar suichenguang

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

parents 49a99085 3340e6c1
......@@ -26,6 +26,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
......@@ -50,6 +51,7 @@ public class ReadExcelApi {
public boolean ReadPersonPost(@RequestParam("formStartTime") String startDate,@RequestParam("formDeadLine") String endDate, HttpServletResponse resp, HttpServletRequest requ) {
YXJSONResponse yxresp = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
String filename = "";
DiskFileItemFactory factory = new DiskFileItemFactory();
......@@ -83,8 +85,7 @@ public class ReadExcelApi {
// 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件
// 得到上传的文件名称
filename = item.getName();
filename = item.getOriginalFilename();
System.out.println(item.getName()); // 为上传的key值
System.out.println(item.getOriginalFilename()); // 上传的真实文件的文件名
File file = null;
......@@ -99,10 +100,11 @@ public class ReadExcelApi {
//保存EXCEL文件信息
FileNameDicEntity fileNameDicEntity = new FileNameDicEntity();
fileNameDicEntity.setFileName(filename);
fileNameDicEntity.setUploadDate(new Date());
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++) {
......@@ -127,16 +129,16 @@ public class ReadExcelApi {
personPostEntity.setRecipientName((String) list2.get(12));
personPostEntity.setRecipientPhone((String) list2.get(13));
personPostEntity.setRecipientAddress((String) list2.get(14));
personPostEntity.setOrderBlankNumber((String) list2.get(15));
personPostEntity.setGetToProvince((String) list2.get(16));
personPostEntity.setGetToCity((String) list2.get(17));
personPostEntity.setGetToCounty((String) list2.get(18));
personPostEntity.setBusinessType((String) list2.get(19));
personPostEntity.setLatticeMouthInformation((String) list2.get(20));
personPostEntity.setNatureOfTheInternal((String) list2.get(21));
personPostEntity.setNatureOfTheInformation((String) list2.get(22));
personPostEntity.setFirstWhite((String) list2.get(23));
personPostEntity.setFileId(l);
personPostEntity.setOrderBlankNumber("");
personPostEntity.setGetToProvince((String) list2.get(15));
personPostEntity.setGetToCity((String) list2.get(16));
personPostEntity.setGetToCounty((String) list2.get(17));
personPostEntity.setBusinessType((String) list2.get(18));
personPostEntity.setLatticeMouthInformation((String) list2.get(19));
personPostEntity.setNatureOfTheInternal((String) list2.get(20));
personPostEntity.setNatureOfTheInformation((String) list2.get(21));
personPostEntity.setFirstWhite(list2.get(22).toString().substring(5,24) );
personPostEntity.setFileId(fileNameDicEntity.getFileId());
entityList.add(personPostEntity);
}
personPostService.savePersonPost(entityList);
......@@ -175,7 +177,7 @@ public class ReadExcelApi {
*/
@RequestMapping("queryPersonPost")
public String queryPersonPost(@RequestParam("fileName") String fileName,@RequestParam("analysisState") String analysisState,@RequestParam("uploadDate") String uploadDate, @RequestParam("currPage") String currPage,@RequestParam("pageSize") String pageSize, HttpServletResponse resp) {
List<FileNameDicEntity> fileNameDicEntities = fileNameDicService.queryFileNameDic(uploadDate,replaceNullString(fileName), Long.valueOf(analysisState), Long.valueOf(currPage), Long.valueOf(pageSize));
List<FileNameDicEntity> fileNameDicEntities = fileNameDicService.queryFileNameDic(replaceDate(uploadDate),replaceNullString(fileName), Long.valueOf(analysisState), Long.valueOf(currPage), Long.valueOf(pageSize));
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(fileNameDicEntities);
......@@ -191,13 +193,20 @@ public class ReadExcelApi {
*/
@RequestMapping("queryPersonPostCount")
public String queryPersonPostCount(@RequestParam("fileName") String fileName,@RequestParam("analysisState") String analysisState,@RequestParam("uploadDate") String uploadDate, HttpServletResponse resp) {
int i = fileNameDicService.queryFileNameDicCount(uploadDate,replaceNullString(fileName), Long.valueOf(analysisState));
int i = fileNameDicService.queryFileNameDicCount(replaceDate(uploadDate),replaceNullString(fileName), Long.valueOf(analysisState));
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(i+"");
return yxjsonResponse.toJSONString();
}
@RequestMapping("deleteByFileId")
public String deleteFileById(@RequestParam("fileId")String fileId){
fileNameDicService.deleteFileByFileId(fileId);
return "删除成功";
}
private String replaceDate(String str){
return str.replace("-","");
}
......
......@@ -86,15 +86,52 @@ public class TaskListApi {
/**
* 查询任务单详情
* (受理库)
* @param state
* @param process 工序
* @param date 查询时间
* @param resp
* @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("process") String process,@RequestParam("date") String date, HttpServletResponse resp){
List<Object> objects = taskListService.selectByCountyAtACCU(replaceDate(date));
return objects;
}
/**
* 查询派出所列表详情
* @param date 查询时间
* @param typeCode 制证类型
* @param countyCode 区县代码
* @param resp
* @return
*/
@RequestMapping("queryByPoliceAtACCU")
public List<Object> queryByPoliceAtACCU(@RequestParam("state") String date,@RequestParam("typeCode") String typeCode,@RequestParam("countyCode") String countyCode, HttpServletResponse resp){
List<Object> objects = taskListService.selectByPoliceAtACCU(date, typeCode, countyCode);
return objects;
}
/**
* 字符串去除空格
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == ""){
return null;
} else return str;
}
/**
* 去除字符串中中线
* @param str
* @return
*/
private String replaceDate(String str){
return str.replace("-","");
}
}
......@@ -14,11 +14,12 @@ import java.util.Objects;
public class FileNameDicEntity {
private long fileId;
private String fileName;
private Date uploadDate;
private Date analysisDate;
private Date printDate;
private String uploadDate;
private String analysisDate;
private String printDate;
private String formStartTime;
private String formDeadline;
private long state;
@Id
@Column(name = "FILE_ID")
......@@ -42,31 +43,31 @@ public class FileNameDicEntity {
@Basic
@Column(name = "UPLOAD_DATE")
public Date getUploadDate() {
public String getUploadDate() {
return uploadDate;
}
public void setUploadDate(Date uploadDate) {
public void setUploadDate(String uploadDate) {
this.uploadDate = uploadDate;
}
@Basic
@Column(name = "ANALYSIS_DATE")
public Date getAnalysisDate() {
public String getAnalysisDate() {
return analysisDate;
}
public void setAnalysisDate(Date analysisDate) {
public void setAnalysisDate(String analysisDate) {
this.analysisDate = analysisDate;
}
@Basic
@Column(name = "PRINT_DATE")
public Date getPrintDate() {
public String getPrintDate() {
return printDate;
}
public void setPrintDate(Date printDate) {
public void setPrintDate(String printDate) {
this.printDate = printDate;
}
......@@ -89,6 +90,15 @@ public class FileNameDicEntity {
public void setFormDeadline(String formDeadline) {
this.formDeadline = formDeadline;
}
@Basic
@Column(name = "STATE")
public long getState() {
return state;
}
public void setState(long state) {
this.state = state;
}
@Override
public boolean equals(Object o) {
......@@ -101,11 +111,12 @@ public class FileNameDicEntity {
Objects.equals(analysisDate, that.analysisDate) &&
Objects.equals(printDate, that.printDate) &&
Objects.equals(formStartTime, that.formStartTime) &&
Objects.equals(state, that.state) &&
Objects.equals(formDeadline, that.formDeadline);
}
@Override
public int hashCode() {
return Objects.hash(fileId, fileName, uploadDate, analysisDate, printDate, formStartTime, formDeadline);
return Objects.hash(fileId, fileName, uploadDate, analysisDate,state, printDate, formStartTime, formDeadline);
}
}
......@@ -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="fileId")
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);
/**
* 更新个人邮寄字典表的解析状态
......@@ -40,11 +40,11 @@ public interface FileNameDicMapper {
@Select("<script> " +
"select * from (select FILE_NAME_DIC.*,rownum rn from FILE_NAME_DIC " +
"<where> 1=1 " +
"<if test='analysisState != -1' >" +
"<if test='analysisState != -1 ' >" +
" and STATE =#{analysisState}" +
"</if>" +
"<if test='uploadDate !=null' >" +
" and to_char(UPLOAD_DATE,'yyyyMMdd') =#{uploadDate}" +
" and substr(UPLOAD_DATE,0,8) =#{uploadDate}" +
"</if>" +
"<if test='fileName != null ' >" +
" and FILE_NAME =#{fileName}" +
......@@ -66,11 +66,13 @@ public interface FileNameDicMapper {
" and STATE =#{analysisState}" +
"</if>" +
"<if test='uploadDate !=null' >" +
" and to_char(UPLOAD_DATE,'yyyyMMdd') = #{uploadDate}" +
" and substr(UPLOAD_DATE,0,8) = #{uploadDate}" +
"</if>" +
"<if test='fileName != null ' >" +
" and FILE_NAME = #{fileName}" +
"</if> </where> </script>")
public List<FileNameDicEntity> queryFileNameDicCount(@Param("uploadDate")String uploadDate,@Param("fileName") String fileName, @Param("analysisState") long analysisState);
@Delete("DELETE FROM FILE_NAME_DIC WHERE FILE_ID = #{fileId}")
public void deleteFileAndPostData(@Param("fileId")String fileId);
}
......@@ -25,7 +25,7 @@ public interface FilesMapper {
"<if test=\"importDate !=null\">"+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}" +
"</if> "+
"group by FILES.upload_date,FILES.ID) group by upload_date" +
"group by FILES.upload_date,FILES.ID) group by upload_date, rownum" +
") where rn BETWEEN #{minNum} and #{maxNum} </script>")
public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum);
......@@ -46,8 +46,7 @@ public interface FilesMapper {
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}" +
"</if>"+
" group by FILES.upload_date,FILES.ID)a" +
" group by a.upload_date " +
"select * from PREPRO_PERSON"+
" group by a.upload_date, rownum " +
"</script>"})
public List<CountDataEntity> selectFilesCount(@Param("importDate") String importDate);
......
......@@ -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" +
......@@ -50,4 +50,6 @@ public interface PersonPostMapper {
" <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>")
public boolean deleteAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,List<String> getToCounty ,@Param("uploadDate")String uploadDate);
@Delete("DELETE FROM PERSON_POST WHERE FILE_ID = #{fileId}")
public void deletePersonPostByFileId(@Param("fileId")String fileId);
}
......@@ -44,19 +44,13 @@ public interface TaskListMapper {
/**
* 派出所计数查询
* 查询派出所列表
* 受理库
* @param submitDate
* @param countyCount
* @return
*/
@Select("SELECT gajg.gajg_mc,substr(act.upload_no,0,9),count(*) as gajg\n" +
" FROM ACC_CARD_T@ACCU_DBLINK act \n" +
" LEFT JOIN ACC_GROUP_T@ACCU_DBLINK agt on substr(act.accept_no,0,8) = agt.group_no \n" +
" LEFT JOIN GAJG_DM gajg on substr(act.upload_no,0,9) = gajg.gajg_dm\n" +
" WHERE agt.group_no not in (select GROUP_NO.group_no from GROUP_NO) \n" +
" and to_char(IMPORT_TIME,'yyyymmdd') = #{submitDate} \n" +
" and substr(act.upload_no,0,6) = #{countyCode}\n" +
" GROUP by gajg.GAJG_MC,substr(act.upload_no,0,9)")
@Select("")
public List<CountGajgEntity> selectByGajg(@Param("submitDate") String submitDate,@Param("countyCode") String countyCount);
......
......@@ -14,7 +14,7 @@ public interface FileNameDicService {
* @param fileNameDicEntity
* @return
*/
public long saveFileNameDic(FileNameDicEntity fileNameDicEntity);
public void saveFileNameDic(FileNameDicEntity fileNameDicEntity);
/**
* 查询个人邮寄信息字典表
......@@ -32,4 +32,10 @@ public interface FileNameDicService {
* @return
*/
public int queryFileNameDicCount(String uploadDate,String fileName, long analysisState);
/**
* 根据文件id删除excel文件以及文件内的邮寄信息
* @param fileId
*/
public void deleteFileByFileId(String fileId);
}
......@@ -20,4 +20,6 @@ public interface TaskListService {
public boolean updateState(String taskId);
public List<Object> selectByCountyAtACCU(String date);
public List<Object> selectByPoliceAtACCU(String date,String typeCode,String countyCode);
}
......@@ -2,9 +2,11 @@ package com.yxproject.start.service.impl;
import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.mapper.FileNameDicMapper;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.service.FileNameDicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
......@@ -16,22 +18,36 @@ import java.util.List;
public class FileNameDicServiceImpl implements FileNameDicService {
@Autowired
private FileNameDicMapper fileNameDicMapper;
@Autowired
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
public List<FileNameDicEntity> queryFileNameDic(String uploadDate,String fileName, long analysisState, long currPage, long pageSize) {
fileNameDicMapper.queryFileNameDic(uploadDate, fileName, analysisState, currPage * pageSize, (currPage - 1) * pageSize + 1);
return fileNameDicMapper.queryFileNameDic(uploadDate,fileName, analysisState, currPage*pageSize,(currPage-1)*pageSize+1 );
// if (analysisState<0){
// analysisState=2;
// }
// List<FileNameDicEntity> fileNameDicEntities = fileNameDicMapper.queryFileNameDic(uploadDate, fileName, -1, currPage * pageSize, (currPage - 1) * pageSize + 1);
return fileNameDicMapper.queryFileNameDic(uploadDate,fileName, -1, currPage*pageSize,(currPage-1)*pageSize+1 );
// return null;
}
@Override
public int queryFileNameDicCount(String uploadDate,String fileName, long analysisState) {
// if (analysisState<0){
// analysisState=2;
// }
return fileNameDicMapper.queryFileNameDicCount(uploadDate,fileName, analysisState ).size();
}
@Override
@Transactional
public void deleteFileByFileId(String fileId) {
fileNameDicMapper.deleteFileAndPostData(fileId);
personPostMapper.deletePersonPostByFileId(fileId);
}
}
......@@ -57,8 +57,8 @@ public class TaskListServiceImpl implements TaskListService {
Map<String,Object> typeMap = new LinkedHashMap<>();
for (Map o :maps){
//TODO 组合JSON
if (typeMap.containsKey(o.get("CARD_TYPE")+"")){
List<Map<String,Object>> mapList= (List<Map<String,Object>>)typeMap.get("CARD_TYPE");
if (typeMap!=null&typeMap.containsKey(o.get("CARD_TYPE")+"")){
List<Map<String,Object>> mapList= (List<Map<String,Object>>)typeMap.get(o.get("CARD_TYPE"));
mapList.add(o);
typeMap.put(o.get("CARD_TYPE")+"",mapList);
}else {
......@@ -72,42 +72,109 @@ public class TaskListServiceImpl implements TaskListService {
List<Map<String,Object>> typeList = new ArrayList<>();
List<Map<String,Object>> mapList = (List<Map<String,Object>>)typeMap.get(type);
int typeSum =0;
String typeCode = null;
for (Map o:mapList) {
typeCode=o.get("CARD_TYPE_ID").toString();
typeSum+=Integer.valueOf(o.get("VALID_COUNT") + "");
Map<String,Object> countyMap = new LinkedHashMap<>();
if (countyMap.containsKey(o.get("COUNTYNAME")+"")){
List<Map<String,Object>> countyList= (List<Map<String,Object>>)countyMap.get("CARD_TYPE");
if (countyMap !=null&countyMap.containsKey(o.get("COUNTYNAME")+"")){
List<Map<String,Object>> countyList= (List<Map<String,Object>>)countyMap.get(o.get("CARD_TYPE"));
countyList.add(o);
Integer valid_count = Integer.valueOf(o.get("VALID_COUNT") + "");
valid_count+=Integer.valueOf(countyMap.get("countyValidCount").toString());
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);
typeMapList.put("typeCode",typeCode);
typeMapList.put("typeSum",typeSum);
typeMapList.put("typeList",typeList);
typeMapList.put("countyList",typeList);
list.add(typeMapList);
}
return list;
}
@Override
public List<Object> selectByPoliceAtACCU(String date,String typeCode,String countyCode) {
// taskListMapper.;
return null;
}
System.out.println(maps.toString()+"---------");
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 "";
}
return null;
}
}
......@@ -81,7 +81,10 @@
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><span><img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;"></span></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><span>{{loginData.roleList[0].role}}</span></span>
<span class="logo-lg">
<img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;">
北京制证辅助平台
</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<!---导航左边-->
......@@ -96,7 +99,7 @@
<li class="sidebar no-padding navbar-left" style="width: 230px;margin-left:27px;height: auto;">
<form style="margin-top: 6px;" name="form">
<div class="input-group input-group-sm">
<input type="text" class="form-control input-sm bg-light no-border padder" ng-keyup="enterEvent($event,searchInput)" style="height: 35px;background-color: #fff;" ng-model="searchInput" placeholder="身份证号/受理号/任务单id...">
<input type="text" class="form-control input-sm bg-light no-border padder" ng-keyup="enterEvent($event,searchInput)" style="height: 35px;background-color: #fff;" ng-model="searchInput" placeholder="身份证号/受理号/任务单编号...">
<span class="input-group-btn">
<button type="button" style="height: 35px;background-color: #fff;border-left:0;outline:none;" ng-click="doSearch(searchInput)" class="btn btn-sm bg-light">
<i class="fa fa-search"></i>
......@@ -192,19 +195,11 @@
<li class="dropdown user">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
<span class="hidden-xs">{{loginData.name}}</span>
<span class="hidden-xs" ng-bind="loginData.name"></span>
</a>
<ul class="dropdown-menu">
<li style="padding: 5px;">
<a ng-click="logout()" class="btn btn-default btn-flat">退出当前用户</a>
</li>
</ul>
</li>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding-bottom: 11px;">
<img src="newTheme/dist/img/logo.jpg" class="user-image" alt="User Image">
<span style="font-size: 1.7em;">北京制证辅助平台</span>
</a>
<a ng-click="logout()" class="btn btn-flat" style="background-color: #0c6ba2;border: 0">退出当前用户</a>
</li>
</ul>
</div>
......@@ -240,9 +235,9 @@
<div class="content-wrapper" ng-view style="min-height: 589px;"></div>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>联系电话:</b>(010)88516568
<b>Version:</b>1.0.1.110
</div>
<strong>北京盈信信息科技所有</strong>
<strong>北京制证辅助平台</strong>
</footer>
</div>
<div ng-if="loginData.login == false" class="wrapper" style="background-color: #EEEEEE;">
......
......@@ -156,14 +156,22 @@ angular.module('AvatarCheck', [
}
$scope.doSearch = function (searchInput) {
if(angular.isUndefined(searchInput)){
$rootScope.searchResult={};
$scope.msg="";
$scope.alertMsg="";
var pattern = /^[0-9]*$/
if(angular.isUndefined(searchInput)||!pattern.test(searchInput)){
$location.path("/searchCard");
$scope.alertMsg = "请输入要查询的受理号/身份证号/任务单id";
$scope.msg = "请输入正确的受理号/身份证号/任务单编号";
}else{
console.log(searchInput,"//")
HttpService.searchCards(searchInput, function (data) {
if(data==''){
$scope.alertMsg = "暂无数据";
}else{
$rootScope.searchResult = data;
console.log($rootScope.searchResult)
}
})
$location.path("/searchCard");
}
......@@ -177,12 +185,37 @@ angular.module('AvatarCheck', [
});
}
$scope.enterEvent = function(e,search) {
console.log(search)
var keycode = window.event?e.keyCode:e.which;
if(keycode==13){
$scope.doSearch(search)
}
}
});
$scope.goBack = function () {
$location.path("/createTaskList");
}
}).filter('myDateFilter', function() { //可以注入依赖
return function(permanentPositionDate) {
if(permanentPositionDate!=null){
var yyyy = permanentPositionDate.substring(0,4);
var MM = permanentPositionDate.substring(4,6);
var dd = permanentPositionDate.substring(6,8);
var hh = permanentPositionDate.substring(8,10);
var mm = permanentPositionDate.substring(10,12);
var ss = permanentPositionDate.substring(12,14)
var yyyyMMddhhmmss = yyyy+"-"+MM+"-"+dd+" "+hh+":"+mm+":"+ss;
var yyyyMMdd = yyyy+"-"+MM+"-"+dd;
if(permanentPositionDate.length == 8){
return yyyyMMdd;
}else{
return yyyyMMddhhmmss;
}
}else{
return permanentPositionDate;
}
}
})
;
......@@ -321,6 +321,17 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) {
success(response.data)
})
},
deleteByFileId:function(fileId,success){
$http({
method: 'GET',
url: "../ReadExcel/deleteByFileId"+urlTimeStamp(),
params:{
fileId:fileId
}
}).then(function successCallback(response) {
success(response.data)
})
}
}
});
\ No newline at end of file
......@@ -113,7 +113,7 @@
</td>
</tr>
</table>
<table class="table table-bordered table-hover postTable" ng-if="postPackageData">
<table class="table table-bordered table-hover postTable" ng-if="postPackageData.length>0">
<thead>
<tr>
<th>NO.</th>
......@@ -128,21 +128,22 @@
<tbody>
<tr ng-repeat="item in postPackageData">
<td>{{$index+1}}</td>
<td>{{item.beginDate}}</td>
<td>{{item.deadline}}</td>
<td>{{item.formStartTime | myDateFilter}}</td>
<td>{{item.formDeadline| myDateFilter}}</td>
<td>{{item.fileName}}</td>
<td>{{item.uploadDate}}</td>
<td>{{item.state}}</td>
<td>{{item.uploadDate | myDateFilter}}</td>
<td ng-if="item.state==0">未解析</td>
<td ng-if="item.state==1">已解析</td>
<td>
<button class="btn btn-danger">删除</button>
<button class="btn btn-danger" ng-click="deletePostData(item.fileId,item.uploadDate)">删除</button>
</td>
</tr>
</tbody>
</table>
<div style="padding-left: 27%;" ng-if="postPackageData">
<div style="padding-left: 27%;" >
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<h3 ng-if="postMsgDetail.length==0">暂无记录。</h3>
<h3 ng-if="postPackageData.length==0">暂无记录。</h3>
<div class="row" style="padding:0 25px;" ng-if="postMsgDetail.length>0">
<div class="col-md-11"></div>
<div class="col-md-1" style="text-align: right;">
......
......@@ -65,21 +65,45 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.paginationConf = {
currentPage: 1,
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
perPageOptions: [5 ,10 ,15 ,20 ,25]
};
var date = $("#datepicker3").val();
$scope.getPostPackage = function(){
console.log($scope.fileName,$scope.state,$("#datepicker3").val())
HttpService.selectPostPackageCount($scope.fileName,$scope.state,$("#datepicker3").val(),function (data) {
$scope.paginationConf.totalItems = data;
console.log(data)
$scope.paginationConf.totalItems = data.respData.string;
console.log($scope.paginationConf.totalItems)
})
HttpService.selectPostPackage($scope.fileName,$scope.state,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,$("#datepicker3").val(),function(data){
$scope.postPackageData = data;
$scope.postPackageData = data.respData;
console.log($scope.postPackageData)
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getPostPackage);
$scope.deletePostData = function(fileid,importDate){
ngDialog.open({
template: 'dialogs/confirm.html' + urlTimeStamp(),
width: 600,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.total = 1;
$scope.importDate = $filter('date')(importDate, 'yyyy-MM-dd');;
$scope.confirmDelete = function () {
HttpService.deleteByFileId(fileid, function (data) {
console.log(data)
$scope.getPostPackage(date)
$scope.closeThisDialog();
MessageService.showAlert(data);
})
};
}]
});
}
});
\ No newline at end of file
......@@ -6,8 +6,12 @@
</strong>
<div class="box-info" style="padding:0px 10px 7px 10px;">
<h4 ng-if="alertMsg">{{alertMsg}}</h4>
<h4 ng-if="msg">{{msg}}</h4>
<h4 ng-if="!searchResult">
请输入要查询的受理号/身份证号/任务单编号
</h4>
<!--任务单-->
<div class="panel panel-info" ng-if="searchResult.workOrderDate.length>0">
<div class="panel panel-info" ng-if="searchResult.workOrderData.length>0">
<div class="panel-heading">
<h3 class="panel-title">
任务单
......@@ -28,17 +32,17 @@
<th>仓库</th>
</thead>
<tbody>
<tr>
<td>20190228001</td>
<td>海淀区</td>
<td>普通证</td>
<td>20190221</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<tr ng-repeat="item in searchResult.workOrderData">
<td>{{item.TASK_ID}}</td>
<td>{{item.COUNTYNAME}}</td>
<td>{{item.CARD_TYPE}}</td>
<td>{{item.SUBMIT_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.ISSUED_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.PRINT_OUT_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.POSITION_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.SORT_OUT_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.QUALITY_TEST_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.OUT_STORAGE_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
</tr>
</tbody>
</table>
......
......@@ -4,15 +4,7 @@ angular.module('AvatarCheck.searchCard', ['ngRoute', 'AvatarCheck.http'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/searchCard', {
templateUrl: 'views/searchCard/searchCard.html' + urlTimeStamp(),
controller: 'searchCardCtrl',
controller: 'appCtrl',
cache: false
});
}])
.controller('searchCardCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter, $location) {
$scope.goBack = function () {
$location.path("/dataCheckTask");
}
});
\ No newline at end of file
}]);
\ No newline at end of file
......@@ -67,7 +67,7 @@
</td>
</tr>
</table>
<table class="table table-bordered table-hover postTable" ng-if="xmlPackageData">
<table class="table table-bordered table-hover postTable" ng-if="xmlPackageData.length>0">
<thead>
<tr>
<th>NO.</th>
......@@ -81,8 +81,8 @@
</thead>
<tbody>
<tr ng-repeat="item in xmlPackageData">
<td>{{$index}}</td>
<td>{{item.uploadDate}}</td>
<td>{{$index+1}}</td>
<td>{{item.uploadDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.packageCount}}</td>
<td>{{item.cardCount}}</td>
<td>{{item.commonCardCount}}</td>
......@@ -94,10 +94,10 @@
</tr>
</tbody>
</table>
<div style="padding-left: 27%;" ng-if="xmlPackageData">
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<h3 ng-if="postMsgDetail.length==0">暂无记录。</h3>
<h3 ng-if="xmlPackageData.length==0">暂无记录。</h3>
<div class="row" style="padding:0 25px;" ng-if="postMsgDetail.length>0">
<div class="col-md-11"></div>
<div class="col-md-1" style="text-align: right;">
......
......@@ -70,10 +70,10 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
$scope.getXmlPackage = function(){
console.log($("#datepicker").val())
HttpService.selectXmlPackageCount($("#datepicker").val(),function(data){
$scope.paginationConf.totalItems = 50;
$scope.paginationConf.totalItems = data.respData.string;
})
HttpService.selectXmlPackage($("#datepicker").val(),$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.xmlPackageData = data;
$scope.xmlPackageData = data.respData;
console.log("$scope.xmlPackageData:",$scope.xmlPackageData)
})
}
......
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