Commit 54af534e authored by liboyang's avatar liboyang

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

parents 0bd0ffe7 f392db40
...@@ -77,6 +77,8 @@ public class FailedCardApi { ...@@ -77,6 +77,8 @@ public class FailedCardApi {
map.put("ID_NO", o.toString()); map.put("ID_NO", o.toString());
map.put("NAME", "查无此人"); map.put("NAME", "查无此人");
map.put("SEX_NO", "-1"); map.put("SEX_NO", "-1");
map.put("SEX_NO", "-1");
map.put("ACCEPT_NO", "");
resultMap.add(map); resultMap.add(map);
} }
resultList.addAll(resultMap); resultList.addAll(resultMap);
......
...@@ -13,10 +13,9 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,10 +13,9 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List; import static com.yxproject.start.utils.YXStringUtils.getCurrentDate2String;
import java.util.Map;
@RestController @RestController
...@@ -174,8 +173,7 @@ public class LogApi { ...@@ -174,8 +173,7 @@ public class LogApi {
MDC.put("ip", remoteAddr); MDC.put("ip", remoteAddr);
try { try {
logService.changeCardType(printDate, fileId); logService.changeCardType(printDate, fileId);
SimpleDateFormat df=new SimpleDateFormat("yyyyMMddhhmmss"); logService.insertAnalysisDate(getCurrentDate2String("yyyyMMddhhmmss"), fileId);
logService.insertAnalysisDate(df.format(new Date()), fileId);
//查询XML文件信息 //查询XML文件信息
List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate); List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate);
//查询Excel文件信息 //查询Excel文件信息
...@@ -218,15 +216,18 @@ public class LogApi { ...@@ -218,15 +216,18 @@ public class LogApi {
public boolean deleteFiles(@RequestParam("uploadTime")String uploadTime, HttpServletRequest requ) { public boolean deleteFiles(@RequestParam("uploadTime")String uploadTime, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr(); String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr); MDC.put("ip", remoteAddr);
List<String> idList =new ArrayList <String>(); Map<String, Object> map = null;
map = new LinkedHashMap<>();
try { try {
idList = logService.selectId(uploadTime); List<String> idList = logService.selectId(replaceDate(uploadTime));
for (int i=0;i<idList.size();i++){ for (int i = 0; i < idList.size(); i++) {
logService.deleteFilesData(idList.get(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)); logService.deleteFile(idList.get(i));
} }
map.put("state", 1);
map.put("msg", "成功删除");
}catch (Exception e){ }catch (Exception e){
logger.error("导入时间:" + uploadTime); logger.error("导入时间:" + uploadTime);
logger.error("Exception 解析异常", e); logger.error("Exception 解析异常", e);
......
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.CountDataEntity; import com.yxproject.start.entity.CountDataEntity;
import com.yxproject.start.entity.FilesEntity; import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
...@@ -9,6 +10,7 @@ import com.yxproject.start.utils.YXJSONResponse; ...@@ -9,6 +10,7 @@ import com.yxproject.start.utils.YXJSONResponse;
import com.yxproject.start.utils.YXStringUtils; import com.yxproject.start.utils.YXStringUtils;
import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.log4j.MDC; import org.apache.log4j.MDC;
import org.dom4j.DocumentException; import org.dom4j.DocumentException;
...@@ -84,8 +86,8 @@ public class ReadXmlApi { ...@@ -84,8 +86,8 @@ public class ReadXmlApi {
// 如果fileitem中封装的是普通输入项的数据 // 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件 // 如果fileitem中封装的是上传文件
// 得到上传的文件名称 // 得到上传的文件名称
filename = item.getName(); filename = item.getOriginalFilename();
if (filename == null || filename.trim().equals("")) { if (StringUtils.isBlank(filename)) {
continue; continue;
} }
InputStream in = item.getInputStream(); InputStream in = item.getInputStream();
...@@ -133,7 +135,7 @@ public class ReadXmlApi { ...@@ -133,7 +135,7 @@ public class ReadXmlApi {
} }
private Boolean idcardsFactory(Map<String, Object> map1) { 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; return true;
} }
......
...@@ -47,18 +47,18 @@ public class UserApi { ...@@ -47,18 +47,18 @@ public class UserApi {
} catch (UnknownAccountException e) { } catch (UnknownAccountException e) {
resultMap.put("status", 201); resultMap.put("status", 201);
resultMap.put("message", "账号不存在!"); resultMap.put("message", "账号不存在!");
logger.error("不存在的用户名:" + username); // logger.error("不存在的用户名:" + username);
logger.error("", e); // logger.error("", e);
} catch (IncorrectCredentialsException e1) { } catch (IncorrectCredentialsException e1) {
resultMap.put("status", 202); resultMap.put("status", 202);
resultMap.put("message", "密码错误!"); resultMap.put("message", "密码错误!");
logger.error("用户密码错误,用户名:" + username + "错误密码:" + password); // logger.error("用户密码错误,用户名:" + username + "错误密码:" + password);
logger.error("", e1); // logger.error("", e1);
} catch (Exception e) { } catch (Exception e) {
resultMap.put("status", 500); resultMap.put("status", 500);
resultMap.put("message", "用户名密码错误"); resultMap.put("message", "用户名密码错误");
logger.error("用户名错误:" + username + "错误密码:" + password); // logger.error("用户名错误:" + username + "错误密码:" + password);
logger.error("Exception 用户登录异常", e); // logger.error("Exception 用户登录异常", e);
} }
return resultMap; 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 { ...@@ -40,6 +40,7 @@ public class PreproPersonEntity {
private Long state; private Long state;
private long id; private long id;
private long isValid; private long isValid;
private String tpPath;
@Id @Id
@Column(name = "ID") @Column(name = "ID")
...@@ -339,6 +340,16 @@ public class PreproPersonEntity { ...@@ -339,6 +340,16 @@ public class PreproPersonEntity {
public void setIsValid(long isValid) { public void setIsValid(long isValid) {
this.isValid = isValid; this.isValid = isValid;
} }
@Basic
@Column(name = "TP_PATH")
public String getTpPath() {
return tpPath;
}
public void setTpPath(String tpPath) {
this.tpPath = tpPath;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
...@@ -373,11 +384,12 @@ public class PreproPersonEntity { ...@@ -373,11 +384,12 @@ public class PreproPersonEntity {
Objects.equals(newFileId, that.newFileId) && Objects.equals(newFileId, that.newFileId) &&
Objects.equals(id, that.id) && Objects.equals(id, that.id) &&
Objects.equals(isValid, that.isValid) && Objects.equals(isValid, that.isValid) &&
Objects.equals(state, that.state); Objects.equals(state, that.state)&&
Objects.equals(tpPath, that.tpPath);
} }
@Override @Override
public int hashCode() { 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 { ...@@ -33,8 +33,8 @@ public interface DataAuditingMapper {
public List<Map<String, Object>> selectDataAuditingEntity(@Param("groupNo") String groupNo); public List<Map<String, Object>> selectDataAuditingEntity(@Param("groupNo") String groupNo);
@Select("<script>" + @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" + "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,to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') SUBMIT_DATE,CARD_TYPE_DIC.CARD_TYPE,\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" + "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 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 " + "left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE " +
...@@ -50,7 +50,7 @@ public interface DataAuditingMapper { ...@@ -50,7 +50,7 @@ public interface DataAuditingMapper {
" and TASK.CARD_TYPE = ${typeCode}"+ " and TASK.CARD_TYPE = ${typeCode}"+
"</if> " + "</if> " +
" and to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') BETWEEN ${startDate} and ${endDate} \n" + " 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" + "order by DATA_AUDITING.POLICE_SUBSTATION" +
"</script>") "</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); 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 { ...@@ -32,7 +32,8 @@ public interface FailedCardMapper {
"PROD_CARD_T.SEX_NO,\n" + "PROD_CARD_T.SEX_NO,\n" +
"PROD_CARD_T.ID_NO,\n" + "PROD_CARD_T.ID_NO,\n" +
"SPECIAL_CARD.SPECIAL_TYPE, " + "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" + "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 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 " + "left join failed_card on PROD_CARD_T.ACCEPT_NO = failed_card.ACCEPT_NO " +
......
...@@ -70,16 +70,16 @@ public interface GroupNoMapper { ...@@ -70,16 +70,16 @@ public interface GroupNoMapper {
"PROD_GROUP_T.valid_count,\n" + "PROD_GROUP_T.valid_count,\n" +
"PROD_GROUP_T.invalid_count, \n" + "PROD_GROUP_T.invalid_count, \n" +
"'000000' county_code\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" + "left join PREPRO_PERSON \n" +
"on PREPRO_PERSON.JMSFZSLH = PROD_CARD_T.upload_no\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" + "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" + "on PROD_GROUP_RELATION_T.group_no =PROD_GROUP_T.group_no \n" +
"left join CARD_TYPE_DIC \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" + "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); public List<Map<String,Object>> selectGroupAtPRODUByGroupNo(@Param("groupNo") String groupNo);
/** /**
......
...@@ -18,12 +18,12 @@ public interface LogMapper { ...@@ -18,12 +18,12 @@ public interface LogMapper {
"\n") "\n")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate); 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 " + "FROM PREPRO_PERSON p " +
"LEFT JOIN FILES f ON p.FILE_ID = f.ID " + "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" + "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} " + "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); public List<Map<String,Object>> checkAcppetNo(@Param("uploadDate") String uploadDate);
...@@ -156,9 +156,15 @@ public interface LogMapper { ...@@ -156,9 +156,15 @@ public interface LogMapper {
@Select("select id from files where TO_CHAR(UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss') = #{uploadTime}") @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); 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); 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}") @Delete("delete from files where id=#{id}")
public boolean deleteFile(@Param("id")String id); public boolean deleteFile(@Param("id")String id);
......
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
...@@ -12,12 +13,16 @@ import java.util.Map; ...@@ -12,12 +13,16 @@ import java.util.Map;
@Mapper @Mapper
public interface PreproPersonMapper { public interface PreproPersonMapper {
/*导入XMl*/ /*导入XMl*/
@Insert("INSERT INTO PREPRO_PERSON (JMSFZSLH,GMSFHM,XM,XBDM,MZDM,CSRQ,SSXQDM,DZMC,SDXP,ZWY_ZWTXSJ,ZWY_ZWTZSJ,ZWE_ZWTXSJ,ZWE_ZWTZSJ," + @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)" + "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},#{sdxp},#{zwyZwtxsj},#{zwyZwtzsj},#{zweZwtxsj}," + "VALUES(#{jmsfzslh},#{gmsfhm},#{xm},#{xbdm},#{mzdm},#{csrq},#{ssxqdm},#{dzmc},#{qfjgGajgmc},#{yxqqsrq},#{yxqjzrq},#{jmsfzslyydm},#{jmsfzzzlxdm},#{jmsfzlzfsdm},#{sjrXm},#{sjrLxdh},#{sjrYzbm}," +
"#{zweZwtzsj},#{qfjgGajgmc},#{yxqqsrq},#{yxqjzrq},#{jmsfzslyydm},#{jmsfzzzlxdm},#{jmsfzlzfsdm},#{sjrXm},#{sjrLxdh},#{sjrYzbm}," + "#{sjrTxdz},#{sid},#{fileId},#{tpPath})")
"#{sjrTxdz},#{sid},#{fileId})") @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean savePreproPersonEntity(PreproPersonEntity personEntity); 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}") @Update("UPDATE PREPRO_PERSON SET IS_POST=#{isPost} where JMSFZSLH=#{jmsfzslh}")
...@@ -141,6 +146,54 @@ public interface PreproPersonMapper { ...@@ -141,6 +146,54 @@ public interface PreproPersonMapper {
" </script>"}) " </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); 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> " + @Select({"<script> " +
...@@ -186,7 +239,7 @@ public interface PreproPersonMapper { ...@@ -186,7 +239,7 @@ public interface PreproPersonMapper {
public boolean updateState(@Param("state") String state, @Param("acceptNo") String acceptNo); public boolean updateState(@Param("state") String state, @Param("acceptNo") String acceptNo);
@Update("UPDATE PREPRO_PERSON SET NEW_FILE_ID=#{newFileId} where JMSFZSLH=#{jmsfzslh}") @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 { ...@@ -208,4 +261,7 @@ public interface PreproPersonMapper {
"UNION all \n" + "UNION all \n" +
"select UPLOAD_NO,ACCEPT_NO from PRODYD_DBA.PROD_CARD_T@PRODYD_LINK WHERE ACCEPT_NO =#{acceptNo}") "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); 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; ...@@ -13,6 +13,6 @@ import java.util.Map;
*/ */
@Mapper @Mapper
public interface QuerySequenceMapper { public interface QuerySequenceMapper {
@Select("select #{sequenceName} from dual") @Select("select ${sequenceName} sequenceName from dual")
public int selectSequenceNextValue(@Param("sequenceName") String sequenceName); public List<Map<String,Object>> selectSequenceNextValue(@Param("sequenceName") String sequenceName);
} }
...@@ -179,9 +179,12 @@ public interface ReceiptMapper { ...@@ -179,9 +179,12 @@ public interface ReceiptMapper {
"WHERE ACCEPT_NO=#{groupNo}") "WHERE ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectCountTimeT(@Param("groupNo") String 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" + @Select("SELECT POLICE_CODE,POLICE_NAME,COUNT(*) \n" +
"left join POLICE_dic on substr(POLICE_dic.POLICE_CODE,0,8) = substr(PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO,0,8)\n" + "FROM PRODYD_DBA.PROD_CARd_T@PRODYD_LINK \n" +
"where group_no = #{policeCode} ") "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); public List<Map<String,Object>> queryPoliceName(@Param("policeCode") String policeCode);
@Select("select \n" + @Select("select \n" +
......
...@@ -116,7 +116,7 @@ public interface SelectSerialNumberMapper { ...@@ -116,7 +116,7 @@ public interface SelectSerialNumberMapper {
"from TASK \n" + "from TASK \n" +
"LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE \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 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" + "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" + "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" + "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 { ...@@ -131,7 +131,7 @@ public interface SelectSerialNumberMapper {
"LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE \n" + "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 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 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" + "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" + "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" + "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 { ...@@ -144,16 +144,16 @@ public interface SelectSerialNumberMapper {
"ACC_CARD_T.NAME,\n" + "ACC_CARD_T.NAME,\n" +
"ACC_CARD_T.ID_NO,\n" + "ACC_CARD_T.ID_NO,\n" +
"ACC_CARD_T.SEX_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" + "ACC_CARD_T.BEGIN_DATE,\n" +
"decode(ACC_CARD_T.EXPIRE_DATE,'00000000','长期',ACC_CARD_T.EXPIRE_DATE) EXPIRE_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" + "ACC_CARD_T.SIGN_GOVT POLICE_NAME\n" +
"FROM ACCUYD_DBA.ACC_CARD_T@ACCUYD_LINK\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 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 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 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 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 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 police_dic on ACC_GROUP_RELATION_T.UPLOAD_UNIT_NO = police_dic.POLICE_CODE " + "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}") "WHERE ACC_CARD_T.ACCEPT_NO =#{id} OR ACC_CARD_T.ID_NO =#{id}")
public List<Map<String,Object>> selectByAcceptNoOrCardIdFromACC(String id); public List<Map<String,Object>> selectByAcceptNoOrCardIdFromACC(String id);
...@@ -161,14 +161,13 @@ public interface SelectSerialNumberMapper { ...@@ -161,14 +161,13 @@ public interface SelectSerialNumberMapper {
"PROD_CARD_T.ID_NO,PROD_CARD_T.SEX_NO,\n" + "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,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" + "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" + "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" +
",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 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 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_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 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}") "WHERE PROD_CARD_T.ACCEPT_NO =#{id} OR PROD_CARD_T.ID_NO =#{id}")
public List<Map<String,Object>> selectByAcceptNoOrCardIdFromPROD(String id); public List<Map<String,Object>> selectByAcceptNoOrCardIdFromPROD(String id);
} }
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.CountDataEntity; import com.yxproject.start.entity.CountDataEntity;
import com.yxproject.start.entity.FilesEntity; import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
...@@ -12,7 +13,7 @@ import java.util.List; ...@@ -12,7 +13,7 @@ import java.util.List;
*/ */
public interface ImportXmlService { 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 List<CountDataEntity> queryPersonXml(String importDate, long maxNum, long minNum);
public int queryPersonXmlCount(String importDate); public int queryPersonXmlCount(String importDate);
} }
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
import java.util.List; import java.util.List;
...@@ -21,11 +22,11 @@ public interface PreproPersonService { ...@@ -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<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 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; package com.yxproject.start.service.impl;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.CountDataEntity; import com.yxproject.start.entity.CountDataEntity;
import com.yxproject.start.entity.FilesEntity; import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.FilesMapper; import com.yxproject.start.mapper.FilesMapper;
import com.yxproject.start.mapper.PreproPersonMapper; import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.ImportXmlService; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; 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; import java.util.List;
/** /**
...@@ -24,17 +36,53 @@ public class ImportXmlServiceImpl implements ImportXmlService { ...@@ -24,17 +36,53 @@ public class ImportXmlServiceImpl implements ImportXmlService {
/** /**
* *
* @param preproPersonEntities * @param preproPersonDtos
* @param filesEntity * @param filesEntity
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @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); long l = filesMapper.insertFiles(filesEntity);
for (PreproPersonEntity preproPersonEntity : preproPersonEntities) { SimpleDateFormat fo = new SimpleDateFormat("YYYYMMddhhmm");
preproPersonEntity.setFileId(filesEntity.getId()); String uploadDate = fo.format(new Date());
preproPersonMapper.savePreproPersonEntity(preproPersonEntity); 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; return true;
} }
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyDicEntity; import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.LogMapper; import com.yxproject.start.mapper.LogMapper;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.LogService; import com.yxproject.start.service.LogService;
import com.yxproject.start.service.SelectSerialNumberService; import com.yxproject.start.service.SelectSerialNumberService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.xml.crypto.Data; import javax.xml.crypto.Data;
import java.io.File;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -16,6 +19,10 @@ public class LogServiceImpl implements LogService { ...@@ -16,6 +19,10 @@ public class LogServiceImpl implements LogService {
@Autowired @Autowired
private LogMapper logMapper; private LogMapper logMapper;
@Autowired
private PreproPersonMapper preproPersonMapper;
@Override @Override
public List<Map<String, Object>> selectNewFilesLog(String newFileName, String cardId, String createDate, String uploadCountyCode, long currPage, long pageSize) { 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); 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 { ...@@ -73,12 +80,19 @@ public class LogServiceImpl implements LogService {
@Override @Override
public boolean deleteFilesData(String id) { 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); logMapper.deleteFilesData(id);
return true; return true;
} }
@Override @Override
public boolean deleteFile(String id) { public boolean deleteFile(String id) {
logMapper.deleteAnalysis(id);
logMapper.deleteFile(id); logMapper.deleteFile(id);
return true; return true;
} }
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.PreproPersonMapper; import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.PreproPersonService; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -72,13 +80,37 @@ public class PreproPersonServiceImpl implements PreproPersonService { ...@@ -72,13 +80,37 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @param SSXQDM * @param SSXQDM
* @param cardType * @param cardType
* @param state * @param state
* @param uploadDate * @param uploadDate1
* @return * @return
*/ */
@Override @Override
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){
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPersonCount(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate),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);
return preproPersonEntities; 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 { ...@@ -90,7 +122,6 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @param SSXQDM * @param SSXQDM
* @param cardType * @param cardType
* @param state * @param state
* @param uploadDate
* @return * @return
*/ */
@Override @Override
...@@ -125,8 +156,8 @@ public class PreproPersonServiceImpl implements PreproPersonService { ...@@ -125,8 +156,8 @@ public class PreproPersonServiceImpl implements PreproPersonService {
* @return * @return
*/ */
@Override @Override
public boolean updatePreproPerson_NewFileName(List<PreproPersonEntity> preproPersonEntities) { public boolean updatePreproPerson_NewFileName(List<PreproPersonDto> preproPersonEntities) {
for (PreproPersonEntity preproPersonEntity: preproPersonEntities) { for (PreproPersonDto preproPersonEntity: preproPersonEntities) {
preproPersonMapper.updateNewFileName(preproPersonEntity); preproPersonMapper.updateNewFileName(preproPersonEntity);
} }
......
...@@ -232,12 +232,14 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -232,12 +232,14 @@ public class ReceiptServiceImpl implements ReceiptService {
@Override @Override
public List<Map<String, Object>> queryPoliceName(String qrCode) { 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<>(); List<Map<String,Object>> maps = new ArrayList<>();
if (mapList.size()>0){ if (mapList.size()>0){
maps.add(mapList.get(0)); maps.add(mapList.get(0));
} }
return maps; return maps;
} }
......
package com.yxproject.start.utils; package com.yxproject.start.utils;
import com.yxproject.start.dto.PreproPersonDto;
import com.yxproject.start.entity.FilesEntity; import com.yxproject.start.entity.FilesEntity;
import com.yxproject.start.entity.PreproPersonEntity; import com.yxproject.start.entity.PreproPersonEntity;
import org.dom4j.Document; import org.dom4j.Document;
...@@ -21,7 +22,7 @@ public class IDCardFactory { ...@@ -21,7 +22,7 @@ public class IDCardFactory {
public Map<String, Object> extractIDCard(String file,Date date) throws Exception { public Map<String, Object> extractIDCard(String file,Date date) throws Exception {
Map<String,Object> resultMap = new HashMap<>(); Map<String,Object> resultMap = new HashMap<>();
List<PreproPersonEntity> preproPersonEntityList = new ArrayList<>(); List<PreproPersonDto> preproPersonEntityList = new ArrayList<>();
FilesEntity filesEntity = new FilesEntity(); FilesEntity filesEntity = new FilesEntity();
try { try {
Document document = DocumentHelper.parseText(file); Document document = DocumentHelper.parseText(file);
...@@ -41,8 +42,9 @@ public class IDCardFactory { ...@@ -41,8 +42,9 @@ public class IDCardFactory {
filesEntity.setCreateTime(packagehead.element("SCSJ").getTextTrim()); filesEntity.setCreateTime(packagehead.element("SCSJ").getTextTrim());
List<Element> recordlist = records.elements("RECORD"); List<Element> recordlist = records.elements("RECORD");
for (Element e : recordlist) { for (Element e : recordlist) {
PreproPersonEntity preproPersonEntity = new PreproPersonEntity(); PreproPersonDto preproPersonEntity = new PreproPersonDto();
preproPersonEntity.setSid(e.attributeValue("sid")); preproPersonEntity.setSid(e.attributeValue("sid"));
preproPersonEntity.setNo(e.attributeValue("no"));
preproPersonEntity.setJmsfzslh( e.element("JMSFZSLH").getStringValue()); preproPersonEntity.setJmsfzslh( e.element("JMSFZSLH").getStringValue());
preproPersonEntity.setGmsfhm(e.element("GMSFHM").getStringValue()); preproPersonEntity.setGmsfhm(e.element("GMSFHM").getStringValue());
preproPersonEntity.setXm(e.element("XM").getStringValue()); preproPersonEntity.setXm(e.element("XM").getStringValue());
......
...@@ -24,9 +24,10 @@ public class QuerySequenceSercive { ...@@ -24,9 +24,10 @@ public class QuerySequenceSercive {
// //
// } // }
// return mapList.get(0).get("NUM2").toString(); // return mapList.get(0).get("NUM2").toString();
int i = querySequenceMapper.selectSequenceNextValue(sequenceName + ".nextval"); List<Map<String, Object>> maps = querySequenceMapper.selectSequenceNextValue(sequenceName + ".nextval");
System.out.println(i); Object sequencename = maps.get(0).get("SEQUENCENAME");
return null; System.out.println(maps.get(0).get("SEQUENCENAME"));
return sequencename+"";
} }
......
server: server:
port: 8082 port: 8082
#spring相关 #spring相关+
spring: spring:
datasource: datasource:
driver-class-name: oracle.jdbc.driver.OracleDriver driver-class-name: oracle.jdbc.driver.OracleDriver
......
### 设置### ### ����###
log4j.rootLogger = debug,stdout,D,E log4j.rootLogger = debug,stdout,D,E
log4j.appenderRefs = ${appenders} log4j.appenderRefs = ${appenders}
log4j.appenderRef.console.ref = STDOUT log4j.appenderRef.console.ref = STDOUT
log4j.appenderRef.rollingFileAppender.ref = rollingFile log4j.appenderRef.rollingFileAppender.ref = rollingFile
### 输出信息到控制台 ### ### �����Ϣ������̨ ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout 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 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 = 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.Append = true
log4j.appender.D.Threshold = DEBUG log4j.appender.D.Threshold = DEBUG
log4j.appender.D.MaxFileSize=20MB log4j.appender.D.MaxFileSize=20MB
...@@ -21,17 +21,18 @@ log4j.appender.D.DatePattern = '_'yyyy-MM-dd'.log' ...@@ -21,17 +21,18 @@ log4j.appender.D.DatePattern = '_'yyyy-MM-dd'.log'
log4j.appender.D.layout = org.apache.log4j.PatternLayout 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 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 = 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.Append = true
log4j.appender.E.Threshold = ERROR log4j.appender.E.Threshold = ERROR
log4j.appender.E.MaxFileSize=20MB 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 = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%X{ip}] [ %t:%r ] - [ %p ] %l %m%n 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.org.mybatis = DEBUG
log4j.logger.java.sql = DEBUG log4j.logger.java.sql = DEBUG
log4j.logger.java.sql.Statement = DEBUG log4j.logger.java.sql.Statement = DEBUG
......
...@@ -5,20 +5,24 @@ ...@@ -5,20 +5,24 @@
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<th>NO.</th> <th>NO.</th>
<th>受理号</th>
<th>身份证号</th> <th>身份证号</th>
<th>姓名</th> <th>姓名</th>
<th>性别</th> <th>性别</th>
<th>起始有效期</th>
<th>类型</th> <th>类型</th>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="item in personInfo"> <tr ng-repeat="item in personInfo">
<td>{{$index + 1}}</td> <td>{{$index + 1}}</td>
<td>{{item.ACCEPT_NO}}</td>
<td>{{item.ID_NO}}</td> <td>{{item.ID_NO}}</td>
<td ng-if="item.NAME=='查无此人'" style="color: red;">{{item.NAME}}</td> <td ng-if="item.NAME=='查无此人'" style="color: red;">{{item.NAME}}</td>
<td ng-if="item.NAME!='查无此人'">{{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==1"></td>
<td ng-if="item.SEX_NO==2"></td> <td ng-if="item.SEX_NO==2"></td>
<td ng-if="item.SEX_NO==-1">错误</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==2" class="text-danger">快证</td>
<td ng-if="item.SPECIAL_TYPE==1" 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> <td ng-if="item.FAILED_CARD_REASON!=null" class="text-danger">废证</td>
......
...@@ -561,14 +561,11 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -561,14 +561,11 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
getTaskListToCreate:function(groupNo1,groupNo2,date,success){ getTaskListToCreate:function(date,success){
console.log($rootScope.loginData.roleList[0].process,groupNo1,groupNo2,date);
$http({ $http({
method: 'GET', method: 'GET',
url: "../TaskList/queryByCountyAtACCU"+urlTimeStamp(), url: "../TaskList/queryByCountyAtACCU"+urlTimeStamp(),
params:{ params:{
groupNo1:groupNo1,
groupNo2:groupNo2,
process:$rootScope.loginData.roleList[0].process, process:$rootScope.loginData.roleList[0].process,
date:date date:date
} }
...@@ -577,7 +574,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -577,7 +574,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}) })
}, },
getCreateHistoryTask:function(date,success){ getCreateHistoryTask:function(date,success){
console.log(date)
$http({ $http({
method: 'GET', method: 'GET',
url: "../TaskList/queryHistoryTaskAtAuxiliary"+urlTimeStamp(), url: "../TaskList/queryHistoryTaskAtAuxiliary"+urlTimeStamp(),
...@@ -1238,7 +1234,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -1238,7 +1234,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}) })
}, },
getPoliceName:function(policeCode,success) { getPoliceName:function(policeCode,success) {
console.log(policeCode+"========================")
$http({ $http({
method: 'GET', method: 'GET',
url: "../ReceiptApi/queryPoliceName"+urlTimeStamp(), url: "../ReceiptApi/queryPoliceName"+urlTimeStamp(),
......
...@@ -12,7 +12,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) { ...@@ -12,7 +12,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
var body = { var body = {
color: ['#003366', '#006699', '#4cabce', '#e5323e'], color: ['#003366', '#006699', '#4cabce', '#e5323e'],
title : { title : {
text: ' 北京市公安局 '+data.date+' 年地证制证生产情况', text: ' 北京市公安局 '+data.date+' 年地证制证生产情况',
subtext: '人次数量' subtext: '人次数量'
}, },
//提示框组件 //提示框组件
...@@ -24,7 +24,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) { ...@@ -24,7 +24,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
type: 'scroll', type: 'scroll',
orient: 'horizontal', orient: 'horizontal',
x: 'right', x: 'right',
data: ['普通证','港澳','台湾','废证'] data: ['异地证','港澳','台湾','废证']
}, },
//拖拽时,是否实时更新。 //拖拽时,是否实时更新。
calculable: true, calculable: true,
...@@ -51,7 +51,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) { ...@@ -51,7 +51,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
//数值 //数值
series: [ series: [
{ {
name: '普通证', name: '异地证',
type: 'bar', type: 'bar',
barGap: 0, barGap: 0,
label: labelprov, label: labelprov,
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
身份证号: 身份证号:
</td> </td>
<td> <td>
<input type="text" placeholder="请填写身份证号" class="{{$index}}" style="height: 34px;"> <input type="text" placeholder="请填写身份证号" class="{{$index}}" style="height: 34px;width: 100%;">
</td> </td>
<td> <td>
废证原因: 废证原因:
......
<section class="content row"> <section class="content row">
<div class="col-md-12" style="margin-top:20px;"> <div class="col-md-12" style="margin-top:20px;">
<div class="box "> <div class="box ">
<div class="box-header"> <div class="box-header">
<strong>制证统计</strong> <strong>制证量柱状图</strong>
<div class="pull-right col-md-2" > <div class="pull-right col-md-2" >
<input class="form-control col-md-1" <input class="form-control col-md-1"
style="width: 70px;height: 20px;" style="width: 70px;height: 20px;"
ng-model="year" ng-model="year"
ng-change="changeYear()"> ng-change="changeYear()">
<span class="col-md-1"></span> <span class="col-md-1"></span>
</div> </div>
</div> </div>
<div class="box box-primary"> <div class="box box-primary" style="min-height: 600px;padding-top: 57px;padding-left: 25px;" >
<div style="text-align: center;">
<div style="text-align: center;"> <div class="row">
<!--通过率统计图--> <div class="col-md-12">
<div class="row" > <div class="yx-div-header"></div>
<div class="col-md-12"> <div id="diagram_item_ratio_certification" style="height:500px;"></div>
<div class="yx-div-header"></div>
<div id="diagram_item_ratio_certification" style="height:500px;"></div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div>
</div>
</div>
</div> </div>
</section> </section>
\ No newline at end of file
...@@ -29,7 +29,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -29,7 +29,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.totalCardProd = 0; $scope.totalCardProd = 0;
$scope.isHistory=0; $scope.isHistory=0;
//用于区分制证库保存或者受理库保存数据 //用于区分制证库保存或者受理库保存数据
$scope.type="ACCU";
//查询制证库 //查询制证库
$scope.searchCurrentFromProd = function () { $scope.searchCurrentFromProd = function () {
if(angular.isUndefined($scope.groupNo1)||angular.isUndefined($scope.groupNo2)){ if(angular.isUndefined($scope.groupNo1)||angular.isUndefined($scope.groupNo2)){
...@@ -50,7 +50,9 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -50,7 +50,9 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.type="PRODU"; $scope.type="PRODU";
} }
}; };
//查询受理库
$scope.searchCurrent = function(){ $scope.searchCurrent = function(){
$scope.type="ACCU";
$scope.totalCardProd = 0; $scope.totalCardProd = 0;
$scope.selected = []; $scope.selected = [];
$scope.isHistory=0; $scope.isHistory=0;
...@@ -58,7 +60,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -58,7 +60,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
if(date=='{{choseDate}}'){ if(date=='{{choseDate}}'){
date=$scope.choseDate; date=$scope.choseDate;
} }
HttpService.getTaskListToCreate($scope.groupNo1,$scope.groupNo2,date,function(data){ HttpService.getTaskListToCreate(date,function(data){
$scope.cycleSheetData = data; $scope.cycleSheetData = data;
for(var i=0;i<$scope.cycleSheetData.length;i++){ for(var i=0;i<$scope.cycleSheetData.length;i++){
$scope.totalCardProd = $scope.totalCardProd+$scope.cycleSheetData[i].typeSum; $scope.totalCardProd = $scope.totalCardProd+$scope.cycleSheetData[i].typeSum;
...@@ -71,7 +73,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -71,7 +73,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
console.log("当天:",$scope.cycleSheetData) console.log("当天:",$scope.cycleSheetData)
}) })
$scope.type="PRODU";
}; };
if($rootScope.loginData.login==true){ if($rootScope.loginData.login==true){
$scope.searchCurrent(); $scope.searchCurrent();
......
...@@ -46,16 +46,6 @@ ...@@ -46,16 +46,6 @@
<td class="text-danger">废品</td> <td class="text-danger">废品</td>
<td>成品</td> <td>成品</td>
<td class="text-danger">废品</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> <td>数量</td>
</tr> </tr>
</thead> </thead>
......
...@@ -56,8 +56,9 @@ ...@@ -56,8 +56,9 @@
</thead> </thead>
<tbody ng-repeat="task in type.countyList"> <tbody ng-repeat="task in type.countyList">
<tr> <tr>
<td ng-show="type.typeCode=='100'||(task.faileCount==0&&(task.countyValidCount-task.specialCount)==task.eWriteCount&&task.eWriteCount==task.recheckCount)"> <td >
<input type="checkbox" class="checkOneBox" <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-checked="isSelected(task)" value="{{task.taskId}}"
ng-click="updateSelection($event,task)"> ng-click="updateSelection($event,task)">
</td> </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