|
|
@@ -277,13 +277,14 @@ public class supplyanddemand extends Controller {
|
|
|
public String updatesupplyanddemandstatus() {
|
|
|
long tsupplyanddemandid = content.getLong("tsupplyanddemandid");
|
|
|
String fstatus = content.getString("fstatus");
|
|
|
- Rows rows = dbConnect.runSqlQuery("select * from tsupplyanddemand where siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select * from tsupplyanddemand where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
if (rows.isEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("供需内容不存在").toString();
|
|
|
}
|
|
|
if (!Arrays.asList(new String[]{"新建", "发布", "待对接", "对接中", "已解决", "已过期"}).contains(fstatus)) {
|
|
|
return getErrReturnObject().setErrMsg("无效的供需状态").toString();
|
|
|
}
|
|
|
+ long tagentsid = rows.get(0).getLong("tagentsid");
|
|
|
switch (fstatus) {
|
|
|
case "新建": {
|
|
|
dbConnect.runSqlUpdate("update tsupplyanddemand set fstatus='新建',changeby='" + username + "',changedate=getDate(),checkby=null,checkdate=null where siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
@@ -306,7 +307,7 @@ public class supplyanddemand extends Controller {
|
|
|
dbConnect.runSqlUpdate(list);
|
|
|
break;
|
|
|
}
|
|
|
- case "对接中":{
|
|
|
+ case "对接中": {
|
|
|
long timdialogid = content.getLong("timdialogid");
|
|
|
ArrayList<String> list = new ArrayList<>();
|
|
|
list.add("update tsupplyanddemand set fstatus='对接中',changeby='" + username + "',changedate=getDate(),timdialogid_talking='" + timdialogid + "' where siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
@@ -314,7 +315,7 @@ public class supplyanddemand extends Controller {
|
|
|
dbConnect.runSqlUpdate(list);
|
|
|
break;
|
|
|
}
|
|
|
- case "待对接":{
|
|
|
+ case "待对接": {
|
|
|
long timdialogid = content.getLong("timdialogid");
|
|
|
ArrayList<String> list = new ArrayList<>();
|
|
|
list.add("update tsupplyanddemand set fstatus='待对接',changeby='" + username + "',changedate=getDate(),timdialogid_talking=null where siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|