|
@@ -103,12 +103,14 @@ public class Custorder extends Controller {
|
|
|
@Param(paramname = "sa_custorderid", remarks = "订单ID,修改时必填", fieldtype = FieldType.BigInt, isrequired = false),
|
|
@Param(paramname = "sa_custorderid", remarks = "订单ID,修改时必填", fieldtype = FieldType.BigInt, isrequired = false),
|
|
|
@Param(paramname = "sa_customersid", remarks = "客户ID,新增时必填", fieldtype = FieldType.BigInt),
|
|
@Param(paramname = "sa_customersid", remarks = "客户ID,新增时必填", fieldtype = FieldType.BigInt),
|
|
|
@Param(paramname = "remarks", remarks = "备注说明", fieldtype = FieldType.Varchar, isrequired = false),
|
|
@Param(paramname = "remarks", remarks = "备注说明", fieldtype = FieldType.Varchar, isrequired = false),
|
|
|
- @Param(paramname = "billdate", remarks = "开单日期", fieldtype = FieldType.Date, isrequired = false)})
|
|
|
|
|
|
|
+ @Param(paramname = "billdate", remarks = "开单日期", fieldtype = FieldType.Date, isrequired = false),
|
|
|
|
|
+ @Param(paramname = "amount", remarks = "订单金额", fieldtype = FieldType.Date, isrequired = false)})
|
|
|
public String sa_custorder_save() throws YosException {
|
|
public String sa_custorder_save() throws YosException {
|
|
|
long sa_custorderid = content.getLongValue("sa_custorderid");
|
|
long sa_custorderid = content.getLongValue("sa_custorderid");
|
|
|
long sa_customersid = content.getLong("sa_customersid");//客户ID
|
|
long sa_customersid = content.getLong("sa_customersid");//客户ID
|
|
|
String remarks = content.getStringValue("remarks");// 备注说明
|
|
String remarks = content.getStringValue("remarks");// 备注说明
|
|
|
String billdate = content.getStringValue("billdate");// 开单日期
|
|
String billdate = content.getStringValue("billdate");// 开单日期
|
|
|
|
|
+ double amount = content.getDoubleValue("amount");// 订单金额
|
|
|
Rows sa_custorderRow = SQLFactory.createQuerySQL(this, "sa_custorder", "sa_custorderid").setSiteid(siteid).setUniqueid(sa_custorderid).query();
|
|
Rows sa_custorderRow = SQLFactory.createQuerySQL(this, "sa_custorder", "sa_custorderid").setSiteid(siteid).setUniqueid(sa_custorderid).query();
|
|
|
SQLDump sqldump = new SQLDump();
|
|
SQLDump sqldump = new SQLDump();
|
|
|
if (sa_custorderid == 0 || sa_custorderRow.isEmpty()) {
|
|
if (sa_custorderid == 0 || sa_custorderRow.isEmpty()) {
|
|
@@ -121,6 +123,7 @@ public class Custorder extends Controller {
|
|
|
insertSQL.setValue("billdate", billdate);// 开单日期
|
|
insertSQL.setValue("billdate", billdate);// 开单日期
|
|
|
insertSQL.setValue("status", "待出库");// 状态
|
|
insertSQL.setValue("status", "待出库");// 状态
|
|
|
insertSQL.setValue("ispaid", 0);// 付款状态,待付款
|
|
insertSQL.setValue("ispaid", 0);// 付款状态,待付款
|
|
|
|
|
+ insertSQL.setValue("amount", amount);// 订单金额
|
|
|
insertSQL.setValue("sys_enterpriseid", sys_enterpriseid);// 合作企业档案ID
|
|
insertSQL.setValue("sys_enterpriseid", sys_enterpriseid);// 合作企业档案ID
|
|
|
insertSQL.setValue("sa_customersid", sa_customersid);// 合作企业档案ID
|
|
insertSQL.setValue("sa_customersid", sa_customersid);// 合作企业档案ID
|
|
|
insertSQL.setUniqueid(sa_custorderid);
|
|
insertSQL.setUniqueid(sa_custorderid);
|
|
@@ -259,8 +262,8 @@ public class Custorder extends Controller {
|
|
|
Rows rows = querySQL.query();
|
|
Rows rows = querySQL.query();
|
|
|
if (rows.isNotEmpty()) {
|
|
if (rows.isNotEmpty()) {
|
|
|
double qty = rows.get(0).getDouble("qty");
|
|
double qty = rows.get(0).getDouble("qty");
|
|
|
- double amount = rows.get(0).getDouble("amount");
|
|
|
|
|
- SQLFactory.createUpdateSQL(this, "sa_custorder").setValue("qty", qty).setValue("amount", amount).setUniqueid(sa_custorderid).update();
|
|
|
|
|
|
|
+ //double amount = rows.get(0).getDouble("amount");
|
|
|
|
|
+ SQLFactory.createUpdateSQL(this, "sa_custorder").setValue("qty", qty).setUniqueid(sa_custorderid).update();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|