|
|
@@ -27,6 +27,7 @@ public class sizecustomizedscheme extends Controller {
|
|
|
public sizecustomizedscheme(JSONObject content) throws YosException {
|
|
|
super(content);
|
|
|
}
|
|
|
+
|
|
|
@API(title = "尺寸定制方案单新增更新", apiversion = R.ID20230707091503.v1.class)
|
|
|
@CACHEING_CLEAN(apiClass = {sizecustomizedscheme.class, Item.class, restcontroller.webmanage.sale.item.Item.class})
|
|
|
public String insertormodify_sizecustomizedscheme() throws YosException {
|
|
|
@@ -37,15 +38,16 @@ public class sizecustomizedscheme extends Controller {
|
|
|
String schemename = content.getStringValue("schemename");
|
|
|
String schemedescription = content.getStringValue("schemedescription");
|
|
|
String type = content.getStringValue("type");
|
|
|
- BigDecimal min =content.getBigDecimalValue("min");
|
|
|
- BigDecimal max =content.getBigDecimalValue("max");
|
|
|
- int decimalplaces =content.getIntValue("decimalplaces");
|
|
|
+ String valuetype = content.getStringValue("valuetype");
|
|
|
+ BigDecimal min = content.getBigDecimalValue("min");
|
|
|
+ BigDecimal max = content.getBigDecimalValue("max");
|
|
|
+ int decimalplaces = content.getIntValue("decimalplaces");
|
|
|
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "尺寸定制方案新增");
|
|
|
|
|
|
|
|
|
if (sa_sizecustomizedschemeid <= 0 || dbConnect.runSqlQuery(
|
|
|
- "select sa_sizecustomizedschemeid from sa_sizecustomizedscheme where sa_sizecustomizedschemeid=" + sa_sizecustomizedschemeid)
|
|
|
+ "select sa_sizecustomizedschemeid from sa_sizecustomizedscheme where sa_sizecustomizedschemeid=" + sa_sizecustomizedschemeid)
|
|
|
.isEmpty()) {
|
|
|
sa_sizecustomizedschemeid = createTableID(tableName);
|
|
|
sqlList.add(
|
|
|
@@ -76,6 +78,7 @@ public class sizecustomizedscheme extends Controller {
|
|
|
sqlFactory.addParameter("min", min);
|
|
|
sqlFactory.addParameter("max", max);
|
|
|
sqlFactory.addParameter("decimalplaces", decimalplaces);
|
|
|
+ sqlFactory.addParameter("valuetype", valuetype.isEmpty() ? "数字" : valuetype);
|
|
|
sqlList.add(sqlFactory.getSQL());
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
|
|
|
@@ -99,8 +102,8 @@ public class sizecustomizedscheme extends Controller {
|
|
|
sqlFactorydetail.addParameter("where", " 1=1 ");
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
Rows rowsdetail = dbConnect.runSqlQuery(sqlFactorydetail);
|
|
|
- if(rows.isNotEmpty()){
|
|
|
- rows.get(0).put("rowsdetail",rowsdetail);
|
|
|
+ if (rows.isNotEmpty()) {
|
|
|
+ rows.get(0).put("rowsdetail", rowsdetail);
|
|
|
}
|
|
|
Row row = rows.isNotEmpty() ? rows.get(0) : new Row();
|
|
|
|
|
|
@@ -185,7 +188,7 @@ public class sizecustomizedscheme extends Controller {
|
|
|
.runSqlQuery("select * from sa_sizecustomizedscheme where status !='新建' and siteid='" + siteid
|
|
|
+ "' and sa_sizecustomizedschemeid='" + sa_sizecustomizedschemeid + "'");
|
|
|
Rows RowsCount = dbConnect
|
|
|
- .runSqlQuery("select * from plm_item where (widthschemeid="+sa_sizecustomizedschemeid +" or lengthschemeid="+sa_sizecustomizedschemeid +") and siteid='"+siteid+"'");
|
|
|
+ .runSqlQuery("select * from plm_item where (widthschemeid=" + sa_sizecustomizedschemeid + " or lengthschemeid=" + sa_sizecustomizedschemeid + ") and siteid='" + siteid + "'");
|
|
|
|
|
|
if (RowsStatus.isNotEmpty()) {
|
|
|
batchDeleteErr.addErr(sa_sizecustomizedschemeid, "非新建状态的尺寸定制方案无法删除");
|