| | |
| | | codeOrderSecDTO.setSecValue(keyValue.getValue()); |
| | | secDTOList.add(codeOrderSecDTO); |
| | | }); |
| | | codeOrderDTO.setLcStatus("Released"); |
| | | codeOrderDTO.setSecDTOList(secDTOList); |
| | | codeOrderDTO.setData(dataMap); |
| | | Object object = JSONObject.toJSON(codeOrderDTO); |
| | | Map<String,String> headerMap=new HashMap<>(); |
| | | headerMap.put("content-type","application/json"); |
| | | headerMap.put("Blade-Auth",this.owner.getTokenUserObject().getAccess_token()); |
| | | R r= HttpUtil.sendPost(url+"/addSaveCode",object.toString(),headerMap); |
| | | //R r= HttpUtil.sendPost(url+"/addSaveCode",object.toString(),headerMap); |
| | | String code=""; |
| | | //校验关键属性存在的数据直接返回编码 |
| | | R checkKeyAttrOnOrderR= HttpUtil.sendPost(url+"/checkKeyAttrOnOrderFordatas",object.toString(),headerMap); |
| | | if(checkKeyAttrOnOrderR.isSuccess()){ |
| | | List<Map> list=(List)checkKeyAttrOnOrderR.getData(); |
| | | if(!CollectionUtils.isEmpty(list)) { |
| | | code=list.get(0).get("ID")!=null?list.get(0).get("ID").toString():""; |
| | | this.owner.setApplyCode(code); |
| | | this.owner.getApplyTxt().requestFocusInWindow(); |
| | | this.owner.getApplyTxt().selectAll(); |
| | | this.owner.setAttrNameAndValMap(attrNameAndValMap); |
| | | return; |
| | | } |
| | | } |
| | | R r= HttpUtil.sendPost(url+"/addSaveCode",object.toString(),headerMap); |
| | | if(r.isSuccess()){ |
| | | code=r.getData().toString(); |
| | | this.owner.setApplyCode(code); |