Commit ddad48d2 authored by dahai's avatar dahai

导入妥投信息表

登记投递失败信息
妥投信息报表
查询导入妥投信息
查询登记妥投失败信息
删除导入妥投信息
删除登记妥投失败信息
parent 4aa2dccb
This diff is collapsed.
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/17 9:42
*/
@Entity
@Table(name = "DELIVERED_FAILED_INFO", schema = "YINGXIN", catalog = "")
public class DeliveredFailedInfoEntity {
private long id;
private String waybillNumber;
private Time backDate;
private long backReason;
private String note;
private String registerName;
private String cardId;
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "WAYBILL_NUMBER")
public String getWaybillNumber() {
return waybillNumber;
}
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
@Basic
@Column(name = "BACK_DATE")
public Time getBackDate() {
return backDate;
}
public void setBackDate(Time backDate) {
this.backDate = backDate;
}
@Basic
@Column(name = "NOTE")
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
@Basic
@Column(name = "REGISTER_NAME")
public String getRegisterName() {
return registerName;
}
public void setRegisterName(String registerName) {
this.registerName = registerName;
}
@Basic
@Column(name = "BACK_REASON")
public long getBackReason() {
return backReason;
}
public void setBackReason(long backReason) {
this.backReason = backReason;
}
@Basic
@Column(name = "CARD_ID")
public String getCardId() {
return cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DeliveredFailedInfoEntity that = (DeliveredFailedInfoEntity) o;
return id == that.id &&
Objects.equals(waybillNumber, that.waybillNumber) &&
Objects.equals(backDate, that.backDate) &&
Objects.equals(note, that.note) &&
Objects.equals(backReason, that.backReason) &&
Objects.equals(cardId, that.cardId) &&
Objects.equals(registerName, that.registerName);
}
@Override
public int hashCode() {
return Objects.hash(id, cardId,backReason,waybillNumber, backDate, note, registerName);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/17 9:42
*/
@Entity
@Table(name = "DELIVERED_FAILED_REASON", schema = "YINGXIN", catalog = "")
public class DeliveredFailedReasonEntity {
private long id;
private String reason;
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "REASON")
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DeliveredFailedReasonEntity that = (DeliveredFailedReasonEntity) o;
return id == that.id &&
Objects.equals(reason, that.reason);
}
@Override
public int hashCode() {
return Objects.hash(id, reason);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/17 9:42
*/
@Entity
@Table(name = "DELIVERED_IMPORT_DIC", schema = "YINGXIN", catalog = "")
public class DeliveredImportDicEntity {
private long id;
private String fileName;
private Time importDate;
private String importName;
private Long importCount;
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "FILE_NAME")
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
@Basic
@Column(name = "IMPORT_DATE")
public Time getImportDate() {
return importDate;
}
public void setImportDate(Time importDate) {
this.importDate = importDate;
}
@Basic
@Column(name = "IMPORT_NAME")
public String getImportName() {
return importName;
}
public void setImportName(String importName) {
this.importName = importName;
}
@Basic
@Column(name = "IMPORT_COUNT")
public Long getImportCount() {
return importCount;
}
public void setImportCount(Long importCount) {
this.importCount = importCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DeliveredImportDicEntity that = (DeliveredImportDicEntity) o;
return id == that.id &&
Objects.equals(fileName, that.fileName) &&
Objects.equals(importDate, that.importDate) &&
Objects.equals(importName, that.importName) &&
Objects.equals(importCount, that.importCount);
}
@Override
public int hashCode() {
return Objects.hash(id, fileName, importDate, importName, importCount);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/17 9:42
*/
@Entity
@Table(name = "DELIVERED_INFO", schema = "YINGXIN", catalog = "")
public class DeliveredInfoEntity {
private long id;
private String waybillNumber;
private Time dealDate;
private Long dealState;
private long fileId;
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "WAYBILL_NUMBER")
public String getWaybillNumber() {
return waybillNumber;
}
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
@Basic
@Column(name = "DEAL_DATE")
public Time getDealDate() {
return dealDate;
}
public void setDealDate(Time dealDate) {
this.dealDate = dealDate;
}
@Basic
@Column(name = "DEAL_STATE")
public Long getDealState() {
return dealState;
}
public void setDealState(Long dealState) {
this.dealState = dealState;
}
@Basic
@Column(name = "FILE_ID")
public long getFileId() {
return fileId;
}
public void setFileId(long fileId) {
this.fileId = fileId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DeliveredInfoEntity that = (DeliveredInfoEntity) o;
return id == that.id &&
Objects.equals(waybillNumber, that.waybillNumber) &&
Objects.equals(dealDate, that.dealDate) &&
Objects.equals(fileId, that.fileId) &&
Objects.equals(dealState, that.dealState);
}
@Override
public int hashCode() {
return Objects.hash(id, fileId,waybillNumber, dealDate, dealState);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.DeliveredFailedInfoEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
/**
* @auther zhangyusheng
* 2019/4/17 10:24
*/
@Mapper
public interface DeliveredFailedInfoMapper {
@Insert("insert into DELIVERED_FAILED_INFO (WAYBILL_NUMBER,BACK_DATE,BACK_REASON,note,REGISTER_NAME,CARD_ID) \n" +
"VALUES (#{waybillNumber},sysdate,#{backReason},#{note},#{registerName},#{cardId})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean saveDeliveredFailedInfo(DeliveredFailedInfoEntity deliveredFailedInfoEntity);
}
package com.yxproject.start.mapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @auther zhangyusheng
* 2019/4/17 10:25
*/
@Mapper
public interface DeliveredFailedReasonMapper {
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.DeliveredImportDicEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
/**
* @auther zhangyusheng
* 2019/4/17 10:25
*/
@Mapper
public interface DeliveredImportDicMapper {
@Insert("insert into DELIVERED_IMPORT_DIC (FILE_NAME,IMPORT_DATE,import_name,import_count) \n" +
"VALUES (#{fileName},sysdate,#{importName},#{importCount})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean saveDeliveredImportDic(DeliveredImportDicEntity deliveredImportDicEntity);
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.DeliveredImportDicEntity;
import com.yxproject.start.entity.DeliveredInfoEntity;
import org.apache.ibatis.annotations.*;
import java.util.List;
import java.util.Map;
/**
* @auther zhangyusheng
* 2019/4/17 10:26
*/
@Mapper
public interface DeliveredInfoMapper {
@Insert("insert into DELIVERED_INFO (WAYBILL_NUMBER,DEAL_DATE,DEAL_STATE,FILE_ID) \n" +
"VALUES (#{waybillNumber},sysdate,#{dealState},#{fileId})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean saveDeliveredInfo(DeliveredInfoEntity deliveredInfoEntity);
@Select("select to_char(PRINT_DATE,'yyyyMMdd') PRINT_DATE ,count(PERSON_POST.WAYBILL_NUMBER) post_Count,\n" +
"sum(decode(DELIVERED_INFO.WAYBILL_NUMBER,null,0,1)) DELIVERED_count,\n" +
"sum(decode(DELIVERED_FAILED_INFO.WAYBILL_NUMBER,null,0,1)) DELIVERED_FAILED_count from PERSON_POST \n" +
"left join DELIVERED_INFO on PERSON_POST.WAYBILL_NUMBER = DELIVERED_INFO.WAYBILL_NUMBER\n" +
"left join DELIVERED_FAILED_INFO on PERSON_POST.WAYBILL_NUMBER = DELIVERED_FAILED_INFO.WAYBILL_NUMBER\n" +
"where to_char(PRINT_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
"group by to_char(PRINT_DATE,'yyyyMMdd')")
public List<Map<String,Object>> selectReport(@Param("startDate")String startDate,@Param("endDate") String endDate);
@Select("select * from DELIVERED_IMPORT_DIC where TO_CHAR(IMPORT_DATE,'yyyyMMdd') = #{date} ")
public List<DeliveredImportDicEntity> selectDeliveredByImportDate(@Param("date")String date);
@Select("select DELIVERED_FAILED_INFO.*,DELIVERED_FAILED_REASON.REASON from DELIVERED_FAILED_INFO\n" +
"left join DELIVERED_FAILED_REASON on DELIVERED_FAILED_REASON.ID = DELIVERED_FAILED_INFO.BACK_REASON\n" +
"where to_char(back_date,'yyyyMMdd') = #{date}")
public List<Map<String,Object>> selectDeliveredFailedByRegisterDate(@Param("date")String date);
@Delete("delete from DELIVERED_INFO where FILE_ID = #{fileId}")
public boolean deleteDeliveredByFileId(@Param("fileId")long fileId);
@Delete("delete from DELIVERED_IMPORT_DIC where id = #{fileId}")
public boolean deleteDeliveredImportDicByFileId(@Param("fileId")long fileId);
@Delete("delete from DELIVERED_FAILED_INFO where id = #{id}")
public boolean deleteDeliveredFailedById(@Param("id")long id);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.DeliveredFailedInfoEntity;
import com.yxproject.start.entity.DeliveredImportDicEntity;
import com.yxproject.start.entity.DeliveredInfoEntity;
import java.util.List;
import java.util.Map;
/**
* @auther zhangyusheng
* 2019/4/17 10:27
*/
public interface DeliveredService {
public boolean saveDeliveredImportDic(DeliveredImportDicEntity deliveredImportDicEntity);
public boolean saveDeliveredInfoList(List<DeliveredInfoEntity> deliveredInfoEntityList);
public boolean saveDeliveredFailedInfoList(List<DeliveredFailedInfoEntity> deliveredFailedInfoEntities);
public List<Map<String,Object>> selectDeliveredReport(String startDate,String endDate);
public List<DeliveredImportDicEntity> selectDeliveredByImportDate(String date);
public List<Map<String,Object>> selectDeliveredFailedByRegisterDate(String date);
public boolean deleteDeliveredByFileId(long filedID);
public boolean deleteDeliveredFailedById(long id);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.DeliveredFailedInfoEntity;
import com.yxproject.start.entity.DeliveredImportDicEntity;
import com.yxproject.start.entity.DeliveredInfoEntity;
import com.yxproject.start.mapper.DeliveredFailedInfoMapper;
import com.yxproject.start.mapper.DeliveredFailedReasonMapper;
import com.yxproject.start.mapper.DeliveredImportDicMapper;
import com.yxproject.start.mapper.DeliveredInfoMapper;
import com.yxproject.start.service.DeliveredService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* @auther zhangyusheng
* 2019/4/17 10:27
*/
@Service
public class DeliveredServiceImpl implements DeliveredService {
@Autowired
private DeliveredFailedInfoMapper deliveredFailedInfoMapper;
@Autowired
private DeliveredFailedReasonMapper deliveredFailedReasonMapper;
@Autowired
private DeliveredImportDicMapper deliveredImportDicMapper;
@Autowired
private DeliveredInfoMapper deliveredInfoMapper;
@Override
public boolean saveDeliveredImportDic(DeliveredImportDicEntity deliveredImportDicEntity) {
return deliveredImportDicMapper.saveDeliveredImportDic(deliveredImportDicEntity);
}
@Override
public boolean saveDeliveredInfoList(List<DeliveredInfoEntity> deliveredInfoEntityList) {
for (DeliveredInfoEntity deliveredInfoEntity: deliveredInfoEntityList) {
deliveredInfoMapper.saveDeliveredInfo(deliveredInfoEntity);
}
return true;
}
@Override
public boolean saveDeliveredFailedInfoList(List<DeliveredFailedInfoEntity> deliveredFailedInfoEntities) {
for (DeliveredFailedInfoEntity deliveredFailedInfoEntity :deliveredFailedInfoEntities){
deliveredFailedInfoMapper.saveDeliveredFailedInfo(deliveredFailedInfoEntity);
}
return false;
}
@Override
public List<Map<String, Object>> selectDeliveredReport(String startDate, String endDate) {
List<Map<String, Object>> mapList = deliveredInfoMapper.selectReport(startDate, endDate);
return mapList;
}
@Override
public List<DeliveredImportDicEntity> selectDeliveredByImportDate(String date) {
return deliveredInfoMapper.selectDeliveredByImportDate(date);
}
@Override
public List<Map<String, Object>> selectDeliveredFailedByRegisterDate(String date) {
return deliveredInfoMapper.selectDeliveredFailedByRegisterDate(date);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteDeliveredByFileId(long filedID) {
deliveredInfoMapper.deleteDeliveredByFileId(filedID);
deliveredInfoMapper.deleteDeliveredImportDicByFileId(filedID);
return true;
}
@Override
public boolean deleteDeliveredFailedById(long id) {
return deliveredInfoMapper.deleteDeliveredFailedById(id);
}
}
......@@ -18,8 +18,8 @@
<td colspan="2" width="35%">
<input type="text" class="form-control" placeholder="身份证号" ng-model="idCard"/>
</td>
<td colspan="2">
有效期: <input style="width:9%;" name="yxqstart" type="text" ng-model="startDate"><input style="width:15%;" name="yxqend" type="text" ng-model="endDate">
<td colspan="1">
有效期: <input style="width:9%;" name="yxqstart" type="text" ng-model="startDate"><input style="width:9%;" name="yxqend" type="text" ng-model="endDate">
</td>
<td style="text-align: left;">
<button class="btn btn-primary search" ng-click="searchTagPrintData()">查询</button>
......
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