Commit 2daa62bf authored by tangwei's avatar tangwei

解决冲突

parents 3bfb032d f34c5c44
package com.yeejoin.amos.boot.module.jcs.biz.aop; package com.yeejoin.amos.boot.biz.common.aop;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -46,7 +47,7 @@ public class ControllerAop { ...@@ -46,7 +47,7 @@ public class ControllerAop {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Pointcut("execution(public * com.yeejoin.amos.boot.module.*.biz.controller..*(..))") @Pointcut("execution(public * com.yeejoin.amos.boot.module.*.biz.controller..*(..)) || execution(public * com.yeejoin.amos.*.business.controller..*(..))")
public void userCache() { public void userCache() {
} }
...@@ -56,6 +57,18 @@ public class ControllerAop { ...@@ -56,6 +57,18 @@ public class ControllerAop {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest(); HttpServletRequest request = attributes.getRequest();
String token = request.getHeader("token"); String token = request.getHeader("token");
if (token == null) {
token = request.getHeader("X-Access-Token");
}
String authProduct = request.getHeader("product");
if (authProduct == null) {
authProduct = request.getParameter("product");
}
String authAppKey = request.getHeader("appKey");
if (authAppKey == null) {
authAppKey = request.getParameter("appKey");
}
String authToken = buildKey(token);
if (token != null) { if (token != null) {
//验证token有效性,防止token失效 //验证token有效性,防止token失效
AgencyUserModel userModel; AgencyUserModel userModel;
...@@ -67,7 +80,7 @@ public class ControllerAop { ...@@ -67,7 +80,7 @@ public class ControllerAop {
} }
} catch (Exception e) { } catch (Exception e) {
//删除失效token缓存 //删除失效token缓存
redisUtils.del(buildKey(token)); redisUtils.del(authToken);
throw new RuntimeException(e.getMessage()); throw new RuntimeException(e.getMessage());
} }
// 不需要添加请求头的接口 // 不需要添加请求头的接口
...@@ -76,12 +89,13 @@ public class ControllerAop { ...@@ -76,12 +89,13 @@ public class ControllerAop {
if (Arrays.asList(url).contains(request.getRequestURI())) { if (Arrays.asList(url).contains(request.getRequestURI())) {
// 暂无需要 // 暂无需要
} else { } else {
if (!redisUtils.hasKey(buildKey(token))) { if (!redisUtils.hasKey(authToken)) {
saveUserRedis(userModel, token); saveUserRedis(userModel, token);
} }
} }
} }
System.out.println(redisUtils.get(buildKey(token))); // buildRequestCxt(authToken,authProduct,authAppKey);
System.out.println(redisUtils.get(authToken));
} }
public void saveUserRedis(AgencyUserModel user, String token) { public void saveUserRedis(AgencyUserModel user, String token) {
...@@ -112,7 +126,8 @@ public class ControllerAop { ...@@ -112,7 +126,8 @@ public class ControllerAop {
reginParams.setRole(role); reginParams.setRole(role);
reginParams.setDepartment(department); reginParams.setDepartment(department);
reginParams.setUserModel(user); reginParams.setUserModel(user);
redisUtils.set(buildKey(token), JSONObject.toJSONString(reginParams), redisRegionTimeSecond); String authToken = buildKey(token);
redisUtils.set(authToken, JSONObject.toJSONString(reginParams), redisRegionTimeSecond);
} }
public String buildKey(String token) { public String buildKey(String token) {
//由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时, //由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时,
...@@ -130,4 +145,9 @@ public class ControllerAop { ...@@ -130,4 +145,9 @@ public class ControllerAop {
// GlobalCache.paramMap.remove(token); // GlobalCache.paramMap.remove(token);
// } // }
} }
// public void buildRequestCxt(String token,String product,String appKey){
// RequestContext.setToken(token);
// RequestContext.setProduct(product);
// RequestContext.setAppKey(appKey);
//}
} }
...@@ -10,15 +10,58 @@ import java.io.Serializable; ...@@ -10,15 +10,58 @@ import java.io.Serializable;
* @author Dell * @author Dell
* **/ * **/
public class ReginParams implements Serializable { public class ReginParams implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private CompanyBo company; private CompanyBo company;
private RoleBo role; private RoleBo role;
private DepartmentBo department; private DepartmentBo department;
//用户基本信息
private AgencyUserModel userModel; private AgencyUserModel userModel;
private PersonIdentity personIdentity;
public static class PersonIdentity {
private String identityType;
private String personName;
private String companyId;
public PersonIdentity(String identityType,String personName,String companyId){
this.identityType = identityType;
this.personName = personName;
this.companyId = companyId;
}
public String getIdentityType() {
return identityType;
}
public void setIdentityType(String identityType) {
this.identityType = identityType;
}
public String getPersonName() {
return personName;
}
public void setPersonName(String personName) {
this.personName = personName;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}
public PersonIdentity getPersonIdentity() {
return personIdentity;
}
public void setPersonIdentity(PersonIdentity personIdentity) {
this.personIdentity = personIdentity;
}
@Deprecated @Deprecated
private String token; private String token;
...@@ -53,10 +96,12 @@ public class ReginParams implements Serializable { ...@@ -53,10 +96,12 @@ public class ReginParams implements Serializable {
public void setUserModel(AgencyUserModel userModel) { public void setUserModel(AgencyUserModel userModel) {
this.userModel = userModel; this.userModel = userModel;
} }
@Deprecated @Deprecated
public String getToken() { public String getToken() {
return token; return token;
} }
@Deprecated @Deprecated
public void setToken(String token) { public void setToken(String token) {
this.token = token; this.token = token;
......
package com.yeejoin.amos.boot.biz.common.controller; package com.yeejoin.amos.boot.biz.common.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -8,9 +10,6 @@ import org.typroject.tyboot.core.foundation.context.RequestContext; ...@@ -8,9 +10,6 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
...@@ -27,6 +26,8 @@ public class BaseController { ...@@ -27,6 +26,8 @@ public class BaseController {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
protected HttpServletRequest request;
/** /**
* 获取token * 获取token
...@@ -34,28 +35,22 @@ public class BaseController { ...@@ -34,28 +35,22 @@ public class BaseController {
protected String getToken() { protected String getToken() {
return RequestContext.getToken(); return RequestContext.getToken();
} }
public String buildKey(String token) {
protected String buildKey(String token) { //由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时,
// 由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时, //return "region_" + userId + "_" + token;
return "region_" + token; return "region_"+ token;
} }
/** /**
* 用户选择信心redis获取 * 用户选择信心redis获取
**/ **/
protected ReginParams getSelectedOrgInfo() { protected ReginParams getSelectedOrgInfo() {
return JSONObject.parseObject(redisUtils.get(buildKey(RequestContext.getToken())).toString(), return JSONObject.parseObject(redisUtils.get(buildKey(RequestContext.getToken())).toString(), ReginParams.class);
ReginParams.class);
} }
protected String getOrgCode(ReginParams reginParams) { protected String getOrgCode(ReginParams reginParams) {
if (reginParams == null) { if (reginParams == null) {
return null; return null;
} }
// if (reginParams.getDepartment() != null) {
// return reginParams.getDepartment().getDeptOrgCode();
// }
if (reginParams.getCompany() != null) { if (reginParams.getCompany() != null) {
return reginParams.getCompany().getOrgCode(); return reginParams.getCompany().getOrgCode();
} }
...@@ -67,19 +62,74 @@ public class BaseController { ...@@ -67,19 +62,74 @@ public class BaseController {
* 当前登录用户信息 * 当前登录用户信息
*/ */
protected AgencyUserModel getUserInfo() { protected AgencyUserModel getUserInfo() {
AgencyUserModel userModel = null; ReginParams reginParams = getSelectedOrgInfo();
if (getToken() != null) { return reginParams.getUserModel();
FeignClientResult<?> feignClientResult; }
try {
feignClientResult = Privilege.agencyUserClient.getme();
userModel = (AgencyUserModel) feignClientResult.getResult();
} catch (InnerInvokException e) { protected String getProduct() {
throw new RuntimeException(e.getMessage()); return RequestContext.getProduct();
} }
protected String getAppKey() {
return RequestContext.getAppKey();
}
protected String getUserId() {
String userId = null;
if (getUserInfo() != null) {
userId = getUserInfo().getUserId();
}
return userId;
} }
return userModel;
protected String getRoleTypeName(ReginParams reginParams) {
if (reginParams == null) {
return null;
}
if (reginParams.getRole() != null) {
return reginParams.getRole().getRoleType();
}
return null;
}
protected String getDepartmentId(ReginParams reginParams) {
if (reginParams == null) {
return null;
}
if (reginParams.getDepartment().getSequenceNbr() != null) {
return reginParams.getDepartment().getSequenceNbr().toString();
}
return null;
}
protected String getDepartmentName(ReginParams reginParams) {
if (reginParams == null) {
return null;
}
if (reginParams.getDepartment().getDepartmentName() != null) {
return reginParams.getDepartment().getDepartmentName();
}
return null;
}
protected String getCompanyId(ReginParams reginParams) {
if (reginParams == null) {
return null;
}
if (reginParams.getCompany() != null) {
return reginParams.getCompany().getSequenceNbr().toString();
}
return null;
}
protected String getCompanyName(ReginParams reginParams) {
if (reginParams == null) {
return null;
}
if (reginParams.getCompany() != null) {
return reginParams.getCompany().getCompanyName();
}
return null;
} }
} }
...@@ -5,6 +5,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -5,6 +5,7 @@ import org.apache.commons.lang3.StringUtils;
import java.text.ParseException; import java.text.ParseException;
import java.text.ParsePosition; import java.text.ParsePosition;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*; import java.util.*;
/** /**
...@@ -663,4 +664,27 @@ public class DateUtils { ...@@ -663,4 +664,27 @@ public class DateUtils {
return date.after(begin) && date.before(end); return date.after(begin) && date.before(end);
} }
/**
* 由出生日期获得年龄
*
* @param birthDay 出生日期
*/
public static int getAge(Date birthDay) {
if (birthDay == null) {
return 0;
}
LocalDate now = LocalDate.now();
Calendar cal = Calendar.getInstance();
cal.setTime(birthDay);
int yearBirth = cal.get(Calendar.YEAR);
int monthBirth = cal.get(Calendar.MONTH) + 1;
int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
LocalDate birth = LocalDate.of(yearBirth, monthBirth, dayOfMonthBirth);
if (birth.isAfter(now)) {
return 0;
}
int age = birth.until(now).getYears();
return age;
}
} }
package com.yeejoin.amos.boot.biz.common.workflow.feign;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Author: xl
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
public class CommonMultipartSupportConfig {
@Autowired
private ObjectFactory<HttpMessageConverters> messageConverters;
@Bean
public Encoder feignCommonFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
}
package com.yeejoin.amos.boot.biz.common.workflow.feign;
import java.util.HashMap;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.alibaba.fastjson.JSONObject;
@FeignClient(name = "AMOS-API-WORKFLOW", path = "workflow", configuration = { CommonMultipartSupportConfig.class })
public interface WorkflowFeignService {
/**
* 发起流程
*
* @param params
* @return
*/
@RequestMapping(value = "/task/startProcess", method = RequestMethod.POST)
JSONObject startByVariable(@RequestBody Object params);
/**
* 完成任务
*
* @param taskID
* @param variable
* @return
* @throws Exception
*/
@RequestMapping(value = "/task/pickupAndCompleteTask/{taskId}", method = RequestMethod.POST)
JSONObject pickupAndCompleteTask(@PathVariable("taskId") String taskID,
@RequestBody(required = false) HashMap<String, Object> variable) throws Exception;
/**
* 查询当前流程下所有的可执行任务
*
* @param processInstanceId
* @return
*/
@RequestMapping(value = "/task/list/all/{processInstanceId}", method = RequestMethod.GET)
JSONObject getTaskList(@PathVariable("processInstanceId") String processInstanceId);
/**
* 查询当前任务的执行用户组
*
* @param processInstanceId
* @return
*/
@RequestMapping(value = "/getTaskGroupName/{taskId}", method = RequestMethod.GET)
JSONObject getTaskGroupName(@PathVariable("taskId") String taskId);
}
...@@ -26,6 +26,9 @@ public class FailureAuditDto extends BaseDto { ...@@ -26,6 +26,9 @@ public class FailureAuditDto extends BaseDto {
@ApiModelProperty(value = "审核部门") @ApiModelProperty(value = "审核部门")
private String auditDepartment; private String auditDepartment;
@ApiModelProperty(value = "审核部门")
private Long auditDepartmentId;
@ApiModelProperty(value = "审核时间") @ApiModelProperty(value = "审核时间")
private Date auditTime; private Date auditTime;
...@@ -38,4 +41,9 @@ public class FailureAuditDto extends BaseDto { ...@@ -38,4 +41,9 @@ public class FailureAuditDto extends BaseDto {
@ApiModelProperty(value = "设备故障报修单id") @ApiModelProperty(value = "设备故障报修单id")
private Long faultId; private Long faultId;
@ApiModelProperty(value = "审核结果条件判断,0同意,1拒绝,2驳回")
private String condition;
} }
...@@ -52,4 +52,7 @@ public class FailureMaintainDto extends BaseDto { ...@@ -52,4 +52,7 @@ public class FailureMaintainDto extends BaseDto {
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private List<SourceFile> attachment; private List<SourceFile> attachment;
@ApiModelProperty(value = "审核结果条件判断,0同意,1拒绝,2驳回")
private String condition;
} }
...@@ -2,20 +2,18 @@ package com.yeejoin.amos.boot.module.common.api.dto; ...@@ -2,20 +2,18 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile; import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint; import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint; import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.omg.CORBA.PRIVATE_MEMBER;
/** /**
* 联动单位 * 联动单位
* *
......
...@@ -35,6 +35,9 @@ public class FailureAudit extends BaseEntity { ...@@ -35,6 +35,9 @@ public class FailureAudit extends BaseEntity {
@TableField("audit_department") @TableField("audit_department")
private String auditDepartment; private String auditDepartment;
@TableField("audit_department_id")
private Long auditDepartmentId;
/** /**
* 审核时间 * 审核时间
*/ */
...@@ -53,4 +56,6 @@ public class FailureAudit extends BaseEntity { ...@@ -53,4 +56,6 @@ public class FailureAudit extends BaseEntity {
@TableField("fault_id") @TableField("fault_id")
private Long faultId; private Long faultId;
} }
package com.yeejoin.amos.boot.module.common.api.entity; package com.yeejoin.amos.boot.module.common.api.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date;
/** /**
* *
* *
...@@ -101,4 +102,8 @@ public class FailureDetails extends BaseEntity { ...@@ -101,4 +102,8 @@ public class FailureDetails extends BaseEntity {
@TableField("process_id") @TableField("process_id")
private String processId; private String processId;
@TableField ("current_role")
private String currentRole;
} }
package com.yeejoin.amos.boot.module.common.api.entity; package com.yeejoin.amos.boot.module.common.api.entity;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import java.util.List;
import io.swagger.annotations.ApiModelProperty; import java.util.Map;
/** /**
......
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.entity.FailureAudit;
/** /**
* 接口类 * 接口类
...@@ -8,5 +9,5 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -8,5 +9,5 @@ package com.yeejoin.amos.boot.module.common.api.service;
* @date 2021-08-04 * @date 2021-08-04
*/ */
public interface IFailureAuditService { public interface IFailureAuditService {
public FailureAudit findByFaultId(Long faultId) ;
} }
...@@ -4,7 +4,6 @@ import java.util.List; ...@@ -4,7 +4,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto; import com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
......
package com.yeejoin.amos.maintenance.common.enums;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author DELL
* 维保任务排序
*/
public enum OrderByEnum {
/**
* 维保任务排序
*/
TIME_DESC("时间倒序", "1", "beginTime desc"),
TIME_ASC("时间正序", "2", "beginTime asc"),
PLAN_TASK_NUM_ASC("计划维保设施数正序", "3", "taskPlanNum asc"),
PLAN_TASK_NUM_DESC("计划维保设施数倒序", "4", "taskPlanNum desc"),
FINISH_NUM_DESC("完成数倒序", "5", "finishNum desc"),
FINISH_NUM_ASC("完成数正序", "6", "finishNum asc");
/**
* 名字
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 条件
*/
private String oderBy;
public String getOderBy() {
return oderBy;
}
public void setOderBy(String oderBy) {
this.oderBy = oderBy;
}
OrderByEnum(String name, String code, String oderBy) {
this.code = code;
this.name = name;
this.oderBy = oderBy;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public static List<Map<String, Object>> getEnumList() {
return Arrays.stream(OrderByEnum.values()).map(e -> {
Map<String, Object> map = new HashMap<>();
map.put(e.getCode(), e.getName());
return map;
}).collect(Collectors.toList());
}
public static OrderByEnum getEumByCode(String code) throws Exception {
Optional<OrderByEnum> op = Arrays.stream(OrderByEnum.values()).filter(e->e.getCode().equals(code)).findFirst();
return op.orElseThrow(()->new Exception("非法的条件"));
}
}
...@@ -16,6 +16,12 @@ ...@@ -16,6 +16,12 @@
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>4.0.9.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-common-api</artifactId> <artifactId>amos-boot-module-common-api</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
......
package com.yeejoin.amos.boot.module.tzs.api.vo; package com.yeejoin.amos.boot.module.tzs.api.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -14,8 +14,8 @@ import java.util.Map; ...@@ -14,8 +14,8 @@ import java.util.Map;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@ApiModel(value = "AlarmStatisticsVo", description = "AlarmStatisticsVo") @ApiModel(value = "AlarmStatisticsDto", description = "AlarmStatisticsDto")
public class AlarmStatisticsVo { public class AlarmStatisticsDto {
@ApiModelProperty(value = "我的待办数量") @ApiModelProperty(value = "我的待办数量")
private Integer todoNum; private Integer todoNum;
......
...@@ -127,14 +127,15 @@ public class AlertCalledDto extends BaseDto { ...@@ -127,14 +127,15 @@ public class AlertCalledDto extends BaseDto {
@ApiModelProperty(value = "警情地址") @ApiModelProperty(value = "警情地址")
private String alertAddress; private String alertAddress;
/** @ApiModelProperty(value = "响应级别")
* 工单编号 private String responseLevel;
*/
@ApiModelProperty("工单编号") @ApiModelProperty("工单编号")
private String workOrderNumber; private String workOrderNumber;
@ApiModelProperty(value = "接警时间str") @ApiModelProperty(value = "接警时间str")
private String callTimeStr; private String callTimeStr;
@ApiModelProperty(value = "接警人")
protected String recUserName; // @ApiModelProperty(value = "接警人")
// protected String recUserName;
} }
package com.yeejoin.amos.boot.module.tzs.api.dto; package com.yeejoin.amos.boot.module.tzs.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlertCalledVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -21,14 +20,14 @@ public class AlertCalledFormDto extends BaseDto{ ...@@ -21,14 +20,14 @@ public class AlertCalledFormDto extends BaseDto{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情基本信息") @ApiModelProperty(value = "警情基本信息")
private AlertCalledVo alertCalledVo; private AlertCalledDto alertCalledDto;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<FormValue> dynamicFormAlert; private List<FormValue> dynamicFormAlert;
public AlertCalledFormDto(AlertCalledVo alertCalledVo, List<FormValue> formValue) { public AlertCalledFormDto(AlertCalledDto alertCalledDto, List<FormValue> formValue) {
this.alertCalledVo = alertCalledVo; this.alertCalledDto = alertCalledDto;
this.dynamicFormAlert = formValue; this.dynamicFormAlert = formValue;
} }
} }
package com.yeejoin.amos.boot.module.tzs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author kfm
* @date 2021/8/10.
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "DutyPersonDto", description = "负责人DTO")
public class DutyPersonDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "人员id")
private String userId;
@ApiModelProperty(value = "人员职务")
private String deptName;
@ApiModelProperty(value = "人员名称")
private String userName;
@ApiModelProperty(value = "人员电话")
private String phone;
@ApiModelProperty(value = "照片")
private String image;
@ApiModelProperty(value = "人员状态")
private String status;
}
...@@ -206,9 +206,6 @@ public class ElevatorDto extends BaseDto { ...@@ -206,9 +206,6 @@ public class ElevatorDto extends BaseDto {
@ApiModelProperty(value = "功率") @ApiModelProperty(value = "功率")
private String power; private String power;
@ApiModelProperty(value = "设备图片")
private String photos;
@ApiModelProperty(value = "原始表id(来自历史数据库)") @ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId; private String originalId;
......
package com.yeejoin.amos.boot.module.tzs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author fengwang
* @date 2021-08-10.
*/
@Data
@ApiModel(value="ElevatorNewDto", description="电梯对象集合")
public class ElevatorNewDto {
@ApiModelProperty(value = "电梯基本信息")
ElevatorDto elevatorDto;
}
...@@ -8,6 +8,8 @@ import lombok.Data; ...@@ -8,6 +8,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
/** /**
* @author tb * @author tb
* @date 2021-06-01 * @date 2021-06-01
...@@ -20,7 +22,6 @@ import lombok.experimental.Accessors; ...@@ -20,7 +22,6 @@ import lombok.experimental.Accessors;
public class MaintenanceUnitDto extends BaseDto { public class MaintenanceUnitDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "统一社会信用代码") @ApiModelProperty(value = "统一社会信用代码")
private String socialCreditCode; private String socialCreditCode;
...@@ -93,4 +94,6 @@ public class MaintenanceUnitDto extends BaseDto { ...@@ -93,4 +94,6 @@ public class MaintenanceUnitDto extends BaseDto {
@ApiModelProperty(value = "原始表id(来自历史数据库)") @ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId; private String originalId;
@ApiModelProperty(value = "人员信息")
List<DutyPersonDto> dutyPersonList;
} }
package com.yeejoin.amos.boot.module.tzs.api.vo; package com.yeejoin.amos.boot.module.tzs.api.dto;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
...@@ -16,10 +16,8 @@ import lombok.experimental.Accessors; ...@@ -16,10 +16,8 @@ import lombok.experimental.Accessors;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) @ApiModel(value = "MaintenanceUnitNameDto", description = "MaintenanceUnitNameDto")
@TableName("cb_maintenance_unit") public class MaintenanceUnitNameDto extends BaseEntity {
@ApiModel(value = "MaintenanceUnitNameVo", description = "MaintenanceUnitNameVo")
public class MaintenanceUnitNameVo extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -30,6 +30,12 @@ public class RescueProcessDto extends BaseDto { ...@@ -30,6 +30,12 @@ public class RescueProcessDto extends BaseDto {
@ApiModelProperty(value = "是否手动派遣") @ApiModelProperty(value = "是否手动派遣")
private Boolean dispatchByUser = false; private Boolean dispatchByUser = false;
@ApiModelProperty(value = "是否手动到达")
private Boolean arriveByUser = false;
@ApiModelProperty(value = "是否手动救援")
private Boolean saveByUser = false;
@ApiModelProperty(value = "派遣时间") @ApiModelProperty(value = "派遣时间")
private Date dispatchTime; private Date dispatchTime;
......
...@@ -8,6 +8,8 @@ import lombok.Data; ...@@ -8,6 +8,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
/** /**
* @author tb * @author tb
* @date 2021-06-01 * @date 2021-06-01
...@@ -20,7 +22,6 @@ import lombok.experimental.Accessors; ...@@ -20,7 +22,6 @@ import lombok.experimental.Accessors;
public class RescueStationDto extends BaseDto { public class RescueStationDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "应急救援机构名称") @ApiModelProperty(value = "应急救援机构名称")
private String name; private String name;
...@@ -75,4 +76,6 @@ public class RescueStationDto extends BaseDto { ...@@ -75,4 +76,6 @@ public class RescueStationDto extends BaseDto {
@ApiModelProperty(value = "距离") @ApiModelProperty(value = "距离")
private String distance; private String distance;
@ApiModelProperty(value = "人员信息")
List<DutyPersonDto> dutyPersonList;
} }
...@@ -8,6 +8,8 @@ import lombok.Data; ...@@ -8,6 +8,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
/** /**
* @author tb * @author tb
* @date 2021-06-01 * @date 2021-06-01
...@@ -20,7 +22,6 @@ import lombok.experimental.Accessors; ...@@ -20,7 +22,6 @@ import lombok.experimental.Accessors;
public class UseUnitDto extends BaseDto { public class UseUnitDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "统一社会信用代码") @ApiModelProperty(value = "统一社会信用代码")
private String socialCreditCode; private String socialCreditCode;
...@@ -72,4 +73,6 @@ public class UseUnitDto extends BaseDto { ...@@ -72,4 +73,6 @@ public class UseUnitDto extends BaseDto {
@ApiModelProperty(value = "原始表id(来自历史数据库)") @ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId; private String originalId;
@ApiModelProperty(value = "人员信息")
List<DutyPersonDto> dutyPersonList;
} }
...@@ -189,9 +189,6 @@ public class Elevator extends BaseEntity { ...@@ -189,9 +189,6 @@ public class Elevator extends BaseEntity {
@ApiModelProperty(value = "功率") @ApiModelProperty(value = "功率")
private String power; private String power;
@ApiModelProperty(value = "设备图片")
private String photos;
@ApiModelProperty(value = "原始表id(来自历史数据库)") @ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId; private String originalId;
......
...@@ -8,33 +8,36 @@ package com.yeejoin.amos.boot.module.tzs.api.enums; ...@@ -8,33 +8,36 @@ package com.yeejoin.amos.boot.module.tzs.api.enums;
public enum AlertStageEnums { public enum AlertStageEnums {
//报警类型 //报警类型BJLX
JQCB("297","警情初报"), JQCB("958","JQCB","警情初报"),
JQGB("298","警情归并"), JQGB("959","JQGB","警情归并"),
//警情类型 //警情类型JQLX
KRJY("247","困人救援"), KRJY("960","KRJY","困人救援"),
GZWX("248", "故障维修"), GZWX("961","GZWX", "故障维修"),
TSZX("249", "投诉咨询"), TSZX("962","TSZX", "投诉咨询"),
// 来源类型 // 来源类型JQLYLX
DHBJ("233","电话报警"), DHBJ("963","233","电话报警"),
// 警情阶段
JJ("JJQK-247","接警"),
PQ("241","派遣"),
DD("242","抵达"),
HF("243","回访"),
WX("244","维修"),
FK("245","反馈");
// 警情阶段 JQJD
JJ("964","JJ","接警"),
PQ("965","PQ","派遣"),
DD("966","DD","抵达"),
JC("967","JC","救出"),
JYHF("968","JYHF","救援回访"),
WXFK("969","WXFK","维修反馈"),
BXFK("970","BXFK","报修反馈"),
TSRFK("971","TSRFK","投诉人反馈");
private String id;
private String code; private String code;
private String value; private String value;
AlertStageEnums(String code, String value) { AlertStageEnums(String id, String code, String value) {
this.id = id;
this.code=code; this.code=code;
this.value=value; this.value=value;
} }
...@@ -51,5 +54,36 @@ public enum AlertStageEnums { ...@@ -51,5 +54,36 @@ public enum AlertStageEnums {
this.value = value; this.value = value;
} }
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public static AlertStageEnums getEnumById(String id)
{
for (AlertStageEnums status : AlertStageEnums.values())
{
if (status.getId().equals(id))
{
return status;
}
}
return null;
}
public static AlertStageEnums getEnumByCode(String code)
{
for (AlertStageEnums status : AlertStageEnums.values())
{
if (status.getCode().equals(code))
{
return status;
}
}
return null;
}
} }
...@@ -9,63 +9,65 @@ public enum DispatchPaperEnums { ...@@ -9,63 +9,65 @@ public enum DispatchPaperEnums {
//完成状态 WCZT //完成状态 WCZT
notFinish("notFinish","未完成"), notFinish("858","notFinish","未完成"),
hasFinished("hasFinished","已完成"), hasFinished("859","hasFinished","已完成"),
//处置环节 CZHJ //处置环节 CZHJ
receivedAlert("receivedAlert","已接警"), receivedAlert("860","receivedAlert","已接警"),
dispatched("dispatched", "已派遣"), dispatched("861","dispatched", "已派遣"),
rescueArrived("rescueArrived", "救援已到达"), rescueArrived("862","rescueArrived", "救援已到达"),
repaireArrived("repaireArrived", "维保已到达"), repaireArrived("863","repaireArrived", "维保已到达"),
rescued("rescued", "救援完成"), rescued("864","rescued", "救援完成"),
rescueBack("rescueBack", "救援回访"), rescueBack("865","rescueBack", "救援回访"),
repaired("repaired", "维修完成"), repaired("866","repaired", "维修完成"),
reportorBack("reportorBack", "报修人已反馈"), reportorBack("867","reportorBack", "报修人已反馈"),
disposed("disposed", "维保已处置"), disposed("868","disposed", "维保已处置"),
complainantBack("complainantBack", "投诉人已回访"), complainantBack("869","complainantBack", "投诉人已回访"),
// 警情类型 JJLX // 警情类型 JJLX
KRJY("KRJY","困人救援","250"), KRJY("960","KRJY","困人救援","250"),
GZWX("GZWX", "故障维修","251"), GZWX("961","GZWX", "故障维修","251"),
TSZX("TSZX", "投诉咨询","252"), TSZX("962","TSZX", "投诉咨询","252"),
// 反馈方式 FKFS // 反馈方式 FKFS
mainBack("mainBack","主动反馈"), mainBack("856","mainBack","主动反馈"),
phoneBack("phoneBack","电话回访"), phoneBack("857","phoneBack","电话回访"),
// 维修结果 WXJG // 维修结果 WXJG
hasRepaired("hasRepaired","维修成功"), hasRepaired("940","hasRepaired","维修成功"),
other("other","其他"), other("941","other","其他"),
// 处置结果 CZJG // 处置结果 CZJG
hasDisposed("hasDisposed","已处置"), hasDisposed("944","hasDisposed","已处置"),
notDispose("notDispose","未处置"), notDispose("945","notDispose","未处置"),
// 反馈结果 FKJG // 反馈结果 FKJG
satisfactory("satisfactory","满意"), satisfactory("942","satisfactory","满意"),
unsatisfactory("unsatisfactory","不满意"), unsatisfactory("943","unsatisfactory","不满意"),
// 派遣单位 PQDW // 派遣单位 PQDW
useUnit("useUnit","使用单位"), useUnit("949","useUnit","使用单位"),
repairUnit("repairUnit","维保单位"), repairUnit("950","repairUnit","维保单位"),
levelOneUnit("levelOneUnit","一级响应"), levelOneUnit("951","levelOneUnit","一级响应"),
levelTwoUnit("levelTwoUnit","二级响应"), levelTwoUnit("952","levelTwoUnit","二级响应"),
levelThreeUnit("levelThreeUnit","三级响应"); levelThreeUnit("953","levelThreeUnit","三级响应");
private String id;
private String code; private String code;
private String value; private String value;
private String dynamicCode; private String dynamicCode;
DispatchPaperEnums(String code, String value) { DispatchPaperEnums(String id, String code, String value) {
this.id= id;
this.code=code; this.code=code;
this.value=value; this.value=value;
} }
DispatchPaperEnums(String code, String value, String dynamicCode) { DispatchPaperEnums(String id, String code, String value, String dynamicCode) {
this.id= id;
this.code=code; this.code=code;
this.value=value; this.value=value;
this.dynamicCode = dynamicCode; this.dynamicCode = dynamicCode;
...@@ -83,6 +85,14 @@ public enum DispatchPaperEnums { ...@@ -83,6 +85,14 @@ public enum DispatchPaperEnums {
this.value = value; this.value = value;
} }
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDynamicCode() { public String getDynamicCode() {
return dynamicCode; return dynamicCode;
} }
...@@ -91,7 +101,7 @@ public enum DispatchPaperEnums { ...@@ -91,7 +101,7 @@ public enum DispatchPaperEnums {
this.dynamicCode = dynamicCode; this.dynamicCode = dynamicCode;
} }
public static DispatchPaperEnums getEnum(String code) public static DispatchPaperEnums getEnumByCode(String code)
{ {
for (DispatchPaperEnums status : DispatchPaperEnums.values()) for (DispatchPaperEnums status : DispatchPaperEnums.values())
{ {
...@@ -102,6 +112,16 @@ public enum DispatchPaperEnums { ...@@ -102,6 +112,16 @@ public enum DispatchPaperEnums {
} }
return null; return null;
} }
public static DispatchPaperEnums getEnumById(String code)
{
for (DispatchPaperEnums status : DispatchPaperEnums.values())
{
if (status.getId().equals(code))
{
return status;
}
}
return null;
}
} }
package com.yeejoin.amos.boot.module.tzs.api.service; package com.yeejoin.amos.boot.module.tzs.api.service;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto;
/** /**
* 警情接警填报记录接口类 * 警情接警填报记录接口类
* *
...@@ -15,4 +17,11 @@ public interface IAlertCalledService { ...@@ -15,4 +17,11 @@ public interface IAlertCalledService {
* *
* **/ * **/
Object selectAlertCalledById( Long id); Object selectAlertCalledById( Long id);
/**
*
* 根据警情返回信息,不读取缓存
*
* **/
AlertCalledFormDto selectAlertCalledByIdNoCache(Long id);
} }
...@@ -41,7 +41,7 @@ public interface IDispatchPaperService { ...@@ -41,7 +41,7 @@ public interface IDispatchPaperService {
* @param dispatchSaveFeedbackDto * @param dispatchSaveFeedbackDto
* @return * @return
*/ */
Boolean saveDispatchSaveFeedback(DispatchSaveFeedbackDto dispatchSaveFeedbackDto); Boolean saveDispatchSaveFeedback(DispatchSaveFeedbackDto dispatchSaveFeedbackDto, AgencyUserModel user);
/** /**
* 根据警情id 返回 维修回访相关信息 * 根据警情id 返回 维修回访相关信息
...@@ -56,7 +56,7 @@ public interface IDispatchPaperService { ...@@ -56,7 +56,7 @@ public interface IDispatchPaperService {
* @param dispatchRepairFeedbackDto * @param dispatchRepairFeedbackDto
* @return * @return
*/ */
Boolean saveDispatchRepairFeedback(DispatchRepairFeedbackDto dispatchRepairFeedbackDto); Boolean saveDispatchRepairFeedback(DispatchRepairFeedbackDto dispatchRepairFeedbackDto, AgencyUserModel user);
/** /**
* 根据警情id 返回 投诉回访相关信息 * 根据警情id 返回 投诉回访相关信息
...@@ -71,7 +71,7 @@ public interface IDispatchPaperService { ...@@ -71,7 +71,7 @@ public interface IDispatchPaperService {
* @param dispatchConsultFeedbackDto * @param dispatchConsultFeedbackDto
* @return * @return
*/ */
Boolean saveDispatchConsultFeedback(DispatchConsultFeedbackDto dispatchConsultFeedbackDto); Boolean saveDispatchConsultFeedback(DispatchConsultFeedbackDto dispatchConsultFeedbackDto, AgencyUserModel user);
} }
package com.yeejoin.amos.boot.module.tzs.api.service; package com.yeejoin.amos.boot.module.tzs.api.service;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
/** /**
* 警情填报业务数据项接口类 * 警情填报业务数据项接口类
* *
...@@ -9,4 +11,13 @@ package com.yeejoin.amos.boot.module.tzs.api.service; ...@@ -9,4 +11,13 @@ package com.yeejoin.amos.boot.module.tzs.api.service;
*/ */
public interface IRepairConsultService { public interface IRepairConsultService {
/**
* 根据警情id 和类型记录处置过程
* @param alertId
* @param type
* @param taskId
* @return
*/
Boolean saveRepairConsultByAlertIdType(Long alertId, String type, Long taskId, AgencyUserModel user);
} }
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
//import java.util.Date;
//import java.util.List;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_elevator")
//@ApiModel(value = "ElevatorDto", description = "ElevatorDto")
//public class ElevatorDto extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "电梯应急救援识别码")
// private Integer rescueCode;
//
// @ApiModelProperty(value = "设备注册代码")
// private String registerCode;
//
// @ApiModelProperty(value = "所属省")
// private String province;
//
// @ApiModelProperty(value = "所属地市")
// private String city;
//
// @ApiModelProperty(value = "所属区县")
// private String district;
//
// @ApiModelProperty(value = "所属区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "安装地址")
// private String address;
//
// @ApiModelProperty(value = "内部编号")
// private String innerNum;
//
// @ApiModelProperty(value = "电梯品牌")
// private String brand;
//
// @ApiModelProperty(value = "出厂编号")
// private String factoryNum;
//
// @ApiModelProperty(value = "电梯安装单位")
// private String installationUnit;
//
// @ApiModelProperty(value = "制造日期(出厂时间)")
// private Date factoryDate;
//
// @ApiModelProperty(value = "电梯大修/改造日期")
// private Date overhaulDate;
//
// @ApiModelProperty(value = "开始使用日期")
// private Date startUseDate;
//
// @ApiModelProperty(value = "设备类别")
// private String category;
//
// @ApiModelProperty(value = "使用场所分类")
// private String useSiteCategory;
//
// @ApiModelProperty(value = "电梯型号")
// private String model;
//
// @ApiModelProperty(value = "电梯层数")
// private Integer floors;
//
// @ApiModelProperty(value = "电梯站数")
// private Integer stations;
//
// @ApiModelProperty(value = "电梯门数")
// private Integer doors;
//
// @ApiModelProperty(value = "电梯额定速度(单位:m/s)")
// private Float ratedSpeed;
//
// @ApiModelProperty(value = "电梯额定载重量(单位:kg)")
// private Float ratedLoad;
//
// @ApiModelProperty(value = "最大荷载人数")
// private Integer maxPersonLoad;
//
// @ApiModelProperty(value = "提升高度")
// private Float raiseHeight;
//
// @ApiModelProperty(value = "拖动方式")
// private String dragMode;
//
// @ApiModelProperty(value = "电梯使用状态")
// private Integer useStatus;
//
// @ApiModelProperty(value = "使用单位")
// private String useUnit;
//
// @ApiModelProperty(value = "使用单位id")
// private Long useUnitId;
//
// @ApiModelProperty(value = "制造单位名称")
// private String manufacturerName;
//
// @ApiModelProperty(value = "制造许可编号")
// private String manufacturingLicense;
//
// @ApiModelProperty(value = "维保类型")
// private String maintainType;
//
// @ApiModelProperty(value = "维护周期")
// private String maintainPeriod;
//
// @ApiModelProperty(value = "维保单位")
// private String maintainUnit;
//
// @ApiModelProperty(value = "维保单位id")
// private Long maintainUnitId;
//
// @ApiModelProperty(value = "维保负责人")
// private String maintainLeader;
//
// @ApiModelProperty(value = "维保负责人id")
// private Long maintainLeaderId;
//
// @ApiModelProperty(value = "维保负责人手机")
// private String maintainLeaderPhone;
//
// @ApiModelProperty(value = "主机模式")
// private String hostModel;
//
// @ApiModelProperty(value = "主机编号")
// private String hostNum;
//
// @ApiModelProperty(value = "动力类型")
// private String engineType;
//
// @ApiModelProperty(value = "动力编号")
// private String engineNum;
//
// @ApiModelProperty(value = "面板模型")
// private String panelModel;
//
// @ApiModelProperty(value = "面板编号")
// private String panelNum;
//
// @ApiModelProperty(value = "级联模型")
// private String cascadeModel;
//
// @ApiModelProperty(value = "级联线路模型")
// private String cascadeLineModel;
//
// @ApiModelProperty(value = "扶手带类型")
// private String handrailType;
//
// @ApiModelProperty(value = "扶手面板模型")
// private String handrailPanelModel;
//
// @ApiModelProperty(value = "扶手面板品牌")
// private String handrailPanelBrand;
//
// @ApiModelProperty(value = "滚转机模式")
// private String rollerMode;
//
// @ApiModelProperty(value = "倾斜的角度")
// private String tiltAngle;
//
// @ApiModelProperty(value = "横向跨度")
// private String horizontalSpan;
//
// @ApiModelProperty(value = "运行噪音")
// private String runningNoise;
//
// @ApiModelProperty(value = "运行方式")
// private String runningMode;
//
// @ApiModelProperty(value = "运行振动")
// private String runningVibration;
//
// @ApiModelProperty(value = "功率")
// private String power;
//
// @ApiModelProperty(value = "设备图片")
// private String photos;
//
// @ApiModelProperty(value = "设备图片")
// private List<Img> img;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
// @Data
// @EqualsAndHashCode()
// @Accessors(chain = true)
// @ApiModel(value = "Img", description = "Img")
// public static class Img {
// private String url;
//
// public Img(String url) {
// this.url = url;
// }
// }
//
//}
package com.yeejoin.amos.boot.module.tzs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
/**
* @author tb
* @date 2021-06-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_elevator")
@ApiModel(value = "ElevatorVo", description = "ElevatorVo")
public class ElevatorVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "电梯应急救援识别码")
private Integer rescueCode;
@ApiModelProperty(value = "设备注册代码")
private String registerCode;
@ApiModelProperty(value = "所属省")
private String province;
@ApiModelProperty(value = "所属地市")
private String city;
@ApiModelProperty(value = "所属区县")
private String district;
@ApiModelProperty(value = "所属区域代码")
private String regionCode;
@ApiModelProperty(value = "安装地址")
private String address;
@ApiModelProperty(value = "内部编号")
private String innerNum;
@ApiModelProperty(value = "电梯品牌")
private String brand;
@ApiModelProperty(value = "出厂编号")
private String factoryNum;
@ApiModelProperty(value = "电梯安装单位")
private String installationUnit;
@ApiModelProperty(value = "制造日期(出厂时间)")
private Date factoryDate;
@ApiModelProperty(value = "电梯大修/改造日期")
private Date overhaulDate;
@ApiModelProperty(value = "开始使用日期")
private Date startUseDate;
@ApiModelProperty(value = "设备类别")
private String category;
@ApiModelProperty(value = "使用场所分类")
private String useSiteCategory;
@ApiModelProperty(value = "电梯型号")
private String model;
@ApiModelProperty(value = "电梯层数")
private Integer floors;
@ApiModelProperty(value = "电梯站数")
private Integer stations;
@ApiModelProperty(value = "电梯门数")
private Integer doors;
@ApiModelProperty(value = "电梯额定速度(单位:m/s)")
private Float ratedSpeed;
@ApiModelProperty(value = "电梯额定载重量(单位:kg)")
private Float ratedLoad;
@ApiModelProperty(value = "最大荷载人数")
private Integer maxPersonLoad;
@ApiModelProperty(value = "提升高度")
private Float raiseHeight;
@ApiModelProperty(value = "拖动方式")
private String dragMode;
@ApiModelProperty(value = "电梯使用状态")
private Integer useStatus;
@ApiModelProperty(value = "使用单位")
private String useUnit;
@ApiModelProperty(value = "使用单位id")
private Long useUnitId;
@ApiModelProperty(value = "制造单位名称")
private String manufacturerName;
@ApiModelProperty(value = "制造许可编号")
private String manufacturingLicense;
@ApiModelProperty(value = "维保类型")
private String maintainType;
@ApiModelProperty(value = "维护周期")
private String maintainPeriod;
@ApiModelProperty(value = "维保单位")
private String maintainUnit;
@ApiModelProperty(value = "维保单位id")
private Long maintainUnitId;
@ApiModelProperty(value = "维保负责人")
private String maintainLeader;
@ApiModelProperty(value = "维保负责人id")
private Long maintainLeaderId;
@ApiModelProperty(value = "维保负责人手机")
private String maintainLeaderPhone;
@ApiModelProperty(value = "主机模式")
private String hostModel;
@ApiModelProperty(value = "主机编号")
private String hostNum;
@ApiModelProperty(value = "动力类型")
private String engineType;
@ApiModelProperty(value = "动力编号")
private String engineNum;
@ApiModelProperty(value = "面板模型")
private String panelModel;
@ApiModelProperty(value = "面板编号")
private String panelNum;
@ApiModelProperty(value = "级联模型")
private String cascadeModel;
@ApiModelProperty(value = "级联线路模型")
private String cascadeLineModel;
@ApiModelProperty(value = "扶手带类型")
private String handrailType;
@ApiModelProperty(value = "扶手面板模型")
private String handrailPanelModel;
@ApiModelProperty(value = "扶手面板品牌")
private String handrailPanelBrand;
@ApiModelProperty(value = "滚转机模式")
private String rollerMode;
@ApiModelProperty(value = "倾斜的角度")
private String tiltAngle;
@ApiModelProperty(value = "横向跨度")
private String horizontalSpan;
@ApiModelProperty(value = "运行噪音")
private String runningNoise;
@ApiModelProperty(value = "运行方式")
private String runningMode;
@ApiModelProperty(value = "运行振动")
private String runningVibration;
@ApiModelProperty(value = "功率")
private String power;
@ApiModelProperty(value = "设备图片")
private String photos;
@ApiModelProperty(value = "设备图片")
private List<Img> img;
@ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId;
@Data
@EqualsAndHashCode()
@Accessors(chain = true)
@ApiModel(value = "Img", description = "Img")
public static class Img {
private String url;
public Img(String url) {
this.url = url;
}
}
}
package com.yeejoin.amos.boot.module.tzs.api.vo; //package com.yeejoin.amos.boot.module.tzs.api.vo;
//
import com.baomidou.mybatisplus.annotation.TableName; //import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; //import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; //import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; //import io.swagger.annotations.ApiModelProperty;
import lombok.Data; //import lombok.Data;
import lombok.EqualsAndHashCode; //import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; //import lombok.experimental.Accessors;
//
/** ///**
* @author tb // * @author tb
* @date 2021-06-01 // * @date 2021-06-01
*/ // */
@Data //@Data
@EqualsAndHashCode(callSuper = true) //@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) //@Accessors(chain = true)
@TableName("cb_maintenance_unit") //@TableName("cb_maintenance_unit")
@ApiModel(value = "MaintenanceUnitVo", description = "MaintenanceUnitVo") //@ApiModel(value = "MaintenanceUnitVo", description = "MaintenanceUnitVo")
public class MaintenanceUnitVo extends BaseEntity { //public class MaintenanceUnitVo extends BaseEntity {
//
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
//
@ApiModelProperty(value = "统一社会信用代码") // @ApiModelProperty(value = "统一社会信用代码")
private String socialCreditCode; // private String socialCreditCode;
//
@ApiModelProperty(value = "维护保养单位名称") // @ApiModelProperty(value = "维护保养单位名称")
private String unitName; // private String unitName;
//
@ApiModelProperty(value = "省份") // @ApiModelProperty(value = "省份")
private String province; // private String province;
//
@ApiModelProperty(value = "地市") // @ApiModelProperty(value = "地市")
private String city; // private String city;
//
@ApiModelProperty(value = "区县") // @ApiModelProperty(value = "区县")
private String district; // private String district;
//
@ApiModelProperty(value = "区域代码") // @ApiModelProperty(value = "区域代码")
private String regionCode; // private String regionCode;
//
@ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)") // @ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
private String address; // private String address;
//
@ApiModelProperty(value = "经度") // @ApiModelProperty(value = "经度")
private String longitude; // private String longitude;
//
@ApiModelProperty(value = "纬度") // @ApiModelProperty(value = "纬度")
private String latitude; // private String latitude;
//
@ApiModelProperty(value = "法人id") // @ApiModelProperty(value = "法人id")
private Long legalPersonId; // private Long legalPersonId;
//
@ApiModelProperty(value = "法人") // @ApiModelProperty(value = "法人")
private String legalPerson; // private String legalPerson;
//
@ApiModelProperty(value = "法人电话/注册电话") // @ApiModelProperty(value = "法人电话/注册电话")
private String legalPersonPhone; // private String legalPersonPhone;
//
@ApiModelProperty(value = "企业资质等级") // @ApiModelProperty(value = "企业资质等级")
private String qualificationLevel; // private String qualificationLevel;
//
@ApiModelProperty(value = "信用级别") // @ApiModelProperty(value = "信用级别")
private Integer creditLevel; // private Integer creditLevel;
//
@ApiModelProperty(value = "许可证编号") // @ApiModelProperty(value = "许可证编号")
private String licenseNum; // private String licenseNum;
//
@ApiModelProperty(value = "值班电话") // @ApiModelProperty(value = "值班电话")
private String dutyPhone; // private String dutyPhone;
//
@ApiModelProperty(value = "紧急电话号码") // @ApiModelProperty(value = "紧急电话号码")
private String emergencyPhone; // private String emergencyPhone;
//
@ApiModelProperty(value = "主要负责人1") // @ApiModelProperty(value = "主要负责人1")
private String principalFirst; // private String principalFirst;
//
@ApiModelProperty(value = "主要负责人1手机号码") // @ApiModelProperty(value = "主要负责人1手机号码")
private String principalFirstPhone; // private String principalFirstPhone;
//
@ApiModelProperty(value = "主要负责人1id") // @ApiModelProperty(value = "主要负责人1id")
private Long principalFirstId; // private Long principalFirstId;
//
@ApiModelProperty(value = "主要负责人2") // @ApiModelProperty(value = "主要负责人2")
private String principalSecond; // private String principalSecond;
//
@ApiModelProperty(value = "主要负责人2手机号码") // @ApiModelProperty(value = "主要负责人2手机号码")
private String principalSecondPhone; // private String principalSecondPhone;
//
@ApiModelProperty(value = "主要负责人2id") // @ApiModelProperty(value = "主要负责人2id")
private Long principalSecondId; // private Long principalSecondId;
//
@ApiModelProperty(value = "原始表id(来自历史数据库)") // @ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId; // private String originalId;
//
} //}
package com.yeejoin.amos.boot.module.tzs.api.vo; //package com.yeejoin.amos.boot.module.tzs.api.vo;
//
import com.baomidou.mybatisplus.annotation.TableName; //import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; //import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; //import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; //import io.swagger.annotations.ApiModelProperty;
import lombok.Data; //import lombok.Data;
import lombok.EqualsAndHashCode; //import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; //import lombok.experimental.Accessors;
//
/** ///**
* @author tb // * @author tb
* @date 2021-06-01 // * @date 2021-06-01
*/ // */
@Data //@Data
@EqualsAndHashCode(callSuper = true) //@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) //@Accessors(chain = true)
@TableName("tcb_rescue_station") //@TableName("tcb_rescue_station")
@ApiModel(value = "RescueStationVo", description = "RescueStationVo") //@ApiModel(value = "RescueStationVo", description = "RescueStationVo")
public class RescueStationVo extends BaseEntity { //public class RescueStationVo extends BaseEntity {
//
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
//
@ApiModelProperty(value = "应急救援机构名称") // @ApiModelProperty(value = "应急救援机构名称")
private String name; // private String name;
//
@ApiModelProperty(value = "省份") // @ApiModelProperty(value = "省份")
private String province; // private String province;
//
@ApiModelProperty(value = "地市") // @ApiModelProperty(value = "地市")
private String city; // private String city;
//
@ApiModelProperty(value = "区县") // @ApiModelProperty(value = "区县")
private String district; // private String district;
//
@ApiModelProperty(value = "区域代码") // @ApiModelProperty(value = "区域代码")
private String regionCode; // private String regionCode;
//
@ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)") // @ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
private String address; // private String address;
//
@ApiModelProperty(value = "责任人id") // @ApiModelProperty(value = "责任人id")
private Long principalId; // private Long principalId;
//
@ApiModelProperty(value = "主要负责人") // @ApiModelProperty(value = "主要负责人")
private String principal; // private String principal;
//
@ApiModelProperty(value = "负责人电话") // @ApiModelProperty(value = "负责人电话")
private String principalPhone; // private String principalPhone;
//
@ApiModelProperty(value = "应急救援负责人") // @ApiModelProperty(value = "应急救援负责人")
private String rescueLeader; // private String rescueLeader;
//
@ApiModelProperty(value = "应急救援负责人手机号") // @ApiModelProperty(value = "应急救援负责人手机号")
private String rescueLeaderPhone; // private String rescueLeaderPhone;
//
@ApiModelProperty(value = "应急救援负责人id") // @ApiModelProperty(value = "应急救援负责人id")
private Long rescueLeaderId; // private Long rescueLeaderId;
//
@ApiModelProperty(value = "所属单位(维保单位)") // @ApiModelProperty(value = "所属单位(维保单位)")
private String affiliatedUnit; // private String affiliatedUnit;
//
@ApiModelProperty(value = "所属单位id") // @ApiModelProperty(value = "所属单位id")
private Long affiliatedUnitId; // private Long affiliatedUnitId;
//
@ApiModelProperty(value = "经纬度") // @ApiModelProperty(value = "经纬度")
private String longitudeLatitude; // private String longitudeLatitude;
//
} //}
package com.yeejoin.amos.boot.module.tzs.api.vo; //package com.yeejoin.amos.boot.module.tzs.api.vo;
//
import com.baomidou.mybatisplus.annotation.TableName; //import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; //import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; //import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; //import io.swagger.annotations.ApiModelProperty;
import lombok.Data; //import lombok.Data;
import lombok.EqualsAndHashCode; //import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; //import lombok.experimental.Accessors;
//
/** ///**
* @author tb // * @author tb
* @date 2021-06-01 // * @date 2021-06-01
*/ // */
@Data //@Data
@EqualsAndHashCode(callSuper = true) //@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) //@Accessors(chain = true)
@TableName("tcb_use_unit") //@TableName("tcb_use_unit")
@ApiModel(value = "UseUnitVo", description = "UseUnitVo") //@ApiModel(value = "UseUnitVo", description = "UseUnitVo")
public class UseUnitVo extends BaseEntity { //public class UseUnitVo extends BaseEntity {
//
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
//
@ApiModelProperty(value = "统一社会信用代码") // @ApiModelProperty(value = "统一社会信用代码")
private String socialCreditCode; // private String socialCreditCode;
//
@ApiModelProperty(value = "使用单位(小区)名称") // @ApiModelProperty(value = "使用单位(小区)名称")
private String useUnitName; // private String useUnitName;
//
@ApiModelProperty(value = "小区所属地产品牌") // @ApiModelProperty(value = "小区所属地产品牌")
private String realEstateBrand; // private String realEstateBrand;
//
@ApiModelProperty(value = "物业公司所属品牌") // @ApiModelProperty(value = "物业公司所属品牌")
private String propertyCompanyBrand; // private String propertyCompanyBrand;
//
@ApiModelProperty(value = "省份") // @ApiModelProperty(value = "省份")
private String province; // private String province;
//
@ApiModelProperty(value = "地市") // @ApiModelProperty(value = "地市")
private String city; // private String city;
//
@ApiModelProperty(value = "区县") // @ApiModelProperty(value = "区县")
private String district; // private String district;
//
@ApiModelProperty(value = "区域代码") // @ApiModelProperty(value = "区域代码")
private String regionCode; // private String regionCode;
//
@ApiModelProperty(value = "地址") // @ApiModelProperty(value = "地址")
private String address; // private String address;
//
@ApiModelProperty(value = "责任人id") // @ApiModelProperty(value = "责任人id")
private Long principalId; // private Long principalId;
//
@ApiModelProperty(value = "主要负责人") // @ApiModelProperty(value = "主要负责人")
private String principal; // private String principal;
//
@ApiModelProperty(value = "负责人电话") // @ApiModelProperty(value = "负责人电话")
private String principalPhone; // private String principalPhone;
//
@ApiModelProperty(value = "管理部门") // @ApiModelProperty(value = "管理部门")
private String management; // private String management;
//
@ApiModelProperty(value = "管理员id") // @ApiModelProperty(value = "管理员id")
private Long managerId; // private Long managerId;
//
@ApiModelProperty(value = "电梯安全管理员") // @ApiModelProperty(value = "电梯安全管理员")
private String manager; // private String manager;
//
@ApiModelProperty(value = "电梯管理员手机") // @ApiModelProperty(value = "电梯管理员手机")
private String managerPhone; // private String managerPhone;
//
@ApiModelProperty(value = "原始表id(来自历史数据库)") // @ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId; // private String originalId;
//
} //}
...@@ -15,22 +15,5 @@ ...@@ -15,22 +15,5 @@
<artifactId>amos-boot-module-common-api</artifactId> <artifactId>amos-boot-module-common-api</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-jcs-api</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<!-- <dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-maintenance-biz</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency> -->
<!-- <dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-patrol-biz</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>-->
</dependencies> </dependencies>
</project> </project>
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.biz.controller; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto; import com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto;
import com.yeejoin.amos.boot.module.common.api.entity.FailureAudit;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FailureAuditServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.FailureAuditServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -86,4 +87,19 @@ public class FailureAuditController extends BaseController { ...@@ -86,4 +87,19 @@ public class FailureAuditController extends BaseController {
public ResponseModel<List<FailureAuditDto>> selectForList() { public ResponseModel<List<FailureAuditDto>> selectForList() {
return ResponseHelper.buildResponse(failureAuditServiceImpl.queryForFailureAuditList()); return ResponseHelper.buildResponse(failureAuditServiceImpl.queryForFailureAuditList());
} }
/**
* 审核列表记录查询
*根据关联主表faultId查询
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "审核列表记录查询", notes = "审核列表记录查询")
@GetMapping(value = "/list/{faultId}")
public ResponseModel<List<FailureAudit>> findByFaultIDFotList(@RequestParam long faultId) {
return ResponseHelper.buildResponse(failureAuditServiceImpl.findByfaultId(faultId));
}
} }
package com.yeejoin.amos.boot.module.common.biz.controller; package com.yeejoin.amos.boot.module.common.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import java.util.List;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FailureDetailsServiceImpl;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
/*import com.yeejoin.amos.patrol.business.util.CommonResponse;
import com.yeejoin.amos.patrol.business.util.CommonResponseUtil;*/
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.*; 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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto;
import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FailureDetailsServiceImpl;
/*import com.yeejoin.amos.patrol.business.util.CommonResponse;
import com.yeejoin.amos.patrol.business.util.CommonResponseUtil;*/
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* *
...@@ -43,30 +53,23 @@ public class FailureDetailsController extends BaseController { ...@@ -43,30 +53,23 @@ public class FailureDetailsController extends BaseController {
* 新增 * 新增
* *
* @return * @return
* @throws Exception
*/ */
/*
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增") @ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public CommonResponse save(@RequestBody FailureDetailsDto model) { public ResponseModel<Object> save(@RequestBody FailureDetailsDto model) {
*/ Object result;
/* model = failureDetailsServiceImpl.savemodel(model);
return ResponseHelper.buildResponse(model);*//*
CommonResponse commonResponse = new CommonResponse();
try { try {
AgencyUserModel user = getUserInfo(); result = failureDetailsServiceImpl.savemodel(model,getSelectedOrgInfo());
if (ObjectUtils.isEmpty(user)) { return ResponseHelper.buildResponse(result);
return CommonResponseUtil.failure("用户session过期");
}
return failureDetailsServiceImpl.savemodel(model);
} catch (Exception e) { } catch (Exception e) {
logger.error("", e.getMessage()); // TODO Auto-generated catch block
return CommonResponseUtil.failure("系统繁忙,请稍后再试"); return ResponseHelper.buildResponse("erro");
} }
} }
*/
/** /**
* 根据sequenceNbr更新 * 根据sequenceNbr更新
...@@ -119,11 +122,12 @@ public class FailureDetailsController extends BaseController { ...@@ -119,11 +122,12 @@ public class FailureDetailsController extends BaseController {
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询") @ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<FailureDetailsDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<FailureDetailsDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) { (value = "size") int size,@RequestParam Long currentStatus) {
Page<FailureDetailsDto> page = new Page<FailureDetailsDto>(); Page<FailureDetailsDto> page = new Page<FailureDetailsDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryForFailureDetailsPage(page)); final AgencyUserModel userInfo = getUserInfo();
return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryForFailureDetailsPage(page,currentStatus,userInfo));
} }
/** /**
...@@ -151,5 +155,33 @@ public class FailureDetailsController extends BaseController { ...@@ -151,5 +155,33 @@ public class FailureDetailsController extends BaseController {
return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryForFailureDetailsList(currentStatus)); return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryForFailureDetailsList(currentStatus));
} }
/**
* 查询当前状态任务数量
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询当前状态任务数量", notes = "查询当前状态任务数量")
@GetMapping(value = "/list/count/{currentStatus}")
public ResponseModel<Integer> selectStatusCount(@RequestParam Long currentStatus) {
return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryStatusCount(currentStatus));
}
/**
* 查询我提交状态任务数量
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "查询我提交状态任务数量", notes = "查询我提交状态任务数量")
@GetMapping(value = "/list/userID")
public ResponseModel<Page<FailureDetailsDto>> selectISubmit(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<FailureDetailsDto> page = new Page<FailureDetailsDto>();
page.setCurrent(current);
page.setSize(size);
String userId = getUserInfo().getUserId();
return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryForPage(page,userId));
}
} }
...@@ -118,5 +118,18 @@ public class FailureMaintainController extends BaseController { ...@@ -118,5 +118,18 @@ public class FailureMaintainController extends BaseController {
return ResponseHelper.buildResponse(failureMaintainServiceImpl.queryForFailureMaintainList()); return ResponseHelper.buildResponse(failureMaintainServiceImpl.queryForFailureMaintainList());
} }
/**
* 查询历史流程审核信息记录
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备故障报修单详情-报修日志", notes = "设备故障报修单详情-报修日志")
@GetMapping(value = "/getProcessHistory/{sequenceNbr}")
public ResponseModel<List<Object>> getProcessHistory(@PathVariable Long sequenceNbr ) {
if(sequenceNbr==null) {
return ResponseHelper.buildResponse(null);
}
return ResponseHelper.buildResponse(failureMaintainServiceImpl.getProcessHistoryList(sequenceNbr));
}
} }
...@@ -6,22 +6,35 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,22 +6,35 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.Menu; import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto; import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireExperts; import com.yeejoin.amos.boot.module.common.api.entity.FireExperts;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.utils.BeanDtoVoUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; 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.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -100,7 +113,7 @@ public class FireExpertsController extends BaseController { ...@@ -100,7 +113,7 @@ public class FireExpertsController extends BaseController {
public ResponseModel<FireExpertsDto> selectOne(@PathVariable Long sequenceNbr) { public ResponseModel<FireExpertsDto> selectOne(@PathVariable Long sequenceNbr) {
FireExpertsDto fireExpertsDto = fireExpertsServiceImpl.queryBySeq(sequenceNbr); FireExpertsDto fireExpertsDto = fireExpertsServiceImpl.queryBySeq(sequenceNbr);
Date birthdayTime = fireExpertsDto.getBirthdayTime(); Date birthdayTime = fireExpertsDto.getBirthdayTime();
int age = BeanDtoVoUtils.getAge(birthdayTime); int age = DateUtils.getAge(birthdayTime);
fireExpertsDto.setAge(age); fireExpertsDto.setAge(age);
return ResponseHelper.buildResponse(fireExpertsDto); return ResponseHelper.buildResponse(fireExpertsDto);
} }
...@@ -125,7 +138,7 @@ public class FireExpertsController extends BaseController { ...@@ -125,7 +138,7 @@ public class FireExpertsController extends BaseController {
Page<FireExpertsDto> fireExpertsDtoPage = fireExpertsServiceImpl.queryForFireExpertsPage(page, false, Page<FireExpertsDto> fireExpertsDtoPage = fireExpertsServiceImpl.queryForFireExpertsPage(page, false,
fireExpertsDto.getName(), fireExpertsDto.getExpertCode()); fireExpertsDto.getName(), fireExpertsDto.getExpertCode());
List<FireExpertsDto> fireExpertsDtoList = fireExpertsDtoPage.getRecords().stream().map(item -> { List<FireExpertsDto> fireExpertsDtoList = fireExpertsDtoPage.getRecords().stream().map(item -> {
item.setAge(BeanDtoVoUtils.getAge(item.getBirthdayTime())); item.setAge(DateUtils.getAge(item.getBirthdayTime()));
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
fireExpertsDtoPage.setRecords(fireExpertsDtoList); fireExpertsDtoPage.setRecords(fireExpertsDtoList);
...@@ -143,7 +156,7 @@ public class FireExpertsController extends BaseController { ...@@ -143,7 +156,7 @@ public class FireExpertsController extends BaseController {
public ResponseModel<List<FireExpertsDto>> selectForList() { public ResponseModel<List<FireExpertsDto>> selectForList() {
List<FireExpertsDto> fireExpertsDtoList = fireExpertsServiceImpl.queryForFireExpertsList(false); List<FireExpertsDto> fireExpertsDtoList = fireExpertsServiceImpl.queryForFireExpertsList(false);
fireExpertsDtoList.stream().map(item -> { fireExpertsDtoList.stream().map(item -> {
item.setAge(BeanDtoVoUtils.getAge(item.getBirthdayTime())); item.setAge(DateUtils.getAge(item.getBirthdayTime()));
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
......
package com.yeejoin.amos.boot.module.common.biz.controller; package com.yeejoin.amos.boot.module.common.biz.controller;
import java.util.ArrayList; import com.alibaba.fastjson.JSONArray;
import java.util.List; import com.alibaba.fastjson.JSONObject;
import java.util.Map; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import javax.servlet.http.HttpServletRequest; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -21,22 +29,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -21,22 +29,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSONArray; import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSONObject; import java.util.ArrayList;
import com.baomidou.mybatisplus.core.metadata.IPage; import java.util.List;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import java.util.Map;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.entity.KeySite;
import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.KeySiteServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* 重点部位 * 重点部位
......
...@@ -6,7 +6,6 @@ import java.util.Map; ...@@ -6,7 +6,6 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto; import com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto; import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto;
...@@ -9,13 +19,6 @@ import com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum; ...@@ -9,13 +19,6 @@ import com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum;
import com.yeejoin.amos.boot.module.common.api.mapper.FailureAuditMapper; import com.yeejoin.amos.boot.module.common.api.mapper.FailureAuditMapper;
import com.yeejoin.amos.boot.module.common.api.service.IFailureAuditService; import com.yeejoin.amos.boot.module.common.api.service.IFailureAuditService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
/** /**
* 服务实现类 * 服务实现类
* *
...@@ -23,11 +26,13 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -23,11 +26,13 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
* @date 2021-08-04 * @date 2021-08-04
*/ */
@Service @Service
public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, FailureAudit, FailureAuditMapper> implements IFailureAuditService { public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, FailureAudit, FailureAuditMapper>
implements IFailureAuditService {
@Autowired @Autowired
FailureDetailsServiceImpl failureDetailsService; FailureDetailsServiceImpl failureDetailsService;
/* @Autowired
RemoteWorkFlowService remoteWorkFlowService;*/ // @Autowired
// RemoteWorkFlowService remoteWorkFlowService;
/** /**
* 分页查询 * 分页查询
...@@ -54,9 +59,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur ...@@ -54,9 +59,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
Integer auditResult = model.getAuditResult(); Integer auditResult = model.getAuditResult();
if (auditResult.equals(AuditResultEnum.AGREE.getCode())) { if (auditResult.equals(AuditResultEnum.AGREE.getCode())) {
updateStatus(model, FailureStatuEnum.WAITING_MAINTAIN.getCode()); updateStatus(model, FailureStatuEnum.WAITING_MAINTAIN.getCode());
} else if (auditResult.equals( AuditResultEnum.REFUSE.getCode())) { } else if (auditResult.equals(AuditResultEnum.REFUSE.getCode())) {
updateStatus(model, FailureStatuEnum.REFUSE.getCode()); updateStatus(model, FailureStatuEnum.REFUSE.getCode());
}else if (auditResult.equals(AuditResultEnum.SEND_BACK.getCode())){ } else if (auditResult.equals(AuditResultEnum.SEND_BACK.getCode())) {
updateStatus(model, FailureStatuEnum.WAITING_SUBMIT.getCode()); updateStatus(model, FailureStatuEnum.WAITING_SUBMIT.getCode());
} }
return model; return model;
...@@ -70,6 +75,25 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur ...@@ -70,6 +75,25 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
failureDetailsDto.setCurrentStatus(status); failureDetailsDto.setCurrentStatus(status);
failureDetailsDto.setSequenceNbr(model.getFaultId()); failureDetailsDto.setSequenceNbr(model.getFaultId());
return failureDetailsService.updateWithModel(failureDetailsDto); return failureDetailsService.updateWithModel(failureDetailsDto);
}
/**
* 根据FaultId查询
*/
public List<FailureAudit> findByfaultId(Long faultId) {
Page<FailureAudit> page = new Page<>();
QueryWrapper<FailureAudit> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("fault_id", faultId).orderByDesc("submission_time");
return baseMapper.selectList(queryWrapper);
} }
public FailureAudit findByFaultId(Long faultId) {
LambdaQueryWrapper<FailureAudit> wrapper = new LambdaQueryWrapper<FailureAudit>();
wrapper.eq(FailureAudit::getIsDelete, false);
wrapper.eq(FailureAudit::getFaultId, faultId);
wrapper.orderByAsc(FailureAudit::getAuditTime);
wrapper.last("LIMIT 1");
return this.baseMapper.selectOne(wrapper);
}
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto; import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto;
import com.yeejoin.amos.boot.module.common.api.dto.FailureMaintainDto; import com.yeejoin.amos.boot.module.common.api.dto.FailureMaintainDto;
import com.yeejoin.amos.boot.module.common.api.entity.FailureAudit;
import com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain; import com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain;
import com.yeejoin.amos.boot.module.common.api.enums.AuditResultEnum; import com.yeejoin.amos.boot.module.common.api.enums.AuditResultEnum;
import com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum; import com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum;
...@@ -57,6 +59,16 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,F ...@@ -57,6 +59,16 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,F
} }
/** /**
* 根据FaultId查询
*/
public List<FailureMaintain> findByfaultId(Long faultId) {
Page<FailureMaintain> page = new Page<>();
QueryWrapper<FailureMaintain> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("fault_id", faultId).orderByDesc("submission_time");
return baseMapper.selectList(queryWrapper);
}
/**
*根据审核结果更新维修表 *根据审核结果更新维修表
*/ */
public FailureMaintainDto updateModel(FailureMaintainDto failureMaintainDto,Integer status) { public FailureMaintainDto updateModel(FailureMaintainDto failureMaintainDto,Integer status) {
...@@ -73,4 +85,13 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,F ...@@ -73,4 +85,13 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,F
} }
return failureMaintainDto; return failureMaintainDto;
} }
/**
* 查询当前故障报修单的流程的审批历史节点
* @param sequenceNbr
* @return
*/
public List<Object> getProcessHistoryList(Long sequenceNbr) {
// TODO Auto-generated method stub
return null;
}
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.runtime.directive.Foreach;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Sequence; import com.baomidou.mybatisplus.core.toolkit.Sequence;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.itextpdf.text.pdf.PdfStructTreeController.returnType;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto; import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto; import com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto;
...@@ -40,6 +19,23 @@ import com.yeejoin.amos.boot.module.common.api.mapper.KeySiteMapper; ...@@ -40,6 +19,23 @@ import com.yeejoin.amos.boot.module.common.api.mapper.KeySiteMapper;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper; import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService; import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/** /**
* 重点部位服务实现类 * 重点部位服务实现类
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -38,6 +21,21 @@ import com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit; ...@@ -38,6 +21,21 @@ import com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile; import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.api.mapper.LinkageUnitMapper; import com.yeejoin.amos.boot.module.common.api.mapper.LinkageUnitMapper;
import com.yeejoin.amos.boot.module.common.api.service.ILinkageUnitService; import com.yeejoin.amos.boot.module.common.api.service.ILinkageUnitService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 联动单位服务实现类 * 联动单位服务实现类
...@@ -281,6 +279,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU ...@@ -281,6 +279,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
return update; return update;
} }
@Override
public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) { public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) {
List<Map<String, Object>> map = linkageUnitMapper.getEmergencyLinkageUnitCodeGroupByAndCount(); List<Map<String, Object>> map = linkageUnitMapper.getEmergencyLinkageUnitCodeGroupByAndCount();
......
package com.yeejoin.amos.boot.module.common.biz.utils; //package com.yeejoin.amos.boot.module.common.biz.utils;
//
import com.baomidou.mybatisplus.core.metadata.IPage; //import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto; //import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireExperts; //import com.yeejoin.amos.boot.module.common.api.entity.FireExperts;
import org.springframework.beans.BeanUtils; //import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component; //import org.springframework.stereotype.Component;
//
import java.time.LocalDate; //import java.time.LocalDate;
import java.util.Calendar; //import java.util.Calendar;
import java.util.Date; //import java.util.Date;
//
/** ///**
* @title: 实体类 Dto,Vo,entity 转换工具类 // * @title: 实体类 Dto,Vo,entity 转换工具类
* @Author fpy // * @Author fpy
* @Date: 2021/6/3 13:53 // * @Date: 2021/6/3 13:53
*/ // */
@Component //@Component
public class BeanDtoVoUtils { //public class BeanDtoVoUtils {
//
/** // /**
* Dot ,Vo ,Entity 相互转换 // * Dot ,Vo ,Entity 相互转换
* // *
* @param source 原数据 // * @param source 原数据
* @param targetClass 目标类 // * @param targetClass 目标类
* @param <T> 泛型类 // * @param <T> 泛型类
* @return 转换返回值 // * @return 转换返回值
*/ // */
public static <T> T convert(Object source, Class<T> targetClass) { // public static <T> T convert(Object source, Class<T> targetClass) {
// 判断source是否为空 // // 判断source是否为空
if (source == null) { // if (source == null) {
return null; // return null;
} // }
// 判断targetClass是否为空 // // 判断targetClass是否为空
if (targetClass == null) { // if (targetClass == null) {
return null; // return null;
} // }
try { // try {
// 创建新的对象实例 // // 创建新的对象实例
T target = targetClass.newInstance(); // T target = targetClass.newInstance();
// 把原对象数据拷贝到新对象 // // 把原对象数据拷贝到新对象
BeanUtils.copyProperties(source, target); // BeanUtils.copyProperties(source, target);
// 返回新对象 // // 返回新对象
return target; // return target;
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
return null; // return null;
} // }
} // }
//
/** // /**
* Dot ,Vo ,Entity 相互转换 // * Dot ,Vo ,Entity 相互转换
* // *
* @param source 原数据 // * @param source 原数据
* @return 转换返回值 // * @return 转换返回值
*/ // */
public static FireExpertsDto convertFireExperts(FireExperts source) { // public static FireExpertsDto convertFireExperts(FireExperts source) {
// 判断source是否为空 // // 判断source是否为空
if (source == null) { // if (source == null) {
return null; // return null;
} // }
try { // try {
// 创建新的对象实例 // // 创建新的对象实例
FireExpertsDto target = FireExpertsDto.class.newInstance(); // FireExpertsDto target = FireExpertsDto.class.newInstance();
// 把原对象数据拷贝到新对象 // // 把原对象数据拷贝到新对象
BeanUtils.copyProperties(source, target); // BeanUtils.copyProperties(source, target);
// 计算年龄 // // 计算年龄
int age = getAge(source.getBirthdayTime()); // int age = getAge(source.getBirthdayTime());
target.setAge(age); // target.setAge(age);
// 返回新对象 // // 返回新对象
return target; // return target;
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
return null; // return null;
} // }
} // }
//
/** // /**
* IPage<Entity> 分页对象转 Page<Dto> // * IPage<Entity> 分页对象转 Page<Dto>
* // *
* @param page 原分页对象 // * @param page 原分页对象
* @param v 目标vo类 // * @param v 目标vo类
* @param <E> 泛型类 // * @param <E> 泛型类
* @param <V> 泛型类 // * @param <V> 泛型类
* @return 转换后的分页对象 // * @return 转换后的分页对象
*/ // */
public static <E, V> IPage<V> iPageDtoStream(IPage<E> page, Class<V> v) { // public static <E, V> IPage<V> iPageDtoStream(IPage<E> page, Class<V> v) {
return page.convert(item -> { // return page.convert(item -> {
try { // try {
return convert(item, v); // return convert(item, v);
} catch (Exception e) { // } catch (Exception e) {
return null; // return null;
} // }
}); // });
} // }
//
/** // /**
* IPage<Entity> 分页对象转 Page<Dto> // * IPage<Entity> 分页对象转 Page<Dto>
* // *
* @param page 原分页对象 // * @param page 原分页对象
* @return 转换后的分页对象 // * @return 转换后的分页对象
*/ // */
public static IPage<FireExpertsDto> iPageDtoStreamFireExperts(IPage<FireExperts> page) { // public static IPage<FireExpertsDto> iPageDtoStreamFireExperts(IPage<FireExperts> page) {
return page.convert(item -> { // return page.convert(item -> {
try { // try {
return convertFireExperts(item); // return convertFireExperts(item);
} catch (Exception e) { // } catch (Exception e) {
return null; // return null;
} // }
}); // });
} // }
//
//由出生日期获得年龄 // //由出生日期获得年龄
public static int getAge(Date birthDay) { // public static int getAge(Date birthDay) {
if (birthDay == null) { // if (birthDay == null) {
return 0; // return 0;
} // }
LocalDate now = LocalDate.now(); // LocalDate now = LocalDate.now();
Calendar cal = Calendar.getInstance(); // Calendar cal = Calendar.getInstance();
cal.setTime(birthDay); // cal.setTime(birthDay);
int yearBirth = cal.get(Calendar.YEAR); // int yearBirth = cal.get(Calendar.YEAR);
int monthBirth = cal.get(Calendar.MONTH) + 1; // int monthBirth = cal.get(Calendar.MONTH) + 1;
int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH); // int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
//
LocalDate birth = LocalDate.of(yearBirth, monthBirth, dayOfMonthBirth); // LocalDate birth = LocalDate.of(yearBirth, monthBirth, dayOfMonthBirth);
if (birth.isAfter(now)) { // if (birth.isAfter(now)) {
return 0; // return 0;
} // }
int age = birth.until(now).getYears(); // int age = birth.until(now).getYears();
return age; // return age;
} // }
//
} //}
\ No newline at end of file \ No newline at end of file
...@@ -89,8 +89,8 @@ public class AlertCalledController extends BaseController { ...@@ -89,8 +89,8 @@ public class AlertCalledController extends BaseController {
|| ValidationUtil.isEmpty(alertCalledObjsDto.getAlertCalled())) || ValidationUtil.isEmpty(alertCalledObjsDto.getAlertCalled()))
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
ReginParams reginParams = ReginParams reginParams =
JSONObject.parseObject(null != redisUtils.get(buildKey(getToken())) ? JSONObject.parseObject(null != redisUtils.get(getToken()) ?
redisUtils.get(buildKey(getToken())).toString() : null, ReginParams.class); redisUtils.get(getToken()).toString() : null, ReginParams.class);
//获取当前登录人公司 //获取当前登录人公司
String name= reginParams.getCompany().getCompanyName(); String name= reginParams.getCompany().getCompanyName();
AlertCalled alertCalled = alertCalledObjsDto.getAlertCalled(); AlertCalled alertCalled = alertCalledObjsDto.getAlertCalled();
......
...@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.dao.mapper.CatalogTreeMapper; import com.yeejoin.amos.maintenance.business.dao.mapper.CatalogTreeMapper;
...@@ -22,7 +24,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponse; ...@@ -22,7 +24,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.common.request.CommonPageable; 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.request.CommonRequest;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.dao.entity.CatalogTree; import com.yeejoin.amos.maintenance.dao.entity.CatalogTree;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -42,12 +43,12 @@ public class CatalogTreeController extends AbstractBaseController { ...@@ -42,12 +43,12 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "树结构查询", notes = "树结构查询") @ApiOperation(value = "树结构查询", notes = "树结构查询")
@RequestMapping(value = "/getCatalogTree", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/getCatalogTree", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getCatalogTree() { public CommonResponse getCatalogTree() {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
List<Object> list = catalogTreeService.getCatalogTree(orgCode); List<Object> list = catalogTreeService.getCatalogTree(orgCode);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
} }
...@@ -57,12 +58,12 @@ public class CatalogTreeController extends AbstractBaseController { ...@@ -57,12 +58,12 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "树结构查询", notes = "树结构查询") @ApiOperation(value = "树结构查询", notes = "树结构查询")
@RequestMapping(value = "/catalogList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/catalogList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getCatalogList() { public CommonResponse getCatalogList() {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
List<CatalogTree> list = catalogTreeService.getCatalogList(orgCode); List<CatalogTree> list = catalogTreeService.getCatalogList(orgCode);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
} }
...@@ -72,14 +73,14 @@ public class CatalogTreeController extends AbstractBaseController { ...@@ -72,14 +73,14 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分类新增", notes = "分类新增") @ApiOperation(value = "分类新增", notes = "分类新增")
@RequestMapping(value = "/addCatalogTree", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/addCatalogTree", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse catalogTreeAdd(@ApiParam(value = "分类", required = true) @RequestBody CatalogTree param) { public CommonResponse catalogTreeAdd(@ApiParam(value = "分类", required = true) @RequestBody CatalogTree param) {
try { try {
String userId = getUserId(); String userId = getUserId();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
HashMap<String,Object> map = new HashMap<String,Object>(); HashMap<String,Object> map = new HashMap<String,Object>();
map.put("org_code", orgCode); map.put("org_code", orgCode);
map.put("user_id", userId); map.put("user_id", userId);
...@@ -124,7 +125,7 @@ public class CatalogTreeController extends AbstractBaseController { ...@@ -124,7 +125,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "删除分类", notes = "删除分类") @ApiOperation(value = "删除分类", notes = "删除分类")
@RequestMapping(value = "/deleteCatalogTreeById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/deleteCatalogTreeById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteCatalogTreeById( public CommonResponse deleteCatalogTreeById(
...@@ -144,13 +145,13 @@ public class CatalogTreeController extends AbstractBaseController { ...@@ -144,13 +145,13 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分类数据查询", notes = "分类数据查询") @ApiOperation(value = "分类数据查询", notes = "分类数据查询")
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse qryCatalogTreeInfoPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests, public CommonResponse qryCatalogTreeInfoPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) { @ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
HashMap<String,Object> paramMap = new HashMap<String,Object>(); HashMap<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("orgCode",orgCode); paramMap.put("orgCode",orgCode);
CatalogTreePageParam param = CatalogTreePageParamUtil.fillPageParam(queryRequests, commonPageable, paramMap); CatalogTreePageParam param = CatalogTreePageParamUtil.fillPageParam(queryRequests, commonPageable, paramMap);
...@@ -164,7 +165,7 @@ public class CatalogTreeController extends AbstractBaseController { ...@@ -164,7 +165,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询分类按照id", notes = "查询分类按照id") @ApiOperation(value = "查询分类按照id", notes = "查询分类按照id")
@RequestMapping(value = "/catalogTreeDetById/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/catalogTreeDetById/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryCatalogTreeById(@ApiParam(value = "分类id", required = true) @PathVariable(name = "id") Long id) { public CommonResponse queryCatalogTreeById(@ApiParam(value = "分类id", required = true) @PathVariable(name = "id") Long id) {
......
package com.yeejoin.amos.maintenance.business.controller; package com.yeejoin.amos.maintenance.business.controller;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.maintenance.business.service.intfc.IAppService; import com.yeejoin.amos.maintenance.business.service.intfc.IAppService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.common.enums.CheckStatisticsTypeEnum; import com.yeejoin.amos.maintenance.common.enums.CheckStatisticsTypeEnum;
import com.yeejoin.amos.maintenance.common.enums.PlanTaskExecution; import com.yeejoin.amos.maintenance.common.enums.PlanTaskExecution;
import com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum; import com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum;
...@@ -28,35 +29,35 @@ public class CommonController extends AbstractBaseController{ ...@@ -28,35 +29,35 @@ public class CommonController extends AbstractBaseController{
@Autowired @Autowired
private IAppService iAppService; private IAppService iAppService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "任务统计口径类型", notes = "任务统计口径类型") @ApiOperation(value = "任务统计口径类型", notes = "任务统计口径类型")
@RequestMapping(value = "/taskgetStatisticsType", method = RequestMethod.GET) @RequestMapping(value = "/taskgetStatisticsType", method = RequestMethod.GET)
public CommonResponse getTaskStatisticsType() { public CommonResponse getTaskStatisticsType() {
return CommonResponseUtil.success(TaskStatisticsTypeEnum.getEnumList()); return CommonResponseUtil.success(TaskStatisticsTypeEnum.getEnumList());
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检统计口径类型", notes = "巡检统计口径类型") @ApiOperation(value = "巡检统计口径类型", notes = "巡检统计口径类型")
@RequestMapping(value = "/checkStatisticsType", method = RequestMethod.GET) @RequestMapping(value = "/checkStatisticsType", method = RequestMethod.GET)
public CommonResponse getCheckStatisticsType() { public CommonResponse getCheckStatisticsType() {
return CommonResponseUtil.success(CheckStatisticsTypeEnum.getEnumList()); return CommonResponseUtil.success(CheckStatisticsTypeEnum.getEnumList());
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "计划任务完成种类", notes = "计划任务完成种类") @ApiOperation(httpMethod = "GET", value = "计划任务完成种类", notes = "计划任务完成种类")
@RequestMapping(value = "/planTaskFinishStatus", method = RequestMethod.GET) @RequestMapping(value = "/planTaskFinishStatus", method = RequestMethod.GET)
public CommonResponse getPlanTaskFinishStatus() { public CommonResponse getPlanTaskFinishStatus() {
return CommonResponseUtil.success(PlanTaskFinishStatusEnum.getEnumList()); return CommonResponseUtil.success(PlanTaskFinishStatusEnum.getEnumList());
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "计划任务执行情况种类", notes = "计划任务执行情况种类") @ApiOperation(value = "计划任务执行情况种类", notes = "计划任务执行情况种类")
@RequestMapping(value = "/planTaskExecution", method = RequestMethod.GET) @RequestMapping(value = "/planTaskExecution", method = RequestMethod.GET)
public CommonResponse getPlanTaskExecution() { public CommonResponse getPlanTaskExecution() {
return CommonResponseUtil.success(PlanTaskExecution.getEnumList()); return CommonResponseUtil.success(PlanTaskExecution.getEnumList());
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取app最新版本信息", notes = "获取app最新版本信息") @ApiOperation(value = "获取app最新版本信息", notes = "获取app最新版本信息")
@RequestMapping(value = "/queryAppVersion", method = RequestMethod.GET) @RequestMapping(value = "/queryAppVersion", method = RequestMethod.GET)
//@Authorization(ingore=true) //@Authorization(ingore=true)
......
...@@ -2,16 +2,18 @@ package com.yeejoin.amos.maintenance.business.controller; ...@@ -2,16 +2,18 @@ package com.yeejoin.amos.maintenance.business.controller;
import java.util.List; import java.util.List;
import com.yeejoin.amos.maintenance.business.dao.repository.IConfigDao;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.maintenance.business.dao.repository.IConfigDao;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.dao.entity.Config; import com.yeejoin.amos.maintenance.dao.entity.Config;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -42,7 +44,7 @@ public class ConfigController extends AbstractBaseController{ ...@@ -42,7 +44,7 @@ public class ConfigController extends AbstractBaseController{
* @return * @return
*/ */
//@Authorization(ingore = true) //@Authorization(ingore = true)
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取配置接口信息", notes = " 获取配置接口信息") @ApiOperation(value = "获取配置接口信息", notes = " 获取配置接口信息")
@RequestMapping(value = "/getConfigsInfo", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/getConfigsInfo", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getConfigsInfo() { public CommonResponse getConfigsInfo() {
......
...@@ -10,13 +10,14 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -10,13 +10,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.service.intfc.IEquipmentHandlerService; import com.yeejoin.amos.maintenance.business.service.intfc.IEquipmentHandlerService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.util.Toke; import com.yeejoin.amos.maintenance.business.util.Toke;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.dao.entity.InputItem; import com.yeejoin.amos.maintenance.dao.entity.InputItem;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -41,7 +42,7 @@ public class EquipmentRuleController extends AbstractBaseController { ...@@ -41,7 +42,7 @@ public class EquipmentRuleController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "装备检查项", notes = "装备检查项") @ApiOperation(value = "装备检查项", notes = "装备检查项")
@RequestMapping(value = "/equipmnetInput", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/equipmnetInput", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse getPlanTaskList( public CommonResponse getPlanTaskList(
...@@ -51,7 +52,7 @@ public class EquipmentRuleController extends AbstractBaseController { ...@@ -51,7 +52,7 @@ public class EquipmentRuleController extends AbstractBaseController {
token.setToke(getToken()); token.setToke(getToken());
token.setAppKey(getAppKey()); token.setAppKey(getAppKey());
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
map.put("orgCode", orgCode); map.put("orgCode", orgCode);
equipmentHandlerService.fireEquipRuleMessagePush(map, token); equipmentHandlerService.fireEquipRuleMessagePush(map, token);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
...@@ -62,7 +63,7 @@ public class EquipmentRuleController extends AbstractBaseController { ...@@ -62,7 +63,7 @@ public class EquipmentRuleController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "装备检查项", notes = "装备检查项") @ApiOperation(value = "装备检查项", notes = "装备检查项")
@RequestMapping(value = "/getEquipmnetRules", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/getEquipmnetRules", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getEquipmnetRules( public CommonResponse getEquipmnetRules(
......
...@@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.param.TaskStatisticsParam; import com.yeejoin.amos.maintenance.business.param.TaskStatisticsParam;
...@@ -26,7 +28,6 @@ import com.yeejoin.amos.maintenance.business.service.impl.TaskReportService; ...@@ -26,7 +28,6 @@ import com.yeejoin.amos.maintenance.business.service.impl.TaskReportService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.util.Toke; import com.yeejoin.amos.maintenance.business.util.Toke;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
...@@ -57,7 +58,7 @@ public class ExcelExportController extends AbstractBaseController{ ...@@ -57,7 +58,7 @@ public class ExcelExportController extends AbstractBaseController{
* *
* 导出格式为:vnd.ms-excel * 导出格式为:vnd.ms-excel
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检完成情况月报表导出excel", notes = " 巡检完成情况月报表导出excel") @ApiOperation(value = "巡检完成情况月报表导出excel", notes = " 巡检完成情况月报表导出excel")
@RequestMapping(value = "/task/{statistical}", produces = "application/vnd.ms-excel;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/task/{statistical}", produces = "application/vnd.ms-excel;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse taskReport( public CommonResponse taskReport(
...@@ -71,7 +72,7 @@ public class ExcelExportController extends AbstractBaseController{ ...@@ -71,7 +72,7 @@ public class ExcelExportController extends AbstractBaseController{
startDate += " 00:00:00"; startDate += " 00:00:00";
endDate += " 23:59:59"; endDate += " 23:59:59";
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
Map<String,Object> map = taskReportService.queryForTaskReport(getToken(),getProduct(),getAppKey(),statistical,startDate,endDate,planId,routeId,orgCode); Map<String,Object> map = taskReportService.queryForTaskReport(getToken(),getProduct(),getAppKey(),statistical,startDate,endDate,planId,routeId,orgCode);
...@@ -86,7 +87,7 @@ public class ExcelExportController extends AbstractBaseController{ ...@@ -86,7 +87,7 @@ public class ExcelExportController extends AbstractBaseController{
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = " 人员综合统计分析Excel导出", notes = " 人员综合统计分析Excel导出") @ApiOperation(value = " 人员综合统计分析Excel导出", notes = " 人员综合统计分析Excel导出")
@RequestMapping(value = "/comprehensive/user", produces = "application/vnd.ms-excel;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/comprehensive/user", produces = "application/vnd.ms-excel;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse comprehensiveStatisticalForUser( public CommonResponse comprehensiveStatisticalForUser(
......
...@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo; import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...@@ -23,7 +25,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.ISafety3DDataSendServ ...@@ -23,7 +25,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.ISafety3DDataSendServ
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.common.response.TaskInfoRespone; import com.yeejoin.amos.maintenance.core.common.response.TaskInfoRespone;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.email.IEmailService; import com.yeejoin.amos.maintenance.email.IEmailService;
import com.yeejoin.amos.maintenance.feign.RemoteSecurityService; import com.yeejoin.amos.maintenance.feign.RemoteSecurityService;
...@@ -51,7 +52,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -51,7 +52,7 @@ public class GroupController extends AbstractBaseController{
* 部门查询 * 部门查询
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取当前用户所属公司的所有部门", notes = "获取当前用户所属公司的所有部门") @ApiOperation(value = "获取当前用户所属公司的所有部门", notes = "获取当前用户所属公司的所有部门")
@RequestMapping(value = "/queryDept", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryDept", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryCurrentCompanyDept() { public CommonResponse queryCurrentCompanyDept() {
...@@ -138,7 +139,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -138,7 +139,7 @@ public class GroupController extends AbstractBaseController{
return CommonResponseUtil.success(res); return CommonResponseUtil.success(res);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取当前用户所属公司的所有部门及人员", notes = "获取当前用户所属公司的所有部门及人员") @ApiOperation(value = "获取当前用户所属公司的所有部门及人员", notes = "获取当前用户所属公司的所有部门及人员")
@RequestMapping(value = "/queryDeptAndUser",produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryDeptAndUser",produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryCurrentCompanyDeptAndUser() { public CommonResponse queryCurrentCompanyDeptAndUser() {
...@@ -288,7 +289,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -288,7 +289,7 @@ public class GroupController extends AbstractBaseController{
* @param companyId * @param companyId
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据指定公司ID获取公司和所属公司的子公司信息", notes = "根据指定公司ID获取公司和所属公司的子公司信息") @ApiOperation(value = "根据指定公司ID获取公司和所属公司的子公司信息", notes = "根据指定公司ID获取公司和所属公司的子公司信息")
@RequestMapping(value = "/queryCompanyLeaves", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryCompanyLeaves", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryCompanyLeavesById(@ApiParam(value="公司Id") @RequestParam("companyId") String companyId) { public CommonResponse queryCompanyLeavesById(@ApiParam(value="公司Id") @RequestParam("companyId") String companyId) {
...@@ -308,7 +309,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -308,7 +309,7 @@ public class GroupController extends AbstractBaseController{
* 根据用户所有属公司ID,查询所有子公司末端公司信息 * 根据用户所有属公司ID,查询所有子公司末端公司信息
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取用户所属公司和所属公司的子公司信息", notes = "获取用户所属公司和所属公司的子公司信息") @ApiOperation(value = "获取用户所属公司和所属公司的子公司信息", notes = "获取用户所属公司和所属公司的子公司信息")
@RequestMapping(value = "/queryAuthCompanyLeaves", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryAuthCompanyLeaves", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryAuthCompanyLeaves() { public CommonResponse queryAuthCompanyLeaves() {
...@@ -351,7 +352,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -351,7 +352,7 @@ public class GroupController extends AbstractBaseController{
@Autowired @Autowired
private ISafety3DDataSendService safety3DDataSend; private ISafety3DDataSendService safety3DDataSend;
//@Authorization(ingore=true) //@Authorization(ingore=true)
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "检查点状态推送", notes = "检查点状态推送") @ApiOperation(value = "检查点状态推送", notes = "检查点状态推送")
@RequestMapping(value = "/testCheckPushStatus", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/testCheckPushStatus", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse testCheckPushStatus(@ApiParam(value="Id") @RequestParam("checkId") long checkId) { public CommonResponse testCheckPushStatus(@ApiParam(value="Id") @RequestParam("checkId") long checkId) {
...@@ -366,7 +367,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -366,7 +367,7 @@ public class GroupController extends AbstractBaseController{
} }
//@Authorization(ingore=true) //@Authorization(ingore=true)
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "任务状态推送", notes = "任务状态推送") @ApiOperation(value = "任务状态推送", notes = "任务状态推送")
@RequestMapping(value = "/testTaskPushStatus", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/testTaskPushStatus", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse testTaskPushStatus(@ApiParam(value="Id") @RequestParam("checkId") Long taskId) { public CommonResponse testTaskPushStatus(@ApiParam(value="Id") @RequestParam("checkId") Long taskId) {
...@@ -379,7 +380,7 @@ public class GroupController extends AbstractBaseController{ ...@@ -379,7 +380,7 @@ public class GroupController extends AbstractBaseController{
} }
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检点信息", notes = "巡检点信息") @ApiOperation(value = "巡检点信息", notes = "巡检点信息")
@RequestMapping(value = "/pointInfo", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/pointInfo", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getPointInfo(@ApiParam(value="Id") @RequestParam("pointId") Long pointId) { public CommonResponse getPointInfo(@ApiParam(value="Id") @RequestParam("pointId") Long pointId) {
......
...@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.service.intfc.ICheckService; import com.yeejoin.amos.maintenance.business.service.intfc.ICheckService;
...@@ -19,7 +21,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.IPointService; ...@@ -19,7 +21,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.IPointService;
import com.yeejoin.amos.maintenance.business.service.intfc.ITaskService; import com.yeejoin.amos.maintenance.business.service.intfc.ITaskService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.feign.RemoteSecurityService; import com.yeejoin.amos.maintenance.feign.RemoteSecurityService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -46,7 +47,7 @@ public class HomeController extends AbstractBaseController{ ...@@ -46,7 +47,7 @@ public class HomeController extends AbstractBaseController{
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "首页数据", notes = "首页数据") @ApiOperation(value = "首页数据", notes = "首页数据")
@GetMapping(value="/overviewData") @GetMapping(value="/overviewData")
// @Authorization(ingore = true) // @Authorization(ingore = true)
...@@ -54,11 +55,11 @@ public class HomeController extends AbstractBaseController{ ...@@ -54,11 +55,11 @@ public class HomeController extends AbstractBaseController{
HashMap<String, Object> response = new HashMap<String, Object>(); HashMap<String, Object> response = new HashMap<String, Object>();
HashMap<String, Object> statusList = new HashMap<String, Object>(); HashMap<String, Object> statusList = new HashMap<String, Object>();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String companyName = getCompanyName(reginParams); String companyName = getCompanyName(reginParams);
/*if (XJConstant.ROLE_NAME_ADMIN.equals(loginParam.getRoleTypeName()) || /*if (XJConstant.ROLE_NAME_ADMIN.equals(loginParam.getRoleTypeName()) ||
XJConstant.ROLE_NAME_SUPERADMIN.equals(loginParam.getRoleTypeName())) { XJConstant.ROLE_NAME_SUPERADMIN.equals(loginParam.getRoleTypeName())) {
orgCode = loginParam.getLoginOrgCode(); orgCode = loginParam.getOrgCode();
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(loginParam.getRoleTypeName())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(loginParam.getRoleTypeName())) {
orgCode = loginParam.getUserOrgCode(); orgCode = loginParam.getUserOrgCode();
}*/ }*/
...@@ -83,13 +84,13 @@ public class HomeController extends AbstractBaseController{ ...@@ -83,13 +84,13 @@ public class HomeController extends AbstractBaseController{
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "首页数据", notes = "首页数据") @ApiOperation(value = "首页数据", notes = "首页数据")
@GetMapping(value="/getCheckData") @GetMapping(value="/getCheckData")
public CommonResponse getCheckData() { public CommonResponse getCheckData() {
String userId = getUserId(); String userId = getUserId();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String roleTypeName = getRoleTypeName(reginParams); String roleTypeName = getRoleTypeName(reginParams);
SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日"); SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
...@@ -106,7 +107,7 @@ public class HomeController extends AbstractBaseController{ ...@@ -106,7 +107,7 @@ public class HomeController extends AbstractBaseController{
HashMap<String, Object> param = new HashMap<String, Object>(); HashMap<String, Object> param = new HashMap<String, Object>();
/*if (XJConstant.ROLE_NAME_ADMIN.equals(loginParam.getRoleTypeName()) || /*if (XJConstant.ROLE_NAME_ADMIN.equals(loginParam.getRoleTypeName()) ||
XJConstant.ROLE_NAME_SUPERADMIN.equals(loginParam.getRoleTypeName())) { XJConstant.ROLE_NAME_SUPERADMIN.equals(loginParam.getRoleTypeName())) {
param.put("orgCode", loginParam.getLoginOrgCode()); param.put("orgCode", loginParam.getOrgCode());
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(loginParam.getRoleTypeName())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(loginParam.getRoleTypeName())) {
param.put("orgCode", loginParam.getUserOrgCode()); param.put("orgCode", loginParam.getUserOrgCode());
} else { } else {
......
...@@ -65,7 +65,7 @@ public class LatentDangerController extends AbstractBaseController { ...@@ -65,7 +65,7 @@ public class LatentDangerController extends AbstractBaseController {
} }
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String deptId = getDepartmentId(reginParams); String deptId = getDepartmentId(reginParams);
String companyId = getCompanyId(reginParams); String companyId = getCompanyId(reginParams);
String departmentName = getDepartmentName(reginParams); String departmentName = getDepartmentName(reginParams);
...@@ -87,7 +87,7 @@ public class LatentDangerController extends AbstractBaseController { ...@@ -87,7 +87,7 @@ public class LatentDangerController extends AbstractBaseController {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
} }
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String deptId = getDepartmentId(reginParams); String deptId = getDepartmentId(reginParams);
String companyId = getCompanyId(reginParams); String companyId = getCompanyId(reginParams);
String departmentName = getDepartmentName(reginParams); String departmentName = getDepartmentName(reginParams);
...@@ -110,7 +110,7 @@ public class LatentDangerController extends AbstractBaseController { ...@@ -110,7 +110,7 @@ public class LatentDangerController extends AbstractBaseController {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
} }
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String deptId = null; String deptId = null;
return iLatentDangerService.list(getToken(), getProduct(), getAppKey(), latentDangerListParam, user, loginOrgCode, deptId); return iLatentDangerService.list(getToken(), getProduct(), getAppKey(), latentDangerListParam, user, loginOrgCode, deptId);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -8,11 +8,12 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -8,11 +8,12 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.maintenance.business.service.intfc.IMeasuresService; import com.yeejoin.amos.maintenance.business.service.intfc.IMeasuresService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.dao.entity.Measure; import com.yeejoin.amos.maintenance.dao.entity.Measure;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -27,7 +28,7 @@ public class MeasuresController extends AbstractBaseController { ...@@ -27,7 +28,7 @@ public class MeasuresController extends AbstractBaseController {
@Autowired @Autowired
IMeasuresService measuresService; IMeasuresService measuresService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "add", produces = "application/json;charset=UTF-8") @PostMapping(value = "add", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "新增风险措施", notes = "新增风险措施") @ApiOperation(value = "新增风险措施", notes = "新增风险措施")
public CommonResponse measuresAdd(@ApiParam(value = "风险措施参数", required = false) @RequestBody(required = false) Measure measure) { public CommonResponse measuresAdd(@ApiParam(value = "风险措施参数", required = false) @RequestBody(required = false) Measure measure) {
...@@ -39,7 +40,7 @@ public class MeasuresController extends AbstractBaseController { ...@@ -39,7 +40,7 @@ public class MeasuresController extends AbstractBaseController {
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "update", produces = "application/json;charset=UTF-8") @PostMapping(value = "update", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "修改风险措施", notes = "修改风险措施") @ApiOperation(value = "修改风险措施", notes = "修改风险措施")
public CommonResponse measuresUpdate(@ApiParam(value = "风险措施参数", required = false) @RequestBody(required = false) Measure measure) { public CommonResponse measuresUpdate(@ApiParam(value = "风险措施参数", required = false) @RequestBody(required = false) Measure measure) {
...@@ -53,7 +54,7 @@ public class MeasuresController extends AbstractBaseController { ...@@ -53,7 +54,7 @@ public class MeasuresController extends AbstractBaseController {
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "delete/{id}", produces = "application/json;charset=UTF-8") @PostMapping(value = "delete/{id}", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "删除风险措施", notes = "删除风险措施") @ApiOperation(value = "删除风险措施", notes = "删除风险措施")
public CommonResponse measuresDelete(@ApiParam(value = "风险措施id", required = false) @PathVariable(required = true) Long id) { public CommonResponse measuresDelete(@ApiParam(value = "风险措施id", required = false) @PathVariable(required = true) Long id) {
......
...@@ -21,6 +21,8 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -21,6 +21,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...@@ -44,7 +46,6 @@ import com.yeejoin.amos.maintenance.common.enums.CheckTypeEnum; ...@@ -44,7 +46,6 @@ import com.yeejoin.amos.maintenance.common.enums.CheckTypeEnum;
import com.yeejoin.amos.maintenance.common.enums.MsgTypeEnum; import com.yeejoin.amos.maintenance.common.enums.MsgTypeEnum;
import com.yeejoin.amos.maintenance.core.common.request.CommonPageable; 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.request.CommonRequest;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.dao.entity.Msg; import com.yeejoin.amos.maintenance.dao.entity.Msg;
import com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe; import com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe;
import com.yeejoin.amos.maintenance.quartz.IJobService; import com.yeejoin.amos.maintenance.quartz.IJobService;
...@@ -90,7 +91,7 @@ public class MsgController extends AbstractBaseController { ...@@ -90,7 +91,7 @@ public class MsgController extends AbstractBaseController {
* 获取用户当前所选择公司的消息订阅信息 * 获取用户当前所选择公司的消息订阅信息
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value="获取用户当前所选择公司的消息订阅信息", notes="获取用户当前所选择公司的消息订阅信息") @ApiOperation(value="获取用户当前所选择公司的消息订阅信息", notes="获取用户当前所选择公司的消息订阅信息")
@GetMapping(value="/querySubscribe", produces = "application/json;charset=UTF-8") @GetMapping(value="/querySubscribe", produces = "application/json;charset=UTF-8")
public CommonResponse queryMsgSetting() { public CommonResponse queryMsgSetting() {
...@@ -98,7 +99,7 @@ public class MsgController extends AbstractBaseController { ...@@ -98,7 +99,7 @@ public class MsgController extends AbstractBaseController {
AgencyUserModel userModel = getUserInfo(); AgencyUserModel userModel = getUserInfo();
String userId = userModel.getUserId(); String userId = userModel.getUserId();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String deptId=null; String deptId=null;
if( reginParams.getDepartment()!=null){ if( reginParams.getDepartment()!=null){
deptId = reginParams.getDepartment().getDepartmentDesc(); deptId = reginParams.getDepartment().getDepartmentDesc();
...@@ -181,7 +182,7 @@ public class MsgController extends AbstractBaseController { ...@@ -181,7 +182,7 @@ public class MsgController extends AbstractBaseController {
* @param subscribe * @param subscribe
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value="保存用户消息订阅信息", notes="保存用户消息订阅信息") @ApiOperation(value="保存用户消息订阅信息", notes="保存用户消息订阅信息")
@PostMapping(value="/saveSubscribe",produces = "application/json;charset=UTF-8") @PostMapping(value="/saveSubscribe",produces = "application/json;charset=UTF-8")
public CommonResponse saveSubscribe(@ApiParam(value = "消息订阅信息", required = false) @RequestBody(required = true) List<MsgSubscribe> subscribe) { public CommonResponse saveSubscribe(@ApiParam(value = "消息订阅信息", required = false) @RequestBody(required = true) List<MsgSubscribe> subscribe) {
...@@ -189,7 +190,7 @@ public class MsgController extends AbstractBaseController { ...@@ -189,7 +190,7 @@ public class MsgController extends AbstractBaseController {
AgencyUserModel userModel = getUserInfo(); AgencyUserModel userModel = getUserInfo();
String userId = userModel.getUserId(); String userId = userModel.getUserId();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
for (MsgSubscribe s: subscribe) { for (MsgSubscribe s: subscribe) {
s.setOrgCode(orgCode); s.setOrgCode(orgCode);
s.setUserId(userModel.getUserId()); s.setUserId(userModel.getUserId());
...@@ -252,7 +253,7 @@ public class MsgController extends AbstractBaseController { ...@@ -252,7 +253,7 @@ public class MsgController extends AbstractBaseController {
* 根据登陆用户APP获取未读消息个数 * 根据登陆用户APP获取未读消息个数
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value="APP根据登陆用户获取未读消息个数", notes="APP根据登陆用户获取未读消息个数") @ApiOperation(value="APP根据登陆用户获取未读消息个数", notes="APP根据登陆用户获取未读消息个数")
@GetMapping(value="/unreadCount",produces = "application/json;charset=UTF-8") @GetMapping(value="/unreadCount",produces = "application/json;charset=UTF-8")
public CommonResponse getUnreadCount() { public CommonResponse getUnreadCount() {
...@@ -270,7 +271,7 @@ public class MsgController extends AbstractBaseController { ...@@ -270,7 +271,7 @@ public class MsgController extends AbstractBaseController {
* 获取消息类型 * 获取消息类型
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value="APP获取消息类型", notes="APP获取消息类型") @ApiOperation(value="APP获取消息类型", notes="APP获取消息类型")
@GetMapping(value="/MsgType",produces = "application/json;charset=UTF-8") @GetMapping(value="/MsgType",produces = "application/json;charset=UTF-8")
public CommonResponse getMsgType() { public CommonResponse getMsgType() {
...@@ -288,7 +289,7 @@ public class MsgController extends AbstractBaseController { ...@@ -288,7 +289,7 @@ public class MsgController extends AbstractBaseController {
* @param commonPageable * @param commonPageable
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "APP 根据条件获取消息列表", notes = "APP 根据条件获取消息列表") @ApiOperation(value = "APP 根据条件获取消息列表", notes = "APP 根据条件获取消息列表")
@PostMapping(value = "/msgList", produces = "application/json;charset=UTF-8") @PostMapping(value = "/msgList", produces = "application/json;charset=UTF-8")
public CommonResponse queryMsgList( public CommonResponse queryMsgList(
...@@ -298,7 +299,7 @@ public class MsgController extends AbstractBaseController { ...@@ -298,7 +299,7 @@ public class MsgController extends AbstractBaseController {
AgencyUserModel user = getUserInfo(); AgencyUserModel user = getUserInfo();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String roleTypeName = getRoleTypeName(reginParams); String roleTypeName = getRoleTypeName(reginParams);
CommonRequest request = new CommonRequest(); CommonRequest request = new CommonRequest();
CommonRequest request1 = new CommonRequest(); CommonRequest request1 = new CommonRequest();
...@@ -358,7 +359,7 @@ public class MsgController extends AbstractBaseController { ...@@ -358,7 +359,7 @@ public class MsgController extends AbstractBaseController {
* @param commonPageable * @param commonPageable
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据条件获取消息列表", notes = "APP 根据条件获取消息列表") @ApiOperation(value = "根据条件获取消息列表", notes = "APP 根据条件获取消息列表")
@PostMapping(value = "/list", produces = "application/json;charset=UTF-8") @PostMapping(value = "/list", produces = "application/json;charset=UTF-8")
public CommonResponse querylist( public CommonResponse querylist(
...@@ -366,7 +367,7 @@ public class MsgController extends AbstractBaseController { ...@@ -366,7 +367,7 @@ public class MsgController extends AbstractBaseController {
@ApiParam(value = "分页参数", required = true, defaultValue = "pageNumber=0&pageSize=10") CommonPageable commonPageable) { @ApiParam(value = "分页参数", required = true, defaultValue = "pageNumber=0&pageSize=10") CommonPageable commonPageable) {
try { try {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String roleTypeName = getRoleTypeName(reginParams); String roleTypeName = getRoleTypeName(reginParams);
HashMap<String, Object> paramMap = buildMybatisCriterias(loginOrgCode, roleTypeName); HashMap<String, Object> paramMap = buildMybatisCriterias(loginOrgCode, roleTypeName);
if(XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName)||XJConstant.ROLE_NAME_PERSON.equals(roleTypeName)) if(XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName)||XJConstant.ROLE_NAME_PERSON.equals(roleTypeName))
...@@ -385,7 +386,7 @@ public class MsgController extends AbstractBaseController { ...@@ -385,7 +386,7 @@ public class MsgController extends AbstractBaseController {
* @param msgId * @param msgId
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "修改消失为已读", notes = "修改消失为已读") @ApiOperation(value = "修改消失为已读", notes = "修改消失为已读")
@PostMapping(value = "/isRead", produces = "application/json;charset=UTF-8") @PostMapping(value = "/isRead", produces = "application/json;charset=UTF-8")
public CommonResponse isRead( public CommonResponse isRead(
...@@ -404,7 +405,7 @@ public class MsgController extends AbstractBaseController { ...@@ -404,7 +405,7 @@ public class MsgController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通知发布", notes = "通知发布") @ApiOperation(value = "通知发布", notes = "通知发布")
@PostMapping(value = "/noticePublish", produces = "application/json;charset=UTF-8") @PostMapping(value = "/noticePublish", produces = "application/json;charset=UTF-8")
public CommonResponse noticePublish(@ApiParam(value = "通知信息", required = true) @RequestBody NoticePublishParam msg) { public CommonResponse noticePublish(@ApiParam(value = "通知信息", required = true) @RequestBody NoticePublishParam msg) {
...@@ -413,7 +414,7 @@ public class MsgController extends AbstractBaseController { ...@@ -413,7 +414,7 @@ public class MsgController extends AbstractBaseController {
msg.setCreateBy(user.getUserId()); msg.setCreateBy(user.getUserId());
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
msg.setUserName(user.getRealName()); msg.setUserName(user.getRealName());
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
msg.setOrgCode(loginOrgCode); msg.setOrgCode(loginOrgCode);
List<Msg> msgList = iMsgService.publishNotice(getToken(),getProduct(),getAppKey(),msg); List<Msg> msgList = iMsgService.publishNotice(getToken(),getProduct(),getAppKey(),msg);
msgList.forEach(m->{ msgList.forEach(m->{
......
...@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.param.PlanInfoPageParam; import com.yeejoin.amos.maintenance.business.param.PlanInfoPageParam;
...@@ -21,7 +23,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; ...@@ -21,7 +23,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.util.PlanPageParamUtil; import com.yeejoin.amos.maintenance.business.util.PlanPageParamUtil;
import com.yeejoin.amos.maintenance.core.common.request.CommonPageable; 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.request.CommonRequest;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.dao.entity.Plan; import com.yeejoin.amos.maintenance.dao.entity.Plan;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -43,15 +44,15 @@ public class PlanController extends AbstractBaseController { ...@@ -43,15 +44,15 @@ public class PlanController extends AbstractBaseController {
* @param * @param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检计划查询", notes = "巡检计划查询") @ApiOperation(value = "巡检计划查询", notes = "巡检计划查询")
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse qryCheckInfoPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests, public CommonResponse qryCheckInfoPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) { @ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
HashMap<String, Object> paramMap = buildMybatisCriterias(loginOrgCode, null); HashMap<String, Object> paramMap = buildMybatisCriterias(loginOrgCode, null);
buildRequestCxt(); // buildRequestCxt();
PlanInfoPageParam param = PlanPageParamUtil.fillPlanInfoParam(queryRequests, commonPageable, paramMap); PlanInfoPageParam param = PlanPageParamUtil.fillPlanInfoParam(queryRequests, commonPageable, paramMap);
Page<HashMap<String, Object>> list = planService.getPlanInfo(param); Page<HashMap<String, Object>> list = planService.getPlanInfo(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
...@@ -64,13 +65,13 @@ public class PlanController extends AbstractBaseController { ...@@ -64,13 +65,13 @@ public class PlanController extends AbstractBaseController {
* @param * @param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "业主单位维保计划查询", notes = "业主单位维保计划查询") @ApiOperation(value = "业主单位维保计划查询", notes = "业主单位维保计划查询")
@RequestMapping(value = "/owner/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/owner/list", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryInfoPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests, public CommonResponse queryInfoPage(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) { @ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
HashMap<String, Object> paramMap = buildMybatisCriterias(null, null); HashMap<String, Object> paramMap = buildMybatisCriterias(null, null);
buildRequestCxt(); // buildRequestCxt();
PlanInfoPageParam param = PlanPageParamUtil.fillPlanInfoParam(queryRequests, commonPageable, paramMap); PlanInfoPageParam param = PlanPageParamUtil.fillPlanInfoParam(queryRequests, commonPageable, paramMap);
Page<HashMap<String, Object>> list = planService.getPlanInfo(param); Page<HashMap<String, Object>> list = planService.getPlanInfo(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
...@@ -82,14 +83,14 @@ public class PlanController extends AbstractBaseController { ...@@ -82,14 +83,14 @@ public class PlanController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检计划新增及编辑", notes = "巡检计划新增及编辑") @ApiOperation(value = "巡检计划新增及编辑", notes = "巡检计划新增及编辑")
@RequestMapping(value = "/addPlan", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/addPlan", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse checkPlanAdd(@ApiParam(value = "巡检计划", required = true) @RequestBody Plan param) { public CommonResponse checkPlanAdd(@ApiParam(value = "巡检计划", required = true) @RequestBody Plan param) {
try { try {
String userId = getUserId(); String userId = getUserId();
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
HashMap<String, Object> map = new HashMap<String, Object>(); HashMap<String, Object> map = new HashMap<String, Object>();
map.put("org_code", loginOrgCode); map.put("org_code", loginOrgCode);
map.put("user_id", userId); map.put("user_id", userId);
...@@ -108,7 +109,7 @@ public class PlanController extends AbstractBaseController { ...@@ -108,7 +109,7 @@ public class PlanController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "删除巡检计划", notes = "删除巡检计划") @ApiOperation(value = "删除巡检计划", notes = "删除巡检计划")
@RequestMapping(value = "/deletePlanById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/deletePlanById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deletePlanById( public CommonResponse deletePlanById(
...@@ -129,7 +130,7 @@ public class PlanController extends AbstractBaseController { ...@@ -129,7 +130,7 @@ public class PlanController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "另存巡检计划", notes = "另存巡检计划") @ApiOperation(value = "另存巡检计划", notes = "另存巡检计划")
@RequestMapping(value = "/saveAs", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/saveAs", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse planSaveAs(@ApiParam(value = "参数", required = true) @RequestBody String[] param) { public CommonResponse planSaveAs(@ApiParam(value = "参数", required = true) @RequestBody String[] param) {
...@@ -148,7 +149,7 @@ public class PlanController extends AbstractBaseController { ...@@ -148,7 +149,7 @@ public class PlanController extends AbstractBaseController {
* @param id * @param id
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询巡检计划明细", notes = "查询巡检计划明细") @ApiOperation(value = "查询巡检计划明细", notes = "查询巡检计划明细")
@RequestMapping(value = "/detail/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/detail/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPointById(@ApiParam(value = "计划id", required = true) @PathVariable(name = "id") Long id) { public CommonResponse queryPointById(@ApiParam(value = "计划id", required = true) @PathVariable(name = "id") Long id) {
...@@ -165,24 +166,24 @@ public class PlanController extends AbstractBaseController { ...@@ -165,24 +166,24 @@ public class PlanController extends AbstractBaseController {
* @param param * @param param
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检计划查询", notes = "巡检计划查询") @ApiOperation(value = "巡检计划查询", notes = "巡检计划查询")
@RequestMapping(value = "/queryPlanByOrgCode", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/queryPlanByOrgCode", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse qryCheckInfo(@ApiParam(value = "查询条件") @RequestBody(required = false) List<CommonRequest> queryRequests) { public CommonResponse qryCheckInfo(@ApiParam(value = "查询条件") @RequestBody(required = false) List<CommonRequest> queryRequests) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
HashMap<String, Object> paramMap = buildMybatisCriterias(loginOrgCode, null); HashMap<String, Object> paramMap = buildMybatisCriterias(loginOrgCode, null);
PlanInfoPageParam param = PlanPageParamUtil.fillPlanInfoParam(queryRequests, null, paramMap); PlanInfoPageParam param = PlanPageParamUtil.fillPlanInfoParam(queryRequests, null, paramMap);
List<HashMap<String, Object>> list = planService.getPlanInfoNoPage(param); List<HashMap<String, Object>> list = planService.getPlanInfoNoPage(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询计划列表(<font color='blue'>手机app</font>)", notes = "查询计划列表(<font color='blue'>手机app</font>)") @ApiOperation(value = "查询计划列表(<font color='blue'>手机app</font>)", notes = "查询计划列表(<font color='blue'>手机app</font>)")
@RequestMapping(value = "/queryPlanList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryPlanList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPlanList() { public CommonResponse queryPlanList() {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
List<HashMap<String, Object>> list = planService.queryPlanListByOrgCode(loginOrgCode); List<HashMap<String, Object>> list = planService.queryPlanListByOrgCode(loginOrgCode);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
} }
......
...@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.param.CheckStatsListPageParam; import com.yeejoin.amos.maintenance.business.param.CheckStatsListPageParam;
...@@ -19,7 +21,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; ...@@ -19,7 +21,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.vo.CheckStatsVo; import com.yeejoin.amos.maintenance.business.vo.CheckStatsVo;
import com.yeejoin.amos.maintenance.core.common.request.CommonPageable; 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.request.CommonRequest;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -39,14 +40,14 @@ public class QueryStatsController extends AbstractBaseController { ...@@ -39,14 +40,14 @@ public class QueryStatsController extends AbstractBaseController {
* @param point * @param point
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询巡检点信息", notes = "查询巡检点信息") @ApiOperation(value = "查询巡检点信息", notes = "查询巡检点信息")
@PostMapping(value = "/checkStats", produces = "application/json;charset=UTF-8") @PostMapping(value = "/checkStats", produces = "application/json;charset=UTF-8")
public CommonResponse queryCheckStats( public CommonResponse queryCheckStats(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests, @ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = true, defaultValue = "pageNumber=0&pageSize=10") CommonPageable commonPageable) { @ApiParam(value = "分页参数", required = true, defaultValue = "pageNumber=0&pageSize=10") CommonPageable commonPageable) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
String roleTypeName = getRoleTypeName(reginParams); String roleTypeName = getRoleTypeName(reginParams);
HashMap<String, Object> paramMap = buildMybatisDaoCriterias(loginOrgCode, roleTypeName); HashMap<String, Object> paramMap = buildMybatisDaoCriterias(loginOrgCode, roleTypeName);
CheckStatsListPageParam param = CheckStatsParamUtils.fillCheckInfoParam(queryRequests, commonPageable, paramMap); CheckStatsListPageParam param = CheckStatsParamUtils.fillCheckInfoParam(queryRequests, commonPageable, paramMap);
......
...@@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.feign.RemoteSecurityService; import com.yeejoin.amos.maintenance.feign.RemoteSecurityService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -57,11 +58,11 @@ public class SafetyController extends AbstractBaseController{ ...@@ -57,11 +58,11 @@ public class SafetyController extends AbstractBaseController{
/** /**
* 保存登陆用户选择公司信息 * 保存登陆用户选择公司信息
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = " 保存登陆用户选择公司信息", notes = " 保存登陆用户选择公司信息") @ApiOperation(value = " 保存登陆用户选择公司信息", notes = " 保存登陆用户选择公司信息")
@PostMapping(value = "/save/curCompany") @PostMapping(value = "/save/curCompany")
public CommonResponse saveCurCompany(@RequestBody ReginParams reginParams) { public CommonResponse saveCurCompany(@RequestBody ReginParams reginParams) {
this.saveSelectedOrgInfo(reginParams); // this.saveSelectedOrgInfo(reginParams);
// CatalogTree hh4= new CatalogTree(); // CatalogTree hh4= new CatalogTree();
// CommonResponse hh= pointService.pushSpcCheckResult(hh4); // CommonResponse hh= pointService.pushSpcCheckResult(hh4);
...@@ -71,7 +72,7 @@ public class SafetyController extends AbstractBaseController{ ...@@ -71,7 +72,7 @@ public class SafetyController extends AbstractBaseController{
/** /**
* 保存登陆用户选择公司信息(换流站项目登录巡检) * 保存登陆用户选择公司信息(换流站项目登录巡检)
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存登陆用户选择公司信息", notes = "保存登陆用户选择公司信息") @ApiOperation(value = "保存登陆用户选择公司信息", notes = "保存登陆用户选择公司信息")
@GetMapping(value = "/save/shortCutCompany") @GetMapping(value = "/save/shortCutCompany")
public CommonResponse specialSaveCurCompany( public CommonResponse specialSaveCurCompany(
......
...@@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.param.SynInputItemParam; import com.yeejoin.amos.maintenance.business.param.SynInputItemParam;
...@@ -20,7 +22,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.ISynDataService; ...@@ -20,7 +22,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.ISynDataService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.util.Toke; import com.yeejoin.amos.maintenance.business.util.Toke;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -46,14 +47,14 @@ public class SynDataController extends AbstractBaseController { ...@@ -46,14 +47,14 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 同步巡检项 * 同步巡检项
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "同步巡检项", notes = "同步巡检项") @ApiOperation(value = "同步巡检项", notes = "同步巡检项")
@PostMapping(value = "/inputItem/{operationType}") @PostMapping(value = "/inputItem/{operationType}")
public CommonResponse inputItem(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType, public CommonResponse inputItem(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType,
@ApiParam(value = "巡检项信息", required = true) @RequestBody SynInputItemParam synInputItemParam) { @ApiParam(value = "巡检项信息", required = true) @RequestBody SynInputItemParam synInputItemParam) {
try { try {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
String userId = getUserId(); String userId = getUserId();
if (ObjectUtils.isEmpty(reginParams)) { if (ObjectUtils.isEmpty(reginParams)) {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
...@@ -77,7 +78,7 @@ public class SynDataController extends AbstractBaseController { ...@@ -77,7 +78,7 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 同步巡检点 * 同步巡检点
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "同步巡检点", notes = "同步巡检点") @ApiOperation(value = "同步巡检点", notes = "同步巡检点")
@PostMapping(value = "/point/{operationType}") @PostMapping(value = "/point/{operationType}")
public CommonResponse point(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType, public CommonResponse point(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType,
...@@ -85,7 +86,7 @@ public class SynDataController extends AbstractBaseController { ...@@ -85,7 +86,7 @@ public class SynDataController extends AbstractBaseController {
try { try {
if (operationType.equals(saveOperationType)) { if (operationType.equals(saveOperationType)) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
String userId = getUserId(); String userId = getUserId();
if (ObjectUtils.isEmpty(reginParams)) { if (ObjectUtils.isEmpty(reginParams)) {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
...@@ -108,7 +109,7 @@ public class SynDataController extends AbstractBaseController { ...@@ -108,7 +109,7 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 同步巡检点和巡检项关系 * 同步巡检点和巡检项关系
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "同步巡检点和巡检项关系", notes = "同步巡检点和巡检项关系") @ApiOperation(value = "同步巡检点和巡检项关系", notes = "同步巡检点和巡检项关系")
@PostMapping(value = "/pointItem/relation/{operationType}") @PostMapping(value = "/pointItem/relation/{operationType}")
public CommonResponse relation(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType, public CommonResponse relation(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType,
...@@ -135,19 +136,19 @@ public class SynDataController extends AbstractBaseController { ...@@ -135,19 +136,19 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 同步巡检路线 * 同步巡检路线
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "同步巡检路线", notes = "同步巡检路线") @ApiOperation(value = "同步巡检路线", notes = "同步巡检路线")
@PostMapping(value = "/route/{operationType}") @PostMapping(value = "/route/{operationType}")
public CommonResponse route(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType, public CommonResponse route(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType,
@ApiParam(value = "巡检路线信息") @RequestBody SynRouteParam synRouteParam) { @ApiParam(value = "巡检路线信息") @RequestBody SynRouteParam synRouteParam) {
try { try {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
String userId = getUserId(); String userId = getUserId();
if (ObjectUtils.isEmpty(reginParams)) { if (ObjectUtils.isEmpty(reginParams)) {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
} }
// String orgCode = getLoginUserParam().getLoginOrgCode(); // String orgCode = getLoginUserParam().getOrgCode();
if (operationType.equals(saveOperationType)) { if (operationType.equals(saveOperationType)) {
return iSynDataService.saveRoute(synRouteParam, userId, orgCode); return iSynDataService.saveRoute(synRouteParam, userId, orgCode);
} }
...@@ -164,14 +165,14 @@ public class SynDataController extends AbstractBaseController { ...@@ -164,14 +165,14 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 同步巡检计划 * 同步巡检计划
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "同步巡检计划", notes = "同步巡检计划") @ApiOperation(value = "同步巡检计划", notes = "同步巡检计划")
@PostMapping(value = "/plan/{operationType}") @PostMapping(value = "/plan/{operationType}")
public CommonResponse plan(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType, public CommonResponse plan(@ApiParam(value = "操作类型(save/update/delete)", required = true) @PathVariable String operationType,
@ApiParam(value = "巡检计划信息") @RequestBody SynPlanParam synPlanParam) { @ApiParam(value = "巡检计划信息") @RequestBody SynPlanParam synPlanParam) {
try { try {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
String userId = getUserId(); String userId = getUserId();
Toke toke = new Toke(); Toke toke = new Toke();
toke.setAppKey(getAppKey()); toke.setAppKey(getAppKey());
...@@ -180,7 +181,7 @@ public class SynDataController extends AbstractBaseController { ...@@ -180,7 +181,7 @@ public class SynDataController extends AbstractBaseController {
if (ObjectUtils.isEmpty(reginParams)) { if (ObjectUtils.isEmpty(reginParams)) {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
} }
// String orgCode = getLoginUserParam().getLoginOrgCode(); // String orgCode = getLoginUserParam().getOrgCode();
if (operationType.equals(saveOperationType)) { if (operationType.equals(saveOperationType)) {
return iSynDataService.savePlan(synPlanParam, userId, orgCode,toke); return iSynDataService.savePlan(synPlanParam, userId, orgCode,toke);
} }
...@@ -197,7 +198,7 @@ public class SynDataController extends AbstractBaseController { ...@@ -197,7 +198,7 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 停用巡检计划 * 停用巡检计划
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "停用巡检计划", notes = "停用巡检计划") @ApiOperation(value = "停用巡检计划", notes = "停用巡检计划")
@PostMapping(value = "/stopPlan") @PostMapping(value = "/stopPlan")
public CommonResponse stopPlan(@ApiParam(value = "巡检计划信息", required = true) @RequestParam String originalId) { public CommonResponse stopPlan(@ApiParam(value = "巡检计划信息", required = true) @RequestParam String originalId) {
...@@ -217,7 +218,7 @@ public class SynDataController extends AbstractBaseController { ...@@ -217,7 +218,7 @@ public class SynDataController extends AbstractBaseController {
/** /**
* 获取巡检计划已完成次数 * 获取巡检计划已完成次数
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取巡检计划已完成次数", notes = "获取巡检计划已完成次数") @ApiOperation(value = "获取巡检计划已完成次数", notes = "获取巡检计划已完成次数")
@GetMapping(value = "/plan/getFinishTimes") @GetMapping(value = "/plan/getFinishTimes")
public CommonResponse getPlanFinishTimes(@ApiParam(value = "巡检计划原始编号(多个逗号隔开)", required = true) @RequestParam String originalIds) { public CommonResponse getPlanFinishTimes(@ApiParam(value = "巡检计划原始编号(多个逗号隔开)", required = true) @RequestParam String originalIds) {
......
...@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
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.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.param.TaskStatisticsParam; import com.yeejoin.amos.maintenance.business.param.TaskStatisticsParam;
...@@ -18,7 +20,6 @@ import com.yeejoin.amos.maintenance.business.service.impl.TaskReportService; ...@@ -18,7 +20,6 @@ import com.yeejoin.amos.maintenance.business.service.impl.TaskReportService;
import com.yeejoin.amos.maintenance.business.util.CommonResponse; import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil; import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import com.yeejoin.amos.maintenance.business.util.Toke; import com.yeejoin.amos.maintenance.business.util.Toke;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -34,7 +35,7 @@ public class TaskReportController extends AbstractBaseController{ ...@@ -34,7 +35,7 @@ public class TaskReportController extends AbstractBaseController{
@Autowired @Autowired
private TaskReportService taskReportService; private TaskReportService taskReportService;
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = " 巡检完成情况月报表", notes = " 巡检完成情况月报表") @ApiOperation(value = " 巡检完成情况月报表", notes = " 巡检完成情况月报表")
@RequestMapping(value = "/{statistical}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/{statistical}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse taskReport( public CommonResponse taskReport(
...@@ -47,12 +48,12 @@ public class TaskReportController extends AbstractBaseController{ ...@@ -47,12 +48,12 @@ public class TaskReportController extends AbstractBaseController{
startDate += " 00:00:00"; startDate += " 00:00:00";
endDate += " 23:59:59"; endDate += " 23:59:59";
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getLoginOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
return CommonResponseUtil.success(taskReportService.queryForTaskReport(getToken(),getProduct(),getAppKey(),statistical,startDate,endDate,planId,routeId,orgCode)); return CommonResponseUtil.success(taskReportService.queryForTaskReport(getToken(),getProduct(),getAppKey(),statistical,startDate,endDate,planId,routeId,orgCode));
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = " 人员综合统计分析", notes = " 人员综合统计分析") @ApiOperation(value = " 人员综合统计分析", notes = " 人员综合统计分析")
@PostMapping(value = "/comprehensive/user", produces = "application/json;charset=UTF-8") @PostMapping(value = "/comprehensive/user", produces = "application/json;charset=UTF-8")
public CommonResponse comprehensiveStatisticalForUser( public CommonResponse comprehensiveStatisticalForUser(
......
...@@ -30,6 +30,8 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -30,6 +30,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -51,7 +53,6 @@ import com.yeejoin.amos.maintenance.business.util.DepartmentUserTreeAppVo; ...@@ -51,7 +53,6 @@ import com.yeejoin.amos.maintenance.business.util.DepartmentUserTreeAppVo;
import com.yeejoin.amos.maintenance.business.util.DepartmentUserTreeWebVo; import com.yeejoin.amos.maintenance.business.util.DepartmentUserTreeWebVo;
import com.yeejoin.amos.maintenance.business.util.DesUtil; import com.yeejoin.amos.maintenance.business.util.DesUtil;
import com.yeejoin.amos.maintenance.business.util.StringUtil; import com.yeejoin.amos.maintenance.business.util.StringUtil;
import com.yeejoin.amos.maintenance.core.framework.Permission;
import com.yeejoin.amos.maintenance.feign.RemoteSecurityService; import com.yeejoin.amos.maintenance.feign.RemoteSecurityService;
import com.yeejoin.amos.maintenance.jpush.AppMessagePushService; import com.yeejoin.amos.maintenance.jpush.AppMessagePushService;
...@@ -97,7 +98,7 @@ public class UserController extends AbstractBaseController { ...@@ -97,7 +98,7 @@ public class UserController extends AbstractBaseController {
* @param deptId * @param deptId
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "部门人员查询", notes = "部门人员查询") @ApiOperation(value = "部门人员查询", notes = "部门人员查询")
@RequestMapping(value = "/queryDeptUser", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryDeptUser", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryDeptUser(@RequestParam(value = "deptId", required = false) String deptId) { public CommonResponse queryDeptUser(@RequestParam(value = "deptId", required = false) String deptId) {
...@@ -177,7 +178,7 @@ public class UserController extends AbstractBaseController { ...@@ -177,7 +178,7 @@ public class UserController extends AbstractBaseController {
return userList; return userList;
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "部门人员树查询", notes = "部门人员树查询") @ApiOperation(value = "部门人员树查询", notes = "部门人员树查询")
@RequestMapping(value = "/queryDeptUserTree1", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryDeptUserTree1", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryDeptUserTree1() { public CommonResponse queryDeptUserTree1() {
...@@ -185,7 +186,7 @@ public class UserController extends AbstractBaseController { ...@@ -185,7 +186,7 @@ public class UserController extends AbstractBaseController {
CompanyModel companyModel = remoteSecurityService.listUserByCompanyId1(getToken(), getProduct(), getAppKey(), reginParams.getCompany().getSequenceNbr().toString()); CompanyModel companyModel = remoteSecurityService.listUserByCompanyId1(getToken(), getProduct(), getAppKey(), reginParams.getCompany().getSequenceNbr().toString());
List children = (List) companyModel.getChildren(); List children = (List) companyModel.getChildren();
List<DepartmentUserTreeWebVo> list = Lists.newArrayList(); List<DepartmentUserTreeWebVo> list = Lists.newArrayList();
String loginOrgCode= getLoginOrgCode(reginParams); String loginOrgCode= getOrgCode(reginParams);
for (int i = 0; i < children.size(); i++) { for (int i = 0; i < children.size(); i++) {
Map<String, Object> map = (LinkedHashMap) children.get(i); Map<String, Object> map = (LinkedHashMap) children.get(i);
JSONObject json = JSON.parseObject(JSON.toJSONString(map)); JSONObject json = JSON.parseObject(JSON.toJSONString(map));
...@@ -294,14 +295,14 @@ public class UserController extends AbstractBaseController { ...@@ -294,14 +295,14 @@ public class UserController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "人员查询", notes = "人员查询") @ApiOperation(value = "人员查询", notes = "人员查询")
@RequestMapping(value = "/queryAuthUsers", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryAuthUsers", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
// @Authorization(ingore = true) // @Authorization(ingore = true)
public CommonResponse queryAllUser() { public CommonResponse queryAllUser() {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getLoginOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
List<AgencyUserModel> userModels = remoteSecurityService.listUserByOrgCode(getToken(), getProduct(), getAppKey(), loginOrgCode); List<AgencyUserModel> userModels = remoteSecurityService.listUserByOrgCode(getToken(), getProduct(), getAppKey(), loginOrgCode);
List<LinkedHashMap<String, Object>> userList = paraseData(userModels, null); List<LinkedHashMap<String, Object>> userList = paraseData(userModels, null);
return CommonResponseUtil.success(userList); return CommonResponseUtil.success(userList);
...@@ -312,7 +313,7 @@ public class UserController extends AbstractBaseController { ...@@ -312,7 +313,7 @@ public class UserController extends AbstractBaseController {
* *
* @return * @return
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "部门人员树查询", notes = "部门人员树查询") @ApiOperation(value = "部门人员树查询", notes = "部门人员树查询")
@RequestMapping(value = "/queryDeptUserTree", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryDeptUserTree", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryDeptUserTree() { public CommonResponse queryDeptUserTree() {
...@@ -330,7 +331,7 @@ public class UserController extends AbstractBaseController { ...@@ -330,7 +331,7 @@ public class UserController extends AbstractBaseController {
* @return * @return
* @RequestParam userName 用户名 * @RequestParam userName 用户名
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通讯录(<font color='blue'>手机app</font>)", notes = "通讯录(<font color='blue'>手机app</font>)") @ApiOperation(value = "通讯录(<font color='blue'>手机app</font>)", notes = "通讯录(<font color='blue'>手机app</font>)")
@RequestMapping(value = "/queryUserAddressList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryUserAddressList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryUserAddressListTree( public CommonResponse queryUserAddressListTree(
...@@ -490,7 +491,7 @@ public class UserController extends AbstractBaseController { ...@@ -490,7 +491,7 @@ public class UserController extends AbstractBaseController {
return userList; return userList;
} }
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "用户登录成功之后数据初始化(<font color='blue'>手机app</font>)", notes = "用户登录成功之后数据初始化") @ApiOperation(value = "用户登录成功之后数据初始化(<font color='blue'>手机app</font>)", notes = "用户登录成功之后数据初始化")
@RequestMapping(value = "/initData", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/initData", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse initUserApp() { public CommonResponse initUserApp() {
...@@ -529,7 +530,7 @@ public class UserController extends AbstractBaseController { ...@@ -529,7 +530,7 @@ public class UserController extends AbstractBaseController {
} }
///////////////////////////////2019-11-18安全服务升级/////////////////////////////// ///////////////////////////////2019-11-18安全服务升级///////////////////////////////
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通讯录", notes = "通讯录") @ApiOperation(value = "通讯录", notes = "通讯录")
@RequestMapping(value = "/mobile/addressList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/mobile/addressList", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse addressList() { public CommonResponse addressList() {
...@@ -740,13 +741,13 @@ public class UserController extends AbstractBaseController { ...@@ -740,13 +741,13 @@ public class UserController extends AbstractBaseController {
/** /**
* 保存登陆用户选择公司信息 * 保存登陆用户选择公司信息
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存登陆用户选择公司信息", notes = "保存登陆用户选择公司信息") @ApiOperation(value = "保存登陆用户选择公司信息", notes = "保存登陆用户选择公司信息")
@PostMapping(value = "/save/curCompany") @PostMapping(value = "/save/curCompany")
public CommonResponse saveCurCompany(@ApiParam(value = "当前登陆用户所选单位机构编号", required = true) @RequestBody ReginParams reginParams) { public CommonResponse saveCurCompany(@ApiParam(value = "当前登陆用户所选单位机构编号", required = true) @RequestBody ReginParams reginParams) {
try { try {
AgencyUserModel user = getUserInfo(); AgencyUserModel user = getUserInfo();
saveSelectedOrgInfo(reginParams); // saveSelectedOrgInfo(reginParams);
return CommonResponseUtil.success(buildCurCompany(getToken(),getProduct(),getAppKey(),reginParams, user)); return CommonResponseUtil.success(buildCurCompany(getToken(),getProduct(),getAppKey(),reginParams, user));
} catch (Exception e) { } catch (Exception e) {
logger.error("保存登陆用户选择公司信息异常", e); logger.error("保存登陆用户选择公司信息异常", e);
...@@ -791,7 +792,7 @@ public class UserController extends AbstractBaseController { ...@@ -791,7 +792,7 @@ public class UserController extends AbstractBaseController {
/** /**
* 装备登录返回巡检统计信息 * 装备登录返回巡检统计信息
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "装备登录返回巡检统计信息", notes = "装备登录返回巡检统计信息") @ApiOperation(value = "装备登录返回巡检统计信息", notes = "装备登录返回巡检统计信息")
@GetMapping(value = "/patrolCount") @GetMapping(value = "/patrolCount")
public CommonResponse getPatrolCount() { public CommonResponse getPatrolCount() {
...@@ -808,7 +809,7 @@ public class UserController extends AbstractBaseController { ...@@ -808,7 +809,7 @@ public class UserController extends AbstractBaseController {
/** /**
* 修改密码 * 修改密码
*/ */
@Permission @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = " 修改密码", notes = " 修改密码") @ApiOperation(value = " 修改密码", notes = " 修改密码")
@GetMapping(value = "/editPassword") @GetMapping(value = "/editPassword")
public CommonResponse editPassword(@ApiParam(value = "旧密码", required = true) @RequestParam String password, public CommonResponse editPassword(@ApiParam(value = "旧密码", required = true) @RequestParam String password,
......
This diff is collapsed.
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