Commit 54af534e authored by liboyang's avatar liboyang

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

parents 0bd0ffe7 f392db40
package com.yxproject.start.api;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.NewFilesEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.FilesService;
import com.yxproject.start.service.NewFilesService;
import com.yxproject.start.service.PreproPersonService;
import com.yxproject.start.utils.QuerySequenceSercive;
import com.yxproject.start.utils.ZipUtils;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
......@@ -24,12 +25,17 @@ import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.*;
import java.util.zip.ZipOutputStream;
import static com.yxproject.start.utils.YXStringUtils.getCurrentDate2String;
/**
* @auther zhangyusheng
* @author zhangyusheng
* 2019/3/1 11:18
*/
@RestController
......@@ -41,6 +47,10 @@ public class ExportXMLApi {
private NewFilesService newFilesService;
@Autowired
private FilesService filesService;
@Autowired
private QuerySequenceSercive querySequenceSercive;
private static ExecutorService threadPool = Executors.newCachedThreadPool();
Logger logger = Logger.getLogger(ExportXMLApi.class);
......@@ -48,45 +58,46 @@ public class ExportXMLApi {
* 导出制证数据包
*/
@RequestMapping("printXmlData")
// @RequiresPermissions("userInfo.add")//权限管理;
public byte[] printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard") String IDCard, @RequestParam("oldFile") String oldFile, @RequestParam("newFile") String newFile, @RequestParam("SSXQDM") String SSXQDM, @RequestParam("cardType") String cardType, @RequestParam("state") String state, @RequestParam("uploadDate") String uploadDate, @RequestParam("downloadState") String downloadState, HttpServletResponse response, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
public byte[] printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard") String IDCard, @RequestParam("oldFile") String oldFile, @RequestParam("newFile") String newFile, @RequestParam("SSXQDM") String SSXQDM, @RequestParam("cardType") String cardType, @RequestParam("state") String state, @RequestParam("uploadDate1") String uploadDate1, @RequestParam("uploadDate2") String uploadDate2, @RequestParam("downloadState") String downloadState, HttpServletResponse response, HttpServletRequest requ) throws SQLException {
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件
List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectAllPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate), downloadState);
// List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectAllPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate));
List<PreproPersonDto> preproPersonEntities = new ArrayList<>();
List<PreproPersonDto> preproPersonDtos =null;
System.out.println(new Date()+ "开始查询");
preproPersonDtos=preproPersonService.selectAllPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, replaceDate(uploadDate1), replaceDate(uploadDate2), downloadState);
preproPersonEntities.addAll(preproPersonDtos);
System.out.println(new Date()+ "结束查询");
if (preproPersonEntities.size() > 0) {
//将制证详情详细划分
Map<Long, Object> map = new LinkedHashMap<>();
for (PreproPersonEntity preproPersonEntity : preproPersonEntities) {
if (map != null && map.containsKey(preproPersonEntity.getCardTypeId())) {
List<PreproPersonEntity> preproPersonEntityList = (List<PreproPersonEntity>) map.get(preproPersonEntity.getCardTypeId());
preproPersonEntityList.add(preproPersonEntity);
map.put(preproPersonEntity.getCardTypeId(), preproPersonEntityList);
for (PreproPersonDto preproPersonDto : preproPersonEntities) {
if (map != null && map.containsKey(preproPersonDto.getCardTypeId())) {
List<PreproPersonDto> preproPersonEntityList = (List<PreproPersonDto>) map.get(preproPersonDto.getCardTypeId());
preproPersonEntityList.add(preproPersonDto);
map.put(preproPersonDto.getCardTypeId(), preproPersonEntityList);
} else {
List<PreproPersonEntity> preproPersonEntityList = new ArrayList<>();
preproPersonEntityList.add(preproPersonEntity);
map.put(preproPersonEntity.getCardTypeId(), preproPersonEntityList);
List<PreproPersonDto> preproPersonEntityList = new ArrayList<>();
preproPersonEntityList.add(preproPersonDto);
map.put(preproPersonDto.getCardTypeId(), preproPersonEntityList);
}
}
List<List<Map<Long, Object>>> lists = new ArrayList<>();
List<List<Map<String, Object>>> lists = new ArrayList<>();
for (Long cardTypeId : map.keySet()) {
//区分邮寄证和大批证件类型
//大批证
if (cardTypeId == 0) {
List list = new ArrayList();
List<PreproPersonEntity> preproPersonEntityList = (List<PreproPersonEntity>) map.get(cardTypeId);
Map<Long, Object> mapFileId = new LinkedHashMap<>();
for (PreproPersonEntity preproPersonEntity : preproPersonEntityList) {
if (mapFileId != null && mapFileId.containsKey(preproPersonEntity.getFileId())) {
List<PreproPersonEntity> preproPersonEntityListFileId = (List<PreproPersonEntity>) mapFileId.get(preproPersonEntity.getFileId());
List<PreproPersonDto> preproPersonEntityList = (List<PreproPersonDto>) map.get(cardTypeId);
Map<String, Object> mapFileId = new LinkedHashMap<>();
for (PreproPersonDto preproPersonEntity : preproPersonEntityList) {
if (mapFileId != null && mapFileId.containsKey(preproPersonEntity.getDwdm())) {
List<PreproPersonDto> preproPersonEntityListFileId = (List<PreproPersonDto>) mapFileId.get(preproPersonEntity.getDwdm());
preproPersonEntityListFileId.add(preproPersonEntity);
mapFileId.put(preproPersonEntity.getFileId(), preproPersonEntityListFileId);
mapFileId.put(preproPersonEntity.getDwdm(), preproPersonEntityListFileId);
} else {
List<PreproPersonEntity> preproPersonEntityListFileId = new ArrayList<>();
List<PreproPersonDto> preproPersonEntityListFileId = new ArrayList<>();
preproPersonEntityListFileId.add(preproPersonEntity);
mapFileId.put(preproPersonEntity.getFileId(), preproPersonEntityListFileId);
mapFileId.put(preproPersonEntity.getDwdm(), preproPersonEntityListFileId);
}
}
list.add(mapFileId);
......@@ -94,28 +105,28 @@ public class ExportXMLApi {
} else {
//邮寄证
List list = new ArrayList();
List<PreproPersonEntity> preproPersonEntityList = (List<PreproPersonEntity>) map.get(cardTypeId);
Map<Long, Object> mapFileId = new LinkedHashMap<>();
mapFileId.put((long) 1, preproPersonEntityList);
List<PreproPersonDto> preproPersonEntityList = (List<PreproPersonDto>) map.get(cardTypeId);
Map<String, Object> mapFileId = new LinkedHashMap<>();
mapFileId.put("1", preproPersonEntityList);
list.add(mapFileId);
lists.add(list);
}
}
List<String> documentList = new ArrayList<>();
//执行生成XML文件方法
for (List<Map<Long, Object>> mapList : lists) {
for (Map<Long, Object> objectMap : mapList) {
for (Long fileId : objectMap.keySet()) {
List<PreproPersonEntity> preproPersonEntityList = (List<PreproPersonEntity>) objectMap.get(fileId);
System.out.println(new Date()+ "开始生成xml");
for (List<Map<String, Object>> mapList : lists) {
for (Map<String, Object> objectMap : mapList) {
for (String fileId : objectMap.keySet()) {
List<PreproPersonDto> preproPersonEntityList = (List<PreproPersonDto>) objectMap.get(fileId);
int i = 0;
List<List> listList = new ArrayList<>();
List list = new ArrayList();
for (int a = 0; a < preproPersonEntityList.size(); a++) {
PreproPersonEntity preproPersonEntity = preproPersonEntityList.get(a);
PreproPersonDto preproPersonEntity = preproPersonEntityList.get(a);
list.add(preproPersonEntity);
i++;
if (i < 80) {
} else {
listList.add(list);
list = new ArrayList();
......@@ -126,27 +137,27 @@ public class ExportXMLApi {
}
}
for (List list1 : listList) {
List<PreproPersonEntity> preproPersonEntityList1 = (List<PreproPersonEntity>) list1;
List<PreproPersonDto> preproPersonEntityList1 = (List<PreproPersonDto>) list1;
List<FilesEntity> filesEntities = filesService.selectFilesEntityById(preproPersonEntityList1.get(0).getFileId().toString());
FilesEntity filesEntity = new FilesEntity();
if (preproPersonEntityList1.get(0).getCardTypeId() == 9) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
filesEntity.setVersionCode("3.00");
filesEntity.setCreateTime(simpleDateFormat.format(new Date()));
filesEntity.setCreateTime(getCurrentDate2String("yyyyMMddhhmmss"));
filesEntity.setDwmc("北京市公安局人口管理总队证件管理大队");
filesEntity.setDwdm("110001580800");
} else {
filesEntity = filesEntities.get(0);
}
filesEntity.setCreateTime(getCurrentDate2String("yyyyMMddhhmmss"));
FilesEntity finalFilesEntity = filesEntity;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
filesEntity.setCreateTime(simpleDateFormat.format(new Date()));
String xml = null;
try {
xml = createToMakePackageXML(preproPersonEntityList1, filesEntity, "\\zhang");
} catch (IOException e) {
xml = createToMakePackageXML(preproPersonEntityList1, finalFilesEntity, "\\zhang");
} catch (Exception e) {
e.printStackTrace();
logger.error("个人上传受理号:" + uploadNo + "个人身份证号:" + IDCard + "包号:" + oldFile + "新文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型:" + cardType + "是否有效(1有效,0无效):" + state + "下载时间:" + uploadDate + "下载状态(0未下载,1已下载):" + downloadState);
logger.error("个人上传受理号:" + uploadNo + "个人身份证号:" + IDCard + "包号:" + oldFile + "新文件名:" + newFile + "签发机关:" + SSXQDM + "制证类型:" + cardType + "是否有效(1有效,0无效):" + state + "下载时间:" + uploadDate2 + "下载状态(0未下载,1已下载):" + downloadState);
logger.error("IOException 导出制证数据包IO异常", e);
}
documentList.add(xml);
......@@ -154,6 +165,8 @@ public class ExportXMLApi {
}
}
}
System.out.println(new Date()+ "生成xml结束");
// -----制证包数据打包下载
String zipName = "myfile.zip";
response.setContentType("APPLICATION/OCTET-STREAM");
......@@ -167,10 +180,12 @@ public class ExportXMLApi {
logger.error("IOException 制证包数据打包下载IO异常", e);
}
try {
System.out.println(new Date()+ "开始打包");
for (String document : documentList) {
ZipUtils.doCompress(document, out);
response.flushBuffer();
}
System.out.println(new Date()+ "结束打包");
} catch (Exception e) {
e.printStackTrace();
logger.error("制证包数据打包名:" + zipName);
......@@ -185,18 +200,16 @@ public class ExportXMLApi {
}
}
}
System.out.println(new Date()+ "结束");
return null;
}
/**
* 生成单个可制证数据XML
*
* @throws IOException 可能出现文件写入不成功
*/
private String createToMakePackageXML(List<PreproPersonEntity> preproPersonEntities, FilesEntity filesEntity, String url) throws IOException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyyMMddhhmmss");
private String createToMakePackageXML(List<PreproPersonDto> preproPersonEntities, FilesEntity filesEntity, String url) throws IOException,ParseException {
Document document = DocumentHelper.createDocument();
Element PACKAGE = DocumentHelper.createElement("PACKAGE");
document.setRootElement(PACKAGE);
......@@ -211,23 +224,24 @@ public class ExportXMLApi {
Element JLS = PACKAGEHEAD.addElement("JLS");
JLS.setText(preproPersonEntities.size() + "");
Element SCSJ = PACKAGEHEAD.addElement("SCSJ");
SCSJ.setText(simpleDateFormat2.format(new Date()));
SCSJ.setText(getCurrentDate2String("yyyyMMddhhmmss"));
NewFilesEntity newFilesEntity = new NewFilesEntity();
newFilesEntity.setCreateDate(simpleDateFormat2.format(new Date()));
newFilesEntity.setCreateDate(getCurrentDate2String("yyyyMMddhhmmss"));
newFilesEntity.setDwdm(filesEntity.getDwdm());
newFilesEntity.setDwmc(filesEntity.getDwmc());
newFilesEntity.setVersionCode(filesEntity.getVersionCode());
newFilesEntity.setRecordNumber((long) preproPersonEntities.size());
long l = newFilesService.saveNewFiles(newFilesEntity);
String files_seq = autoGenericCode(newFilesEntity.getId() + "", 4);
newFilesEntity.setNewFileName("ZAGL_ZZJH_" + filesEntity.getDwdm() + simpleDateFormat.format(new Date()) + preproPersonEntities.get(0).getCardTypeId() + files_seq);
String xml_seq = querySequenceSercive.selectSequenceNextValue("XML_SEQ");
String files_seq = autoGenericCode(xml_seq, 4);
newFilesEntity.setNewFileName("ZAGL_ZZJH_" + filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + preproPersonEntities.get(0).getCardTypeId() + files_seq);
newFilesService.updateNewFileName(newFilesEntity);
Element SJBBH = PACKAGEHEAD.addElement("SJBBH");
SJBBH.setText(filesEntity.getDwdm() + simpleDateFormat.format(new Date()) + preproPersonEntities.get(0).getCardTypeId() + files_seq);
SJBBH.setText(filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + preproPersonEntities.get(0).getCardTypeId() + files_seq);
int NO = 1;
long cardType = 0;
for (PreproPersonEntity preproPersonEntity : preproPersonEntities) {
for (PreproPersonDto preproPersonEntity : preproPersonEntities) {
Element RECORD = DATA.addElement("RECORD");
RECORD.addAttribute("no", NO + "");
RECORD.addAttribute("sid", preproPersonEntity.getSid());
......@@ -281,9 +295,18 @@ public class ExportXMLApi {
preproPersonEntity.setNewFileId(newFilesEntity.getId());
cardType = preproPersonEntity.getCardTypeId();
}
preproPersonService.updatePreproPerson_NewFileName(preproPersonEntities);
threadPool.execute(new Runnable() {
@Override
public void run() {
try {
preproPersonService.updatePreproPerson_NewFileName(preproPersonEntities);
} catch (Exception e) {
e.printStackTrace();
}
}
});
try {
FileOutputStream fos = new FileOutputStream("D:\\XML\\" + "ZAGL_ZZJH_" + filesEntity.getDwdm() + simpleDateFormat.format(new Date()) + cardType + files_seq + ".xml");
FileOutputStream fos = new FileOutputStream("D:\\XML\\" + "ZAGL_YDZZ_" + filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + cardType + files_seq + ".xml");
OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
OutputFormat of = new OutputFormat();
of.setEncoding("UTF-8");
......@@ -294,22 +317,23 @@ public class ExportXMLApi {
writer.write(document);
writer.close();
} catch (IOException e) {
e.printStackTrace();
logger.error("IOException XML文件生成异常", e);
e.printStackTrace();
}
System.out.println("XML文件生成成功..." + new Date());
return "D:\\XML\\" + "ZAGL_ZZJH_" + filesEntity.getDwdm() + simpleDateFormat.format(new Date()) + cardType + files_seq + ".xml";
return "D:\\XML\\" + "ZAGL_YDZZ_" + filesEntity.getDwdm() + getCurrentDate2String("yyyyMMdd") + cardType + files_seq + ".xml";
}
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == null) return "";
else return str;
if (str == null) {
return "";
}
return str;
}
/**
......@@ -319,24 +343,19 @@ public class ExportXMLApi {
* @return
*/
private String replaceDate(String str) {
return str.replace("-", "").replace(" ", "").replace(":", "");
return str.replace("-", "").replace(" ","").replace(":","");
}
/**
* 不够位数的在前面补0,保留code的长度位数字
*
* @param code
* @return
*/
private String autoGenericCode(String code, int num) {
String result = "";
// 保留num的位数
// 0 代表前面补充0
// num 代表长度为4
// d 代表参数为正数型
result = String.format("%0" + num + "d", Integer.parseInt(code) + 1);
return result;
return String.format("%0" + num + "d", Integer.parseInt(code) + 1);
}
}
......@@ -77,6 +77,8 @@ public class FailedCardApi {
map.put("ID_NO", o.toString());
map.put("NAME", "查无此人");
map.put("SEX_NO", "-1");
map.put("SEX_NO", "-1");
map.put("ACCEPT_NO", "");
resultMap.add(map);
}
resultList.addAll(resultMap);
......
......@@ -13,10 +13,9 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import static com.yxproject.start.utils.YXStringUtils.getCurrentDate2String;
@RestController
......@@ -174,8 +173,7 @@ public class LogApi {
MDC.put("ip", remoteAddr);
try {
logService.changeCardType(printDate, fileId);
SimpleDateFormat df=new SimpleDateFormat("yyyyMMddhhmmss");
logService.insertAnalysisDate(df.format(new Date()), fileId);
logService.insertAnalysisDate(getCurrentDate2String("yyyyMMddhhmmss"), fileId);
//查询XML文件信息
List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate);
//查询Excel文件信息
......@@ -218,15 +216,18 @@ public class LogApi {
public boolean deleteFiles(@RequestParam("uploadTime")String uploadTime, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<String> idList =new ArrayList <String>();
Map<String, Object> map = null;
map = new LinkedHashMap<>();
try {
idList = logService.selectId(uploadTime);
for (int i=0;i<idList.size();i++){
List<String> idList = logService.selectId(replaceDate(uploadTime));
for (int i = 0; i < idList.size(); i++) {
logService.deleteFilesData(idList.get(i));
}
for (int i=0;i<idList.size();i++){
for (int i = 0; i < idList.size(); i++) {
logService.deleteFile(idList.get(i));
}
map.put("state", 1);
map.put("msg", "成功删除");
}catch (Exception e){
logger.error("导入时间:" + uploadTime);
logger.error("Exception 解析异常", e);
......
package com.yxproject.start.api;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.CountDataEntity;
import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity;
......@@ -9,6 +10,7 @@ import com.yxproject.start.utils.YXJSONResponse;
import com.yxproject.start.utils.YXStringUtils;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.dom4j.DocumentException;
......@@ -84,8 +86,8 @@ public class ReadXmlApi {
// 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件
// 得到上传的文件名称
filename = item.getName();
if (filename == null || filename.trim().equals("")) {
filename = item.getOriginalFilename();
if (StringUtils.isBlank(filename)) {
continue;
}
InputStream in = item.getInputStream();
......@@ -133,7 +135,7 @@ public class ReadXmlApi {
}
private Boolean idcardsFactory(Map<String, Object> map1) {
importXmlService.importPersonXml((List<PreproPersonEntity>) map1.get("preproPerson"), (FilesEntity) map1.get("file"));
importXmlService.importPersonXml((List<PreproPersonDto>) map1.get("preproPerson"), (FilesEntity) map1.get("file"));
return true;
}
......
......@@ -47,18 +47,18 @@ public class UserApi {
} catch (UnknownAccountException e) {
resultMap.put("status", 201);
resultMap.put("message", "账号不存在!");
logger.error("不存在的用户名:" + username);
logger.error("", e);
// logger.error("不存在的用户名:" + username);
// logger.error("", e);
} catch (IncorrectCredentialsException e1) {
resultMap.put("status", 202);
resultMap.put("message", "密码错误!");
logger.error("用户密码错误,用户名:" + username + "错误密码:" + password);
logger.error("", e1);
// logger.error("用户密码错误,用户名:" + username + "错误密码:" + password);
// logger.error("", e1);
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message", "用户名密码错误");
logger.error("用户名错误:" + username + "错误密码:" + password);
logger.error("Exception 用户登录异常", e);
// logger.error("用户名错误:" + username + "错误密码:" + password);
// logger.error("Exception 用户登录异常", e);
}
return resultMap;
}
......
package com.yxproject.start.dto;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Id;
/**
* Created by Administrator on 2019/7/17.
*/
public class PreproPersonDto {
private String jmsfzslh;
private String gmsfhm;
private String xm;
private String xbdm;
private String mzdm;
private String dwmc;
private String dwdm;
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 no;
private Long fileId;
private Long cardTypeId;
private Long newFileId;
private Long state;
private long id;
private long isValid;
private String tpPath;
@Id
@Column(name = "ID")
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "JMSFZSLH")
public String getJmsfzslh() {
return jmsfzslh;
}
public void setJmsfzslh(String jmsfzslh) {
this.jmsfzslh = jmsfzslh;
}
@Basic
@Column(name = "GMSFHM")
public String getGmsfhm() {
return gmsfhm;
}
public void setGmsfhm(String gmsfhm) {
this.gmsfhm = gmsfhm;
}
@Basic
@Column(name = "DWDM")
public String getDwdm() {
return dwdm;
}
public void setDwdm(String dwdm) {
this.dwdm = dwdm;
}
@Basic
@Column(name = "DWMC")
public String getDwmc() {
return dwmc;
}
public void setDwmc(String dwmc) {
this.dwmc = dwmc;
}
@Basic
@Column(name = "XM")
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
@Basic
@Column(name = "XBDM")
public String getXbdm() {
return xbdm;
}
public void setXbdm(String xbdm) {
this.xbdm = xbdm;
}
@Basic
@Column(name = "MZDM")
public String getMzdm() {
return mzdm;
}
public void setMzdm(String mzdm) {
this.mzdm = mzdm;
}
@Basic
@Column(name = "CSRQ")
public String getCsrq() {
return csrq;
}
public void setCsrq(String csrq) {
this.csrq = csrq;
}
@Basic
@Column(name = "SSXQDM")
public String getSsxqdm() {
return ssxqdm;
}
public void setSsxqdm(String ssxqdm) {
this.ssxqdm = ssxqdm;
}
@Basic
@Column(name = "DZMC")
public String getDzmc() {
return dzmc;
}
public void setDzmc(String dzmc) {
this.dzmc = dzmc;
}
@Basic
@Column(name = "SDXP")
public String getSdxp() {
return sdxp;
}
public void setSdxp(String sdxp) {
this.sdxp = sdxp;
}
@Basic
@Column(name = "ZWY_ZWTXSJ")
public String getZwyZwtxsj() {
return zwyZwtxsj;
}
public void setZwyZwtxsj(String zwyZwtxsj) {
this.zwyZwtxsj = zwyZwtxsj;
}
@Basic
@Column(name = "ZWY_ZWTZSJ")
public String getZwyZwtzsj() {
return zwyZwtzsj;
}
public void setZwyZwtzsj(String zwyZwtzsj) {
this.zwyZwtzsj = zwyZwtzsj;
}
@Basic
@Column(name = "ZWE_ZWTXSJ")
public String getZweZwtxsj() {
return zweZwtxsj;
}
public void setZweZwtxsj(String zweZwtxsj) {
this.zweZwtxsj = zweZwtxsj;
}
@Basic
@Column(name = "ZWE_ZWTZSJ")
public String getZweZwtzsj() {
return zweZwtzsj;
}
public void setZweZwtzsj(String zweZwtzsj) {
this.zweZwtzsj = zweZwtzsj;
}
@Basic
@Column(name = "QFJG_GAJGMC")
public String getQfjgGajgmc() {
return qfjgGajgmc;
}
public void setQfjgGajgmc(String qfjgGajgmc) {
this.qfjgGajgmc = qfjgGajgmc;
}
@Basic
@Column(name = "YXQQSRQ")
public String getYxqqsrq() {
return yxqqsrq;
}
public void setYxqqsrq(String yxqqsrq) {
this.yxqqsrq = yxqqsrq;
}
@Basic
@Column(name = "YXQJZRQ")
public String getYxqjzrq() {
return yxqjzrq;
}
public void setYxqjzrq(String yxqjzrq) {
this.yxqjzrq = yxqjzrq;
}
@Basic
@Column(name = "JMSFZSLYYDM")
public String getJmsfzslyydm() {
return jmsfzslyydm;
}
public void setJmsfzslyydm(String jmsfzslyydm) {
this.jmsfzslyydm = jmsfzslyydm;
}
@Basic
@Column(name = "JMSFZZZLXDM")
public String getJmsfzzzlxdm() {
return jmsfzzzlxdm;
}
public void setJmsfzzzlxdm(String jmsfzzzlxdm) {
this.jmsfzzzlxdm = jmsfzzzlxdm;
}
@Basic
@Column(name = "JMSFZLZFSDM")
public String getJmsfzlzfsdm() {
return jmsfzlzfsdm;
}
public void setJmsfzlzfsdm(String jmsfzlzfsdm) {
this.jmsfzlzfsdm = jmsfzlzfsdm;
}
@Basic
@Column(name = "SJR_XM")
public String getSjrXm() {
return sjrXm;
}
public void setSjrXm(String sjrXm) {
this.sjrXm = sjrXm;
}
@Basic
@Column(name = "SJR_LXDH")
public String getSjrLxdh() {
return sjrLxdh;
}
public void setSjrLxdh(String sjrLxdh) {
this.sjrLxdh = sjrLxdh;
}
@Basic
@Column(name = "SJR_YZBM")
public String getSjrYzbm() {
return sjrYzbm;
}
public void setSjrYzbm(String sjrYzbm) {
this.sjrYzbm = sjrYzbm;
}
@Basic
@Column(name = "SJR_TXDZ")
public String getSjrTxdz() {
return sjrTxdz;
}
public void setSjrTxdz(String sjrTxdz) {
this.sjrTxdz = sjrTxdz;
}
@Basic
@Column(name = "NO")
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
@Basic
@Column(name = "SID")
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
@Basic
@Column(name = "FILE_ID")
public Long getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
}
@Basic
@Column(name = "CARD_TYPE_ID")
public Long getCardTypeId() {
return cardTypeId;
}
public void setCardTypeId(Long cardTypeId) {
this.cardTypeId = cardTypeId;
}
@Basic
@Column(name = "NEW_FILE_ID")
public Long getNewFileId() {
return newFileId;
}
public void setNewFileId(Long newFileId) {
this.newFileId = newFileId;
}
@Basic
@Column(name = "STATE")
public Long getState() {
return state;
}
public void setState(Long state) {
this.state = state;
}
@Basic
@Column(name = "IS_VALID")
public long getIsValid() {
return isValid;
}
public void setIsValid(long isValid) {
this.isValid = isValid;
}
@Basic
@Column(name = "TP_PATH")
public String getTpPath() {
return tpPath;
}
public void setTpPath(String tpPath) {
this.tpPath = tpPath;
}
}
......@@ -40,6 +40,7 @@ public class PreproPersonEntity {
private Long state;
private long id;
private long isValid;
private String tpPath;
@Id
@Column(name = "ID")
......@@ -339,6 +340,16 @@ public class PreproPersonEntity {
public void setIsValid(long isValid) {
this.isValid = isValid;
}
@Basic
@Column(name = "TP_PATH")
public String getTpPath() {
return tpPath;
}
public void setTpPath(String tpPath) {
this.tpPath = tpPath;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
......@@ -373,11 +384,12 @@ public class PreproPersonEntity {
Objects.equals(newFileId, that.newFileId) &&
Objects.equals(id, that.id) &&
Objects.equals(isValid, that.isValid) &&
Objects.equals(state, that.state);
Objects.equals(state, that.state)&&
Objects.equals(tpPath, that.tpPath);
}
@Override
public int hashCode() {
return Objects.hash(id,jmsfzslh, gmsfhm, xm, xbdm, mzdm, isValid,csrq, ssxqdm, dzmc, sdxp, zwyZwtxsj, zwyZwtzsj, zweZwtxsj, zweZwtzsj, qfjgGajgmc, yxqqsrq, yxqjzrq, jmsfzslyydm, jmsfzzzlxdm, jmsfzlzfsdm, sjrXm, sjrLxdh, sjrYzbm, sjrTxdz, sid, fileId, cardTypeId, newFileId, state);
return Objects.hash(id,jmsfzslh, gmsfhm, xm, xbdm, mzdm, isValid,csrq, ssxqdm, dzmc, sdxp, zwyZwtxsj, zwyZwtzsj, zweZwtxsj, zweZwtzsj, qfjgGajgmc, yxqqsrq, yxqjzrq, jmsfzslyydm, jmsfzzzlxdm, jmsfzlzfsdm, sjrXm, sjrLxdh, sjrYzbm, sjrTxdz, sid, fileId, cardTypeId, newFileId, state,tpPath);
}
}
......@@ -33,8 +33,8 @@ public interface DataAuditingMapper {
public List<Map<String, Object>> selectDataAuditingEntity(@Param("groupNo") String groupNo);
@Select("<script>" +
"select nvl(DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,'000000000') GAJG_MC,DATA_AUDITING.POLICE_SUBSTATION,sum(DATA_AUDITING.VALID_COUNT) VALID_COUNT,\n" +
"sum(DATA_AUDITING.INVALID_COUNT) inVALID_COUNT,to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') SUBMIT_DATE,CARD_TYPE_DIC.CARD_TYPE,\n" +
"select nvl(DIC_UPLOAD_UNIT_T.UNIT_NAME,'000000000') GAJG_MC,DATA_AUDITING.POLICE_SUBSTATION,sum(DATA_AUDITING.VALID_COUNT) VALID_COUNT,\n" +
"sum(DATA_AUDITING.INVALID_COUNT) inVALID_COUNT,CARD_TYPE_DIC.CARD_TYPE,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,1-(sum(DATA_AUDITING.VALID_COUNT)/(sum(DATA_AUDITING.VALID_COUNT)+sum(DATA_AUDITING.inVALID_COUNT))) Failure_rate from DATA_AUDITING \n" +
"left join TASK on TASK.TASK_ID = DATA_AUDITING.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE " +
......@@ -50,7 +50,7 @@ public interface DataAuditingMapper {
" and TASK.CARD_TYPE = ${typeCode}"+
"</if> " +
" and to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') BETWEEN ${startDate} and ${endDate} \n" +
"group by nvl(DIC_UPLOAD_UNIT_T.UNIT_NAME,'000000000'),DATA_AUDITING.POLICE_SUBSTATION, to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd'), CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"group by nvl(DIC_UPLOAD_UNIT_T.UNIT_NAME,'000000000'),DATA_AUDITING.POLICE_SUBSTATION, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"order by DATA_AUDITING.POLICE_SUBSTATION" +
"</script>")
public List<Map<String, Object>> selectDataAuditingReport(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("policeName") String policeName, @Param("policeCode") String policeCode,@Param("typeCode")String typeCode);
......
......@@ -32,7 +32,8 @@ public interface FailedCardMapper {
"PROD_CARD_T.SEX_NO,\n" +
"PROD_CARD_T.ID_NO,\n" +
"SPECIAL_CARD.SPECIAL_TYPE, " +
"FAILED_CARD_REASON_DIC.FAILED_CARD_REASON \n " +
"FAILED_CARD_REASON_DIC.FAILED_CARD_REASON " +
",PROD_CARD_T.ACCEPT_NO ACCEPT_NO ,PROD_CARD_T.begin_date " +
"FROM PRODYD_DBA.PROD_CARD_T@PRODYD_LINK\n" +
"left join SPECIAL_CARD on PROD_CARD_T.ACCEPT_NO = SPECIAL_CARD.ACCEPT_NO " +
"left join failed_card on PROD_CARD_T.ACCEPT_NO = failed_card.ACCEPT_NO " +
......
......@@ -70,16 +70,16 @@ public interface GroupNoMapper {
"PROD_GROUP_T.valid_count,\n" +
"PROD_GROUP_T.invalid_count, \n" +
"'000000' county_code\n" +
"from PRODYD_DBA.PROD_CARD_T@PROD_LINK \n" +
"from PRODYD_DBA.PROD_CARD_T@PRODYD_LINK \n" +
"left join PREPRO_PERSON \n" +
"on PREPRO_PERSON.JMSFZSLH = PROD_CARD_T.upload_no\n" +
"left join PRODYD_DBA.PROD_GROUP_T@PROD_LINK\n" +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK\n" +
"on substr(PROD_CARD_T.accept_no,0,8) = PROD_GROUP_T.group_no \n" +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PROD_LINK \n" +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK \n" +
"on PROD_GROUP_RELATION_T.group_no =PROD_GROUP_T.group_no \n" +
"left join CARD_TYPE_DIC \n" +
"on decode(substr(ORIGINAL_NO,3,2),'99',6,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID \n" +
"where PROD_GROUP_T.group_no in (#{groupNo}) ")
"where PROD_GROUP_T.group_no in (${groupNo}) ")
public List<Map<String,Object>> selectGroupAtPRODUByGroupNo(@Param("groupNo") String groupNo);
/**
......
......@@ -18,12 +18,12 @@ public interface LogMapper {
"\n")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
@Select("SELECT p.JMSFZSLH acceptNo,f.SOURCE_FILE_NAME fileName,p.XM name,p.GMSFHM cardId,f.DWMC filePoliceCode,g.UNIT_NAME GAJG_MC acceptPoliceCode\n" +
@Select("SELECT p.JMSFZSLH acceptNo,f.SOURCE_FILE_NAME fileName,p.XM name,p.GMSFHM cardId,f.DWMC filePoliceCode,g.UNIT_NAME acceptPoliceCode\n" +
"FROM PREPRO_PERSON p " +
"LEFT JOIN FILES f ON p.FILE_ID = f.ID " +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK g ON substr(p.JMSFZSLH,0,9) = substr(g.UPLOAD_UNIT_NO,0,9) \n" +
"where TO_CHAR(f.UPLOAD_DATE,'yyyyMMddhh24miss') = #{uploadDate} " +
"and g.GAJG_MC != f.DWMC"
"and g.UNIT_NAME != f.DWMC"
)
public List<Map<String,Object>> checkAcppetNo(@Param("uploadDate") String uploadDate);
......@@ -156,9 +156,15 @@ public interface LogMapper {
@Select("select id from files where TO_CHAR(UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss') = #{uploadTime}")
public List<String> selectId(@Param("uploadTime")String uploadTime);
@Delete("delete from PREPRO_PERSON where PREPRO_PERSON.file_id = #{id}")
@Delete("DELETE FROM (SELECT * FROM PREPRO_PERSON_CLOB LEFT JOIN PREPRO_PERSON ON PREPRO_PERSON_CLOB.ID = PREPRO_PERSON.ID WHERE PREPRO_PERSON.FILE_ID = #{id})")
public boolean deleteFilesDataCLOB(@Param("id")String id);
@Delete("DELETE FROM PREPRO_PERSON WHERE PREPRO_PERSON.FILE_ID = #{id}")
public boolean deleteFilesData(@Param("id")String id);
@Delete("delete from ANALYSIS where FILE_ID=#{id}")
public boolean deleteAnalysis(@Param("id")String id);
@Delete("delete from files where id=#{id}")
public boolean deleteFile(@Param("id")String id);
......
package com.yxproject.start.mapper;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.PreproPersonEntity;
import org.apache.ibatis.annotations.*;
......@@ -12,12 +13,16 @@ import java.util.Map;
@Mapper
public interface PreproPersonMapper {
/*导入XMl*/
@Insert("INSERT INTO PREPRO_PERSON (JMSFZSLH,GMSFHM,XM,XBDM,MZDM,CSRQ,SSXQDM,DZMC,SDXP,ZWY_ZWTXSJ,ZWY_ZWTZSJ,ZWE_ZWTXSJ,ZWE_ZWTZSJ," +
"QFJG_GAJGMC,YXQQSRQ,YXQJZRQ,JMSFZSLYYDM,JMSFZZZLXDM,JMSFZLZFSDM,SJR_XM,SJR_LXDH,SJR_YZBM,SJR_TXDZ,SID,FILE_ID)" +
"VALUES(#{jmsfzslh},#{gmsfhm},#{xm},#{xbdm},#{mzdm},#{csrq},#{ssxqdm},#{dzmc},#{sdxp},#{zwyZwtxsj},#{zwyZwtzsj},#{zweZwtxsj}," +
"#{zweZwtzsj},#{qfjgGajgmc},#{yxqqsrq},#{yxqjzrq},#{jmsfzslyydm},#{jmsfzzzlxdm},#{jmsfzlzfsdm},#{sjrXm},#{sjrLxdh},#{sjrYzbm}," +
"#{sjrTxdz},#{sid},#{fileId})")
public boolean savePreproPersonEntity(PreproPersonEntity personEntity);
@Insert("INSERT INTO PREPRO_PERSON (JMSFZSLH,GMSFHM,XM,XBDM,MZDM,CSRQ,SSXQDM,DZMC," +
"QFJG_GAJGMC,YXQQSRQ,YXQJZRQ,JMSFZSLYYDM,JMSFZZZLXDM,JMSFZLZFSDM,SJR_XM,SJR_LXDH,SJR_YZBM,SJR_TXDZ,SID,FILE_ID,TP_PATH)" +
"VALUES(#{jmsfzslh},#{gmsfhm},#{xm},#{xbdm},#{mzdm},#{csrq},#{ssxqdm},#{dzmc},#{qfjgGajgmc},#{yxqqsrq},#{yxqjzrq},#{jmsfzslyydm},#{jmsfzzzlxdm},#{jmsfzlzfsdm},#{sjrXm},#{sjrLxdh},#{sjrYzbm}," +
"#{sjrTxdz},#{sid},#{fileId},#{tpPath})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean savePreproPersonEntity(PreproPersonDto preproPersonDto);
@Insert("INSERT INTO PREPRO_PERSON_CLOB (ID,SDXP,ZWY_ZWTXSJ,ZWY_ZWTZSJ,ZWE_ZWTXSJ,ZWE_ZWTZSJ,TP_PATH)" +
" VALUES(#{id},#{sdxp},#{zwyZwtxsj},#{zwyZwtzsj},#{zweZwtxsj},#{zweZwtzsj},#{tpPath})")
public boolean savePreproPersonCLOB(PreproPersonDto preproPersonDto);
/*更新制证数据是否邮寄*/
@Update("UPDATE PREPRO_PERSON SET IS_POST=#{isPost} where JMSFZSLH=#{jmsfzslh}")
......@@ -141,6 +146,54 @@ public interface PreproPersonMapper {
" </script>"})
public List<PreproPersonEntity> selectPreproPersonCount(@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("downloadState") String downloadState);
/*按条件查询制证数据*/
@Select({"<script>" +
"SELECT * FROM( " +
"SELECT PREPRO_PERSON.JMSFZSLH JMSFZSLH,PREPRO_PERSON.GMSFHM GMSFHM,PREPRO_PERSON.XM XM,PREPRO_PERSON.XBDM XBDM,PREPRO_PERSON.MZDM MZDM, PREPRO_PERSON.CSRQ CSRQ,PREPRO_PERSON.SSXQDM SSXQDM,\n" +
"PREPRO_PERSON.DZMC DZMC,PREPRO_PERSON.QFJG_GAJGMC QFJG_GAJGMC,PREPRO_PERSON.YXQQSRQ YXQQSRQ, PREPRO_PERSON.YXQJZRQ YXQJZRQ,PREPRO_PERSON.JMSFZSLYYDM JMSFZSLYYDM,PREPRO_PERSON.JMSFZZZLXDM JMSFZZZLXDM,\n" +
"PREPRO_PERSON.JMSFZLZFSDM JMSFZLZFSDM, PREPRO_PERSON.SJR_XM SJR_XM,PREPRO_PERSON.SJR_LXDH SJR_LXDH,PREPRO_PERSON.SJR_YZBM SJR_YZBM,PREPRO_PERSON.SJR_TXDZ SJR_TXDZ,PREPRO_PERSON.SID SID, \n" +
"PREPRO_PERSON.FILE_ID FILE_ID,PREPRO_PERSON.CARD_TYPE_ID CARD_TYPE_ID,PREPRO_PERSON.NEW_FILE_ID NEW_FILE_ID,PREPRO_PERSON.STATE STATE,PREPRO_PERSON.ID ID, PREPRO_PERSON.IS_VALID IS_VALID,PREPRO_PERSON.TP_PATH TP_PATH, \n" +
"FILES.VERSION_CODE VERSION_CODE,FILES.DWDM DWDM,FILES.DWMC DWMC, FILES.RECORD_NUMBER RECORD_NUMBER,FILES.CREATE_TIME CREATE_TIME,FILES.SOURCE_FILE_NAME SOURCE_FILE_NAME,FILES.NEW_TIME NEW_TIME,\n" +
"FILES.UPLOAD_DATE UPLOAD_DATE, NEW_FILES.CREATE_DATE CREATE_DATE,NEW_FILES.NEW_FILE_NAME NEW_FILE_NAME \n" +
"FROM PREPRO_PERSON \n" +
"LEFT JOIN (SELECT FILES.VERSION_CODE,FILES.DWDM,FILES.DWMC,FILES.RECORD_NUMBER,FILES.CREATE_TIME,FILES.SOURCE_FILE_NAME,FILES.NEW_TIME,FILES.UPLOAD_DATE,FILES.ID FROM FILES)FILES ON PREPRO_PERSON.FILE_ID = files.ID \n" +
"LEFT JOIN (select NEW_FILES.CREATE_DATE,NEW_FILES.NEW_FILE_NAME,NEW_FILES.ID from NEW_FILES)NEW_FILES ON PREPRO_PERSON.NEW_FILE_ID = NEW_FILES.ID) T " +
"<where> " +
" 1=1 " +
"<if test='uploadNo!= null'>" +
"and T.JMSFZSLH = #{uploadNo}" +
"</if>" +
" <if test='IDCard!=null'> "+
"and T.GMSFHM = #{IDCard} "+
"</if> "+
" <if test='oldFile!=null'> "+
"and T.SOURCE_FILE_NAME =#{oldFile} "+
" </if> "+
" <if test='newFile!= null'> "+
"and T.NEW_FILE_NAME = #{newFile}"+
" </if> "+
" <if test='SSXQDM!=null'> "+
" and T.DWDM =#{SSXQDM}"+
" </if>"+
" <if test='cardType!=null'>"+
" and T.CARD_TYPE_ID =#{cardType}"+
" </if> "+
" <if test='state!= -1 '>"+
" and T.is_valid = #{state}"+
" </if> "+
" <if test='uploadDate1!= null '>"+
" and to_char(T.UPLOAD_DATE,'yyyyMMdd') between #{uploadDate1} and #{uploadDate2}"+
" </if> "+
" <if test='downloadState == 1 '>"+
" and T.NEW_FILE_ID is not null"+
" </if> "+
" <if test='downloadState == 0 '>"+
" and T.NEW_FILE_ID is null"+
" </if> "+
"</where> " +
" </script>"})
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public List<PreproPersonDto> selectPreproPerson2( @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("uploadDate1") String uploadDate1, @Param("uploadDate2") String uploadDate2, @Param("downloadState") String downloadState);
/*按条件查询制证数据*/
@Select({"<script> " +
......@@ -186,7 +239,7 @@ public interface PreproPersonMapper {
public boolean updateState(@Param("state") String state, @Param("acceptNo") String acceptNo);
@Update("UPDATE PREPRO_PERSON SET NEW_FILE_ID=#{newFileId} where JMSFZSLH=#{jmsfzslh}")
public boolean updateNewFileName(PreproPersonEntity personEntity);
public boolean updateNewFileName(PreproPersonDto personEntity);
/**
* 更新制证数据是否有效
......@@ -208,4 +261,7 @@ public interface PreproPersonMapper {
"UNION all \n" +
"select UPLOAD_NO,ACCEPT_NO from PRODYD_DBA.PROD_CARD_T@PRODYD_LINK WHERE ACCEPT_NO =#{acceptNo}")
public List<Map<String, Object>> selectUploadNoByAcceptNo(String acceptNo);
@Select("SELECT TP_PATH FROM PREPRO_PERSON WHERE FILE_ID = #{id}")
public List<PreproPersonEntity> selectPath (String id);
}
\ No newline at end of file
......@@ -13,6 +13,6 @@ import java.util.Map;
*/
@Mapper
public interface QuerySequenceMapper {
@Select("select #{sequenceName} from dual")
public int selectSequenceNextValue(@Param("sequenceName") String sequenceName);
@Select("select ${sequenceName} sequenceName from dual")
public List<Map<String,Object>> selectSequenceNextValue(@Param("sequenceName") String sequenceName);
}
......@@ -179,9 +179,12 @@ public interface ReceiptMapper {
"WHERE ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectCountTimeT(@Param("groupNo") String groupNo);
@Select("select POLICE_dic.POLICE_NAME from PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK \n" +
"left join POLICE_dic on substr(POLICE_dic.POLICE_CODE,0,8) = substr(PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO,0,8)\n" +
"where group_no = #{policeCode} ")
@Select("SELECT POLICE_CODE,POLICE_NAME,COUNT(*) \n" +
"FROM PRODYD_DBA.PROD_CARd_T@PRODYD_LINK \n" +
"LEFT JOIN POLICE_DIC\n" +
"ON SUBSTR(PROD_CARD_T.UPLOAD_NO,0,6)=POLICE_DIC.POLICE_CODE\n" +
"where ACCEPT_NO like #{policeCode} \n" +
"GROUP BY POLICE_CODE,POLICE_NAME" )
public List<Map<String,Object>> queryPoliceName(@Param("policeCode") String policeCode);
@Select("select \n" +
......
......@@ -116,7 +116,7 @@ public interface SelectSerialNumberMapper {
"from TASK \n" +
"LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE \n" +
"LEFT JOIN GROUP_NO ON GROUP_NO.TASK_ID = TASK.TASK_ID\n" +
"LEFT JOIN ACCUYD_DBA.ACC_CARD_T@ACCUYD_LINK ON SUBSTR(ACC_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO "+
"LEFT JOIN ACCYD_DBA.ACC_CARD_T@ACCUYD_LINK ON SUBSTR(ACC_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO "+
"LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID \n" +
"WHERE GROUP_NO.GROUP_NO =substr(#{id},0,8) OR ACC_CARD_T.ID_NO=#{id} and GROUP_NO.GROUP_NO is not null\n" +
"group by task.WORK_GROUP,TASK.TASK_ID, COUNTY_DIC.COUNTYNAME, COUNTY_DIC.COUNTY_CODE, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, \n" +
......@@ -131,7 +131,7 @@ public interface SelectSerialNumberMapper {
"LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE \n" +
"LEFT JOIN SPECIAL_CARD on SPECIAL_CARD.TASK_ID = TASK.TASK_ID\n" +
"LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID \n" +
"LEFT JOIN ACCUYD_DBA.ACC_CARD_T@ACCUYD_LINK ON ACC_CARD_T.ACCEPT_NO=SPECIAL_CARD.ACCEPT_NO "+
"LEFT JOIN ACCYD_DBA.ACC_CARD_T@ACCUYD_LINK ON ACC_CARD_T.ACCEPT_NO=SPECIAL_CARD.ACCEPT_NO "+
"WHERE ACC_CARD_T.ACCEPT_NO =#{id} OR ACC_CARD_T.ID_NO=#{id} \n" +
"group by task.WORK_GROUP,TASK.TASK_ID, COUNTY_DIC.COUNTYNAME, COUNTY_DIC.COUNTY_CODE, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, \n" +
"TASK.ISSUED_DATE, TASK.PRINT_OUT_DATE, TASK.POSITION_DATE, TASK.CONCORA_CRUSH_DATE, TASK.PUNCHING_DATE, \n" +
......@@ -144,16 +144,16 @@ public interface SelectSerialNumberMapper {
"ACC_CARD_T.NAME,\n" +
"ACC_CARD_T.ID_NO,\n" +
"ACC_CARD_T.SEX_NO,\n" +
"DIC_UPLOAD_UNIT_T.UNIT_NAME AS GAJG1,\n" +
"PU.UNIT_NAME AS GAJG1,\n" +
"ACC_CARD_T.BEGIN_DATE,\n" +
"decode(ACC_CARD_T.EXPIRE_DATE,'00000000','长期',ACC_CARD_T.EXPIRE_DATE) EXPIRE_DATE,\n" +
"ACC_CARD_T.SIGN_GOVT,POLICE_NAME\n" +
"FROM ACCUYD_DBA.ACC_CARD_T@ACCUYD_LINK\n" +
"ACC_CARD_T.SIGN_GOVT POLICE_NAME\n" +
"FROM ACCYD_DBA.ACC_CARD_T@ACCUYD_LINK\n" +
"LEFT JOIN COUNTY_DIC ON subStr(ACC_CARD_T.UPLOAD_NO,0,6)=COUNTY_DIC.COUNTY_CODE\n" +
"LEFT JOIN GROUP_NO ON subStr(ACC_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO \n" +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK ON subStr(ACC_CARD_T.upload_no,0,9)= subStr(DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,0,9) \n" +
"left join ACCUYD_DBA.ACC_GROUP_RELATION_T@ACCUYD_LINK ON SUBSTR(ACC_CARD_T.ACCEPT_NO,0,8) =ACC_GROUP_RELATION_T.GROUP_NO\n" +
"left join police_dic on ACC_GROUP_RELATION_T.UPLOAD_UNIT_NO = police_dic.POLICE_CODE " +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK PU ON subStr(ACC_CARD_T.upload_no,0,9)= subStr(PU.UPLOAD_UNIT_NO,0,9) \n" +
"left join ACCYD_DBA.ACC_GROUP_RELATION_T@ACCUYD_LINK ON SUBSTR(ACC_CARD_T.ACCEPT_NO,0,8) =ACC_GROUP_RELATION_T.GROUP_NO\n" +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK AU on ACC_GROUP_RELATION_T.UPLOAD_UNIT_NO = AU.UPLOAD_UNIT_NO " +
"WHERE ACC_CARD_T.ACCEPT_NO =#{id} OR ACC_CARD_T.ID_NO =#{id}")
public List<Map<String,Object>> selectByAcceptNoOrCardIdFromACC(String id);
......@@ -161,14 +161,13 @@ public interface SelectSerialNumberMapper {
"PROD_CARD_T.ID_NO,PROD_CARD_T.SEX_NO,\n" +
"decode(CHECK_DATE, null,decode(ELECTRIC_WRITE_DATE, null,decode(DOWNLOAD_DATE, null,1,2,5)),6) state,\n" +
"decode(CHECK_DATE, null,decode(ELECTRIC_WRITE_DATE, null,decode(DOWNLOAD_DATE, null,EXPORT_DATE,DOWNLOAD_DATE,ELECTRIC_WRITE_DATE)),CHECK_DATE) Last_date,\n" +
"DIC_UPLOAD_UNIT_T.UNIT_NAME AS GAJG1,PROD_CARD_T.BEGIN_DATE,decode(PROD_CARD_T.EXPIRE_DATE,'00000000','长期',PROD_CARD_T.EXPIRE_DATE) EXPIRE_DATE ,PROD_CARD_T.SIGN_GOVT\n" +
",police_NAME FROM PRODYD_DBA.PROD_CARD_T@PRODYD_LINK\n" +
"PU.UNIT_NAME AS GAJG1,PROD_CARD_T.BEGIN_DATE,decode(PROD_CARD_T.EXPIRE_DATE,'00000000','长期',PROD_CARD_T.EXPIRE_DATE) EXPIRE_DATE ,PROD_CARD_T.SIGN_GOVT police_NAME FROM PRODYD_DBA.PROD_CARD_T@PRODYD_LINK\n" +
"LEFT JOIN COUNTY_DIC ON subStr(PROD_CARD_T.UPLOAD_NO,0,6)=COUNTY_DIC.COUNTY_CODE\n" +
"LEFT JOIN GROUP_NO ON subStr(PROD_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO\n" +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK ON subStr(PROD_CARD_T.upload_no,0,9)= subStr(DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,0,9) \n" +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK PU ON subStr(PROD_CARD_T.upload_no,0,9)= subStr(PU.UPLOAD_UNIT_NO,0,9) \n" +
"LEFT JOIN PRODYD_DBA.PROD_TRACE_T@PRODYD_LINK ON PROD_TRACE_T.ACCEPT_NO =PROD_CARD_T.ACCEPT_NO\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 police_dic on PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO = police_dic.POLICE_CODE " +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK AU on PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO = AU.UPLOAD_UNIT_NO " +
"WHERE PROD_CARD_T.ACCEPT_NO =#{id} OR PROD_CARD_T.ID_NO =#{id}")
public List<Map<String,Object>> selectByAcceptNoOrCardIdFromPROD(String id);
}
......@@ -451,7 +451,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(*) police_Count,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,\n" +
"task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" +
......@@ -470,13 +470,13 @@ public interface TaskListMapper {
"left join PRODYD_DBA.prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO " +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO " +
"where task.TASK_STATE_ID = #{process} and task.work_group=#{workGroup}\n" +
// "and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) " +
"group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by group_no.GROUP_NO")
"nvl(fc.faileCount,0),DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,DIC_UPLOAD_UNIT_T.UNIT_NAME,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
......@@ -487,7 +487,7 @@ public interface TaskListMapper {
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,\n" +
"count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC, \n" +
"count(*) police_Count,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC, \n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,\n" +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count, task.submit_date, task.task_id,\n" +
"CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, \n" +
......@@ -507,13 +507,13 @@ public interface TaskListMapper {
"left join PRODYD_DBA.prod_card_t@PRODYD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n" +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO \n" +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) \n" +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) \n" +
"left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO \n" +
"where task.TASK_STATE_ID = #{process} " +
// "and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) \n" +
"group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" +
"nvl(fc.faileCount,0), police_dic.police_code, police_dic.police_name, nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0), fc.faileCount,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) \n" +
"nvl(fc.faileCount,0), DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,DIC_UPLOAD_UNIT_T.UNIT_NAME, nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0), fc.faileCount,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) \n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common5(@Param("process") long process,@Param("process2") long process2);
......@@ -711,7 +711,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount,prod_card_t.id_no,prod_card_t.name\n" +
",decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) last_date " +
......@@ -725,12 +725,12 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9) " +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no " +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no " +
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.work_group=#{workGroup} and task.TASK_STATE_ID =#{process}\n" +
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,DIC_UPLOAD_UNIT_T.UNIT_NAME,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast2(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
/**
......@@ -739,7 +739,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount,prod_card_t.id_no,prod_card_t.name\n" +
",decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) last_date from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
......@@ -752,12 +752,12 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9) " +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no " +
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\n" +
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,DIC_UPLOAD_UNIT_T.UNIT_NAME,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast5(@Param("process") long process,@Param("process2") long process2);
......@@ -1098,7 +1098,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount,prod_card_t.id_no,prod_card_t.name\n" +
",decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) last_date " +
......@@ -1112,12 +1112,12 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)" +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no " +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no " +
" where SPECIAL_CARD.SPECIAL_TYPE =1 and task.work_group=#{workGroup} and task.TASK_STATE_ID =#{process} " +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '99', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,DIC_UPLOAD_UNIT_T.UNIT_NAME,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind2(@Param("process") long process,@Param("process2") long process2,@Param("workGroup") long workGroup);
......@@ -1127,7 +1127,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount,prod_card_t.id_no,prod_card_t.name\n" +
",decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) last_date " +
......@@ -1141,12 +1141,12 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)" +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = special_card.accept_no " +
" where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID =#{process} " +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '99', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO,DIC_UPLOAD_UNIT_T.UNIT_NAME,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0),prod_card_t.id_no,prod_card_t.name,decode(CONNECT_DATE,null,decode(SORTING_DATE,null,decode(PUNCHING_DATE,null,decode(POSITION_DATE,null,decode(PRINT_OUT_DATE,null,task.SUBMIT_DATE,PRINT_OUT_DATE),POSITION_DATE),PUNCHING_DATE),SORTING_DATE),CONNECT_DATE) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind5(@Param("process") long process,@Param("process2") long process2);
//
......@@ -1214,7 +1214,7 @@ public interface TaskListMapper {
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"police_dic.police_code ,police_dic.police_name GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," +
"DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,\n" +
"task.submit_date,FAILED_CARD.failed_card_id task_id,'废证' CARD_TYPE,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
......@@ -1228,9 +1228,9 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no " +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) "+
"where FAILED_CARD.STATE =#{process} and FAILED_CARD.work_group=#{workGroup} and FAILED_CARD.STATE!=FAILED_CARD.INITIATOR \n" +
"group by 0, police_dic.police_code, police_dic.police_name, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"group by 0, DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO, DIC_UPLOAD_UNIT_T.UNIT_NAME, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"'废证', '100', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, FAILED_CARD.ACCEPT_NO, 0,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) \n" +
"order by FAILED_CARD.FAILED_CARD_ID")
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed2(@Param("process") long process,@Param("workGroup") long workGroup);
......@@ -1242,7 +1242,7 @@ public interface TaskListMapper {
* @return
*/
@Select("select DISTINCT 0 finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,\n" +
"police_dic.police_code ,police_dic.police_name GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," +
"DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO police_code ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,\n" +
"task.submit_date,FAILED_CARD.failed_card_id task_id,'废证' CARD_TYPE,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
......@@ -1256,9 +1256,9 @@ public interface TaskListMapper {
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" +
"left join PRODYD_DBA.PROD_GROUP_T@PRODYD_LINK on PROD_GROUP_T.group_no =substr(prod_trace_t.ACCEPT_NO,0,8) " +
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
"left join ACCYD_DBA.DIC_UPLOAD_UNIT_T@ACCUYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
"where FAILED_CARD.STATE =#{process} and FAILED_CARD.STATE!=FAILED_CARD.INITIATOR \n" +
"group by 0, police_dic.police_code, police_dic.police_name, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"group by 0, DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO, DIC_UPLOAD_UNIT_T.UNIT_NAME, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"'废证', '100', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, FAILED_CARD.ACCEPT_NO, 0,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) \n" +
"order by FAILED_CARD.FAILED_CARD_ID")
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed5(@Param("process") long process);
......
package com.yxproject.start.service;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.CountDataEntity;
import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity;
......@@ -12,7 +13,7 @@ import java.util.List;
*/
public interface ImportXmlService {
public boolean importPersonXml(List<PreproPersonEntity> preproPersonEntities,FilesEntity filesEntity);
public boolean importPersonXml( List<PreproPersonDto> preproPersonDtos, FilesEntity filesEntity);
public List<CountDataEntity> queryPersonXml(String importDate, long maxNum, long minNum);
public int queryPersonXmlCount(String importDate);
}
package com.yxproject.start.service;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.PreproPersonEntity;
import java.util.List;
......@@ -21,11 +22,11 @@ public interface PreproPersonService {
public List<Map<String, Object>> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String downloadState);
public List<PreproPersonEntity> selectAllPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState);
public List<PreproPersonDto> selectAllPreproPerson( String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1, String uploadDate2, String downloadState);
public int selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1,String uploadDate2,String downloadState);
public boolean updatePreproPerson_NewFileName(List<PreproPersonEntity> preproPersonEntities);
public boolean updatePreproPerson_NewFileName(List<PreproPersonDto> preproPersonEntities);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.CountDataEntity;
import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.FilesMapper;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.ImportXmlService;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
......@@ -24,17 +36,53 @@ public class ImportXmlServiceImpl implements ImportXmlService {
/**
*
* @param preproPersonEntities
* @param preproPersonDtos
* @param filesEntity
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public boolean importPersonXml(List<PreproPersonEntity> preproPersonEntities, FilesEntity filesEntity) {
public boolean importPersonXml( List<PreproPersonDto> preproPersonDtos, FilesEntity filesEntity) {
long l = filesMapper.insertFiles(filesEntity);
for (PreproPersonEntity preproPersonEntity : preproPersonEntities) {
preproPersonEntity.setFileId(filesEntity.getId());
preproPersonMapper.savePreproPersonEntity(preproPersonEntity);
SimpleDateFormat fo = new SimpleDateFormat("YYYYMMddhhmm");
String uploadDate = fo.format(new Date());
for (PreproPersonDto preproPersonDto : preproPersonDtos) {
preproPersonDto.setFileId(filesEntity.getId());
Document document = DocumentHelper.createDocument();
Element PACKAGE = DocumentHelper.createElement("PACKAGE");
document.setRootElement(PACKAGE);
Element SDXP = PACKAGE.addElement("SDXP");
SDXP.setText(preproPersonDto.getSdxp());
Element ZWY_ZWTXSJ = PACKAGE.addElement("ZWY_ZWTXSJ");
ZWY_ZWTXSJ.setText(preproPersonDto.getZwyZwtxsj());
Element ZWY_ZWTZSJ = PACKAGE.addElement("ZWY_ZWTZSJ");
ZWY_ZWTZSJ.setText(preproPersonDto.getZwyZwtzsj());
Element ZWE_ZWTXSJ = PACKAGE.addElement("ZWE_ZWTXSJ");
ZWE_ZWTXSJ.setText(preproPersonDto.getZweZwtxsj());
Element ZWE_ZWTZSJ = PACKAGE.addElement("ZWE_ZWTZSJ");
ZWE_ZWTZSJ.setText(preproPersonDto.getZweZwtzsj());
String url = "D:\\TP_PATH_YD\\"+ uploadDate + "\\" + "ZAGL_YDZZ_" + filesEntity.getSourceFileName() + preproPersonDto.getNo() + ".xml";
try {
File file = new File(url);
if(!file.exists()){
file.getParentFile().mkdirs();
}
FileOutputStream fos = new FileOutputStream(file);
OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
OutputFormat of = new OutputFormat();
of.setEncoding("UTF-8");
of.setIndent(true);
of.setNewlines(true);
of.setNewLineAfterDeclaration(false);
XMLWriter writer = new XMLWriter(osw, of);
writer.write(document);
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
preproPersonDto.setTpPath(url);
preproPersonMapper.savePreproPersonEntity(preproPersonDto);
preproPersonMapper.savePreproPersonCLOB(preproPersonDto);
}
return true;
}
......
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.LogMapper;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.LogService;
import com.yxproject.start.service.SelectSerialNumberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.xml.crypto.Data;
import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -16,6 +19,10 @@ public class LogServiceImpl implements LogService {
@Autowired
private LogMapper logMapper;
@Autowired
private PreproPersonMapper preproPersonMapper;
@Override
public List<Map<String, Object>> selectNewFilesLog(String newFileName, String cardId, String createDate, String uploadCountyCode, long currPage, long pageSize) {
List<Map<String, Object>> resultMap= logMapper.selectNewFilesLog(newFileName,cardId,createDate,uploadCountyCode,currPage * pageSize, (currPage - 1) * pageSize + 1);
......@@ -73,12 +80,19 @@ public class LogServiceImpl implements LogService {
@Override
public boolean deleteFilesData(String id) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPath(id);
for (PreproPersonEntity preproPerson : preproPersonEntities) {
File file = new File(preproPerson.getTpPath());
file.delete();
}
logMapper.deleteFilesDataCLOB(id);
logMapper.deleteFilesData(id);
return true;
}
@Override
public boolean deleteFile(String id) {
logMapper.deleteAnalysis(id);
logMapper.deleteFile(id);
return true;
}
......
package com.yxproject.start.service.impl;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.PreproPersonService;
import com.yxproject.start.utils.YXStringUtils;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -72,13 +80,37 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @param SSXQDM
* @param cardType
* @param state
* @param uploadDate
* @param uploadDate1
* @return
*/
@Override
public List<PreproPersonEntity> selectAllPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String downloadState) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPersonCount(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate),downloadState);
return preproPersonEntities;
public List<PreproPersonDto> selectAllPreproPerson( String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate1, String uploadDate2, String downloadState){
List<PreproPersonDto> preproPersonDtos = preproPersonMapper.selectPreproPerson2(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate1), replace(uploadDate2),downloadState);
List<PreproPersonDto> preproPersonDto = new ArrayList<>();
for (PreproPersonDto preproPerson : preproPersonDtos) {
File file = new File(preproPerson.getTpPath());
if(file.exists()){
try {
InputStream input = new FileInputStream(file);
String date = YXStringUtils.inputStream2String(input, "utf-8");
Document document = DocumentHelper.parseText(date);
Element root = document.getRootElement();
preproPerson.setSdxp(root.element("SDXP").getStringValue());
preproPerson.setZwyZwtxsj(root.element("ZWY_ZWTXSJ").getStringValue());
preproPerson.setZwyZwtzsj(root.element("ZWY_ZWTZSJ").getStringValue());
preproPerson.setZweZwtxsj(root.element("ZWE_ZWTXSJ").getStringValue());
preproPerson.setZweZwtzsj(root.element("ZWE_ZWTZSJ").getStringValue());
preproPersonDto.add(preproPerson);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (DocumentException e) {
e.printStackTrace();
}
}
}
return preproPersonDtos;
}
/**
......@@ -90,7 +122,6 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @param SSXQDM
* @param cardType
* @param state
* @param uploadDate
* @return
*/
@Override
......@@ -125,8 +156,8 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @return
*/
@Override
public boolean updatePreproPerson_NewFileName(List<PreproPersonEntity> preproPersonEntities) {
for (PreproPersonEntity preproPersonEntity: preproPersonEntities) {
public boolean updatePreproPerson_NewFileName(List<PreproPersonDto> preproPersonEntities) {
for (PreproPersonDto preproPersonEntity: preproPersonEntities) {
preproPersonMapper.updateNewFileName(preproPersonEntity);
}
......
......@@ -232,12 +232,14 @@ public class ReceiptServiceImpl implements ReceiptService {
@Override
public List<Map<String, Object>> queryPoliceName(String qrCode) {
List<Map<String, Object>> mapList = receiptMapper.queryPoliceName(qrCode.substring(0,8));
if (qrCode!=null){
qrCode=qrCode+"%";
}
List<Map<String, Object>> mapList = receiptMapper.queryPoliceName(qrCode);
List<Map<String,Object>> maps = new ArrayList<>();
if (mapList.size()>0){
maps.add(mapList.get(0));
}
return maps;
}
......
......@@ -205,25 +205,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String num1=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(num1.substring(1, num1.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(((((countyMapList.get(i)).get("GROUP_NO")) + "").replace("E","").replace("G","")));
String num2=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((num2.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("countyCode", county);
countyMapGroup.put("dealFlag", dealFlag);
......@@ -329,24 +331,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String str=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(str.substring(1, str.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + ""));
String str=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((str.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("countyCode", county);
countyMapGroup.put("dealFlag", dealFlag);
......@@ -733,7 +738,12 @@ public class TaskListServiceImpl implements TaskListService {
if (list.size()>0){
Map<String, Object> stringObjectMap = list.get(0);
TaskEntity taskEntity = new TaskEntity();
taskEntity.setCardType(Long.valueOf(stringObjectMap.get("CARD_TYPE_ID") + ""));
String cardType =String.valueOf(stringObjectMap.get("CARD_TYPE_ID"));
if(cardType.equals(String.valueOf(0))){
taskEntity.setCardType(Long.valueOf(8));
}else {
taskEntity.setCardType(Long.valueOf(stringObjectMap.get("CARD_TYPE_ID") + ""));
}
taskEntity.setCountyCode(stringObjectMap.get("COUNTY_CODE") + "");
taskEntity.setSubmitName(submitName);
taskEntity.setTaskStateId(Long.valueOf(process));
......@@ -1327,41 +1337,73 @@ public class TaskListServiceImpl implements TaskListService {
return taskListMapper.deletePolice(policeCode);
}
private String createGroupNoMiss(List<String> c, List<String> nsList) {
try {
String groupNo = "";
c.add(nsList.get(0));
for (int i = 0; i < nsList.size() - 1; ++i) {
String t = nsList.get(i);
String n = nsList.get(i + 1);
String l = String.valueOf(Integer.parseInt(t.substring(1,8))+1);
String m = n.substring(1,8);
if (l.equals(m)) {
c.add(nsList.get(i + 1));
} else {
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
// private String createGroupNoMiss(List<String> c, List<String> nsList) {
// try {
// String groupNo = "";
// c.add(nsList.get(0));
// for (int i = 0; i < nsList.size() - 1; ++i) {
// String t = nsList.get(i);
// String n = nsList.get(i + 1);
// String l = String.valueOf(Integer.parseInt(t.substring(1,7))+1);
//
// String m = String.valueOf(Integer.parseInt(n.substring(1,7)+1));
// if (l.equals(m)) {
// c.add(nsList.get(i + 1));
// } else {
// if (c.size() >= 1) {
// if (c.size() == 1) {
// groupNo += c.get(0) + ",";
// } else {
// groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
// }
// }
// c.clear();
// c.add(nsList.get(i + 1));
// }
// }
// if (c.size() >= 1) {
// if (c.size() == 1) {
// groupNo += c.get(0) + ",";
// } else {
// groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
// }
// }
// return groupNo;
// } catch (Exception e) {
// }
// return "";
// }
private String createGroupNo(List<Integer> c, List<Integer> nsList) {
try {
String groupNo = "";
c.add(nsList.get(0));
for (int i = 0; i < nsList.size() - 1; ++i) {
if (nsList.get(i) + 1 == nsList.get(i + 1)) {
c.add(nsList.get(i + 1));
} else {
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
c.clear();
c.add(nsList.get(i + 1));
}
c.clear();
c.add(nsList.get(i + 1));
}
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
}
if (c.size() >= 1) {
if (c.size() == 1) {
groupNo += c.get(0) + ",";
} else {
groupNo += c.get(0) + "-" + c.get(c.size() - 1) + ",";
}
return groupNo;
} catch (Exception e) {
}
return "";
return groupNo;
} catch (Exception e) {
}
return "";
}
private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
......@@ -1431,24 +1473,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(num.substring(1, num.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(((((countyMapList.get(i)).get("GROUP_NO")) + "").replace("E","").replace("G","")));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((num.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("faileCount", faileCount);
countyMapGroup.put("specialCount", specialCount);
......@@ -1544,24 +1589,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(num.substring(1, num.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(((((countyMapList.get(i)).get("GROUP_NO")) + "").replace("E","").replace("G","")));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((num.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("faileCount", faileCount);
countyMapGroup.put("specialCount", specialCount);
......@@ -1660,24 +1708,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(num.substring(1, num.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(((((countyMapList.get(i)).get("GROUP_NO")) + "").replace("E","").replace("G","")));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((num.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("faileCount", faileCount);
countyMapGroup.put("specialCount", specialCount);
......@@ -1769,24 +1820,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(num.substring(1, num.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(((((countyMapList.get(i)).get("GROUP_NO")) + "").replace("E","").replace("G","")));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((num.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("specialCount", specialCount);
countyMapGroup.put("countyCode", countyCode);
......@@ -1874,24 +1928,27 @@ public class TaskListServiceImpl implements TaskListService {
if (countyMapList.size() == 1) {
countyMapGroup.put("groupNum", countyMapList.get(0).get("GROUP_NO"));
} else {
List<String> c = new ArrayList<>();
List<String> nsList = new ArrayList<>();
List<Integer> c = new ArrayList<>();
List<Integer> nsList = new ArrayList<>();
for (int i = 0; i < countyMapList.size(); i++) {
/**
* 判断组号中时候含有历史回迁组
*/
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").contains("L")) {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add((((countyMapList.get(i)).get("GROUP_NO")) + "").substring(1, (((countyMapList.get(i)).get("GROUP_NO")) + "").length()));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf(num.substring(1, num.length())));
}
} else {
if ((((countyMapList.get(i)).get("GROUP_NO")) + "").length() == 8) {
nsList.add(((((countyMapList.get(i)).get("GROUP_NO")) + "").replace("E","").replace("G","")));
//nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
String num=(countyMapList.get(i)).get("GROUP_NO").toString();
nsList.add(Integer.valueOf((num.replace("E","").replace("G",""))));
// nsList.add(Integer.parseInt((((countyMapList.get(i)).get("GROUP_NO")) + "")));
}
}
}
countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
// countyMapGroup.put("groupNum", createGroupNoMiss(c, nsList));
countyMapGroup.put("groupNum", createGroupNo(c, nsList));
}
countyMapGroup.put("specialCount", specialCount);
countyMapGroup.put("countyCode", countyCode);
......
package com.yxproject.start.utils;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import org.dom4j.Document;
......@@ -21,7 +22,7 @@ public class IDCardFactory {
public Map<String, Object> extractIDCard(String file,Date date) throws Exception {
Map<String,Object> resultMap = new HashMap<>();
List<PreproPersonEntity> preproPersonEntityList = new ArrayList<>();
List<PreproPersonDto> preproPersonEntityList = new ArrayList<>();
FilesEntity filesEntity = new FilesEntity();
try {
Document document = DocumentHelper.parseText(file);
......@@ -41,8 +42,9 @@ public class IDCardFactory {
filesEntity.setCreateTime(packagehead.element("SCSJ").getTextTrim());
List<Element> recordlist = records.elements("RECORD");
for (Element e : recordlist) {
PreproPersonEntity preproPersonEntity = new PreproPersonEntity();
PreproPersonDto preproPersonEntity = new PreproPersonDto();
preproPersonEntity.setSid(e.attributeValue("sid"));
preproPersonEntity.setNo(e.attributeValue("no"));
preproPersonEntity.setJmsfzslh( e.element("JMSFZSLH").getStringValue());
preproPersonEntity.setGmsfhm(e.element("GMSFHM").getStringValue());
preproPersonEntity.setXm(e.element("XM").getStringValue());
......
......@@ -24,9 +24,10 @@ public class QuerySequenceSercive {
//
// }
// return mapList.get(0).get("NUM2").toString();
int i = querySequenceMapper.selectSequenceNextValue(sequenceName + ".nextval");
System.out.println(i);
return null;
List<Map<String, Object>> maps = querySequenceMapper.selectSequenceNextValue(sequenceName + ".nextval");
Object sequencename = maps.get(0).get("SEQUENCENAME");
System.out.println(maps.get(0).get("SEQUENCENAME"));
return sequencename+"";
}
......
server:
port: 8082
#spring相关
#spring相关+
spring:
datasource:
driver-class-name: oracle.jdbc.driver.OracleDriver
......
### 设置###
### ����###
log4j.rootLogger = debug,stdout,D,E
log4j.appenderRefs = ${appenders}
log4j.appenderRef.console.ref = STDOUT
log4j.appenderRef.rollingFileAppender.ref = rollingFile
### 输出信息到控制台 ###
### �����Ϣ������̨ ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
### 输出DEBUG 级别以上的日志到=E://logs/error.log ###
### ���DEBUG �������ϵ���־��=E://logs/error.log ###
log4j.appender.D = com.yxproject.start.utils.MyDailyRollingFileAppender
log4j.appender.D.File = ./logs/debug.log
log4j.appender.D.File = ./logs/YdDebug.log
log4j.appender.D.Append = true
log4j.appender.D.Threshold = DEBUG
log4j.appender.D.MaxFileSize=20MB
......@@ -21,17 +21,18 @@ log4j.appender.D.DatePattern = '_'yyyy-MM-dd'.log'
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%X{ip}] [ %t:%r ] - [ %p ] %l %m%n
### 输出ERROR 级别以上的日志到=E://logs/error.log ###
### ���ERROR �������ϵ���־��=E://logs/error.log ###
log4j.appender.E = com.yxproject.start.utils.MyDailyRollingFileAppender
log4j.appender.E.File =./logs/error.log
log4j.appender.E.File =./logs/YdError.log
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.MaxFileSize=20MB
log4j.appender.E.DatePattern = '_'yyyy-MM-dd'.log'
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%X{ip}] [ %t:%r ] - [ %p ] %l %m%n
###印SQL###
###��ӡSQL###
log4j.logger.org.mybatis = DEBUG
log4j.logger.java.sql = DEBUG
log4j.logger.java.sql.Statement = DEBUG
......
......@@ -5,20 +5,24 @@
<table class="table table-hover">
<thead>
<th>NO.</th>
<th>受理号</th>
<th>身份证号</th>
<th>姓名</th>
<th>性别</th>
<th>起始有效期</th>
<th>类型</th>
</thead>
<tbody>
<tr ng-repeat="item in personInfo">
<td>{{$index + 1}}</td>
<td>{{item.ACCEPT_NO}}</td>
<td>{{item.ID_NO}}</td>
<td ng-if="item.NAME=='查无此人'" style="color: red;">{{item.NAME}}</td>
<td ng-if="item.NAME!='查无此人'">{{item.NAME}}</td>
<td ng-if="item.SEX_NO==1"></td>
<td ng-if="item.SEX_NO==2"></td>
<td ng-if="item.SEX_NO==-1">错误</td>
<td>{{item.BEGIN_DATE}}</td>
<td ng-if="item.SPECIAL_TYPE==2" class="text-danger">快证</td>
<td ng-if="item.SPECIAL_TYPE==1" class="text-danger">余证</td>
<td ng-if="item.FAILED_CARD_REASON!=null" class="text-danger">废证</td>
......
......@@ -561,14 +561,11 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
getTaskListToCreate:function(groupNo1,groupNo2,date,success){
console.log($rootScope.loginData.roleList[0].process,groupNo1,groupNo2,date);
getTaskListToCreate:function(date,success){
$http({
method: 'GET',
url: "../TaskList/queryByCountyAtACCU"+urlTimeStamp(),
params:{
groupNo1:groupNo1,
groupNo2:groupNo2,
process:$rootScope.loginData.roleList[0].process,
date:date
}
......@@ -577,7 +574,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
getCreateHistoryTask:function(date,success){
console.log(date)
$http({
method: 'GET',
url: "../TaskList/queryHistoryTaskAtAuxiliary"+urlTimeStamp(),
......@@ -1238,7 +1234,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
getPoliceName:function(policeCode,success) {
console.log(policeCode+"========================")
$http({
method: 'GET',
url: "../ReceiptApi/queryPoliceName"+urlTimeStamp(),
......
......@@ -12,7 +12,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
var body = {
color: ['#003366', '#006699', '#4cabce', '#e5323e'],
title : {
text: ' 北京市公安局 '+data.date+' 年地证制证生产情况',
text: ' 北京市公安局 '+data.date+' 年地证制证生产情况',
subtext: '人次数量'
},
//提示框组件
......@@ -24,7 +24,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
type: 'scroll',
orient: 'horizontal',
x: 'right',
data: ['普通证','港澳','台湾','废证']
data: ['异地证','港澳','台湾','废证']
},
//拖拽时,是否实时更新。
calculable: true,
......@@ -51,7 +51,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
//数值
series: [
{
name: '普通证',
name: '异地证',
type: 'bar',
barGap: 0,
label: labelprov,
......
......@@ -64,7 +64,7 @@
身份证号:
</td>
<td>
<input type="text" placeholder="请填写身份证号" class="{{$index}}" style="height: 34px;">
<input type="text" placeholder="请填写身份证号" class="{{$index}}" style="height: 34px;width: 100%;">
</td>
<td>
废证原因:
......
<section class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="box ">
<div class="box-header">
<strong>制证统计</strong>
<div class="pull-right col-md-2" >
<input class="form-control col-md-1"
style="width: 70px;height: 20px;"
ng-model="year"
ng-change="changeYear()">
<span class="col-md-1"></span>
</div>
</div>
<div class="box box-primary">
<div style="text-align: center;">
<!--通过率统计图-->
<div class="row" >
<div class="col-md-12">
<div class="yx-div-header"></div>
<div id="diagram_item_ratio_certification" style="height:500px;"></div>
</div>
</div>
</div>
<div class="box-header">
<strong>制证量柱状图</strong>
<div class="pull-right col-md-2" >
<input class="form-control col-md-1"
style="width: 70px;height: 20px;"
ng-model="year"
ng-change="changeYear()">
<span class="col-md-1"></span>
</div>
</div>
<div class="box box-primary" style="min-height: 600px;padding-top: 57px;padding-left: 25px;" >
<div style="text-align: center;">
<div class="row">
<div class="col-md-12">
<div class="yx-div-header"></div>
<div id="diagram_item_ratio_certification" style="height:500px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
\ No newline at end of file
......@@ -29,7 +29,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.totalCardProd = 0;
$scope.isHistory=0;
//用于区分制证库保存或者受理库保存数据
$scope.type="ACCU";
//查询制证库
$scope.searchCurrentFromProd = function () {
if(angular.isUndefined($scope.groupNo1)||angular.isUndefined($scope.groupNo2)){
......@@ -50,7 +50,9 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.type="PRODU";
}
};
//查询受理库
$scope.searchCurrent = function(){
$scope.type="ACCU";
$scope.totalCardProd = 0;
$scope.selected = [];
$scope.isHistory=0;
......@@ -58,7 +60,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
if(date=='{{choseDate}}'){
date=$scope.choseDate;
}
HttpService.getTaskListToCreate($scope.groupNo1,$scope.groupNo2,date,function(data){
HttpService.getTaskListToCreate(date,function(data){
$scope.cycleSheetData = data;
for(var i=0;i<$scope.cycleSheetData.length;i++){
$scope.totalCardProd = $scope.totalCardProd+$scope.cycleSheetData[i].typeSum;
......@@ -71,7 +73,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
console.log("当天:",$scope.cycleSheetData)
})
$scope.type="PRODU";
};
if($rootScope.loginData.login==true){
$scope.searchCurrent();
......
......@@ -46,16 +46,6 @@
<td class="text-danger">废品</td>
<td>成品</td>
<td class="text-danger">废品</td>
<td>成品</td>
<td class="text-danger">废品</td>
<td>成品</td>
<td class="text-danger">废品</td>
<td>成品</td>
<td class="text-danger">废品</td>
<td>成品</td>
<td class="text-danger">废品</td>
<td>成品</td>
<td class="text-danger">废品</td>
<td>数量</td>
</tr>
</thead>
......
......@@ -56,8 +56,9 @@
</thead>
<tbody ng-repeat="task in type.countyList">
<tr>
<td ng-show="type.typeCode=='100'||(task.faileCount==0&&(task.countyValidCount-task.specialCount)==task.eWriteCount&&task.eWriteCount==task.recheckCount)">
<input type="checkbox" class="checkOneBox"
<td >
<input ng-if="type.typeCode=='100'||(task.faileCount==0&&task.countyValidCount==task.eWriteCount)"
type="checkbox" class="checkOneBox"
ng-checked="isSelected(task)" value="{{task.taskId}}"
ng-click="updateSelection($event,task)">
</td>
......
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