|
|
@@ -390,6 +390,33 @@ public class aftersalesmag extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "更新退货单退款账户", apiversion = R.ID20230706103703.v1.class)
|
|
|
+ public String updateAccountclass() throws YosException {
|
|
|
+
|
|
|
+ Long sa_aftersalesmagid = content.getLong("sa_aftersalesmagid");
|
|
|
+ Long sa_accountclassid = content.getLong("sa_accountclassid");
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select * from sa_aftersalesmag where sa_aftersalesmagid=" + sa_aftersalesmagid + " and siteid='" + siteid + "'");
|
|
|
+ if (rows.isEmpty()) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (!(rows.get(0).getString("status").equals("新建") || rows.get(0).getString("status").equals("审核"))) {
|
|
|
+ return getErrReturnObject().setErrMsg("非新建、审核状态无法修改退款账户").toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ SQLFactory sqlFactory = new SQLFactory(this, "更新退货单退款账户");
|
|
|
+ sqlFactory.addParameter("siteid", siteid);
|
|
|
+ sqlFactory.addParameter("username", username);
|
|
|
+ sqlFactory.addParameter("userid", userid);
|
|
|
+ sqlFactory.addParameter("sa_aftersalesmagid", sa_aftersalesmagid);
|
|
|
+ sqlFactory.addParameter("sa_accountclassid", sa_accountclassid);
|
|
|
+ dbConnect.runSqlUpdate(sqlFactory);
|
|
|
+
|
|
|
+
|
|
|
+ return queryaftersalesmagMain();
|
|
|
+ }
|
|
|
+
|
|
|
@API(title = "复核", apiversion = R.ID20230104160903.v1.class)
|
|
|
@CACHEING_CLEAN(apiversions = {R.ID20230104160603.v1.class, R.ID20230104160703.v1.class, R.ID20230105110903.class, R.ID20230105161503.v1.class},apiClass = {aftersalesmag.class,aftersalesmagItems.class, cashbill.class})
|
|
|
public String recheck() throws YosException {
|