|
@ -28,7 +28,6 @@ import java.io.OutputStream;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
@RestController
|
|
@ -42,10 +41,11 @@ public class ServicePackageSubItemEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
/**
|
|
|
* 查询所有服务子项
|
|
|
* {"id": "", "parentId": "", "dictItemId":"","name": "", "status": "", "orgCode": "", "leasedCode": "", "pageIf": "1", "page": 1, "pageSize": 1}
|
|
|
*/
|
|
|
@GetMapping(value = "getItemList")
|
|
|
@ApiOperation(value = "查询所有服务项")
|
|
|
public PageEnvelop<Map<String, Object>> getSubItemList(
|
|
|
public PageEnvelop getSubItemList(
|
|
|
@ApiParam(name = "jsonStr", value = "Json数据", required = true) @RequestParam String jsonStr
|
|
|
) {
|
|
|
try {
|
|
@ -84,14 +84,10 @@ public class ServicePackageSubItemEndpoint extends EnvelopRestEndpoint {
|
|
|
@PostMapping(value = "changeState")
|
|
|
@ApiOperation(value = "改变状态")
|
|
|
public ObjEnvelop changeState(
|
|
|
@ApiParam(name = "jsonStr", value = "jsonStr", required = true) @RequestParam String jsonStr) throws Exception {
|
|
|
@ApiParam(name = "id", value = "id", required = true) @RequestParam String id,
|
|
|
@ApiParam(name = "status", value = "status 0失效1生效", required = true) @RequestParam String status){
|
|
|
try {
|
|
|
jsonStr = URLDecoder.decode(jsonStr, "UTF-8");
|
|
|
ParamQvo qvo = JSON.parseObject(jsonStr, ParamQvo.class);
|
|
|
if (org.apache.commons.lang3.StringUtils.isBlank(qvo.getId())) {
|
|
|
return failed("ID不能为空", ObjEnvelop.class);
|
|
|
}
|
|
|
ServicePackageSubItemDO entity = subItemService.changeState(qvo);
|
|
|
ServicePackageSubItemDO entity = subItemService.changeState(id,status);
|
|
|
return success(entity);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|