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;
import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
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.Map;
......@@ -35,8 +36,8 @@ public class LogApi {
}
/**
*
* @return
* 查询公安局列表
* @return list
*/
@RequestMapping("selectCountyList")
public List<CountyDicEntity> selectCountyList(){
......@@ -50,7 +51,7 @@ public class LogApi {
* @param cardId
* @param createDate
* @param uploadCountyCode
* @return
* @return total
*
*/
@RequestMapping("selectNewFileLogCount")
......@@ -64,7 +65,7 @@ public class LogApi {
* 查询解析日志
* @param fileName
* @param analysisTime
* @return
* @return resultList
*/
@RequestMapping("selectByAnalysisLog")
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 {
* 查询解析日志总数
* @param fileName
* @param analysisTime
* @return
* @return total
*/
@RequestMapping("selectAnalysisLogCount")
public int selectAnalysisLogCount (@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime){
......@@ -87,12 +88,12 @@ public class LogApi {
/**
* 根据导入时间查询解析数据
* @param uploadName
* @return
* @param filesId
* @return resultList
*/
@RequestMapping("selectAnalysisData")
public List<Map<String,Object>> selectAnalysisData(@RequestParam("uploadName")String uploadName){
List<Map<String,Object>> resultList = logService.selectAnalysisData(replaceDate(uploadName));
public List<Map<String,Object>> selectAnalysisData(@RequestParam("filesId")String filesId){
List<Map<String,Object>> resultList = logService.selectAnalysisData(filesId);
return resultList;
}
......@@ -100,7 +101,7 @@ public class LogApi {
* 解析
* @param printDate
* @param latticeMouthInformation
* @return
* @return true
*/
@RequestMapping("analysis")
@Transactional(rollbackFor = Exception.class)
......@@ -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 {
} else {
//查询交接单所需数据
Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id);
System.out.println("111111111111111111111"+receiptListDate);
String groupNo = (String) receiptListDate.get("GROUP_NO");
String GAJG_DM = (String) receiptListDate.get("GAJG_DM");
int cardType = (int) receiptListDate.get("CARD_TYPE");
......@@ -79,7 +78,6 @@ public class ReceiptApi {
int state = 0;
//查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(groupNo);
System.out.println("222222222222222countGroup"+countGroup);
//没有生成交接单
if (countGroup == 0) {
//生成交接单
......@@ -95,7 +93,6 @@ public class ReceiptApi {
String sex = (String) detailedData.get("SEX");
String cardId = (String) detailedData.get("CARD_ID");
String gajg_dm = (String) detailedData.get("GAJG_DM");
System.out.println("1111111111111111"+gajg_dm);
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex);
......
......@@ -8,8 +8,20 @@ public class CountDataEntity {
private Integer cardCount;
private Integer commonCardCount;
private Integer postCardCount;
private long fileId;
private long state;
public long getFileId() {
return fileId;
}
public void setFileId(long fileId) {
this.fileId = fileId;
}
public String getUploadDate() {
return uploadDate;
}
......
......@@ -15,9 +15,10 @@ public interface FilesMapper {
public long insertFiles(FilesEntity filesEntity);
//TODO 1111111111111
@Select("<script> " +
"select * from (select upload_date upload_Date ,count(ID) package_Count,sum(sumCount) cardCount,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn " +
"from (SELECT FILES.upload_date,FILES.ID,count(prepro_person.JMSFZSLH) as sumCount, " +
"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,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 " +
" FROM PREPRO_PERSON " +
"left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID " +
......@@ -25,7 +26,7 @@ public interface FilesMapper {
"<if test=\"importDate !=null\">"+
" and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate}" +
"</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>")
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;
import com.yxproject.start.entity.CountyDicEntity;
import org.apache.ibatis.annotations.*;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -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" +
"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 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" +
......@@ -131,4 +133,24 @@ public interface LogMapper {
"</if>" +
"</script>")
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 {
/*按条件查询制证数据*/
@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> " +
" 1=1" +
"<if test='uploadNo != null '>" +
......@@ -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);
/*按条件查询制证数据*/
@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> " +
" 1=1" +
"<if test='uploadNo != null '>" +
......
......@@ -2,7 +2,10 @@ package com.yxproject.start.service;
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.Map;
......@@ -23,4 +26,9 @@ public interface LogService {
public boolean changeCardType(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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
......@@ -59,4 +61,16 @@ public class LogServiceImpl implements LogService {
logMapper.insertAnalysisDate(printDate,latticeMouthInformation);
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