From 3d75f684d8b682d2aac275da87db06a520284b81 Mon Sep 17 00:00:00 2001
From: xinyb <574600396@qq.com>
Date: 星期六, 01 六月 2024 16:20:25 +0800
Subject: [PATCH] 售后管理逻辑调整

---
 src/com/yc/sdk/weixincp3rd/service/AfterSalesImpl.java |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/com/yc/sdk/weixincp3rd/service/AfterSalesImpl.java b/src/com/yc/sdk/weixincp3rd/service/AfterSalesImpl.java
index dd33e5a..d95aafb 100644
--- a/src/com/yc/sdk/weixincp3rd/service/AfterSalesImpl.java
+++ b/src/com/yc/sdk/weixincp3rd/service/AfterSalesImpl.java
@@ -43,7 +43,9 @@
                         " return \n" +
                         " end \n";
             }
-            sql += "select @Longitude = Longitude,@Latitude=Latitude,@FullAddressName=FullAddressName,@FullAddress=FullAddress,@Street=Street from t110209 " +
+            sql += "select @Longitude = Longitude,@Latitude=Latitude,@FullAddressName=FullAddressName," +
+                    "@FullAddress=isnull(FullAddress,'')+''+isnull(FullAddressName,'')+''+isnull(Street,'')," +
+                    "@Street=Street from t110209 " +
                     "where seq=@seq";
             sql += " exec sp_newdoccode 640210,'SYSTEM',@docCode output\n";
             sql += "insert into t640210H(docCode,formId,docDate,periodID,ccCode,ccName,DocStatus,LastDocStatus,PostCode,PostName,companyId,companyName,AcceptSource,cltCode,cltName,tel," +
@@ -93,7 +95,7 @@
         try {
             sql += "select a.topic,a.id,a.inserttime,a.curStatus,a.ActionCode,a.ActionName,a.ActionTel,\n" +
                     "b.acceptSource,b.docCode,b.formId,b.PaiGongDocCode,b.PaiGongFormId,b.enterDate,b.preSendDate,b.uploadFiles,b.cltCode,b.cltName,b.tel," +
-                    "(isnull(b.propertyAddress,'')+''+isnull(b.fullAddressName,'')+''+isnull(b.Street,'')) as propertyAddress," +
+                    "isnull(b.propertyAddress,'') as propertyAddress," +
                     "isnull(b.docStatus,0) docStatus,isnull(b.LastDocStatus,0) lastDocStatus,b.memo,b.longitude,b.latitude,b.fullAddressName \n" +
                     "from t640210D2 a right join t640210h b on a.SODocCode=b.docCode where b.docCode= " + GridUtils.prossSqlParm(docCode) + " order by id desc";
             return AfterSalesEntity.setAfterSalesEntity(jdbcTemplate.queryForList(sql));
@@ -162,7 +164,7 @@
         try {
             sql += "select a.topic,a.id,a.inserttime,a.curStatus,a.ActionCode,a.ActionName,a.ActionTel,\n" +
                     "b.acceptSource,b.docCode,b.formId,b.PaiGongDocCode,b.PaiGongFormId,b.enterDate,b.preSendDate,b.UploadFiles,b.cltCode,b.cltName,b.tel," +
-                    "(isnull(b.propertyAddress,'')+''+isnull(b.fullAddressName,'')+''+isnull(b.Street,'')) as propertyAddress," +
+                    "isnull(b.propertyAddress,'') as propertyAddress," +
                     "isnull(b.docStatus,0) docStatus,isnull(b.lastDocStatus,0) lastDocStatus,b.memo\n" +
                     "from t640210D2 a right join t640210h b on a.SODocCode=b.docCode where b.docCode= " + GridUtils.prossSqlParm(docCode) + " order by id desc";
             return AfterSalesEntity.setAfterSalesEntity(jdbcTemplate.queryForList(sql));
@@ -188,14 +190,14 @@
             }
             sql += "select @PaiGongDocCode=PaiGongDocCode,@PaiGongFormId=PaiGongFormId,@PaiGongFormType=PaiGongFormType,@periodID=periodID from t640210H where docCode=" + GridUtils.prossSqlParm(param.getRefCode());
             sql += " exec sp_newdoccode 640402,'SYSTEM',@docCode output\n";
-            sql += "insert into t640402H(docCode,formId,refCode,refFormId,refFormType,PaiGongDocCode,PaiGongFormId,PaiGongFormType,periodID,DocStatus,companyId,companyName,docDate,cltCode,cltName,tel,EnterDate,OverallEvaluationScore,InstallEvaluationScore,AfterSalesEvaluationScore," +
+            sql += "insert into t640402H(docCode,formId,refCode,refFormId,refFormType,postCode,postName,PaiGongDocCode,PaiGongFormId,PaiGongFormType,periodID,DocStatus,companyId,companyName,docDate,cltCode,cltName,tel,EnterDate,OverallEvaluationScore,InstallEvaluationScore,AfterSalesEvaluationScore," +
                     "DeliveryEvaluationScore,HDMemo,UploadFiles)" +
-                    " values (@docCode,640402," + GridUtils.prossSqlParm(param.getRefCode()) + "," + param.getRefFormId() + ",496,@PaiGongDocCode,@PaiGongFormId,@PaiGongFormType,@periodID," +
+                    " values (@docCode,640402," + GridUtils.prossSqlParm(param.getRefCode()) + "," + param.getRefFormId() + ",496,@cltCode,@cltName,@PaiGongDocCode,@PaiGongFormId,@PaiGongFormType,@periodID," +
                     "100,@companyId,@companyName,convert(varchar(10),getdate(),120),@cltCode,@cltName,@tel,getdate()," +
                     GridUtils.prossSqlParm(param.getOverallEvaluationScore()) + "," + GridUtils.prossSqlParm(param.getInstallEvaluationScore()) + "," +
                     GridUtils.prossSqlParm(param.getAfterSalesEvaluationScore()) + "," + GridUtils.prossSqlParm(param.getDeliveryEvaluationScore()) + "," +
                     GridUtils.prossSqlParm(param.getHDMemo()) + "," + GridUtils.prossSqlParm(param.getUploadFiles()) + ") \n";
-            sql += "exec dbo.p640402post 'SYSTEM','绯荤粺绠$悊鍛�',@doccode,640402,0,'鎻愪氦','','','' ";
+            sql += "exec dbo.p640402post 'SYSTEM','绯荤粺绠$悊鍛�',@doccode,640402,0,'鎻愪氦','','','' \n";
             jdbcTemplate.update(sql);
         } catch (Exception e) {
             throw e;

--
Gitblit v1.8.0