修改对接接口
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ public class SrmsApiController {
|
|||||||
}
|
}
|
||||||
List<StandardTree> list = re.getResult();
|
List<StandardTree> list = re.getResult();
|
||||||
JSONObject jsonResponses = ResponsesUtil.getJsonOk();
|
JSONObject jsonResponses = ResponsesUtil.getJsonOk();
|
||||||
jsonResponses.put("Rows",JSON.toJSONString(list));
|
jsonResponses.put("result",JSON.toJSONString(list));
|
||||||
return ResponsesUtil.getJsonResult(json.get(MESSAGE_HEADER),jsonResponses);
|
return ResponsesUtil.getJsonResult(json.get(MESSAGE_HEADER),jsonResponses);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("获取所有体系数据异常:",e);
|
log.error("获取所有体系数据异常:",e);
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@
|
|||||||
left join sar_file_split_info s1 on s1.standard_id = law.id and s1.file_type = 'publish_of_original' and s1.publish_before_id is null and s1.del_flag = 0
|
left join sar_file_split_info s1 on s1.standard_id = law.id and s1.file_type = 'publish_of_original' and s1.publish_before_id is null and s1.del_flag = 0
|
||||||
<where>
|
<where>
|
||||||
<if test="standard.partCategoryName != '' and standard.partCategoryName != null">
|
<if test="standard.partCategoryName != '' and standard.partCategoryName != null">
|
||||||
and l1.name = #{standard.partCategoryName}
|
and l1.name like concat(concat('%',#{standard.partCategoryName}),'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="standard.hasSplit == 1">
|
<if test="standard.hasSplit == 1">
|
||||||
and s1.split_result = '成功'
|
and s1.split_result = '成功'
|
||||||
|
|||||||
+4
-3
@@ -288,12 +288,13 @@ public class SrmsApiServiceImpl implements SrmsApiService {
|
|||||||
if(StringUtils.isBlank(token) || !Objects.equals(TokenUtils.getTokenByRequest(req),token)){
|
if(StringUtils.isBlank(token) || !Objects.equals(TokenUtils.getTokenByRequest(req),token)){
|
||||||
return Result.error(SYS_ERR);
|
return Result.error(SYS_ERR);
|
||||||
}
|
}
|
||||||
JSONArray requests = JSON.parseArray(JSON.toJSONString(json.get(REQUESTS)));
|
JSONObject requests = JSON.parseObject(JSON.toJSONString(json.get(REQUESTS)));
|
||||||
if(CollectionUtils.isEmpty(requests)){
|
JSONArray rows = JSON.parseArray(JSON.toJSONString(requests.get("Rows")));
|
||||||
|
if(CollectionUtils.isEmpty(rows)){
|
||||||
return Result.error(ADD_NOT_NULL);
|
return Result.error(ADD_NOT_NULL);
|
||||||
}
|
}
|
||||||
List<ProductDesign> listProductDesign = new ArrayList<>();
|
List<ProductDesign> listProductDesign = new ArrayList<>();
|
||||||
for (Object request : requests) {
|
for (Object request : rows) {
|
||||||
JSONObject js = JSON.parseObject(JSON.toJSONString(request));
|
JSONObject js = JSON.parseObject(JSON.toJSONString(request));
|
||||||
// todo || !js.containsKey("queryLabels")
|
// todo || !js.containsKey("queryLabels")
|
||||||
if(!js.containsKey("ID") || !js.containsKey(STANDARD_NUMBER) ){
|
if(!js.containsKey("ID") || !js.containsKey(STANDARD_NUMBER) ){
|
||||||
|
|||||||
Reference in New Issue
Block a user