|
|
@@ -153,9 +153,20 @@ public class MesProductCmtController extends BaseController {
|
|
|
// 获取每个元素(JSONObject)并打印其属性值
|
|
|
JSONObject obj = jsonArr.getJSONObject(i);
|
|
|
|
|
|
+ // 修复HTTP传输中+号变空格的问题
|
|
|
+ String snValue = obj.getString("sn");
|
|
|
+ if(snValue != null && snValue.startsWith(" ")) {
|
|
|
+ snValue = "+" + snValue.trim();
|
|
|
+ }
|
|
|
+
|
|
|
+ String oprnoValue = obj.getString("oprno");
|
|
|
+ if(oprnoValue != null && oprnoValue.startsWith(" ")) {
|
|
|
+ oprnoValue = "+" + oprnoValue.trim();
|
|
|
+ }
|
|
|
+
|
|
|
MesProductCmt mesProductFsw = new MesProductCmt();
|
|
|
- mesProductFsw.setSn(obj.getString("sn"));
|
|
|
- mesProductFsw.setOprno(obj.getString("oprno"));
|
|
|
+ mesProductFsw.setSn(snValue);
|
|
|
+ mesProductFsw.setOprno(oprnoValue);
|
|
|
mesProductFsw.setLineSn(obj.getString("lineSn"));
|
|
|
mesProductFsw.setContent(obj.getString("content"));
|
|
|
mesProductCmtService.save(mesProductFsw);
|