Commit 9a2a08c0 authored by liboyang's avatar liboyang

新增几个查询接口

parent 2df0cf1e
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.dto.CardsStatusAndCardsMsgDto;
import com.yxproject.start.dto.CardsStatusAndPostMsgDto; import com.yxproject.start.dto.CardsStatusAndPostMsgDto;
import com.yxproject.start.entity.PersonPostAbnormalEntity; import com.yxproject.start.entity.PersonPostAbnormalEntity;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.entity.PersonalProgressStatusEntity; import com.yxproject.start.entity.PersonalProgressStatusEntity;
import com.yxproject.start.service.PersonPostAbnormalService; import com.yxproject.start.service.PersonPostAbnormalService;
import com.yxproject.start.service.PersonPostService;
import com.yxproject.start.service.PersonalProgressStatusService; import com.yxproject.start.service.PersonalProgressStatusService;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; 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 java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -25,16 +32,74 @@ public class BizApi { ...@@ -25,16 +32,74 @@ public class BizApi {
private PersonPostAbnormalService personPostAbnormalService; private PersonPostAbnormalService personPostAbnormalService;
@Autowired @Autowired
private PersonalProgressStatusService personalProgressStatusService; private PersonalProgressStatusService personalProgressStatusService;
@Autowired
private PersonPostService personPostService;
/**
* 查询个人邮寄信息异常数据
* @param date
* @param police
* @return
*/
@RequestMapping("getErrorPostMsg") @RequestMapping("getErrorPostMsg")
public List<PersonPostAbnormalEntity> getErrorPostMsg(@RequestParam("date")String date, @RequestParam("police")String police) { public List<PersonPostAbnormalEntity> getErrorPostMsg(@RequestParam("date")String date, @RequestParam("police")String police) {
List<PersonPostAbnormalEntity> list = personPostAbnormalService.getPersonPostAbnormal(date,police); List<PersonPostAbnormalEntity> list = personPostAbnormalService.getPersonPostAbnormal(date,police);
return list; return list;
} }
/**
* 查询对公邮寄包查询
* @param date
* @param police
* @return
*/
@RequestMapping("getCardsPostMsg") @RequestMapping("getCardsPostMsg")
public List<CardsStatusAndPostMsgDto> getCardsPostMsg(@RequestParam("date")String date, @RequestParam("police")String police) { public List<CardsStatusAndPostMsgDto> getCardsPostMsg(@RequestParam("date")String date, @RequestParam("police")String police) {
List<CardsStatusAndPostMsgDto> list = personalProgressStatusService.getStatusAndPostMsg(date,police); List<CardsStatusAndPostMsgDto> list = personalProgressStatusService.getStatusAndPostMsg(date,police);
return list; return list;
} }
/**
* 通过运单号查询邮寄信息
* @param waybillNumber
* @return
*/
@RequestMapping("getPostMsgByWaybillNo")
public PersonPostEntity getPostMsgByWaybillNo(@RequestParam("waybillNumber")String waybillNumber) {
PersonPostEntity personPostEntity = personPostService.getPersonPostMsg(waybillNumber);
return personPostEntity;
}
/**
*查询个人证件信息和证件状态
* @param date
* @param police
* @return
*/
@RequestMapping("getCardsStatusAndCardMsg")
public List<CardsStatusAndCardsMsgDto> getCardsStatusAndCardMsg(@RequestParam("date")String date, @RequestParam("police")String police) {
List<CardsStatusAndCardsMsgDto> list = personalProgressStatusService.getStatusAndCardMsg(date,police);
return list;
}
/**
* 签收(修改状态表中的状态)
* @param uploadNoList
* @return
*/
@RequestMapping("setSignInDate")
public Map<String,String> setSignInDate(@RequestBody String uploadNoList) {
Map<String,String> map = new HashMap<>();
JSONArray jsonArray = JSONArray.fromObject(uploadNoList);
Boolean flag = personalProgressStatusService.updateSignInDate(jsonArray);
if(flag){
map.put("msg","修改成功");
}else {
map.put("msg","修改失败");
}
return map;
}
} }
package com.yxproject.start.dto;
import java.sql.Time;
public class CardsStatusAndCardsMsgDto {
private String uploadNo;
private Long progressStatus;
private String note;
private String importDate;
private Time createTaskDate;
private Time dataCheckDate;
private Time filmPrintDate;
private Time positionDate;
private Time sortDate;
private Time qualityTestDate;
private Time outStorageDate;
private Time handOutDate;
private Time signInDate;
private String jmsfzslh;
private String gmsfhm;
private String xm;
private String xbdm;
private String mzdm;
private String csrq;
private String ssxqdm;
private String dzmc;
private String sdxp;
private String zwyZwtxsj;
private String zwyZwtzsj;
private String zweZwtxsj;
private String zweZwtzsj;
private String qfjgGajgmc;
private String yxqqsrq;
private String yxqjzrq;
private String jmsfzslyydm;
private String jmsfzzzlxdm;
private String jmsfzlzfsdm;
private String sjrXm;
private String sjrLxdh;
private String sjrYzbm;
private String sjrTxdz;
private String sid;
private String fileName;
public String getUploadNo() {
return uploadNo;
}
public void setUploadNo(String uploadNo) {
this.uploadNo = uploadNo;
}
public Long getProgressStatus() {
return progressStatus;
}
public void setProgressStatus(Long progressStatus) {
this.progressStatus = progressStatus;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getImportDate() {
return importDate;
}
public void setImportDate(String importDate) {
this.importDate = importDate;
}
public Time getCreateTaskDate() {
return createTaskDate;
}
public void setCreateTaskDate(Time createTaskDate) {
this.createTaskDate = createTaskDate;
}
public Time getDataCheckDate() {
return dataCheckDate;
}
public void setDataCheckDate(Time dataCheckDate) {
this.dataCheckDate = dataCheckDate;
}
public Time getFilmPrintDate() {
return filmPrintDate;
}
public void setFilmPrintDate(Time filmPrintDate) {
this.filmPrintDate = filmPrintDate;
}
public Time getPositionDate() {
return positionDate;
}
public void setPositionDate(Time positionDate) {
this.positionDate = positionDate;
}
public Time getSortDate() {
return sortDate;
}
public void setSortDate(Time sortDate) {
this.sortDate = sortDate;
}
public Time getQualityTestDate() {
return qualityTestDate;
}
public void setQualityTestDate(Time qualityTestDate) {
this.qualityTestDate = qualityTestDate;
}
public Time getOutStorageDate() {
return outStorageDate;
}
public void setOutStorageDate(Time outStorageDate) {
this.outStorageDate = outStorageDate;
}
public Time getHandOutDate() {
return handOutDate;
}
public void setHandOutDate(Time handOutDate) {
this.handOutDate = handOutDate;
}
public Time getSignInDate() {
return signInDate;
}
public void setSignInDate(Time signInDate) {
this.signInDate = signInDate;
}
public String getJmsfzslh() {
return jmsfzslh;
}
public void setJmsfzslh(String jmsfzslh) {
this.jmsfzslh = jmsfzslh;
}
public String getGmsfhm() {
return gmsfhm;
}
public void setGmsfhm(String gmsfhm) {
this.gmsfhm = gmsfhm;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getXbdm() {
return xbdm;
}
public void setXbdm(String xbdm) {
this.xbdm = xbdm;
}
public String getMzdm() {
return mzdm;
}
public void setMzdm(String mzdm) {
this.mzdm = mzdm;
}
public String getCsrq() {
return csrq;
}
public void setCsrq(String csrq) {
this.csrq = csrq;
}
public String getSsxqdm() {
return ssxqdm;
}
public void setSsxqdm(String ssxqdm) {
this.ssxqdm = ssxqdm;
}
public String getDzmc() {
return dzmc;
}
public void setDzmc(String dzmc) {
this.dzmc = dzmc;
}
public String getSdxp() {
return sdxp;
}
public void setSdxp(String sdxp) {
this.sdxp = sdxp;
}
public String getZwyZwtxsj() {
return zwyZwtxsj;
}
public void setZwyZwtxsj(String zwyZwtxsj) {
this.zwyZwtxsj = zwyZwtxsj;
}
public String getZwyZwtzsj() {
return zwyZwtzsj;
}
public void setZwyZwtzsj(String zwyZwtzsj) {
this.zwyZwtzsj = zwyZwtzsj;
}
public String getZweZwtxsj() {
return zweZwtxsj;
}
public void setZweZwtxsj(String zweZwtxsj) {
this.zweZwtxsj = zweZwtxsj;
}
public String getZweZwtzsj() {
return zweZwtzsj;
}
public void setZweZwtzsj(String zweZwtzsj) {
this.zweZwtzsj = zweZwtzsj;
}
public String getQfjgGajgmc() {
return qfjgGajgmc;
}
public void setQfjgGajgmc(String qfjgGajgmc) {
this.qfjgGajgmc = qfjgGajgmc;
}
public String getYxqqsrq() {
return yxqqsrq;
}
public void setYxqqsrq(String yxqqsrq) {
this.yxqqsrq = yxqqsrq;
}
public String getYxqjzrq() {
return yxqjzrq;
}
public void setYxqjzrq(String yxqjzrq) {
this.yxqjzrq = yxqjzrq;
}
public String getJmsfzslyydm() {
return jmsfzslyydm;
}
public void setJmsfzslyydm(String jmsfzslyydm) {
this.jmsfzslyydm = jmsfzslyydm;
}
public String getJmsfzzzlxdm() {
return jmsfzzzlxdm;
}
public void setJmsfzzzlxdm(String jmsfzzzlxdm) {
this.jmsfzzzlxdm = jmsfzzzlxdm;
}
public String getJmsfzlzfsdm() {
return jmsfzlzfsdm;
}
public void setJmsfzlzfsdm(String jmsfzlzfsdm) {
this.jmsfzlzfsdm = jmsfzlzfsdm;
}
public String getSjrXm() {
return sjrXm;
}
public void setSjrXm(String sjrXm) {
this.sjrXm = sjrXm;
}
public String getSjrLxdh() {
return sjrLxdh;
}
public void setSjrLxdh(String sjrLxdh) {
this.sjrLxdh = sjrLxdh;
}
public String getSjrYzbm() {
return sjrYzbm;
}
public void setSjrYzbm(String sjrYzbm) {
this.sjrYzbm = sjrYzbm;
}
public String getSjrTxdz() {
return sjrTxdz;
}
public void setSjrTxdz(String sjrTxdz) {
this.sjrTxdz = sjrTxdz;
}
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
}
...@@ -10,11 +10,12 @@ import java.util.Map; ...@@ -10,11 +10,12 @@ import java.util.Map;
@Mapper @Mapper
public interface PersonPostMapper { public interface PersonPostMapper {
/** /**
* 查询证件状态和邮寄详情 * 查询邮寄详情
* @param police * @param waybillNumber
* @param date
* @return * @return
*/ */
public List<PersonPostEntity> selectPersonPostMsg(@Param("police")String police, @Param("date")String date); @Select("SELECT * FROM PERSON_POST WHERE WAYBILL_NUMBER=#{waybillNumber}")
public PersonPostEntity selectPersonPostMsgByIdCard(String waybillNumber);
} }
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.dto.CardsStatusAndCardsMsgDto;
import com.yxproject.start.dto.CardsStatusAndPostMsgDto; import com.yxproject.start.dto.CardsStatusAndPostMsgDto;
import com.yxproject.start.entity.PersonalProgressStatusEntity; import com.yxproject.start.entity.PersonalProgressStatusEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
...@@ -21,4 +22,17 @@ public interface PersonalProgressStatusMapper { ...@@ -21,4 +22,17 @@ public interface PersonalProgressStatusMapper {
*/ */
@Select("SELECT * FROM PERSONAL_PROGRESS_STATUS a LEFT JOIN PERSON_POST b ON a.UPLOAD_NO = b.FIRST_WHITE WHERE substr(a.UPLOAD_NO,0,9) = #{police} AND a.UPLOAD_NO LIKE CONCAT(CONCAT('%',#{date}),'%')") @Select("SELECT * FROM PERSONAL_PROGRESS_STATUS a LEFT JOIN PERSON_POST b ON a.UPLOAD_NO = b.FIRST_WHITE WHERE substr(a.UPLOAD_NO,0,9) = #{police} AND a.UPLOAD_NO LIKE CONCAT(CONCAT('%',#{date}),'%')")
public List<CardsStatusAndPostMsgDto> selectStatusAndPostMsg(@Param("date")String date, @Param("police")String police); public List<CardsStatusAndPostMsgDto> selectStatusAndPostMsg(@Param("date")String date, @Param("police")String police);
/**
* 查询上传信息
* @param police
* @param date
* @return
*/
@Select("SELECT * FROM PERSONAL_PROGRESS_STATUS a LEFT JOIN PREPRO_PERSON b ON a.UPLOAD_NO = b.JMSFZSLH WHERE IMPORT_DATE=#{date} AND substr(a.UPLOAD_NO,0,9) = #{police}")
public List<CardsStatusAndCardsMsgDto> selectStatusAndCardMsg(@Param("date")String date, @Param("police")String police);
@Update("UPDATE PERSONAL_PROGRESS_STATUS SET PROGRESS_STATUS=9 WHERE UPLOAD_NO=#{uploadNo}")
void updateSignInDate(@Param("uploadNo")String uploadNo);
} }
package com.yxproject.start.service;
import com.yxproject.start.entity.PersonPostEntity;
public interface PersonPostService {
public PersonPostEntity getPersonPostMsg(String idwaybillNumberCard);
}
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.dto.CardsStatusAndCardsMsgDto;
import com.yxproject.start.dto.CardsStatusAndPostMsgDto; import com.yxproject.start.dto.CardsStatusAndPostMsgDto;
import com.yxproject.start.entity.PersonalProgressStatusEntity; import com.yxproject.start.entity.PersonalProgressStatusEntity;
import net.sf.json.JSONArray;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -12,5 +14,6 @@ import java.util.Map; ...@@ -12,5 +14,6 @@ import java.util.Map;
public interface PersonalProgressStatusService { public interface PersonalProgressStatusService {
public List<CardsStatusAndPostMsgDto> getStatusAndPostMsg(String date, String police); public List<CardsStatusAndPostMsgDto> getStatusAndPostMsg(String date, String police);
public List<CardsStatusAndCardsMsgDto> getStatusAndCardMsg(String date, String police);
public boolean updateSignInDate(JSONArray jsonArray);
} }
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.service.PersonPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author Administrator
*/
@Service
public class PersonPostServiceImpl implements PersonPostService {
@Autowired
private PersonPostMapper personPostMapper;
@Override
public PersonPostEntity getPersonPostMsg(String idwaybillNumberCard) {
PersonPostEntity personPostEntity = personPostMapper.selectPersonPostMsgByIdCard(idwaybillNumberCard);
return personPostEntity;
}
}
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.dto.CardsStatusAndCardsMsgDto;
import com.yxproject.start.dto.CardsStatusAndPostMsgDto; import com.yxproject.start.dto.CardsStatusAndPostMsgDto;
import com.yxproject.start.entity.PersonalProgressStatusEntity;
import com.yxproject.start.mapper.PersonalProgressStatusMapper; import com.yxproject.start.mapper.PersonalProgressStatusMapper;
import com.yxproject.start.service.PersonalProgressStatusService; import com.yxproject.start.service.PersonalProgressStatusService;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -23,4 +25,19 @@ public class PersonalProgressStatusServiceImpl implements PersonalProgressStatus ...@@ -23,4 +25,19 @@ public class PersonalProgressStatusServiceImpl implements PersonalProgressStatus
List<CardsStatusAndPostMsgDto> list = personalProgressStatusMapper.selectStatusAndPostMsg(date,police); List<CardsStatusAndPostMsgDto> list = personalProgressStatusMapper.selectStatusAndPostMsg(date,police);
return list; return list;
} }
@Override
public List<CardsStatusAndCardsMsgDto> getStatusAndCardMsg(String date, String police) {
List<CardsStatusAndCardsMsgDto> list = personalProgressStatusMapper.selectStatusAndCardMsg(date,police);
return list;
}
@Override
@Transactional(rollbackFor=Exception.class)
public boolean updateSignInDate(JSONArray jsonArray) {
for (Object object:jsonArray){
personalProgressStatusMapper.updateSignInDate(object.toString());
}
return true;
}
} }
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