Commit fbf59f31 authored by wuzhilong's avatar wuzhilong

更新交接单、封签分局查询方式;

更新选择打印机;
parent fda45ffc
......@@ -5,7 +5,7 @@ import java.util.Date;
import java.util.Objects;
/**
* @auther zhangyusheng
* zhangyusheng
* 2019/5/30 14:55
*/
@Entity
......@@ -23,7 +23,7 @@ public class ReceiptListEntity {
private Long oldCardTypeId;
private long isPrint;
private Date downloadDate;
private String downloadName;
private String fjdm;
@Id
@Column(name = "ID")
......@@ -145,15 +145,6 @@ public class ReceiptListEntity {
this.downloadDate = downloadDate;
}
@Basic
@Column(name = "DOWNLOAD_NAME")
public String getDownloadName() {
return downloadName;
}
public void setDownloadName(String downloadName) {
this.downloadName = downloadName;
}
@Override
public boolean equals(Object o) {
......@@ -172,11 +163,19 @@ public class ReceiptListEntity {
Objects.equals(cardTypeId, that.cardTypeId) &&
Objects.equals(oldCardTypeId, that.oldCardTypeId) &&
Objects.equals(downloadDate, that.downloadDate) &&
Objects.equals(downloadName, that.downloadName);
Objects.equals(fjdm, that.fjdm);
}
@Override
public int hashCode() {
return Objects.hash(id, qrCode, receiptDate, policeCode, finishCount, checkDate, checkName, state, cardTypeId, oldCardTypeId, isPrint, downloadDate, downloadName);
return Objects.hash(id, qrCode, receiptDate, policeCode, finishCount, checkDate, checkName, state, cardTypeId, oldCardTypeId, isPrint, downloadDate, fjdm);
}
public String getFjdm() {
return fjdm;
}
public void setFjdm(String fjdm) {
this.fjdm = fjdm;
}
}
......@@ -30,19 +30,22 @@ public interface ReceiptMapper {
//根据组号查询普通证交接单信息
@Select("select subStr(prod_card_t.accept_no,0,8) group_no,prod_card_t.accept_no,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO as GAJG_DM,\n" +
"count(prod_card_t.accept_no) valid_count,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,\n" +
"task.CARD_TYPE,task.OLD_CARD_TYPE,prod_card_t.id_no,prod_card_t.sex_no,prod_card_t.upload_no \n" +
"task.CARD_TYPE,task.OLD_CARD_TYPE,prod_card_t.id_no,prod_card_t.sex_no,prod_card_t.upload_no" +
",POLICE_DIC.POLICE_CODE FJDM,POLICE_DIC.POLICE_NAME FJMC \n" +
"from PRODYD_DBA.prod_card_t@PRODYD_LINK \n" +
"left join group_no on group_no.group_no =subStr(prod_card_t.accept_no,0,8)\n" +
"left join task on task.task_id =group_no.task_id \n" +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on subStr(prod_card_t.accept_no,0,8) = PROD_GROUP_RELATION_T.GROUP_NO \n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK ON PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO=DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO \n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK ON PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO=DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO " +
"left join POLICE_DIC on substr(DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,0,6) = POLICE_DIC.POLICE_CODE \n" +
"where substr(prod_card_t.accept_no,0,8) =substr(#{groupNo},0,8) and prod_card_t.accept_no not in (select accept_no from SPECIAL_CARD where accept_no like #{groupNo} ) \n" +
"group by subStr(prod_card_t.accept_no,0,8), prod_card_t.accept_no, DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO, DIC_UPLOAD_UNIT_T.UNIT_NAME, task.CARD_TYPE, task.OLD_CARD_TYPE, prod_card_t.id_no, prod_card_t.sex_no, prod_card_t.upload_no ")
"group by subStr(prod_card_t.accept_no,0,8), prod_card_t.accept_no, DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO, DIC_UPLOAD_UNIT_T.UNIT_NAME, task.CARD_TYPE, task.OLD_CARD_TYPE," +
" prod_card_t.id_no, prod_card_t.sex_no, prod_card_t.upload_no,POLICE_DIC.POLICE_CODE,POLICE_DIC.POLICE_NAME ")
public List<Map<String,Object>> selectReceiptListDate2(String groupNo);
//查询这个组号是否已经生成交接单
@Select("select id ,check_name ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO GAJG_DM from receipt_list left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on subStr(DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,0,9) = receipt_list.POLICE_CODE where QR_CODE=#{groupNo}")
public List<Map<String,Object>> selectByGroupNo(String groupNo);
@Select("select id ,check_name,to_char(CHECK_DATE,'yyyy-MM-dd hh24:mi:ss') CHECK_DATE ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO GAJG_DM from receipt_list left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = receipt_list.POLICE_CODE where QR_CODE=#{groupNo}")
public Map<String,Object> selectByGroupNo(String groupNo);
//生成交接单
@Insert("<script>" +
......@@ -50,10 +53,22 @@ public interface ReceiptMapper {
"<if test ='oldCardTypeId !=null'> " +
",OLD_CARD_TYPE_ID" +
"</if> " +
"<if test ='isPrint !=null'> " +
",IS_PRINT" +
"</if> " +
"<if test ='fjdm !=null'> " +
",FJDM" +
"</if> " +
")VALUES(#{qrCode},#{policeCode},#{finishCount},#{state},#{cardTypeId},#{checkName}" +
"<if test ='oldCardTypeId !=null'> " +
",#{oldCardTypeId}" +
"</if> " +
"<if test ='isPrint !=null'> " +
",#{isPrint}" +
"</if> " +
"<if test ='fjdm !=null'> " +
",#{fjdm}" +
"</if> " +
") </script>")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public long createReceiptList(ReceiptListEntity receiptListEntity);
......@@ -149,9 +164,9 @@ public interface ReceiptMapper {
//根据交接单号查详单信息
@Select("select detail_receipt_list.UPLOAD_NO,detail_receipt_list.ACCEPT_NO,detail_receipt_list.NAME,detail_receipt_list.POLICE_CODE,detail_receipt_list.CARD_ID\n" +
",detail_receipt_list.NOTE,detail_receipt_list.SIGN_GOVT,detail_receipt_list.RECEIPT_ID,detail_receipt_list.SEX,\n" +
"RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.FINISH_COUNT,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC\n" +
"RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.FINISH_COUNT,POLICE_DIC.POLICE_NAME FJMC,RECEIPT_LIST.CARD_TYPE_ID \n" +
"from detail_receipt_list left join RECEIPT_LIST on detail_receipt_list.RECEIPT_ID = RECEIPT_LIST.id\n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on subStr(DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,0,9) = RECEIPT_LIST.POLICE_CODE\n" +
"left join POLICE_DIC on POLICE_DIC.POLICE_CODE = RECEIPT_LIST.FJDM \n" +
"where receipt_id= #{receiptId} order by detail_receipt_list.ACCEPT_NO")
public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
......@@ -186,7 +201,7 @@ public interface ReceiptMapper {
"where QR_CODE=(select accept_no " +
"from PRODYD_DBA.prod_card_t@prodYD_LINK " +
"where id_no=#{id} and BEGIN_DATE= #{beginDate} and EXPIRE_DATE = #{expireDate} and receipt_date is null ) ")
public List<Map<String,Object>> selectCountById(@Param("id") String id,@Param("beginDate") String beginDate,@Param("expireDate") String expireDate);
public Map<String,Object> selectCountById(@Param("id") String id,@Param("beginDate") String beginDate,@Param("expireDate") String expireDate);
//根据输入id查询是否生成详单
@Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO= #{acceptNo}")
......@@ -253,10 +268,10 @@ public interface ReceiptMapper {
@Select("<script>" +
"select RECEIPT_LIST.id,RECEIPT_LIST.QR_CODE,to_char(RECEIPT_LIST.RECEIPT_DATE,'yyyy-MM-dd') RECEIPT_DATE,RECEIPT_LIST.POLICE_CODE,decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID) CARD_TYPE_ID,\n" +
"RECEIPT_LIST.FINISH_COUNT,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO GAJG_DM,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,to_char(CHECK_DATE,'yyyyMMdd') CHECK_DATE,RECEIPT_LIST.CHECK_NAME\n" +
",CARD_TYPE_DIC.CARD_TYPE,COUNTY_DIC.COUNTY_CODE ,COUNTY_DIC.COUNTYNAME from RECEIPT_LIST \n" +
",CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE,RECEIPT_LIST.fjdm COUNTY_CODE ,POLICE_DIC.police_name COUNTYNAME from RECEIPT_LIST \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO= RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO= RECEIPT_LIST.POLICE_CODE \n" +
"left join POLICE_DIC on RECEIPT_LIST.fjdm= POLICE_DIC.POLICE_CODE " +
" where RECEIPT_LIST.id in (${string}) order by RECEIPT_LIST.id " +
"</script>")
public List<Map<String,Object>> selectReceiptDate(@Param("string") String string);
......
......@@ -21,7 +21,7 @@ public interface ReceiptService {
// public int selectSpecialCard(String GROUP_NO);
public List<Map<String,Object>> selectByGroupNo(String groupNo);
public Map<String,Object> selectByGroupNo(String groupNo);
public int selectSpecialCardByAcceptNo(String id,String beginDate,String expireDate);
......@@ -46,7 +46,7 @@ public interface ReceiptService {
public List<Map<String,Object>> queryPoliceName(String policeCode);
//特证查询是否生成交接单
public List<Map<String, Object>> selectCountById(String id,String beginDate,String expireDate);
public Map<String, Object> selectCountById(String id,String beginDate,String expireDate);
//查询是否已生成交接单详单
public int selectReceiptByAcceptNo(String acceptNo);
......
......@@ -54,8 +54,8 @@ public class ReceiptServiceImpl implements ReceiptService {
@Override
public List<Map<String,Object>> selectByGroupNo(String groupNo) {
List<Map<String,Object>> countGroup= receiptMapper.selectByGroupNo(groupNo);
public Map<String,Object> selectByGroupNo(String groupNo) {
Map<String,Object> countGroup= receiptMapper.selectByGroupNo(groupNo);
return countGroup;
}
......@@ -109,8 +109,8 @@ public class ReceiptServiceImpl implements ReceiptService {
// }
@Override
public List<Map<String, Object>> selectCountById(String id,String beginDate,String expireDate) {
List<Map<String, Object>> mapList = receiptMapper.selectCountById(id, beginDate, expireDate);
public Map<String, Object> selectCountById(String id,String beginDate,String expireDate) {
Map<String, Object> mapList = receiptMapper.selectCountById(id, beginDate, expireDate);
return mapList;
}
......
......@@ -926,7 +926,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
analyseToUpdateIfPostCard:function(uploadDate,success) {
$http({
method: 'GET',
url: "../printReceitpDataLogApi/analysis"+urlTimeStamp(),
url: "../LogApi/analysis"+urlTimeStamp(),
params:{
printDate:uploadDate
}
......
......@@ -200,7 +200,7 @@
<!--身份证交接单</div>-->
<!--<div>交接日期:{{receitpDataToPrint.date}}</div>-->
<!--<div>送至:</div>-->
<table cellpadding="0" cellspacing="0" width="740px" style="text-align: center;" border="1px" ng-show="true" >
<table cellpadding="0" cellspacing="0" width="740px" style="text-align: center;" border="1px" ng-show="false" >
<thead>
<tr>
<th width="60">
......
......@@ -153,7 +153,8 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
}
}
};
//选择打印机
$scope.priterNum=100;
var iRadioValue=1;
$scope.printReceitp = function() {
var typeCode ='';
......@@ -180,7 +181,6 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
if(json.list.length==0){
MessageService.showAlert("请选择要打印的分局或派出所")
}else{
console.log(json)
HttpService.printReceitpData(json,function (data) {
if($scope.isHistory==0){
$scope.doSearchReceitp();
......@@ -190,7 +190,6 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
getData();
}
$scope.receitpDataToPrint = data;
console.log($scope.receitpDataToPrint)
for(var i=0;i<$scope.receitpDataToPrint.list[0].countyList.length;i++){
for (var j=0;j<$scope.receitpDataToPrint.list[0].countyList[i].policeList.length;j++){
$scope.receitpDataToPrint.list[0].countyList[i].policeList[j].id=j+1;
......@@ -212,6 +211,7 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
}
}
console.log("result",$scope.result);
$timeout(function () {
for (var i=0;i<$scope.result.length;i++){
var LODOP = getLodop();
......@@ -223,7 +223,7 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
// LODOP.SET_PRINT_STYLEA(1, "Bold", 1);
LODOP.SET_PRINT_STYLEA(1, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(1, "FontSize", 16);
LODOP.ADD_PRINT_TEXT(35, 0, "100%", 20, $scope.result[0].county +" 证件交接单");
LODOP.ADD_PRINT_TEXT(35, 0, "100%", 20, $scope.result[i].county +" 证件交接单");
// LODOP.SET_PRINT_STYLEA(2, "Bold", 1);
LODOP.SET_PRINT_STYLEA(2, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(2, "FontSize", 16);
......@@ -236,8 +236,10 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
// LODOP.SET_PRINT_STYLEA(5, "Bold", 0);
LODOP.SET_PRINT_STYLEA(5, "HOrient", 2);
LODOP.SET_PRINT_STYLEA(5, "Vorient", 3);
LODOP.SET_PRINTER_INDEXA(-1);
// LODOP.PREVIEW();
if( $scope.priterNum==100){
$scope.priterNum=LODOP.SELECT_PRINTER();
}
// LODOP.PREVIEW();
LODOP.PRINT();
}
})
......
......@@ -54,7 +54,6 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.tagPrintData[i].styleClass = "bg-info";
}
}
console.log(id)
HttpService.getPoliceCardsList(id,function(data) {
$scope.json.policeCardsList = data;
for (var i=0;i<$scope.json.policeCardsList.length;i++){
......@@ -62,11 +61,10 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.json.policeCardsList[i].styleClass = "bg-danger"
}
}
if($scope.json.policeCardsList.length==1){
$scope.PreviewMytableRotate();
}
// if($scope.json.policeCardsList.length==1){
// $scope.PreviewMytableRotate();
// }
$scope.json.id = id;
console.log($scope.json)
})
}
......@@ -123,18 +121,8 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}
}
}else if(data.state===2){
if(data.checkName===$rootScope.loginData.name){
$scope.json.isShow=true;
getDetailListById(data.id)
for(var i=0;i<$scope.tagPrintData.length;i++){
if($scope.tagPrintData[i].ID===data.id){
$scope.tagPrintData[i].styleClass="bg-info";
}
}
}else{
$scope.json.isShow=false;
MessageService.showAlert($rootScope.loginData.name+" 已生成 "+data.policeName+" 的交接单")
}
MessageService.showAlert(data.msg+"复核人:"+data.checkName+" 复核时间:"+data.checkDate)
}else{
MessageService.showAlert("无该证件的制证记录");
$scope.json.isShow=false;
......@@ -144,7 +132,6 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.doQueryByIdCard = function(idcard,startDate,endDate){
console.log(idcard,startDate,endDate);
if($scope.json.policeCardsList.length>0&&$scope.json.isShow===true){
var count=0;
for (var i=0;i<$scope.json.policeCardsList.length;i++){
......@@ -271,11 +258,10 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
// })
// };
//选择打印机
$scope.priterNum=100;
$scope.PreviewMytableRotate = function(){
HttpService.getPoliceName($scope.json.policeCode,function(data) {
$scope.json.policeData = data[0].POLICE_NAME;
console.log($scope.json.policeData)
console.log($scope.json)
$timeout(function () {
var LODOP = getLodop();
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
......@@ -291,16 +277,13 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
LODOP.ADD_PRINT_BARCODE(24,12, "78mm", "20mm", "128A", $scope.json.policeCardsList[0].ACCEPT_NO.toString());
LODOP.SET_PRINT_STYLEA(0, "FontSize", 14);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
//设定该打印项在纸张内的位置和区域大小【Top,Left,Width,Height,strHtmlContent】
// LODOP.ADD_PRINT_HTM("24mm", "0", "80mm", "24mm", document.getElementById("tagDiv").innerHTML);
LODOP.ADD_PRINT_TEXT(107, 0, "100%", 20,"异地居民身份证");
LODOP.ADD_PRINT_TEXT(107, 0, "100%", 20,$scope.json.policeCardsList[0].FJMC.toString());
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
// LODOP.ADD_PRINT_TEXT(137, 0, "100%", 20, $scope.json.policeName.toString()+($scope.json.machineNum==null?"":"("+$scope.json.machineNum+")"));
LODOP.ADD_PRINT_TEXT(137, 0, "100%", 20, $scope.json.policeName.toString());
LODOP.ADD_PRINT_TEXT(137, 0, "100%", 20, $scope.json.policeName);
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "VOrient", 0);
......@@ -309,11 +292,12 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
// LODOP.PREVIEW();
if( $scope.priterNum==100){
$scope.priterNum=LODOP.SELECT_PRINTER();
}
// LODOP.PREVIEW();
LODOP.PRINT();
})
})
};
});
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