5 changed files with 89 additions and 2 deletions
@ -0,0 +1,56 @@ |
|||
package com.hxgk.lowcode.controller; |
|||
|
|||
import com.hxgk.lowcode.model.entity.ManCont; |
|||
import com.hxgk.lowcode.model.entity.Tree; |
|||
import com.hxgk.lowcode.service.UserService; |
|||
import com.hxgk.lowcode.utils.JsonData; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestHeader; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@RestController |
|||
@RequestMapping("/lowCode/manCont") |
|||
public class ManContController { |
|||
|
|||
@Autowired |
|||
UserService userService; |
|||
/*根据主表id拿到表单字段信息*/ |
|||
@RequestMapping(value = "getManCont") |
|||
public JsonData getFieldTree(@RequestBody Map<String,String> requestBody) { |
|||
|
|||
String paramType = requestBody.get("paramType"); |
|||
String paramValue = requestBody.get("paramValue"); |
|||
if(!StringUtils.isBlank(paramType)){ |
|||
if(paramType.equals("deviceNo")){ |
|||
if(!StringUtils.isBlank(paramValue)){ |
|||
ManCont manCont = userService.getManContByDeviceNo(paramType,paramValue); |
|||
return JsonData.buildSuccess(manCont); |
|||
}else{ |
|||
return JsonData.buildError("paramValue 非法,isBlank"); |
|||
} |
|||
|
|||
}else{ |
|||
return JsonData.buildError("paramType 非法,仅支持deviceNo"); |
|||
} |
|||
}else{ |
|||
return JsonData.buildError("paramType 非法, isBlank"); |
|||
} |
|||
|
|||
/*if(tree.getId()==null){ |
|||
return JsonData.buildError("查无此表单"); |
|||
}else{ |
|||
if(tree.getId().equals("cfid为空")){ |
|||
return JsonData.buildSuccess(tree); |
|||
}else if(tree.getId().equals("masterTable为null")){ |
|||
return JsonData.buildSuccess(tree); |
|||
} |
|||
return JsonData.buildSuccess(tree); |
|||
}*/ |
|||
|
|||
} |
|||
} |
|||
Loading…
Reference in new issue