提交 e7954a0b authored 作者: zjm's avatar zjm

指静脉ip修改

上级 888dcaa0
...@@ -224,11 +224,11 @@ public class FileController { ...@@ -224,11 +224,11 @@ public class FileController {
documents.setTitle("密码装备清退单"); documents.setTitle("密码装备清退单");
documents.setId(null); documents.setId(null);
List<DocumentDevice> documentDevices=new ArrayList<>(); List<DocumentDevice> documentDevices=new ArrayList<>();
for (int i=0;i<20;i++){ for (int i=0;i<1;i++){
DocumentDevice documentDevice=new DocumentDevice(); DocumentDevice documentDevice=new DocumentDevice();
documentDevice.setCount(i); documentDevice.setCount(i);
documentDevice.setModel("MM001"); documentDevice.setModel("ZJM-123123");
documentDevice.setRemark("备注"); documentDevice.setRemark("<1231231231>312312312321312");
documentDevice.setApplicationField("省一级"); documentDevice.setApplicationField("省一级");
documentDevice.setDeviceSerialNumber("asdq1231232"); documentDevice.setDeviceSerialNumber("asdq1231232");
// documentDevice.setProductionSerialNumber("12312312312"); // documentDevice.setProductionSerialNumber("12312312312");
...@@ -240,8 +240,7 @@ public class FileController { ...@@ -240,8 +240,7 @@ public class FileController {
documents.setDocumentDevices(documentDevices); documents.setDocumentDevices(documentDevices);
// String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/"); // String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderRepair(documents,url+"htmlModel/"); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderRepair(documents,url+"htmlModel/");
log.info("[file] 调用了生成出入单据对接口 出入库单据");
log.info("[file] 调用了生成出入单据对接口 documents");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/")); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/"));
} }
......
...@@ -92,14 +92,12 @@ public class DocumentDevice { ...@@ -92,14 +92,12 @@ public class DocumentDevice {
} }
public String changeWord(String keyword) { public String changeWord(String keyword) {
System.out.println(keyword);
if (StringUtils.isNotBlank(keyword)) { if (StringUtils.isNotBlank(keyword)) {
if (keyword.contains("<br />")){ if (keyword.contains("<br/>")){
keyword = keyword.replace("<br />", "Ǵ"); keyword = keyword.replace("<br/>", "Ǵ");
} }
if (keyword.contains("&")) {
keyword = keyword.replace("&", "&amp;");
}
if (keyword.contains("<")) { if (keyword.contains("<")) {
keyword = keyword.replace("<", "&lt;"); keyword = keyword.replace("<", "&lt;");
...@@ -108,7 +106,7 @@ public class DocumentDevice { ...@@ -108,7 +106,7 @@ public class DocumentDevice {
keyword = keyword.replace(">", "&gt;"); keyword = keyword.replace(">", "&gt;");
} }
} }
keyword = keyword.replace("Ǵ", "<br />"); keyword = keyword.replace("Ǵ", "<br/>");
return keyword; return keyword;
} }
......
...@@ -253,6 +253,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -253,6 +253,7 @@ public class JavaToPdfHtmlFreeMarker {
for (int i=1; i<=3; i++){ for (int i=1; i<=3; i++){
Integer page=1; Integer page=1;
for (List<DocumentDevice> list1:listList) { for (List<DocumentDevice> list1:listList) {
String htmlname=htmlPath+ UUID.randomUUID().toString()+".html"; String htmlname=htmlPath+ UUID.randomUUID().toString()+".html";
// 合并数据模型与模板 // 合并数据模型与模板
FileWriter fileWriter = new FileWriter(new File(htmlname)); FileWriter fileWriter = new FileWriter(new File(htmlname));
...@@ -266,7 +267,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -266,7 +267,7 @@ public class JavaToPdfHtmlFreeMarker {
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
log.error("[freeMarkerRender] 方法找不到地址:{}",htmlPath); log.error("[freeMarkerRender] 方法找不到地址:{}",htmlPath);
log.error("{}",e);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -348,7 +349,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -348,7 +349,7 @@ public class JavaToPdfHtmlFreeMarker {
documentDevice.setModel(String.join("",modelList.subList(0,differ))); documentDevice.setModel(String.join("",modelList.subList(0,differ)));
documentDevice1.setModel(String.join("",modelList.subList(differ,modelList.size()))); documentDevice1.setModel(String.join("",modelList.subList(differ,modelList.size())));
}else { }else {
documentDevice.setModel(String.join("",modelList.subList(0,differ))); documentDevice.setModel(String.join("",modelList.subList(0,modelList.size())));
} }
if (seqList.size()>differ){ if (seqList.size()>differ){
......
...@@ -14,7 +14,7 @@ spring.jpa.hibernate.ddl-auto=update ...@@ -14,7 +14,7 @@ spring.jpa.hibernate.ddl-auto=update
#file.path=C:/Users/dengdiyi/Documents/file/ #file.path=C:/Users/dengdiyi/Documents/file/
# spring boot admin # spring boot admin
#file.path=/Users/ozoz/data/ #file.path=/Users/ozoz/data/
file.path=/Users/zhoushaopan/Desktop/data/ file.path=C:/ZB/
preview.path=http://192.168.102.169:8087/file/ preview.path=http://192.168.102.169:8087/file/
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087 spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087
...@@ -26,3 +26,5 @@ qrcode.preview.path=http://192.168.101.133:8087/code/ ...@@ -26,3 +26,5 @@ qrcode.preview.path=http://192.168.101.133:8087/code/
carrier.url = http://192.168.0.30:8087/configuration/saveConfiguration carrier.url = http://192.168.0.30:8087/configuration/saveConfiguration
file.matching.excel=/Users/zhoushaopan/excel/ file.matching.excel=/Users/zhoushaopan/excel/
ven.http=
...@@ -10,4 +10,5 @@ preview.path=http://10.153.4.11:8088/equip/file/ ...@@ -10,4 +10,5 @@ preview.path=http://10.153.4.11:8088/equip/file/
block.flag=true block.flag=true
carrier.url = http://10.153.4.11:8088/carrier/configuration/saveConfiguration carrier.url = http://10.153.4.11:8088/carrier/configuration/saveConfiguration
file.matching.excel=/data/equip/matching/excel/ file.matching.excel=/data/equip/matching/excel/
\ No newline at end of file ven.http=http://10.153.4.10:8081
\ No newline at end of file
...@@ -11,4 +11,5 @@ block.flag=false ...@@ -11,4 +11,5 @@ block.flag=false
qrcode.path = /opt/qrcode/ qrcode.path = /opt/qrcode/
qrcode.preview.path=http://10.153.4.11:8088/equipTest/code/ qrcode.preview.path=http://10.153.4.11:8088/equipTest/code/
carrier.url = http://10.153.4.11:8088/carrierTest/configuration/saveConfiguration carrier.url = http://10.153.4.11:8088/carrierTest/configuration/saveConfiguration
file.matching.excel=/data/equipTest/matching/excel/ file.matching.excel=/data/equipTest/matching/excel/
\ No newline at end of file ven.http=http://10.153.4.10:8081
\ No newline at end of file
...@@ -18,4 +18,5 @@ qrcode.preview.path=http://10.153.4.80/equip/code/ ...@@ -18,4 +18,5 @@ qrcode.preview.path=http://10.153.4.80/equip/code/
carrier.url = http://10.153.4.80:8088/carrier/configuration/saveConfiguration carrier.url = http://10.153.4.80:8088/carrier/configuration/saveConfiguration
file.matching.excel=/data/equip/excel/ file.matching.excel=/data/equip/excel/
\ No newline at end of file ven.http=http://10.153.4.80:8081
\ No newline at end of file
...@@ -22,4 +22,15 @@ public interface VenitalisService { ...@@ -22,4 +22,15 @@ public interface VenitalisService {
* 特征对比 * 特征对比
*/ */
Integer contrastRet(String deviceType,String value); Integer contrastRet(String deviceType,String value);
/**
* 删除特征
*/
RegistereRetVo delFeature(Integer userId,String featureItem);
/**
* 查询特征
*/
String featureQuery(Integer userId);
} }
...@@ -14,12 +14,14 @@ import com.tykj.dev.misc.utils.JacksonUtil; ...@@ -14,12 +14,14 @@ import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.misc.utils.httpclientutil.HttpClientUtil; import com.tykj.dev.misc.utils.httpclientutil.HttpClientUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects;
/** /**
* @author zjm * @author zjm
...@@ -36,10 +38,16 @@ public class VenitalisServiceImpl implements VenitalisService { ...@@ -36,10 +38,16 @@ public class VenitalisServiceImpl implements VenitalisService {
@Autowired @Autowired
private UserLogDao userLogDao; private UserLogDao userLogDao;
private final static String http="http://10.153.6.10:8081"; @Value("${ven.http}")
// private final static String http="http://192.168.0.80:8081"; private String http;
// private final static String http="http://10.153.4.80:8081";
private final static String REGISTERE="/api/v2/auth/register"; private final static String REGISTERE="/api/v2/auth/register";
private final static String CONTRAST="/api/v2/auth/identify"; private final static String CONTRAST="/api/v2/auth/identify";
private final static String Feature="/api/v2/auth/delFeature";
private final static String FEATUREQUERY="/api/v2/auth/featureQuery";
@Override @Override
public RegistereRetVo registeredRet(VenitalisVo venitalisVo) { public RegistereRetVo registeredRet(VenitalisVo venitalisVo) {
User user= userDao.findById(venitalisVo.getUserId()).get(); User user= userDao.findById(venitalisVo.getUserId()).get();
...@@ -65,7 +73,7 @@ public class VenitalisServiceImpl implements VenitalisService { ...@@ -65,7 +73,7 @@ public class VenitalisServiceImpl implements VenitalisService {
registereRetVo.setRet(true); registereRetVo.setRet(true);
userLogDao.save(new UserLog(venitalisVo.getUserId(),new Date(),user.getName()+"注册了指静脉")); userLogDao.save(new UserLog(venitalisVo.getUserId(),new Date(),user.getName()+"注册了指静脉"));
return registereRetVo; return registereRetVo;
}else { } else {
registereRetVo.setRet(false); registereRetVo.setRet(false);
return registereRetVo; return registereRetVo;
} }
...@@ -89,4 +97,38 @@ public class VenitalisServiceImpl implements VenitalisService { ...@@ -89,4 +97,38 @@ public class VenitalisServiceImpl implements VenitalisService {
} }
} }
@Override
public RegistereRetVo delFeature(Integer userId, String featureItem) {
Map<String, Object> params=new HashMap<>();
params.put("username","lingo");
params.put("password","511B0D5F341BDDBD9A5348923B48D14C");
params.put("id_type","06");
params.put("device_type","tg.VM661J.img");
params.put("uid",userId);
params.put("feature_item",featureItem);
String ret= HttpClientUtil.httpPostRequest(http+Feature,params);
RegisteredRet registeredRet= JacksonUtil.readValue(ret,RegisteredRet.class);
RegistereRetVo registereRetVo=new RegistereRetVo();
if (Objects.requireNonNull(registeredRet).getResult_code().equals("200")){
registereRetVo.setRet(true);
}else {
registereRetVo.setRet(false);
}
return registereRetVo;
}
@Override
public String featureQuery(Integer userId) {
Map<String, Object> params=new HashMap<>();
params.put("username","lingo");
params.put("password","511B0D5F341BDDBD9A5348923B48D14C");
params.put("id_type","06");
params.put("device_type","tg.VM661J.img");
params.put("uid",userId);
String ret= HttpClientUtil.httpPostRequest(http+FEATUREQUERY,params);
return ret;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论