| | |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import com.vci.web.service.OsQuereyTemplateServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.DocumentException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询条件的查询按钮查询lis列表 |
| | | * @param dataMap 传输的数据对象: |
| | | * linkTypeName 链接类型名称、 |
| | | * rdPositive 方向,true正向,false反向 |
| | | * btmName 业务类型名称 |
| | | * combRelaType 业务类型选择值 |
| | | * versionValue 版本班次值 |
| | | * isQueryIsLeaf 是否选择下级 |
| | | * level 子节点层数 |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/getCriteria") |
| | | public BaseResult getCriteria(@RequestBody HashMap<String,Object> dataMap){ |
| | | try { |
| | | return quereyTemplateServiceI.getCriteria(dataMap); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询模板列表 |
| | | * @param btName 类型名称 |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/getObjTypeQTs") |
| | | public BaseResult getObjTypeQTs(String btName){ |
| | | try { |
| | | return quereyTemplateServiceI.getObjTypeQTs(btName); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } catch (DocumentException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 检查查询模板名字是否存在 |
| | | * @param name 查询模板名字 |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/isExistsQT") |
| | | public BaseResult isExistsQT(String name){ |
| | | try { |
| | | return quereyTemplateServiceI.isExistsQT(name); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | } |