|
@@ -162,7 +162,9 @@ public class Custorder extends Controller {
|
|
|
@Param(paramname = "oldprice", remarks = "原价(元)", fieldtype = FieldType.Decimal),
|
|
@Param(paramname = "oldprice", remarks = "原价(元)", fieldtype = FieldType.Decimal),
|
|
|
@Param(paramname = "discountrate", remarks = "折扣%", fieldtype = FieldType.Decimal),
|
|
@Param(paramname = "discountrate", remarks = "折扣%", fieldtype = FieldType.Decimal),
|
|
|
@Param(paramname = "price", remarks = "单价(元)", fieldtype = FieldType.Decimal),
|
|
@Param(paramname = "price", remarks = "单价(元)", fieldtype = FieldType.Decimal),
|
|
|
- @Param(paramname = "amount", remarks = "金额(元)", fieldtype = FieldType.Decimal)})
|
|
|
|
|
|
|
+ @Param(paramname = "amount", remarks = "金额(元)", fieldtype = FieldType.Decimal),
|
|
|
|
|
+ @Param(paramname = "remarks", remarks = "备注", fieldtype = FieldType.Varchar),
|
|
|
|
|
+ })
|
|
|
public String sa_custorderitems_save() throws YosException {
|
|
public String sa_custorderitems_save() throws YosException {
|
|
|
long sa_custorderid = content.getLong("sa_custorderid");// 订单ID
|
|
long sa_custorderid = content.getLong("sa_custorderid");// 订单ID
|
|
|
long sa_custorderitemsid = content.getLongValue("sa_custorderitemsid");
|
|
long sa_custorderitemsid = content.getLongValue("sa_custorderitemsid");
|
|
@@ -170,6 +172,7 @@ public class Custorder extends Controller {
|
|
|
double price = content.getDoubleValue("price");// 单价(元)
|
|
double price = content.getDoubleValue("price");// 单价(元)
|
|
|
double amount = content.getDoubleValue("amount");// 金额(元)
|
|
double amount = content.getDoubleValue("amount");// 金额(元)
|
|
|
double discountrate = content.getDoubleValue("discountrate");// 折扣%
|
|
double discountrate = content.getDoubleValue("discountrate");// 折扣%
|
|
|
|
|
+ String remarks = content.getStringValue("remarks");//
|
|
|
SQLDump sqldump = new SQLDump();
|
|
SQLDump sqldump = new SQLDump();
|
|
|
if (sa_custorderitemsid <= 0 || SQLFactory.createQuerySQL(this, "sa_custorderitems", "sa_custorderitemsid").setSiteid(siteid).setUniqueid(sa_custorderitemsid).query().isEmpty()) {
|
|
if (sa_custorderitemsid <= 0 || SQLFactory.createQuerySQL(this, "sa_custorderitems", "sa_custorderitemsid").setSiteid(siteid).setUniqueid(sa_custorderitemsid).query().isEmpty()) {
|
|
|
long sys_enterprise_itemid = content.getLongValue("sys_enterprise_itemid");// 企业商品档案表ID
|
|
long sys_enterprise_itemid = content.getLongValue("sys_enterprise_itemid");// 企业商品档案表ID
|
|
@@ -185,6 +188,7 @@ public class Custorder extends Controller {
|
|
|
insertSQL.setValue("price", price);// 单价(元)
|
|
insertSQL.setValue("price", price);// 单价(元)
|
|
|
insertSQL.setValue("amount", amount);// 金额(元)
|
|
insertSQL.setValue("amount", amount);// 金额(元)
|
|
|
insertSQL.setValue("status", "待出库");
|
|
insertSQL.setValue("status", "待出库");
|
|
|
|
|
+ insertSQL.setValue("remarks", "remarks");
|
|
|
Rows sys_enterprise_itemRows = SQLFactory.createQuerySQL(this, "sys_enterprise_item").setWhere("sys_enterprise_itemid", sys_enterprise_itemid).query();
|
|
Rows sys_enterprise_itemRows = SQLFactory.createQuerySQL(this, "sys_enterprise_item").setWhere("sys_enterprise_itemid", sys_enterprise_itemid).query();
|
|
|
if (sys_enterprise_itemRows.isEmpty()) {
|
|
if (sys_enterprise_itemRows.isEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("未找到商品档案信息").toString();
|
|
return getErrReturnObject().setErrMsg("未找到商品档案信息").toString();
|
|
@@ -210,6 +214,7 @@ public class Custorder extends Controller {
|
|
|
updateSQL.setSiteid(siteid);
|
|
updateSQL.setSiteid(siteid);
|
|
|
updateSQL.setWhere("sa_custorderid", sa_custorderid);
|
|
updateSQL.setWhere("sa_custorderid", sa_custorderid);
|
|
|
updateSQL.setUniqueid(sa_custorderitemsid);
|
|
updateSQL.setUniqueid(sa_custorderitemsid);
|
|
|
|
|
+ updateSQL.setValue("remarks", "remarks");
|
|
|
sqldump.add(updateSQL);
|
|
sqldump.add(updateSQL);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -225,7 +230,7 @@ public class Custorder extends Controller {
|
|
|
long sa_custorderid = content.getLongValue("sa_custorderid");
|
|
long sa_custorderid = content.getLongValue("sa_custorderid");
|
|
|
long sa_custorderitemsid = content.getLongValue("sa_custorderitemsid");
|
|
long sa_custorderitemsid = content.getLongValue("sa_custorderitemsid");
|
|
|
|
|
|
|
|
- if ("待出库".equals(getRow("sa_custorderitems", sa_custorderitemsid).getString("status"))) {
|
|
|
|
|
|
|
+ if (!"待出库".equals(getRow("sa_custorderitems", sa_custorderitemsid).getString("status"))) {
|
|
|
return getErrReturnObject().setErrMsg("非待出库状态,不能删除").toString();
|
|
return getErrReturnObject().setErrMsg("非待出库状态,不能删除").toString();
|
|
|
}
|
|
}
|
|
|
|
|
|