Commit ad254e17 authored by suhuiguang's avatar suhuiguang

1.删除无用代码

parent b6dcf2e4
package com.yeejoin.amos.maintenance.business.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.MediaType;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.maintenance.business.dto.PointDto;
import com.yeejoin.amos.maintenance.business.param.MovePointParam;
import com.yeejoin.amos.maintenance.business.param.PointImportParam;
import com.yeejoin.amos.maintenance.business.param.PointImportQueryParam;
import com.yeejoin.amos.maintenance.business.param.PointParam;
import com.yeejoin.amos.maintenance.business.service.intfc.ICatalogTreeService;
import com.yeejoin.amos.maintenance.business.service.intfc.IPointService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.util.DaoCriteria;
import com.yeejoin.amos.maintenance.business.util.FileHelper;
import com.yeejoin.amos.maintenance.business.util.PointParamUtils;
import com.yeejoin.amos.maintenance.business.util.*;
import com.yeejoin.amos.maintenance.business.vo.MaintenanceResourceData;
import com.yeejoin.amos.maintenance.business.vo.PointClassifyVo;
import com.yeejoin.amos.maintenance.business.vo.PointInputItemVo;
import com.yeejoin.amos.maintenance.business.vo.PointVo;
import com.yeejoin.amos.maintenance.core.common.request.CommonPageable;
import com.yeejoin.amos.maintenance.core.common.request.CommonRequest;
import com.yeejoin.amos.maintenance.core.common.response.PointResponse;
import com.yeejoin.amos.maintenance.dao.entity.Point;
import com.yeejoin.amos.maintenance.dao.entity.PointClassify;
import com.yeejoin.amos.maintenance.feign.RemoteSecurityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
@RestController
@RequestMapping(value = "/api/point")
......@@ -73,9 +46,6 @@ public class PointController extends AbstractBaseController {
@Autowired
private ICatalogTreeService catalogTreeService;
@Autowired
private RemoteSecurityService remoteSecurityService;
/**
* 增加巡检点
*
......@@ -86,23 +56,14 @@ public class PointController extends AbstractBaseController {
@ApiOperation(value = "新增巡检点", notes = "新增巡检点")
@PostMapping(value = "/addPoint", produces = "application/json;charset=UTF-8")
public CommonResponse addPoint(@ApiParam(value = "巡检点", required = true) @RequestBody PointParam pointParam) {
AgencyUserModel user = getUserInfo();
if (ObjectUtils.isEmpty(user)) {
return CommonResponseUtil.failure("用户session过期");
}
try {
ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getOrgCode(reginParams);
//点归属于公司
pointParam.getPoint().setOrgCode(loginOrgCode);
pointParam.getPoint().setCreatorId(user.getUserId());
pointParam.getPoint().setCreatorId(getUserId());
Point point = iPointService.addPoint(pointParam);
return CommonResponseUtil.success(point);
} catch (Exception e) {
e.printStackTrace();
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("巡检点新增失败");
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment