提交 2f341d35 authored 作者: zjm's avatar zjm

fix(单位模版生成): 修改部件名字计算逻辑的问题

修改部件名字计算逻辑的问题
上级 030b2610
...@@ -326,7 +326,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -326,7 +326,7 @@ public class JavaToPdfHtmlFreeMarker {
String s=String.join("",toListString(documentDevice.getDeviceSerialNumber(),56)); String s=String.join("",toListString(documentDevice.getDeviceSerialNumber(),56));
documentDevice.setOneCount(max); documentDevice.setOneCount(max);
documentDevice.setModel(String.join("",toListString(documentDevice.getModel(),13))); documentDevice.setModel(String.join("",toListString(documentDevice.getModel(),13)));
documentDevice.setParts(String.join("",toListString(documentDevice.getParts(),13))); documentDevice.setParts(String.join("",toListString(documentDevice.getParts(),12)));
documentDevice.setRemark(String.join("",toListString(documentDevice.getRemark(),12))); documentDevice.setRemark(String.join("",toListString(documentDevice.getRemark(),12)));
documentDevice.setDeviceSerialNumber(s); documentDevice.setDeviceSerialNumber(s);
code++; code++;
...@@ -340,7 +340,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -340,7 +340,7 @@ public class JavaToPdfHtmlFreeMarker {
int differ=14-i; int differ=14-i;
List<String> modelList= toListString(documentDevice.getModel(),13); List<String> modelList= toListString(documentDevice.getModel(),13);
List<String> seqList=toListString(documentDevice.getDeviceSerialNumber(),56); List<String> seqList=toListString(documentDevice.getDeviceSerialNumber(),56);
List<String> pasList=toListString(documentDevice.getParts(),13); List<String> pasList=toListString(documentDevice.getParts(),12);
List<String> remarkList=toListString(documentDevice.getRemark(),12); List<String> remarkList=toListString(documentDevice.getRemark(),12);
DocumentDevice documentDevice1=new DocumentDevice(); DocumentDevice documentDevice1=new DocumentDevice();
if (modelList.size()>differ){ if (modelList.size()>differ){
...@@ -385,7 +385,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -385,7 +385,7 @@ public class JavaToPdfHtmlFreeMarker {
code++; code++;
documentDevice.setCode(code); documentDevice.setCode(code);
documentDevice.setModel(String.join("",toListString(documentDevice.getModel(),13))); documentDevice.setModel(String.join("",toListString(documentDevice.getModel(),13)));
documentDevice.setParts(String.join("",toListString(documentDevice.getParts(),13))); documentDevice.setParts(String.join("",toListString(documentDevice.getParts(),12)));
documentDevice.setRemark(String.join("",toListString(documentDevice.getRemark(),12))); documentDevice.setRemark(String.join("",toListString(documentDevice.getRemark(),12)));
documentDevice.setOneCount(max); documentDevice.setOneCount(max);
documentDevice.setDeviceSerialNumber(s); documentDevice.setDeviceSerialNumber(s);
...@@ -406,7 +406,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -406,7 +406,7 @@ public class JavaToPdfHtmlFreeMarker {
int deviceSerialNumberCount=String_length(documentDevice.getDeviceSerialNumber()); int deviceSerialNumberCount=String_length(documentDevice.getDeviceSerialNumber());
int modelCount=String_length(documentDevice.getModel()); int modelCount=String_length(documentDevice.getModel());
int remarkCount=String_length(documentDevice.getRemark()); int remarkCount=String_length(documentDevice.getRemark());
int parts = (partsCount%13>0) ? partsCount/13 + 1 : partsCount/13; int parts = (partsCount%12>0) ? partsCount/12 + 1 : partsCount/12;
int deviceSerialNumber=(deviceSerialNumberCount%56>0) ? deviceSerialNumberCount/56 + 1 : deviceSerialNumberCount/56; int deviceSerialNumber=(deviceSerialNumberCount%56>0) ? deviceSerialNumberCount/56 + 1 : deviceSerialNumberCount/56;
int model=(modelCount%13>0) ? modelCount/13 + 1 : modelCount/13; int model=(modelCount%13>0) ? modelCount/13 + 1 : modelCount/13;
int remark=(remarkCount%12>0) ? remarkCount/12 + 1 : remarkCount/12; int remark=(remarkCount%12>0) ? remarkCount/12 + 1 : remarkCount/12;
...@@ -787,7 +787,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -787,7 +787,7 @@ public class JavaToPdfHtmlFreeMarker {
int differ=14-i; int differ=14-i;
List<String> modelList= toListString(documentDevice.getModel(),13); List<String> modelList= toListString(documentDevice.getModel(),13);
List<String> seqList=toListString(documentDevice.getDeviceSerialNumber(),56); List<String> seqList=toListString(documentDevice.getDeviceSerialNumber(),56);
List<String> pasList=toListString(documentDevice.getParts(),13); List<String> pasList=toListString(documentDevice.getParts(),12);
DocumentDevice documentDevice1=new DocumentDevice(); DocumentDevice documentDevice1=new DocumentDevice();
if (modelList.size()>differ){ if (modelList.size()>differ){
documentDevice.setModel(String.join("",modelList.subList(0,differ))); documentDevice.setModel(String.join("",modelList.subList(0,differ)));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论