Commit 015848fc authored by dahai's avatar dahai

修改导入EXCEL个人邮寄信息API

parent ff130340
...@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody;
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;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import sun.net.idn.StringPrep;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
...@@ -101,15 +102,30 @@ public class TaskListApi { ...@@ -101,15 +102,30 @@ public class TaskListApi {
} }
/**
* 查询任务单详情
* (辅助库)
* @param process 工序
* @param date 查询时间
* @param resp
* @return
*/
@RequestMapping("queryByCountyAtAuxiliary")
public List<Object> queryByCountyAtAuxiliary(@RequestParam("process") String process, HttpServletResponse resp){
List<Object> objects = taskListService.selectByCountyAtAuxiliary(process);
return objects;
}
/** /**
* 生成任务单 * 生成任务单
* *
* @param date 查询时间 * date 查询时间
* @param name 提交人姓名 * name 提交人姓名
* @param groupList 组号列表 * groupList 组号列表
* @param countyList 区县列表 {typeCode:1,countyCode:'123456'} * countyList 区县列表 {typeCode:1,countyCode:'123456'}
* @param resp
* @return * @return
*/ */
@RequestMapping("createTask") @RequestMapping("createTask")
...@@ -123,14 +139,14 @@ public class TaskListApi { ...@@ -123,14 +139,14 @@ public class TaskListApi {
JSONArray jsonGroup = jsonObject.getJSONArray("groupList"); JSONArray jsonGroup = jsonObject.getJSONArray("groupList");
List<Map<String,Object>> countyList =(List<Map<String,Object>>)jsonCounty; List<Map<String,Object>> countyList =(List<Map<String,Object>>)jsonCounty;
List<String> groupList =(List<String>)jsonGroup; List<String> groupList =(List<String>)jsonGroup;
//正常生成区县任务单
for (Map<String,Object> map :countyList){ for (Map<String,Object> map :countyList){
String typeCode = map.get("typeCode").toString(); String typeCode = map.get("typeCode").toString();
String countyCode = map.get("countyCode").toString(); String countyCode = map.get("countyCode").toString();
List<Object> objects = taskListService.selectGroupAtACCU(date, typeCode, countyCode); List<Object> objects = taskListService.selectGroupAtACCU(date, typeCode, countyCode);
//todo 保存任务单数据
boolean b = taskListService.saveTask(objects,name); boolean b = taskListService.saveTask(objects,name);
} }
//生成某几个组的区县任务单
if (groupList.size()>0){ if (groupList.size()>0){
//查询组号详情 //查询组号详情
String groupNo = "("; String groupNo = "(";
......
...@@ -15,6 +15,8 @@ public class FilesEntity { ...@@ -15,6 +15,8 @@ public class FilesEntity {
private String createTime; private String createTime;
private String sourceFileName; private String sourceFileName;
private Date newTime; private Date newTime;
private long id;
private Date upload_date;
@Basic @Basic
@Column(name = "VERSION_CODE") @Column(name = "VERSION_CODE")
...@@ -66,7 +68,7 @@ public class FilesEntity { ...@@ -66,7 +68,7 @@ public class FilesEntity {
this.createTime = createTime; this.createTime = createTime;
} }
@Id @Basic
@Column(name = "SOURCE_FILE_NAME") @Column(name = "SOURCE_FILE_NAME")
public String getSourceFileName() { public String getSourceFileName() {
return sourceFileName; return sourceFileName;
...@@ -85,6 +87,24 @@ public class FilesEntity { ...@@ -85,6 +87,24 @@ public class FilesEntity {
public void setNewTime(Date newTime) { public void setNewTime(Date newTime) {
this.newTime = newTime; this.newTime = newTime;
} }
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "UPLOAD_DATE")
public Date getUpload_date() {
return upload_date;
}
public void setUpload_date(Date upload_date) {
this.upload_date = upload_date;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
...@@ -97,11 +117,13 @@ public class FilesEntity { ...@@ -97,11 +117,13 @@ public class FilesEntity {
Objects.equals(recordNumber, that.recordNumber) && Objects.equals(recordNumber, that.recordNumber) &&
Objects.equals(createTime, that.createTime) && Objects.equals(createTime, that.createTime) &&
Objects.equals(sourceFileName, that.sourceFileName) && Objects.equals(sourceFileName, that.sourceFileName) &&
Objects.equals(id, that.id) &&
Objects.equals(upload_date, that.upload_date) &&
Objects.equals(newTime, that.newTime); Objects.equals(newTime, that.newTime);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(versionCode, dwdm, dwmc, recordNumber, createTime, sourceFileName, newTime); return Objects.hash(versionCode, dwdm, dwmc,upload_date,id, recordNumber, createTime, sourceFileName, newTime);
} }
} }
...@@ -43,8 +43,9 @@ public class PersonPostEntity { ...@@ -43,8 +43,9 @@ public class PersonPostEntity {
private Time printDate; private Time printDate;
private Time formStartTime; private Time formStartTime;
private Time formDeadline; private Time formDeadline;
private long id;
@Id @Basic
@Column(name = "WAYBILL_NUMBER") @Column(name = "WAYBILL_NUMBER")
public String getWaybillNumber() { public String getWaybillNumber() {
return waybillNumber; return waybillNumber;
...@@ -273,6 +274,15 @@ public class PersonPostEntity { ...@@ -273,6 +274,15 @@ public class PersonPostEntity {
public void setNatureOfTheInformation(String natureOfTheInformation) { public void setNatureOfTheInformation(String natureOfTheInformation) {
this.natureOfTheInformation = natureOfTheInformation; this.natureOfTheInformation = natureOfTheInformation;
} }
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic @Basic
@Column(name = "FIRST_WHITE") @Column(name = "FIRST_WHITE")
...@@ -444,11 +454,12 @@ public class PersonPostEntity { ...@@ -444,11 +454,12 @@ public class PersonPostEntity {
Objects.equals(analysisDate, that.analysisDate) && Objects.equals(analysisDate, that.analysisDate) &&
Objects.equals(printDate, that.printDate) && Objects.equals(printDate, that.printDate) &&
Objects.equals(formStartTime, that.formStartTime) && Objects.equals(formStartTime, that.formStartTime) &&
Objects.equals(id, that.id) &&
Objects.equals(formDeadline, that.formDeadline); Objects.equals(formDeadline, that.formDeadline);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(waybillNumber, backWaybillNumber, orderNumber, createDate, openid, wcPlayOrderNumber, playState, orderState, applicantName, senderName, senderPhone, senderAddress, recipientName, recipientPhone, recipientAddress, orderBlankNumber, getToProvince, getToCity, getToCounty, businessType, latticeMouthInformation, natureOfTheInternal, natureOfTheInformation, firstWhite, idCard, acceptTheMatter, beginUsefulLife, validPeriodEnd, note, state, uploadDate, fileId, analysisDate, printDate, formStartTime, formDeadline); return Objects.hash(waybillNumber, backWaybillNumber,id, orderNumber, createDate, openid, wcPlayOrderNumber, playState, orderState, applicantName, senderName, senderPhone, senderAddress, recipientName, recipientPhone, recipientAddress, orderBlankNumber, getToProvince, getToCity, getToCounty, businessType, latticeMouthInformation, natureOfTheInternal, natureOfTheInformation, firstWhite, idCard, acceptTheMatter, beginUsefulLife, validPeriodEnd, note, state, uploadDate, fileId, analysisDate, printDate, formStartTime, formDeadline);
} }
} }
...@@ -9,8 +9,8 @@ import java.util.List; ...@@ -9,8 +9,8 @@ import java.util.List;
@Mapper @Mapper
public interface FilesMapper { public interface FilesMapper {
@Insert("INSERT INTO FILES (VERSION_CODE,DWDM,DWMC,RECORD_NUMBER,CREATE_TIME,SOURCE_FILE_NAME)" + @Insert("INSERT INTO FILES (VERSION_CODE,DWDM,DWMC,RECORD_NUMBER,CREATE_TIME,SOURCE_FILE_NAME,UPLOAD_DATE)" +
"VALUES(#{versionCode},#{dwdm},#{dwmc},#{recordNumber},#{createTime},#{sourceFileName})") "VALUES(#{versionCode},#{dwdm},#{dwmc},#{recordNumber},#{createTime},#{sourceFileName},#{upload_date})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id") @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
public long insertFiles(FilesEntity filesEntity); public long insertFiles(FilesEntity filesEntity);
......
...@@ -22,6 +22,8 @@ public interface TaskListService { ...@@ -22,6 +22,8 @@ public interface TaskListService {
public List<Object> selectByCountyAtACCU(String date); public List<Object> selectByCountyAtACCU(String date);
public List<Object> selectByCountyAtAuxiliary(String process);
public List<Object> selectGroupAtACCU(String date,String typeCode,String countyCode); public List<Object> selectGroupAtACCU(String date,String typeCode,String countyCode);
public List<Object> selectGroupAtACCU(String groupNo); public List<Object> selectGroupAtACCU(String groupNo);
......
...@@ -68,7 +68,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -68,7 +68,7 @@ public class TaskListServiceImpl implements TaskListService {
List list = new ArrayList(); List list = new ArrayList();
Map<String,Object> typeMap = new LinkedHashMap<>(); Map<String,Object> typeMap = new LinkedHashMap<>();
for (Map o :maps){ for (Map o :maps){
//TODO 组合JSON // 组合JSON
if (typeMap!=null&typeMap.containsKey(o.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")); List<Map<String,Object>> mapList= (List<Map<String,Object>>)typeMap.get(o.get("CARD_TYPE"));
mapList.add(o); mapList.add(o);
...@@ -149,6 +149,19 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -149,6 +149,19 @@ public class TaskListServiceImpl implements TaskListService {
return list; return list;
} }
/**
* 查询任务单详情
* 辅助库
* @param process 查询工序
* @return
*/
@Override
public List<Object> selectByCountyAtAuxiliary(String process) {
// taskListMapper
return null;
}
/** /**
* 查询组号信息 * 查询组号信息
* 受理库 * 受理库
......
...@@ -40,8 +40,8 @@ public class IDCardFactory { ...@@ -40,8 +40,8 @@ public class IDCardFactory {
filesEntity.setDwmc(DWMC); filesEntity.setDwmc(DWMC);
Date date = new Date(); Date date = new Date();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
filesEntity.setCreateTime(simpleDateFormat.format(date)); filesEntity.setCreateTime(packagehead.element("SCSJ").getTextTrim());
filesEntity.setUpload_date(new Date());
List<Element> recordlist = records.elements("RECORD"); List<Element> recordlist = records.elements("RECORD");
for (Element e : recordlist) { for (Element e : recordlist) {
PreproPersonEntity preproPersonEntity = new PreproPersonEntity(); PreproPersonEntity preproPersonEntity = new PreproPersonEntity();
...@@ -69,7 +69,6 @@ public class IDCardFactory { ...@@ -69,7 +69,6 @@ public class IDCardFactory {
preproPersonEntity.setSjrLxdh(e.element("SJR_LXDH").getStringValue()); preproPersonEntity.setSjrLxdh(e.element("SJR_LXDH").getStringValue());
preproPersonEntity.setSjrYzbm(e.element("SJR_YZBM").getStringValue()); preproPersonEntity.setSjrYzbm(e.element("SJR_YZBM").getStringValue());
preproPersonEntity.setSjrTxdz(e.element("SJR_TXDZ").getStringValue()); preproPersonEntity.setSjrTxdz(e.element("SJR_TXDZ").getStringValue());
// preproPersonEntity.setFileId();
preproPersonEntityList.add(preproPersonEntity); preproPersonEntityList.add(preproPersonEntity);
System.out.println(preproPersonEntity.getJmsfzslh()+"--------------"); System.out.println(preproPersonEntity.getJmsfzslh()+"--------------");
} }
......
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