修复部门为空报错

product
chuang 2 years ago
parent b79a452034
commit 262e807292

@ -36,6 +36,7 @@ import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.service.SupplierService;
import jnpf.util.*;
import jnpf.util.context.SpringContext;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -424,7 +425,22 @@ public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, Payment
if (fullName.length()>fullName.indexOf(substring)+2){
substring1 = fullName.substring(fullName.indexOf(substring) + substring.length()+1, fullName.length());
}
while (substring1.contains("公司")){
if (!substring1.contains("/")){
break;
}
substring=substring1.substring(0,substring1.indexOf("/"));
substring1=substring1.substring(substring1.indexOf("/")+1,substring1.length());
}
while (true){
int intNum = StringUtils.countMatches(paymentdocMessage.getFullName(), "公司");
if (intNum>1){
paymentdocMessage.setFullName(fullName.substring(fullName.indexOf("公司")+3,fullName.length()));
}else {
break;
}
}
}
StringBuilder payEnclosureStr = new StringBuilder();
if (paymentdocMessage.getEnclosure()!=null){

@ -632,6 +632,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (fullName!=null){
if (fullName.indexOf("/", fullName.indexOf("/")+1)!=-1){
substring = fullName.substring(fullName.indexOf("/")+1, fullName.indexOf("/", fullName.indexOf("/")+1));
if (fullName.length()>fullName.indexOf(substring)+2){
substring1 = fullName.substring(fullName.indexOf(substring) + substring.length()+1, fullName.length());
@ -643,6 +644,11 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
substring=substring1.substring(0,substring1.indexOf("/"));
substring1=substring1.substring(substring1.indexOf("/")+1,substring1.length());
}
}else {
substring=fullName.substring(fullName.indexOf("/")+1,fullName.length());
substring1="再生资源事业部";
}
}

@ -37,11 +37,11 @@
<body>
<div class='wrapper'>
<h1 style="text-align: center">${title!""}</h1>
<h1 style="text-align: center">${title!"济钢城市矿产科技有限公司采购订单"}</h1>
<p style="font-weight: bold">业务部门:${name!""}</p>
<p style="font-weight: bold">业务部门:${name!"再生资源事业部"}</p>
<table border="1" cellspacing="0" width="100%">
<tr bgcolor="#6495ed" style="line-height: 44px" >
<td colspan="1" rowspan="2">订单日期</td>

Loading…
Cancel
Save