|
|
@@ -278,6 +278,33 @@ public class aftersalesmag extends Controller {
|
|
|
return getSucReturnObject().setData(rows).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.ID20230104160803.v1.class)
|
|
|
@CACHEING_CLEAN(apiversions = {R.ID20230104160603.v1.class, R.ID20230104160703.v1.class, R.ID20230105161503.v1.class})
|
|
|
public String delete() throws YosException {
|