|
|
@@ -599,7 +599,7 @@ public class sendrepair extends Controller {
|
|
|
if (accountclassrows.isNotEmpty()) {
|
|
|
sa_accountclassid = accountclassrows.get(0).getLong("sa_accountclassid");
|
|
|
}
|
|
|
- Rows rows = dbConnect.runSqlQuery("select t1.sys_enterpriseid,t1.remarks,t1.billno,t1.status,t2.qty,t2.sa_sendrepair_detailid,t2.amount,t2.agentcost,t2.disposition from sa_sendrepair t1 " +
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select t1.sys_enterpriseid,t1.remarks,t1.billno,t1.status,t2.qty,t2.sa_sendrepair_detailid,t2.amount,t2.agentcost,t2.disposition,t2.duty,t2.logisticscost from sa_sendrepair t1 " +
|
|
|
"inner join sa_sendrepair_detail t2 on t1.sa_sendrepairid=t2.sa_sendrepairid" +
|
|
|
" where t1.sa_sendrepairid ='"
|
|
|
+ sa_sendrepairid + "' and t1.siteid='" + siteid + "'");
|
|
|
@@ -609,6 +609,9 @@ public class sendrepair extends Controller {
|
|
|
}
|
|
|
Row row = rows.get(0);
|
|
|
|
|
|
+ String duty = row.getString("duty");
|
|
|
+ BigDecimal logisticscost = row.getBigDecimal("logisticscost");
|
|
|
+
|
|
|
Rows dispositionRows = dbConnect.runSqlQuery("select * from sa_aftersalesmag_disposition where disposition='" + row.getString("disposition") + "'");
|
|
|
if (dispositionRows.isEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("返修处理意见不存在")
|
|
|
@@ -666,6 +669,13 @@ public class sendrepair extends Controller {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (duty.equals("物流公司")) {
|
|
|
+ if (ischeck) {
|
|
|
+ sqlList.add("update sa_sendrepair_detail set practicalamount=" + logisticscost + " where sa_sendrepairid=" + sa_sendrepairid);
|
|
|
+ } else {
|
|
|
+ sqlList.add("update sa_sendrepair_detail set practicalamount=0 where sa_sendrepairid=" + sa_sendrepairid);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_sendrepair");
|
|
|
updateSQL.setUniqueid(sa_sendrepairid);
|