Commit b73525dd authored by dahai's avatar dahai

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

parents abb824da 03b23a01
...@@ -5,11 +5,12 @@ import com.yxproject.start.entity.CountyDicEntity; ...@@ -5,11 +5,12 @@ import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.service.LogService; import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.xml.crypto.Data;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -35,8 +36,8 @@ public class LogApi { ...@@ -35,8 +36,8 @@ public class LogApi {
} }
/** /**
* * 查询公安局列表
* @return * @return list
*/ */
@RequestMapping("selectCountyList") @RequestMapping("selectCountyList")
public List<CountyDicEntity> selectCountyList(){ public List<CountyDicEntity> selectCountyList(){
...@@ -50,7 +51,7 @@ public class LogApi { ...@@ -50,7 +51,7 @@ public class LogApi {
* @param cardId * @param cardId
* @param createDate * @param createDate
* @param uploadCountyCode * @param uploadCountyCode
* @return * @return total
* *
*/ */
@RequestMapping("selectNewFileLogCount") @RequestMapping("selectNewFileLogCount")
...@@ -64,7 +65,7 @@ public class LogApi { ...@@ -64,7 +65,7 @@ public class LogApi {
* 查询解析日志 * 查询解析日志
* @param fileName * @param fileName
* @param analysisTime * @param analysisTime
* @return * @return resultList
*/ */
@RequestMapping("selectByAnalysisLog") @RequestMapping("selectByAnalysisLog")
public List<Map<String,Object>> selectByAnalysisLog(@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){ public List<Map<String,Object>> selectByAnalysisLog(@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
...@@ -77,7 +78,7 @@ public class LogApi { ...@@ -77,7 +78,7 @@ public class LogApi {
* 查询解析日志总数 * 查询解析日志总数
* @param fileName * @param fileName
* @param analysisTime * @param analysisTime
* @return * @return total
*/ */
@RequestMapping("selectAnalysisLogCount") @RequestMapping("selectAnalysisLogCount")
public int selectAnalysisLogCount (@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime){ public int selectAnalysisLogCount (@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime){
...@@ -87,12 +88,12 @@ public class LogApi { ...@@ -87,12 +88,12 @@ public class LogApi {
/** /**
* 根据导入时间查询解析数据 * 根据导入时间查询解析数据
* @param uploadName * @param filesId
* @return * @return resultList
*/ */
@RequestMapping("selectAnalysisData") @RequestMapping("selectAnalysisData")
public List<Map<String,Object>> selectAnalysisData(@RequestParam("uploadName")String uploadName){ public List<Map<String,Object>> selectAnalysisData(@RequestParam("filesId")String filesId){
List<Map<String,Object>> resultList = logService.selectAnalysisData(replaceDate(uploadName)); List<Map<String,Object>> resultList = logService.selectAnalysisData(filesId);
return resultList; return resultList;
} }
...@@ -100,7 +101,7 @@ public class LogApi { ...@@ -100,7 +101,7 @@ public class LogApi {
* 解析 * 解析
* @param printDate * @param printDate
* @param latticeMouthInformation * @param latticeMouthInformation
* @return * @return true
*/ */
@RequestMapping("analysis") @RequestMapping("analysis")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -111,6 +112,19 @@ public class LogApi { ...@@ -111,6 +112,19 @@ public class LogApi {
} }
/**
* 删除制证包及其数据
* @param fileId
* @return true
*/
@RequestMapping("deleteFiles")
@Transactional(rollbackFor = Exception.class)
public boolean deleteFiles(@RequestParam("fileId")String fileId){
logService.deleteFilesData(fileId);
logService.deleteFile(fileId);
return true;
}
/** /**
* 去除字符串中中线 * 去除字符串中中线
......
...@@ -70,7 +70,6 @@ public class ReceiptApi { ...@@ -70,7 +70,6 @@ public class ReceiptApi {
} else { } else {
//查询交接单所需数据 //查询交接单所需数据
Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id); Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id);
System.out.println("111111111111111111111"+receiptListDate);
String groupNo = (String) receiptListDate.get("GROUP_NO"); String groupNo = (String) receiptListDate.get("GROUP_NO");
String GAJG_DM = (String) receiptListDate.get("GAJG_DM"); String GAJG_DM = (String) receiptListDate.get("GAJG_DM");
int cardType = (int) receiptListDate.get("CARD_TYPE"); int cardType = (int) receiptListDate.get("CARD_TYPE");
...@@ -79,7 +78,6 @@ public class ReceiptApi { ...@@ -79,7 +78,6 @@ public class ReceiptApi {
int state = 0; int state = 0;
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(groupNo); int countGroup = receiptService.selectByGroupNo(groupNo);
System.out.println("222222222222222countGroup"+countGroup);
//没有生成交接单 //没有生成交接单
if (countGroup == 0) { if (countGroup == 0) {
//生成交接单 //生成交接单
...@@ -95,7 +93,6 @@ public class ReceiptApi { ...@@ -95,7 +93,6 @@ public class ReceiptApi {
String sex = (String) detailedData.get("SEX"); String sex = (String) detailedData.get("SEX");
String cardId = (String) detailedData.get("CARD_ID"); String cardId = (String) detailedData.get("CARD_ID");
String gajg_dm = (String) detailedData.get("GAJG_DM"); String gajg_dm = (String) detailedData.get("GAJG_DM");
System.out.println("1111111111111111"+gajg_dm);
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + ""); int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成详单 //生成详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex); receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex);
......
...@@ -8,8 +8,20 @@ public class CountDataEntity { ...@@ -8,8 +8,20 @@ public class CountDataEntity {
private Integer cardCount; private Integer cardCount;
private Integer commonCardCount; private Integer commonCardCount;
private Integer postCardCount; private Integer postCardCount;
private long fileId;
private long state; private long state;
public long getFileId() {
return fileId;
}
public void setFileId(long fileId) {
this.fileId = fileId;
}
public String getUploadDate() { public String getUploadDate() {
return uploadDate; return uploadDate;
} }
......
...@@ -15,9 +15,10 @@ public interface FilesMapper { ...@@ -15,9 +15,10 @@ public interface FilesMapper {
public long insertFiles(FilesEntity filesEntity); public long insertFiles(FilesEntity filesEntity);
//TODO 1111111111111
@Select("<script> " + @Select("<script> " +
"select * from (select upload_date upload_Date ,count(ID) package_Count,sum(sumCount) cardCount,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn " + "select * from (select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn " +
"from (SELECT FILES.upload_date,FILES.ID,count(prepro_person.JMSFZSLH) as sumCount, " + "from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, " +
"sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount " + "sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount " +
" FROM PREPRO_PERSON " + " FROM PREPRO_PERSON " +
"left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID " + "left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID " +
...@@ -25,7 +26,7 @@ public interface FilesMapper { ...@@ -25,7 +26,7 @@ public interface FilesMapper {
"<if test=\"importDate !=null\">"+ "<if test=\"importDate !=null\">"+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}" + " and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}" +
"</if> "+ "</if> "+
"group by FILES.upload_date,FILES.ID) group by upload_date, rownum" + "group by FILES.upload_date,FILE_ID) group by upload_date,rownum, FILE_ID" +
") where rn BETWEEN #{minNum} and #{maxNum} </script>") ") where rn BETWEEN #{minNum} and #{maxNum} </script>")
public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum); public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum);
......
...@@ -3,6 +3,8 @@ package com.yxproject.start.mapper; ...@@ -3,6 +3,8 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyDicEntity; import com.yxproject.start.entity.CountyDicEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -11,14 +13,14 @@ public interface LogMapper { ...@@ -11,14 +13,14 @@ public interface LogMapper {
@Select("select distinct FILES.UPLOAD_DATE,PERSON_POST.LATTICE_MOUTH_INFORMATION,FILES.RECORD_NUMBER,FILE_NAME_DIC.FORM_START_TIME,FILE_NAME_DIC.FORM_DEADLINE\n" + @Select("select distinct FILES.UPLOAD_DATE,PREPRO_PERSON.FILE_ID,PERSON_POST.LATTICE_MOUTH_INFORMATION,FILES.RECORD_NUMBER,FILE_NAME_DIC.FORM_START_TIME,FILE_NAME_DIC.FORM_DEADLINE\n" +
"from PREPRO_PERSON \n" + "from PREPRO_PERSON \n" +
"left join FILES on PREPRO_PERSON.FILE_ID =FILES.ID\n" + "left join FILES on PREPRO_PERSON.FILE_ID =FILES.ID\n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" + "LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID\n" + "LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID\n" +
"where FILES.CREATE_TIME = #{uploadDate}" + "where FILES.ID =#{filesId}" +
"") "")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate); public List<Map<String,Object>> selectAnalysisData(@Param("filesId") String filesId);
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" + @Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
...@@ -131,4 +133,24 @@ public interface LogMapper { ...@@ -131,4 +133,24 @@ public interface LogMapper {
"</if>" + "</if>" +
"</script>") "</script>")
public int selectAnalysisLogCount(@Param("fileName")String fileName, @Param("analysisDate")String analysisDate); public int selectAnalysisLogCount(@Param("fileName")String fileName, @Param("analysisDate")String analysisDate);
@Delete("delete from PREPRO_PERSON where file_id = #{fileId}")
public boolean deleteFilesData(@Param("fileId")String fileId);
@Delete("delete from files where id=#{fileId}")
public boolean deleteFile(@Param("fileId")String fileId);
} }
...@@ -25,7 +25,7 @@ public interface PreproPersonMapper { ...@@ -25,7 +25,7 @@ public interface PreproPersonMapper {
/*按条件查询制证数据*/ /*按条件查询制证数据*/
@Select({"<script> select * from (select a.*,rownum rn from(select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,IS_VALID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " + @Select({"<script> select * from (select a.*,rownum rn from(select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,IS_VALID,FILES.ID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
"<where> " + "<where> " +
" 1=1" + " 1=1" +
"<if test='uploadNo != null '>" + "<if test='uploadNo != null '>" +
...@@ -56,7 +56,7 @@ public interface PreproPersonMapper { ...@@ -56,7 +56,7 @@ public interface PreproPersonMapper {
public List<Map<String,Object>> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate, @Param("minNum") long minNum, @Param("maxNum") long maxNum); public List<Map<String,Object>> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate, @Param("minNum") long minNum, @Param("maxNum") long maxNum);
/*按条件查询制证数据*/ /*按条件查询制证数据*/
@Select({"<script> select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,IS_VALID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " + @Select({"<script> select JMSFZSLH,xm,XBDM,GMSFHM,CARD_TYPE,PREPRO_PERSON.CARD_TYPE_ID,FILES.ID,IS_VALID,SOURCE_FILE_NAME,NEW_FILE_NAME from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = PREPRO_PERSON.CARD_TYPE_ID " +
"<where> " + "<where> " +
" 1=1" + " 1=1" +
"<if test='uploadNo != null '>" + "<if test='uploadNo != null '>" +
......
...@@ -2,7 +2,10 @@ package com.yxproject.start.service; ...@@ -2,7 +2,10 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.CountyDicEntity; import com.yxproject.start.entity.CountyDicEntity;
import org.apache.ibatis.annotations.Param;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -23,4 +26,9 @@ public interface LogService { ...@@ -23,4 +26,9 @@ public interface LogService {
public boolean changeCardType(String printDate,String latticeMouthInformation); public boolean changeCardType(String printDate,String latticeMouthInformation);
public boolean insertAnalysisDate(String printDate,String latticeMouthInformation); public boolean insertAnalysisDate(String printDate,String latticeMouthInformation);
public boolean deleteFilesData(@Param("fileId")String fileId);
public boolean deleteFile(@Param("fileId")String fileId);
} }
...@@ -6,6 +6,8 @@ import com.yxproject.start.service.LogService; ...@@ -6,6 +6,8 @@ import com.yxproject.start.service.LogService;
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 javax.xml.crypto.Data;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Service @Service
...@@ -59,4 +61,16 @@ public class LogServiceImpl implements LogService { ...@@ -59,4 +61,16 @@ public class LogServiceImpl implements LogService {
logMapper.insertAnalysisDate(printDate,latticeMouthInformation); logMapper.insertAnalysisDate(printDate,latticeMouthInformation);
return true; return true;
} }
@Override
public boolean deleteFilesData(String fileId) {
logMapper.deleteFilesData(fileId);
return true;
}
@Override
public boolean deleteFile(String fileId) {
logMapper.deleteFile(fileId);
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