2312上推送标识字段调整
This commit is contained in:
parent
0fb9071653
commit
7eafe36ea8
|
@ -1,6 +1,5 @@
|
||||||
package nccloud.api.so.so.UpCdate;
|
package nccloud.api.so.so.UpCdate;
|
||||||
import nc.jdbc.framework.processor.MapListProcessor;
|
|
||||||
import org.springframework.util.ObjectUtils;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
@ -10,13 +9,13 @@ import nc.itf.uap.IUAPQueryBS;
|
||||||
import nc.jdbc.framework.JdbcSession;
|
import nc.jdbc.framework.JdbcSession;
|
||||||
import nc.jdbc.framework.PersistenceManager;
|
import nc.jdbc.framework.PersistenceManager;
|
||||||
import nc.jdbc.framework.exception.DbException;
|
import nc.jdbc.framework.exception.DbException;
|
||||||
import nc.jdbc.framework.processor.ArrayListProcessor;
|
|
||||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||||
|
import nc.jdbc.framework.processor.MapListProcessor;
|
||||||
import nc.vo.pub.BusinessException;
|
import nc.vo.pub.BusinessException;
|
||||||
import nccloud.api.rest.utils.ResultMessageUtil;
|
import nccloud.api.rest.utils.ResultMessageUtil;
|
||||||
import nccloud.ws.rest.resource.AbstractNCCRestResource;
|
import nccloud.ws.rest.resource.AbstractNCCRestResource;
|
||||||
import org.json.JSONString;
|
import org.json.JSONString;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
|
@ -27,7 +26,11 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import nc.itf.cm.productcostcollect.IProductCostCollectService;
|
|
||||||
|
/**
|
||||||
|
* BIP流水3天内未认领退回NCC,并修改推送标识
|
||||||
|
* 2005适配2312
|
||||||
|
*/
|
||||||
@Path("so/so/UpCdate")
|
@Path("so/so/UpCdate")
|
||||||
public class Updateinformer extends AbstractNCCRestResource {
|
public class Updateinformer extends AbstractNCCRestResource {
|
||||||
|
|
||||||
|
@ -78,7 +81,7 @@ public class Updateinformer extends AbstractNCCRestResource {
|
||||||
}
|
}
|
||||||
// StringBuilder sqlStr = new StringBuilder();
|
// StringBuilder sqlStr = new StringBuilder();
|
||||||
List sqlStr = new ArrayList();
|
List sqlStr = new ArrayList();
|
||||||
ArrayList<String> pk_list=null;
|
ArrayList<String> pk_list = null;
|
||||||
|
|
||||||
|
|
||||||
// for (int i = 0; i < arrayList.size(); i++) {
|
// for (int i = 0; i < arrayList.size(); i++) {
|
||||||
|
@ -98,15 +101,15 @@ public class Updateinformer extends AbstractNCCRestResource {
|
||||||
}
|
}
|
||||||
|
|
||||||
result = sb.toString();
|
result = sb.toString();
|
||||||
}else {
|
} else {
|
||||||
Map dataMap = (Map) arrayList.get(0);
|
Map dataMap = (Map) arrayList.get(0);
|
||||||
|
|
||||||
result= "'"+(String) dataMap.get("pk_informer")+"'";
|
result = "'" + (String) dataMap.get("pk_informer") + "'";
|
||||||
|
|
||||||
}
|
}
|
||||||
String sqlser="select pk_informer from cmp_informer where pk_informer in("+result+")";
|
String sqlser = "select pk_informer from cmp_informer where pk_informer in(" + result + ")";
|
||||||
// ArrayList<String> results = (ArrayList<String>) getQueryService().executeQuery(sqlser, new ArrayListProcessor());
|
// ArrayList<String> results = (ArrayList<String>) getQueryService().executeQuery(sqlser, new ArrayListProcessor());
|
||||||
List<Map<String,String>> results = (List<Map<String, String>>) getQueryService().executeQuery(sqlser, new MapListProcessor());
|
List<Map<String, String>> results = (List<Map<String, String>>) getQueryService().executeQuery(sqlser, new MapListProcessor());
|
||||||
// if (results != null || results.size()!=arrayList.size()) {
|
// if (results != null || results.size()!=arrayList.size()) {
|
||||||
// vbillcodes.add(dataMap.get("pk_informer"));
|
// vbillcodes.add(dataMap.get("pk_informer"));
|
||||||
// }else {
|
// }else {
|
||||||
|
@ -117,7 +120,7 @@ public class Updateinformer extends AbstractNCCRestResource {
|
||||||
ArrayList<String> result2 = new ArrayList<>();
|
ArrayList<String> result2 = new ArrayList<>();
|
||||||
System.out.println(results.getClass());
|
System.out.println(results.getClass());
|
||||||
for (int i = 0; i < results.size(); i++) {
|
for (int i = 0; i < results.size(); i++) {
|
||||||
Map aa=results.get(i);
|
Map aa = results.get(i);
|
||||||
result2.add((String) aa.get("pk_informer"));
|
result2.add((String) aa.get("pk_informer"));
|
||||||
}
|
}
|
||||||
ArrayList<Object> vbillcodes = new ArrayList<>();
|
ArrayList<Object> vbillcodes = new ArrayList<>();
|
||||||
|
@ -129,14 +132,14 @@ public class Updateinformer extends AbstractNCCRestResource {
|
||||||
if (pkInformer == null || status == null) {
|
if (pkInformer == null || status == null) {
|
||||||
continue; // ´¦Àí null Öµ
|
continue; // ´¦Àí null Öµ
|
||||||
}
|
}
|
||||||
//判断字符串在不在results查询对象里面
|
// 判断字符串在不在results查询对象里面
|
||||||
//将results里面的所有值改为string类型
|
// 将results里面的所有值改为string类型
|
||||||
|
|
||||||
String pk_informer= (String) dataMap.get("pk_informer");
|
String pk_informer = (String) dataMap.get("pk_informer");
|
||||||
if (result2.contains(pk_informer)) {
|
if (result2.contains(pk_informer)) {
|
||||||
vbillcodes.add(dataMap.get("pk_informer"));
|
vbillcodes.add(dataMap.get("pk_informer"));
|
||||||
|
|
||||||
sqlStr.add("UPDATE cmp_informer SET def01 = '" + dataMap.get("status") + "' where pk_informer='"+dataMap.get("pk_informer")
|
sqlStr.add("UPDATE cmp_informer SET vdef1 = '" + dataMap.get("status") + "' where pk_informer='" + dataMap.get("pk_informer")
|
||||||
+ "';");
|
+ "';");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,8 +150,8 @@ public class Updateinformer extends AbstractNCCRestResource {
|
||||||
returnJson.put("state", '1');
|
returnJson.put("state", '1');
|
||||||
if (succState == 0) {
|
if (succState == 0) {
|
||||||
returnJson.put("msg", "ʧ°Ü");
|
returnJson.put("msg", "ʧ°Ü");
|
||||||
}else {
|
} else {
|
||||||
returnJson.put("msg", "成功,已修改"+succState+"行");
|
returnJson.put("msg", "成功,已修改" + succState + "行");
|
||||||
|
|
||||||
}
|
}
|
||||||
return ResultMessageUtil.toJSON(returnJson);
|
return ResultMessageUtil.toJSON(returnJson);
|
||||||
|
|
Loading…
Reference in New Issue