Commit f596cff7 authored by tangwei's avatar tangwei

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 9ef834c8 d1d8e146
package com.yeejoin.amos.boot.module.common.api.dto;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* @author system_generator
* @date 2021-08-04
......@@ -37,10 +38,9 @@ public class FailureDetailsDto extends BaseDto {
@ApiModelProperty(value = "故障设备")
private String failureEquipment;
@JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "YYYY-MM-dd")
@ApiModelProperty(value = "故障时间")
private Date faultTime;
private String faultTime;
@ApiModelProperty(value = "故障现象")
private String faultPhenomenon;
......
......@@ -85,6 +85,12 @@ public class KeySiteDto extends BaseDto implements Serializable{
@ApiModelProperty(value = "使用性质名称")
private String useNatureName;
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
@ApiModelProperty(value = "备注")
private String remark;
......
package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 单位归属
*
* @author gaojianqiang
* @date 2021-08-19
*/
@Data
@ApiModel(value = "UserDto", description = "用户信息")
public class UserDto {
@ApiModelProperty(value = "人员类型1-维保公司;2-业主单位")
private String identityType;
@ApiModelProperty(value = "人员id")
private String personSeq;
@ApiModelProperty(value = "人员名称")
private String personName;
@ApiModelProperty(value = "公司id")
private String companyId;
@ApiModelProperty(value = "公司名称")
private String companyName;
@ApiModelProperty(value = "字段名")
private String fieldCode;
@ApiModelProperty(value = "字段值")
private String fieldValue;
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
}
......@@ -318,8 +318,9 @@ public class WaterResourceDto extends BaseDto {
@ExcelIgnore
@ApiModelProperty("设施分类id")
private Long equipCategoryId;
// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
@ApiModelProperty("设施分类名称")
@ExplicitConstraint(indexNum = 45, sourceClass = RoleNameExplicitConstraint.class, method = "getEquipCategory")
@ExcelProperty(value = "设施分类名称", index = 45)
private String equipCategoryName;
......
......@@ -4,6 +4,7 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
......@@ -51,8 +52,9 @@ public class FailureDetails extends BaseEntity {
/**
* 故障时间
*/
@JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "YYYY-MM-dd")
@TableField("fault_time")
private Date faultTime;
private String faultTime;
/**
* 故障现象
......
package com.yeejoin.amos.boot.module.common.api.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......
......@@ -94,7 +94,20 @@ public interface EquipFeignClient {
*/
@RequestMapping(value = "/building/tree", method = RequestMethod.GET)
ResponseModel<Object> getBuildingTree();
/**
* 获取消防建筑详情
*
* @return
*/
@RequestMapping(value = "/building/getOne", method = RequestMethod.GET)
ResponseModel<Object> getOne(@RequestParam Long instanceId);
/**
* 获取指定建筑的经纬度信息
*
* @return
*/
@RequestMapping(value = "/building/getBuildingToLongitudeAndLatitude", method = RequestMethod.GET)
ResponseModel<Object> getBuildingToLongitudeAndLatitude(@RequestParam String instanceId);
/**
* 更新车辆状态
*
......@@ -200,4 +213,11 @@ public interface EquipFeignClient {
@RequestMapping(value = "/building/getAllBuilding", method = RequestMethod.GET)
ResponseModel<List<LinkedHashMap<String, Object>>> getAllBuilding();
/**
* 查询所有建筑的数据字典// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
* @return
*/
@RequestMapping(value = "equipment-category/tree/{type}", method = RequestMethod.GET)
ResponseModel<List<LinkedHashMap<String, Object>>> getEquipmentCategory(@PathVariable String type);
}
......@@ -22,124 +22,141 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
* 查询全部 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param current 当前页
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param current 当前页
* @return
*/
List<FailureDetails> selectAllPage(Long current,Long size, Long currentStatus,
String startTime,String endTime, Integer submissionPid);
List<FailureDetails> selectAllPage(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
List<FailureDetailsDto> selectWebPage(Long current, Long size,Long currentStatus,
String startTime, String endTime, String submissionName, Long submissionBranchId,
Long sequenceNbr);
/**
* 查询我发起的 分页
* current 当前页
* size 条数
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
*/
List<FailureDetails> selectISubPage(Long current,Long size, Long currentStatus,
String startTime,String endTime, Integer submissionPid);
List<FailureDetails> selectISubPage(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
/**
* 查询待处理 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*/
List<FailureDetails> selectInProcessing(Long current,Long size,Long currentStatus,
String startTime,String endTime, Integer submissionPid);
List<FailureDetails> selectInProcessing(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
/**
* 查询待处理 应急指挥科人员分页
*
* @param
* @return
*/
List<FailureDetails> selectStatusWaitTj(Long current,Long size,Long currentStatus,
String startTime,String endTime, Integer submissionPid);
List<FailureDetails> selectStatusWaitTj(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
/**
* 查询待处理 维修人员分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*/
List<FailureDetails> selectStatusWaitWx(Long current,Long size,Long currentStatus,
String startTime,String endTime, Integer submissionPid);
List<FailureDetails> selectStatusWaitWx(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
/**
* 统计 全部
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*/
List<StatusDto> selectStatusCount(Long currentStatus,String startTime,String endTime, Integer submissionPid);
List<StatusDto> selectStatusCount(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
* 统计 维修人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*/
List<StatusDto> selectStatusWx(Long currentStatus,String startTime,String endTime, Integer submissionPid);
List<StatusDto> selectStatusWx(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
* 统计 应急指挥科人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*/
List<StatusDto> selectStatusFq(Long currentStatus,String startTime,String endTime, Integer submissionPid);
List<StatusDto> selectStatusFq(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
* 统计 我发起
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*/
List<StatusDto> selectStatusFqp(Long currentStatus,String startTime,String endTime, Integer submissionPid);
List<StatusDto> selectStatusFqp(Long currentStatus, String startTime, String endTime, Integer submissionPid);
/**
* 统计 领导
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*/
List<StatusDto> selectStatusLeader(Long currentStatus,String startTime,String endTime, Integer submissionPid);
List<StatusDto> selectStatusLeader(Long currentStatus, String startTime, String endTime, Integer submissionPid);
List<StatusDto> selectAudit(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId);
List<StatusDto> selectMaintain(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId);
List<StatusDto> selectUserId(Long currentStatus, String startTime, String endTime, String userId);
List<FailureDetails> selectYJ(Long currentStatus, String startTime, String endTime, String userId,Long current, Long size);
List<FailureDetails> selectForAudit(Long currentStatus, String startTime, String endTime,Integer submissionPid, String userId,Long current, Long size);
List<FailureDetails> selectForMaintain(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId,Long current, Long size);
}
......@@ -74,6 +74,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<UserUnitDto> getUserUnit(String id, String type, String code);
List<UserDto> getUserInfo(String id, String type, String code, String fieldCode);
/**
* 导出机场单位带过滤 bug2657 by kongfm
* @param parentId
......
......@@ -31,6 +31,42 @@
order by submission_time DESC limit #{current},#{size}
</select>
<select id="selectWebPage" resultType="com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto">
SELECT
sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM
cb_failure_details
<where>
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionName != null ">
and submission_name = #{submissionName}
</if>
<if test="submissionBranchId!= null ">
and submission_branch_id = #{submissionBranchId}
</if>
<if test="sequenceNbr!= null ">
and sequence_nbr = #{ sequenceNbr}
</if>
</where>
order by submission_time DESC limit #{current},#{size}
</select>
......@@ -257,5 +293,188 @@
GROUP BY cb_failure_details.current_status
</select>
<select id="selectAudit" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT
current_status,
count(current_status)
AS currentStatusCount
FROM
cb_failure_details d
<where>
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_audit
where
rec_user_id = #{userId}
)
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY current_status;
</select>
<select id="selectMaintain" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT
current_status,
count(current_status)
AS currentStatusCount
FROM
cb_failure_details d
<where>
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_maintain
where
rec_user_id = #{userId}
)
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY current_status;
</select>
<select id="selectUserId" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT
current_status,
count(current_status)
AS currentStatusCount
FROM
cb_failure_details d
WHERE
<where>
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_audit
where
audit_result = 2
)
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="userId != null ">
and submission_pid = #{userId}
</if>
</where>
GROUP BY current_status;
</select>
<select id="selectYJ" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT
*
FROM
cb_failure_details d
WHERE
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_audit
where
) and
submission_pid = #{userId}
<where>
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_audit
where
audit_result = 2
)
<if test="currentStatus != null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="userId != null ">
and submission_pid = #{userId}
</if>
</where>
order by submission_time DESC
limit #{current},#{size};
</select>
<select id="selectForAudit" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT
*
FROM
cb_failure_details d
<where>
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_audit
where
rec_user_id = #{userId}
)
<if test="currentStatus != null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC
limit #{current},#{size};
</select>
<select id="selectForMaintain" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT
*
FROM
cb_failure_details d
<where>
d.sequence_nbr in
(SELECT
fault_id
FROM
cb_failure_maintain
where
rec_user_id = #{userId}
)
<if test="currentStatus != null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC
limit #{current},#{size};
</select>
</mapper>
......@@ -421,6 +421,34 @@ GROUP BY
ORDER BY
u.sequence_nbr DESC
</select>
<select id="getUserInfo" resultType="com.yeejoin.amos.boot.module.common.api.dto.UserDto">
SELECT
u.sequence_nbr AS personSeq,
u.biz_org_name AS personName,
'2' AS identityType,
u.biz_org_code,
f.field_code,
f.field_value
FROM
`cb_org_usr` u
LEFT JOIN cb_dynamic_form_instance f ON f.instance_id = u.sequence_nbr
<where>
<if test="id != null and id != ''">
u.amos_org_id = #{id}
</if>
<if test="type != null and type != ''">
AND u.biz_org_type = #{type}
</if>
<if test="code != null and code != ''">
AND u.biz_org_code LIKE CONCAT(#{code}, '%')
</if>
<if test="fieldCode != null and fieldCode != ''">
AND f.field_code IN ( #{fieldCode})
</if>
</where>
ORDER BY
u.sequence_nbr DESC
</select>
<!--BUG2655 导出机场人员存在已删除数据 bykongfm-->
<select id="exportToExcel" resultType="com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto">
select
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="AirportStandDto", description="机场机位旋转角度")
public class AirportStandDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "机位号")
private String standCode;
@ApiModelProperty(value = "坐标X")
private String coordinateX;
@ApiModelProperty(value = "坐标Y")
private String coordinateY;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_airport_stand")
public class AirportStand extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 机位号
*/
@TableField("stand_code")
private String standCode;
/**
* 坐标X
*/
@TableField("coordinate_x")
private String coordinateX;
/**
* 坐标Y
*/
@TableField("coordinate_y")
private String coordinateY;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 更新时间
*/
@TableField("update_time")
private Date updateTime;
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 机场机位旋转角度 Mapper 接口
*
* @author litw
* @date 2021-09-17
*/
public interface AirportStandMapper extends BaseMapper<AirportStand> {
}
package com.yeejoin.amos.boot.module.jcs.api.service;
/**
* 机场机位旋转角度接口类
*
* @author litw
* @date 2021-09-17
*/
public interface IAirportStandService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper">
</mapper>
......@@ -241,12 +241,7 @@ public class FailureDetailsController extends BaseController {
@RequestParam (required = false) Long submissionBranchId,
@RequestParam (required = false) Long sequenceNbr ) {
Page<FailureDetailsDto> page = new Page<>();
if (current > 0) {
page.setCurrent((current - 1) * size);
} else {
page.setCurrent(current);
}
page.setCurrent(current * size);
page.setSize(size);
ReginParams userInfo = getSelectedOrgInfo();
IPage<FailureDetailsDto> failureDetailDTOsIPage = new Page<>();
......
......@@ -399,6 +399,19 @@ public class OrgUsrController extends BaseController {
}
/**
* 获取用户信息
*
* @param userId
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{userId}/userInfo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取用户信息", notes = "获取用户信息")
public ResponseModel<List<UserDto>> getUserInfo(@PathVariable String userId) {
return ResponseHelper.buildResponse(iOrgUsrService.getUserInfo(userId));
}
/**
* 获取登陆人绑定的人员关系
*
* @param
......
......@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
......@@ -59,7 +60,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
model.setAuditTime(new Date());
model.setAuditDepartmentId(userInfo.getDepartment().getSequenceNbr());
model.setAuditor(userInfo.getUserModel().getRealName());
model.setAuditDepartment(userInfo.getDepartment().getDepartmentName());
String parentId = iOrgUsrService.getParentId(userInfo.getUserModel().getUserId());
OrgUsr orgUsr = iOrgUsrService.getById(parentId);
model.setAuditDepartment(orgUsr.getBizOrgName());
FailureDetailsDto failureDetailsDto = failureDetailsService.queryBySeq(model.getFaultId());
......
......@@ -79,15 +79,16 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public static Integer SELECY_STATUS = 7;
public static Integer SELECY_ISUBMIT = 8;
public static Integer SELECY_ACCEPT = 9;
public String[] roleName = {"maintenance_department_maintenance_personnel", "emergency_command_staff","emergency_command_leader","maintenance_department"};
public String[] roleName = {"maintenance_department_maintenance_personnel", "emergency_command_staff", "emergency_command_leader", "maintenance_department"};
/**
* 分页查询接口
* @param type 查询类型
* @param currentStatus 状态
* @param startTime 起始时间
* @param startTime 结束时间
* @param userId 用户id
*
* @param type 查询类型
* @param currentStatus 状态
* @param startTime 起始时间
* @param startTime 结束时间
* @param userId 用户id
*/
public IPage<FailureDetails> queryForFailureDetailsPage(Page<FailureDetails> page, ReginParams userInfo, Long currentStatus,
String startTime, String endTime, Integer userId, Integer type) {
......@@ -110,50 +111,20 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if (type.equals(SELECY_ACCEPT)) {
//当角色为维修人员时
if (userInfo.getRole().getRoleName().equals(roleName[0])) {
LambdaQueryWrapper<FailureMaintain> Wrapper = new LambdaQueryWrapper<>();
Wrapper.eq(FailureMaintain::getRecUserId,userInfo.getUserModel().getUserId());
Wrapper.orderByDesc(FailureMaintain::getMaintainTime);
List<FailureMaintain> failureMaintains = failureMaintainService.getBaseMapper().selectList(Wrapper);
List<FailureDetails> failureDetails = new ArrayList<FailureDetails>();
failureMaintains.forEach(e->{
FailureDetails result = getById(e.getFaultId());
failureDetails.add(result);
});
List<FailureDetails> failureDetails = baseMapper.selectForMaintain(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId(), page.getCurrent(), page.getSize());
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(failureDetails);
return iPage;
} else if (userInfo.getRole().getRoleName().equals(roleName[2]) && userInfo.getRole().getRoleName().equals(roleName[3])) {
LambdaQueryWrapper<FailureAudit> Wrapper = new LambdaQueryWrapper<>();
Wrapper.eq(FailureAudit::getRecUserId,userInfo.getUserModel().getUserId());
Wrapper.orderByDesc(FailureAudit::getAuditTime);
List<FailureAudit> failureAudit = ifailureAuditService.getBaseMapper().selectList(Wrapper);
List<FailureDetails> failureDetails = new ArrayList<FailureDetails>();
} else if (userInfo.getRole().getRoleName().equals(roleName[2]) || userInfo.getRole().getRoleName().equals(roleName[3])) {
List<FailureDetails> failureDetails = baseMapper.selectForAudit(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId(), page.getCurrent(), page.getSize());
failureAudit.forEach(e->{
FailureDetails result = getById(e.getFaultId());
failureDetails.add(result);
}); IPage<FailureDetails> iPage = new Page<>();
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(failureDetails);
return iPage;
}else {
LambdaQueryWrapper<FailureAudit> Wrapper = new LambdaQueryWrapper<>();
Long parentId = Long.valueOf(iOrgUsrService.getParentId(userInfo.getUserModel().getUserId()));
Wrapper.eq(FailureAudit::getAuditDepartmentId,parentId);
Wrapper.eq(FailureAudit::getAuditResult, AuditResultEnum.REFUSE.getCode());
Wrapper.orderByDesc(FailureAudit::getAuditTime);
List<FailureAudit> failureAudit = ifailureAuditService.getBaseMapper().selectList(Wrapper);
List<FailureDetails> failureDetails = new ArrayList<FailureDetails>();
failureAudit.forEach(e->{
FailureDetails result = getById(e.getFaultId());
if (result.getSubmissionPid().equals(userInfo.getUserModel().getUserId())){
failureDetails.add(result);
}
});
} else {
List<FailureDetails> failureDetails = baseMapper.selectYJ(currentStatus, startTime, endTime, userInfo.getUserModel().getUserId(), page.getCurrent(), page.getSize());
IPage<FailureDetails> iPage = new Page<>();
iPage.setRecords(failureDetails);
return iPage;
......@@ -167,11 +138,13 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
* web端列表查询
*/
public IPage<FailureDetailsDto> queryForPageList(Page<FailureDetailsDto> page, ReginParams userInfo, Long currentStatus,
String startTime, String endTime, String submissionName, Long submissionBranchId,
Long sequenceNbr ) {
return queryForPage(page,"",false,currentStatus,startTime, endTime, submissionName,submissionBranchId,sequenceNbr);
String startTime, String endTime, String submissionName, Long submissionBranchId,
Long sequenceNbr) {
List<FailureDetailsDto> list = baseMapper.selectWebPage(page.getCurrent(), page.getSize(), currentStatus, startTime, endTime, submissionName, submissionBranchId, sequenceNbr);
IPage<FailureDetailsDto> iPage = new Page<>();
iPage.setRecords(list);
return iPage;
}
/**
......@@ -182,7 +155,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if (userInfo.getRole().getRoleName().equals(roleName[0])) {
IPage<FailureDetails> wxIpage = new Page<FailureDetails>();
List<FailureDetails> list = baseMapper.selectStatusWaitWx(page.getCurrent(), page.getSize(),currentStatus, startTime, endTime, userId);
List<FailureDetails> list = baseMapper.selectStatusWaitWx(page.getCurrent(), page.getSize(), currentStatus, startTime, endTime, userId);
wxIpage.setRecords(list);
return wxIpage;
} else if (userInfo.getRole().getRoleName().equals(roleName[1])) {
......@@ -247,6 +220,14 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
statusDtos = baseMapper.selectStatusFqp(currentStatus, startTime, endTime, Integer.parseInt(userInfo.getUserModel().getUserId()));
} else if (type.equals(SELECY_ALL)) {
statusDtos = baseMapper.selectStatusCount(currentStatus, startTime, endTime, userId);
} else if (type.equals(SELECY_ACCEPT)) {
if (userInfo.getRole().getRoleName().equals(roleName[2]) || userInfo.getRole().getRoleName().equals(roleName[3])){
statusDtos = baseMapper.selectAudit(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId());
}else if (userInfo.getRole().getRoleName().equals(roleName[0])){
statusDtos = baseMapper.selectMaintain(currentStatus, startTime, endTime, userId, userInfo.getUserModel().getUserId());
}else {
statusDtos = baseMapper.selectUserId(currentStatus, startTime, endTime, userInfo.getUserModel().getUserId());
}
} else {
statusDtos = baseMapper.selectStatusLeader(currentStatus, startTime, endTime, userId);
}
......
......@@ -6,6 +6,7 @@ import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import org.apache.commons.lang3.ObjectUtils;
......@@ -61,6 +62,10 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
@Autowired
WorkflowFeignService workflowFeignService;
@Autowired
OrgUsrServiceImpl iOrgUsrService;
private static String RECORE_TYPE = "维修记录";
private static String[] MAINTENANCE_STATUS = {"维修完成", "维修中"};
......@@ -88,7 +93,9 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
}
failureMaintainDto.setMaintainMan(userInfo.getUserModel().getRealName());
failureMaintainDto.setMaintainTime(new Date());
failureMaintainDto.setDepartment(userInfo.getDepartment().getDepartmentName());
String parentId = iOrgUsrService.getParentId(userInfo.getUserModel().getUserId());
OrgUsr orgUsr = iOrgUsrService.getById(parentId);
failureMaintainDto.setDepartment(orgUsr.getBizOrgName());
failureMaintainDto.setBizId(userInfo.getDepartment().getSequenceNbr());
failureMaintainDto.setRecoreType(RECORE_TYPE);
this.createWithModel(failureMaintainDto);
......@@ -135,7 +142,9 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
}
failureMaintainDto.setMaintainMan(userInfo.getUserModel().getUserName());
failureMaintainDto.setMaintainTime(new Date());
failureMaintainDto.setDepartment(userInfo.getDepartment().getDepartmentName());
String parentId = iOrgUsrService.getParentId(userInfo.getUserModel().getUserId());
OrgUsr orgUsr = iOrgUsrService.getById(parentId);
failureMaintainDto.setDepartment(orgUsr.getBizOrgName());
failureMaintainDto.setBizId(userInfo.getDepartment().getSequenceNbr());
failureMaintainDto.setRecoreType(RECORE_TYPE);
this.createWithModel(failureMaintainDto);
......
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.FailureVerifyDto;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto;
import com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto;
import com.yeejoin.amos.boot.module.common.api.entity.FailureVerify;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
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.mapper.FailureVerifyMapper;
......@@ -33,7 +34,8 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
FailureDetailsServiceImpl failureDetailsService;
@Autowired
FailureRepairlogServiceImpl failureRepairlogService;
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Transactional
public Object savemodel(FailureVerifyDto model, ReginParams userInfo) throws Exception {
......@@ -42,7 +44,9 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
model.setVerifyTime(new Date());
model.setVerifyDepartmentId(userInfo.getDepartment().getSequenceNbr());
model.setAcceptor(userInfo.getUserModel().getRealName());
model.setVerifyDepartment(userInfo.getDepartment().getDepartmentName());
String parentId = iOrgUsrService.getParentId(userInfo.getUserModel().getUserId());
OrgUsr orgUsr = iOrgUsrService.getById(parentId);
model.setVerifyDepartment(orgUsr.getBizOrgName());
FailureDetailsDto failureDetailsDto = failureDetailsService.queryBySeq(model.getFaultId());
......@@ -79,8 +83,6 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
public Boolean updateStatus(FailureVerifyDto model, FailureStatuEnum status, ReginParams userInfo, int condition) throws Exception {
FailureDetailsDto failureDetailsDto = failureDetailsService.queryBySeq(model.getFaultId());
//当前角色部门id为应急指挥科的时候 并且同意时 不修改主表状态 依然为待验收
//当前角色部门id为维修部门的时候 修改状态
List<FailureVerify> byfaultId = findByfaultId(failureDetailsDto.getSequenceNbr());
if (byfaultId.size() != 0) {
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AirportStandServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.dto.AirportStandDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@RestController
@Api(tags = "机场机位旋转角度Api")
@RequestMapping(value = "/airport-stand")
public class AirportStandController extends BaseController {
@Autowired
AirportStandServiceImpl airportStandServiceImpl;
/**
* 根据sequenceNbr查询
*
* @param standCode 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{standCode}")
@ApiOperation(httpMethod = "GET",value = "根据standCode查询单个机场机位旋转角度", notes = "根据standCode查询单个机场机位旋转角度")
public ResponseModel<AirportStandDto> selectOne(@PathVariable String standCode) {
QueryWrapper<AirportStand> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stand_code",standCode);
AirportStand airportStand = airportStandServiceImpl.getOne(queryWrapper);
AirportStandDto airportStandDto = new AirportStandDto();
BeanUtils.copyProperties(airportStand,airportStandDto);
return ResponseHelper.buildResponse(airportStandDto);
}
}
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.netflix.discovery.converters.Auto;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -17,8 +19,14 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 导出导入
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAirportStandService;
import com.yeejoin.amos.boot.module.jcs.api.dto.AirportStandDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 机场机位旋转角度服务实现类
*
* @author litw
* @date 2021-09-17
*/
@Service
public class AirportStandServiceImpl extends BaseService<AirportStandDto,AirportStand,AirportStandMapper> implements IAirportStandService {
/**
* 分页查询
*/
public Page<AirportStandDto> queryForAirportStandPage(Page<AirportStandDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<AirportStandDto> queryForAirportStandList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
......@@ -156,6 +156,9 @@ public class DataSourcesImpl implements DataSources {
case "getDutyArea":
str =getDutyArea();
break;
case "getEquipCategory":
str =getEquipCategory();
break;
}
}
return str;
......@@ -377,4 +380,48 @@ public class DataSourcesImpl implements DataSources {
String[] str = areaList.toArray(new String[buildingList.size()]);
return str;
}
/**
* 获取设施分类// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
* @return
*/
private String[] getEquipCategory() {
String type = "1";
ResponseModel<List<LinkedHashMap<String, Object>>> response = equipFeignClient.getEquipmentCategory(type);
// 筛选第一层
String categoryCode = "90000000";
List<LinkedHashMap<String, Object>> categoryList = response.getResult();
// 筛选第二层
String fireCode = "93000000";
List<LinkedHashMap<String, Object>> fireList = Lists.newArrayList();
// 筛选第三层
String waterCode = "93060000";
List<LinkedHashMap<String, Object>> waterList = Lists.newArrayList();
List<LinkedHashMap<String, Object>> category = Lists.newArrayList();
List<String> resultList = Lists.newArrayList();
for(LinkedHashMap<String, Object> t :categoryList) {
if(categoryCode.equals(t.get("code").toString())){
fireList = (List<LinkedHashMap<String, Object>>) t.get("children");
}
}
// 筛选第二层
for(LinkedHashMap<String, Object> t : fireList) {
if(fireCode.equals(t.get("code").toString())){
waterList = (List<LinkedHashMap<String, Object>>) t.get("children");
}
}
// 筛选第三层
for(LinkedHashMap<String, Object> t : waterList) {
if(waterCode.equals(t.get("code").toString())){
category = (List<LinkedHashMap<String, Object>>) t.get("children");
}
}
category.forEach(t -> {
resultList.add(t.get("name") + "@" + t.get("id"));
});
String[] str = resultList.toArray(new String[category.size()]);
return str;
}
}
......@@ -798,6 +798,12 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
item.setType(type[0]);
item.setTypeCode(type[1]);
}
// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
if (item.getEquipCategoryName() != null) {
String[] equipCategory = item.getEquipCategoryName().split("@");
item.setEquipCategoryName(equipCategory[0]);
item.setEquipCategoryId(Long.parseLong(equipCategory[1]));
}
item = Bean.toPo(getCurrentInfo(), item);
waterResourceServiceImpl.importByExcel(item);
});
......
......@@ -74,7 +74,7 @@ jcs.company.topic.delete=jcs/company/topic/delete
iot.fegin.name=AMOS-API-IOT
equip.fegin.name=AMOS-EQUIPMANAGE-kfm
equip.fegin.name=AMOS-EQUIPMANAGE
## 设备联动服务(车库门、广播、警铃)
control.fegin.name=JCS-API-CONTROL
......
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