|
@@ -17,6 +17,10 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.cxf.ws.security.wss4j.policyvalidators.UsernameTokenPolicyValidator;
|
|
import org.apache.cxf.ws.security.wss4j.policyvalidators.UsernameTokenPolicyValidator;
|
|
|
import org.sqlite.core.DB;
|
|
import org.sqlite.core.DB;
|
|
|
import org.sqlite.date.DateFormatUtils;
|
|
import org.sqlite.date.DateFormatUtils;
|
|
|
|
|
+
|
|
|
|
|
+import com.sun.org.apache.bcel.internal.generic.NEW;
|
|
|
|
|
+import com.sun.org.apache.xpath.internal.operations.And;
|
|
|
|
|
+
|
|
|
import p2.p2server.P2Server;
|
|
import p2.p2server.P2Server;
|
|
|
import p2.pao.*;
|
|
import p2.pao.*;
|
|
|
import p2.util.P2Exception;
|
|
import p2.util.P2Exception;
|
|
@@ -179,7 +183,7 @@ public class HyWorkOrder extends Controller {
|
|
|
"fisupload", "fisaddtitem", "fiscomplete", "fisOperator", "fistext", "fisconfirmation",
|
|
"fisupload", "fisaddtitem", "fiscomplete", "fisOperator", "fistext", "fisconfirmation",
|
|
|
"fiscontract", "confirmation", "fisaddtraining", "fisaddtrainingtitem", "fispaid" };
|
|
"fiscontract", "confirmation", "fisaddtraining", "fisaddtrainingtitem", "fispaid" };
|
|
|
for (int i = 0; i < ordernode.count(); i++) {
|
|
for (int i = 0; i < ordernode.count(); i++) {
|
|
|
-
|
|
|
|
|
|
|
+ System.out.println(111);
|
|
|
PaoRemote pao = ordernode.getPao(i);
|
|
PaoRemote pao = ordernode.getPao(i);
|
|
|
Row row = getrow(from_nodes, to_nodes, pao);
|
|
Row row = getrow(from_nodes, to_nodes, pao);
|
|
|
// t.frownum,t.oneprocessname,t.twoprocessname,t.operating,substring(
|
|
// t.frownum,t.oneprocessname,t.twoprocessname,t.operating,substring(
|
|
@@ -201,6 +205,44 @@ public class HyWorkOrder extends Controller {
|
|
|
// ('MP4','mp4') then 'video' else 'file' end type2 from tattachment where
|
|
// ('MP4','mp4') then 'video' else 'file' end type2 from tattachment where
|
|
|
PaoSetRemote paoSet_url = pao.getPaoSet("$tattachment", "tattachment",
|
|
PaoSetRemote paoSet_url = pao.getPaoSet("$tattachment", "tattachment",
|
|
|
"ownertable='HYORDERNODE' and ownerid =" + pao.getInt("hyordernodeid"));
|
|
"ownertable='HYORDERNODE' and ownerid =" + pao.getInt("hyordernodeid"));
|
|
|
|
|
+ PaoSetRemote HYCONFIRMATIONORDER = workorderpao.getPaoSet("HYCONFIRMATIONORDER");
|
|
|
|
|
+ if(pao.getString("oneprocessname").equals("服务确认") && !HYCONFIRMATIONORDER.isEmpty()) {
|
|
|
|
|
+ System.out.println(paoSet_url.count());
|
|
|
|
|
+ Rows signaturerows = new Rows();
|
|
|
|
|
+ for (int index = 0; index < HYCONFIRMATIONORDER.count(); index++) {
|
|
|
|
|
+ PaoRemote pao1 = HYCONFIRMATIONORDER.getPao(index);
|
|
|
|
|
+ System.out.println(666);
|
|
|
|
|
+ PaoSetRemote confirmorder_url = pao.getPaoSet("$tattachment"+index, "tattachment",
|
|
|
|
|
+ "ownertable='HYCONFIRMATIONORDER' and type='客户签名' and ownerid =" + pao1.getInt("HYCONFIRMATIONORid"));
|
|
|
|
|
+ confirmorder_url.setOrderBy("createdate desc");
|
|
|
|
|
+ confirmorder_url.reset();
|
|
|
|
|
+ Row row1 = new Row();
|
|
|
|
|
+ System.out.println(!confirmorder_url.isEmpty());
|
|
|
|
|
+ if(!confirmorder_url.isEmpty()) {
|
|
|
|
|
+ String postfix = confirmorder_url.getPao(0).getString("postfix");
|
|
|
|
|
+ row1.put("tattachmentid", confirmorder_url.getPao(0).getInt("tattachmentid"));
|
|
|
|
|
+ row1.put("document", confirmorder_url.getPao(0).getString("fdocument"));
|
|
|
|
|
+ row1.put("postfix", postfix.toUpperCase());
|
|
|
|
|
+ row1.put("url", confirmorder_url.getPao(0).getString("fobsurl"));
|
|
|
|
|
+ row1.put("serialnumber", confirmorder_url.getPao(0).getString("serialnumber"));
|
|
|
|
|
+ row1.put("type", confirmorder_url.getPao(0).getString("type"));
|
|
|
|
|
+ if (postfix.equalsIgnoreCase("JPG") || postfix.equalsIgnoreCase("PNG")
|
|
|
|
|
+ || postfix.equalsIgnoreCase("JEPG")) {
|
|
|
|
|
+ row1.put("type2", "image");
|
|
|
|
|
+ } else if (postfix.equalsIgnoreCase("mp4")) {
|
|
|
|
|
+ row1.put("type2", "video");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row1.put("type2", "file");
|
|
|
|
|
+ }
|
|
|
|
|
+ signaturerows.add(row1);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ row.put("signatureurl",signaturerows);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ row.put("signatureurl",new Rows());
|
|
|
|
|
+ }
|
|
|
|
|
+ System.out.println("paoSet_url:"+paoSet_url.count());
|
|
|
if (!paoSet_url.isEmpty()) {
|
|
if (!paoSet_url.isEmpty()) {
|
|
|
Rows rows = new Rows();
|
|
Rows rows = new Rows();
|
|
|
for (int index = 0; index < paoSet_url.count(); index++) {
|
|
for (int index = 0; index < paoSet_url.count(); index++) {
|
|
@@ -259,6 +301,39 @@ public class HyWorkOrder extends Controller {
|
|
|
}
|
|
}
|
|
|
PaoSetRemote paoSet_url2 = pao.getPaoSet("$tattachment", "tattachment",
|
|
PaoSetRemote paoSet_url2 = pao.getPaoSet("$tattachment", "tattachment",
|
|
|
"ownertable='HYORDERNODE' and ownerid =" + pao1.getInt("hyordernodeid"));
|
|
"ownertable='HYORDERNODE' and ownerid =" + pao1.getInt("hyordernodeid"));
|
|
|
|
|
+
|
|
|
|
|
+ if((pao1.getString("twoprocessname").equals("出具安装培训记录单并与客户签字确认,服务完成") || pao1.getString("twoprocessname").equals("出具售后服务单并与客户签字确认,服务完成")) && !HYCONFIRMATIONORDER.isEmpty()) {
|
|
|
|
|
+ Rows signaturerows = new Rows();
|
|
|
|
|
+ for (int index = 0; index < HYCONFIRMATIONORDER.count(); index++) {
|
|
|
|
|
+ PaoRemote pao2 = HYCONFIRMATIONORDER.getPao(index);
|
|
|
|
|
+ PaoSetRemote confirmorder_url = pao.getPaoSet("$tattachment"+index, "tattachment",
|
|
|
|
|
+ "ownertable='HYCONFIRMATIONORDER' and type='客户签名' and ownerid =" + pao2.getInt("HYCONFIRMATIONORid"));
|
|
|
|
|
+ confirmorder_url.setOrderBy("createdate desc");
|
|
|
|
|
+ confirmorder_url.reset();
|
|
|
|
|
+ Row row2 = new Row();
|
|
|
|
|
+ if(!confirmorder_url.isEmpty()) {
|
|
|
|
|
+ String postfix = confirmorder_url.getPao(0).getString("postfix");
|
|
|
|
|
+ row2.put("tattachmentid", confirmorder_url.getPao(0).getInt("tattachmentid"));
|
|
|
|
|
+ row2.put("document", confirmorder_url.getPao(0).getString("fdocument"));
|
|
|
|
|
+ row2.put("postfix", postfix.toUpperCase());
|
|
|
|
|
+ row2.put("url", confirmorder_url.getPao(0).getString("fobsurl"));
|
|
|
|
|
+ row2.put("serialnumber", confirmorder_url.getPao(0).getString("serialnumber"));
|
|
|
|
|
+ row2.put("type", confirmorder_url.getPao(0).getString("type"));
|
|
|
|
|
+ if (postfix.equalsIgnoreCase("JPG") || postfix.equalsIgnoreCase("PNG")
|
|
|
|
|
+ || postfix.equalsIgnoreCase("JEPG")) {
|
|
|
|
|
+ row2.put("type2", "image");
|
|
|
|
|
+ } else if (postfix.equalsIgnoreCase("mp4")) {
|
|
|
|
|
+ row2.put("type2", "video");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row2.put("type2", "file");
|
|
|
|
|
+ }
|
|
|
|
|
+ signaturerows.add(row2);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ row1.put("signatureurl", signaturerows);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ row1.put("signatureurl", new Rows());
|
|
|
|
|
+ }
|
|
|
if (!paoSet_url.isEmpty()) {
|
|
if (!paoSet_url.isEmpty()) {
|
|
|
Rows rows = new Rows();
|
|
Rows rows = new Rows();
|
|
|
for (int index = 0; index < paoSet_url2.count(); index++) {
|
|
for (int index = 0; index < paoSet_url2.count(); index++) {
|