Commit 3d62330a authored by liuxinben's avatar liuxinben

添加校验是否存在未被解析的excel的接口,

暂时先注释掉交接单上的大批证里可能混入邮寄证的校验
parent 09c92ea5
......@@ -321,6 +321,24 @@ public class LogApi {
return logService.updateNullIdDate(fileId);
}
/**
* 校验是否存在新的excel未被解析
*
* @return true
*/
@RequestMapping("checkNewExcelUnresolved")
public Map<String, Object> checkNewExcelUnresolved() {
Map<String, Object> map = new HashMap<>();
if (logService.checkNewExcelUnresolved()){
map.put("code",1);
map.put("msg","全部格口文件都已经被解析了!");
}else {
map.put("code",0);
map.put("msg","存在未解析的格口文件!");
}
return map;
}
/**
* 去除字符串中中线
......
......@@ -344,21 +344,21 @@ public class ReceiptApi {
receiptListEntity.setFinishCount((long) list.size());//证件数量
}
if (cardType.equals("0")){
List<Map<String, Object>> list = receiptService.selectYJZ(acceptNo + "%");
if (list.size()>0){
map.put("show", false);
map.put("state", 3);
map.put("msg", "该大批证组中混入了邮寄证!混入的人员信息为:"+ JSONObject.fromObject(list).toString());
//生成交接单
receiptListEntity.setFinishCount(receiptListEntity.getFinishCount()-list.size());
long S=receiptService.createReceiptList(receiptListEntity);
//生成交接详单
//上传受理号、受理号、姓名、派出所代码、身份证号、受理单位、交接单ID、性别
receiptId=receiptListEntity.getId()+"";
String policeCode=receiptListEntity.getPoliceCode();
}
}else {
// if (cardType.equals("0")){
// List<Map<String, Object>> list = receiptService.selectYJZ(acceptNo + "%");
// if (list.size()>0){
// map.put("show", false);
// map.put("state", 3);
// map.put("msg", "该大批证组中混入了邮寄证!混入的人员信息为:"+ JSONObject.fromObject(list).toString());
// //生成交接单
// receiptListEntity.setFinishCount(receiptListEntity.getFinishCount()-list.size());
// long S=receiptService.createReceiptList(receiptListEntity);
// //生成交接详单
// //上传受理号、受理号、姓名、派出所代码、身份证号、受理单位、交接单ID、性别
// receiptId=receiptListEntity.getId()+"";
// String policeCode=receiptListEntity.getPoliceCode();
// }
// }else {
//生成交接单
long S=receiptService.createReceiptList(receiptListEntity);
//生成交接详单
......@@ -366,7 +366,7 @@ public class ReceiptApi {
receiptId=receiptListEntity.getId()+"";
String policeCode=receiptListEntity.getPoliceCode();
receiptService.createDetailReceiptList( receiptId, acceptNo+"%", policeCode);
}
// }
map.put("show", true);
map.put("state", 1);
map.put("id", receiptId);
......
......@@ -254,4 +254,8 @@ public interface LogMapper {
@Update("UPDATE FILE_NAME_DIC SET STATE = 1 WHERE FILE_ID =#{gkId} ")
public boolean updateGKState(String gkId);
@Select("SELECT NVL(ANALYSIS_DATE,0) FROM FILE_NAME_DIC\n" +
"WHERE FILE_ID IN (SELECT MAX(FILE_ID) FROM FILE_NAME_DIC) ")
public String checkNewExcelUnresolved();
}
......@@ -60,4 +60,6 @@ public interface LogService {
public String selectPostCountByXmlidAndGkid(String xmlId,String gkId);
public boolean checkNewExcelUnresolved();
}
......@@ -185,4 +185,13 @@ public class LogServiceImpl implements LogService {
public String selectPostCountByXmlidAndGkid(String xmlId, String gkId) {
return logMapper.selectPostCountByXmlidAndGkid(xmlId, gkId);
}
@Override
public boolean checkNewExcelUnresolved() {
String s = logMapper.checkNewExcelUnresolved();
if (s.equals("0")){
return false;
}
return true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment