Commit e86fa040 authored by lisong's avatar lisong

Merge remote-tracking branch 'origin/developer' into developer

parents 855d5e3a 1717c96c
......@@ -125,5 +125,13 @@ public class MaintenanceResourceDataDto {
* 位置
*/
private String location;
/**
* 图片
* */
private String img;
/**
* 消防装备编码
* */
private String code;
}
\ No newline at end of file
package com.yeejoin.equipmanage.common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @ProjectName: amos-biz-boot
* @Package: com.yeejoin.equipmanage.common.vo
* @ClassName: VideoImportantEquipmentVo
* @Author: Jianqiang Gao
* @Description: VideoImportantEquipmentVo
* @Date: 2022/6/16 10:36
* @Version: 1.0
*/
@Data
@ApiModel(value = "VideoImportantEquipmentVo对象", description = "")
public class VideoImportantEquipmentVo {
@ApiModelProperty(value = "视频id")
private Long videoId;
@ApiModelProperty(value = "f_equipment表id(重点设备id)")
private Long importantEquipmentId;
@ApiModelProperty(value = "摄像机编号")
private String code;
@ApiModelProperty(value = "类型编码")
private String typeCode;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "访问url")
private String url;
@ApiModelProperty(value = "摄像机名称")
private String name;
@ApiModelProperty(value = "图片")
private String img;
@ApiModelProperty(value = "详细地址")
private String address;
}
\ No newline at end of file
......@@ -3,9 +3,13 @@
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferMapper">
<select id="getPowerTransferList"
resultType="com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto">
select sequence_nbr, company_name, type, resources_num
select sequence_nbr, company_name, type, resources_num,`status`
from (
select ptcr.sequence_nbr, ptc.company_name, ptcr.type, ptcr.resources_num, ptcr.rec_date
select ptcr.sequence_nbr, ptc.company_name, ptcr.type, ptcr.resources_num, ptcr.rec_date,
case ptcr.status
when 'executing' THEN '未完成'
when 'finished' THEN '已完成'
END AS status
from jc_power_transfer_company ptc
left join jc_power_transfer pt on ptc.power_transfer_id = pt.sequence_nbr
right join jc_power_transfer_company_resources ptcr
......@@ -13,7 +17,7 @@
where pt.alert_called_id = #{alertCalledId}
and ptc.is_distribution_agencies = 0
union all
select ptc.sequence_nbr, ptc.company_name, "" type, "" resources_num, ptc.rec_date
select ptc.sequence_nbr, ptc.company_name, "" type, "" resources_num, ptc.rec_date,'' `status`
from jc_power_transfer_company ptc
left join jc_power_transfer pt on ptc.power_transfer_id = pt.sequence_nbr
where pt.alert_called_id = #{alertCalledId}
......
......@@ -1442,7 +1442,19 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public List<OrgMenuDto> companyTreeByUserAndType(ReginParams reginParams, String type) {
Map<String, Object> param = new HashMap<>();
param.put("bizOrgCode", reginParams.getPersonIdentity().getBizOrgCode());
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
if (StringUtils.isNotEmpty(type) && type.equals("COMPANY")){
//查询当前登录人所属单位/部门
OrgUsr orgUsr = orgUsrMapper.selectById(reginParams.getPersonIdentity().getCompanyId());
//判断登陆人是否已经是顶级节点单位
if (orgUsr.getParentId() != null ){
orgUsr =this.selectParentOrgUsr(orgUsr);
bizOrgCode = orgUsr.getBizOrgCode() != null? orgUsr.getBizOrgCode() : reginParams.getPersonIdentity().getBizOrgCode();
}
}
param.put("bizOrgCode", bizOrgCode);
param.put("type", type);
List<OrgUsr> list = orgUsrMapper.companyTreeByUserAndType(param);
return buildTreeParallel(list);
......
......@@ -773,18 +773,21 @@ public class TopographyController extends AbstractBaseController {
}
List<IotDataVO> timeList = iotDatalist.stream().filter(x -> "time".equals(x.getKey())).collect(Collectors.toList());
List<EquipmentSpecificIndex> indexes = equipmentSpecificIndexMapper.getEquipmentSpeIndexByIotCode(iotCode);
if (0 <indexes.size()) {
int j = 0;
Map<String, Object> map = new HashMap<>();
for (int i=0; i<iotDatalist.size(); i++) {
for (int i=0; i<timeList.size(); i++) {
TopographyIotVo iotVo = new TopographyIotVo();
List<TopographyIotDataVO> lists = new ArrayList<>();
if (i == 0) {
map.put(iotDatalist.get(i).getKey(), iotDatalist.get(i).getValue());
}
if (map.containsKey(iotDatalist.get(i).getKey())) {
j++;
}
// if (i == 0) {
// map.put(iotDatalist.get(i).getKey(), iotDatalist.get(i).getValue());
// }
// if (map.containsKey(iotDatalist.get(i).getKey())) {
// j++;
// }
for (EquipmentSpecificIndex x : indexes) {
if (x.getNameKey().equals(iotDatalist.get(i).getKey())) {
TopographyIotDataVO dataVO = new TopographyIotDataVO();
......@@ -797,7 +800,7 @@ public class TopographyController extends AbstractBaseController {
try {
//Date date = DateUtils.dateParse(String.valueOf(timeList.get(j-1).getValue()), DateUtils.DATE_TIME_T_PATTERN);
String value = String.valueOf(timeList.get(j-1).getValue());
String value = String.valueOf(timeList.get(i).getValue());
String strDate = value.substring(0, 19);
SimpleDateFormat sdf = new SimpleDateFormat(ISO8601_DATE_HOUR_MIN_SEC);
SimpleDateFormat sdf1 = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
......
package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.common.vo.VideoImportantEquipmentVo;
import com.yeejoin.equipmanage.service.IVideoImportantEquipmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
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.restful.doc.TycloudOperation;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @ProjectName: amos-biz-boot
* @Package: com.yeejoin.equipmanage.controller
* @ClassName: VideoImportantEquipmentController
* @Author: Jianqiang Gao
* @Description: VideoImportantEquipmentController
* @Date: 2022/6/16 10:24
* @Version: 1.0
*/
@RestController
@Api(tags = "视屏监控关联重点设备Api")
@Slf4j
@RequestMapping(value = "/videoImportantEquipment", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class VideoImportantEquipmentController {
@Autowired
private IVideoImportantEquipmentService videoImportantEquipmentService;
@RequestMapping(value = "/getVideoImportantEquipmentList", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取视屏监控关联重点设备集合", notes = "获取视屏监控关联重点设备集合")
public List<VideoImportantEquipmentVo> getVideoImportantEquipmentList(@RequestParam(required = false) Long importantEquipmentId) {
Map<String, Object> map = null;
if (importantEquipmentId != null) {
map = new HashMap<>();
map.put("importantEquipmentId", importantEquipmentId);
}
return videoImportantEquipmentService.getVideoImportantEquipmentList(map);
}
}
\ No newline at end of file
......@@ -2,8 +2,12 @@ package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.equipmanage.common.entity.VideoImportantEquipment;
import com.yeejoin.equipmanage.common.vo.VideoImportantEquipmentVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author ZeHua Li
* @date 2020/11/25 15:48
......@@ -11,4 +15,5 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface VideoImportantEquipmentMapper extends BaseMapper<VideoImportantEquipment> {
List<VideoImportantEquipmentVo> getVideoImportantEquipmentList(Map<String, Object> map);
}
......@@ -2,6 +2,10 @@ package com.yeejoin.equipmanage.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.equipmanage.common.entity.VideoImportantEquipment;
import com.yeejoin.equipmanage.common.vo.VideoImportantEquipmentVo;
import java.util.List;
import java.util.Map;
/**
* @author ZeHua Li
......@@ -9,4 +13,5 @@ import com.yeejoin.equipmanage.common.entity.VideoImportantEquipment;
* @since v2.0
*/
public interface IVideoImportantEquipmentService extends IService<VideoImportantEquipment> {
List<VideoImportantEquipmentVo> getVideoImportantEquipmentList(Map<String, Object> map);
}
......@@ -2,10 +2,15 @@ package com.yeejoin.equipmanage.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.equipmanage.common.entity.VideoImportantEquipment;
import com.yeejoin.equipmanage.common.vo.VideoImportantEquipmentVo;
import com.yeejoin.equipmanage.mapper.VideoImportantEquipmentMapper;
import com.yeejoin.equipmanage.service.IVideoImportantEquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @author ZeHua Li
* @date 2020/11/25 15:49
......@@ -13,4 +18,12 @@ import org.springframework.stereotype.Service;
*/
@Service
public class VideoImportantEquipmentServiceImpl extends ServiceImpl<VideoImportantEquipmentMapper,VideoImportantEquipment> implements IVideoImportantEquipmentService {
@Autowired
private VideoImportantEquipmentMapper videoImportantEquipmentMapper;
@Override
public List<VideoImportantEquipmentVo> getVideoImportantEquipmentList(Map<String, Object> map) {
return videoImportantEquipmentMapper.getVideoImportantEquipmentList(map);
}
}
......@@ -127,9 +127,9 @@ public class AlertCalledController extends BaseController {
List<AlertFormValue> alertFormValue = alertCalledObjsDto.getAlertFormValue();
alertFormValue.forEach(e -> {
if (e.getFieldCode().equals(ALETR_TYPE_AID_STATUS)) {
if (e.getFieldValueCode() != null) {
if (e.getFieldValueCode().contains(",")) {
String[] split = e.getFieldValueCode().split(",");
if (e.getFieldValue() != null) {
if (e.getFieldValue().contains(",")) {
String[] split = e.getFieldValue().split(",");
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < split.length; i++) {
DataDictionary hzxz = dataDictionaryService.getByCode(split[i], "HZXZ");
......@@ -137,7 +137,7 @@ public class AlertCalledController extends BaseController {
e.setFieldValue(stringBuilder.toString());
}
} else {
DataDictionary hzxz = dataDictionaryService.getByCode(e.getFieldValueCode(), "HZXZ");
DataDictionary hzxz = dataDictionaryService.getByCode(e.getFieldValue(), "HZXZ");
e.setFieldValue(hzxz.getName());
}
}
......
......@@ -1450,6 +1450,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
instructionsZHDto.setSequenceNbr(item.getSequenceNbr());
instructionsZHDto.setType(item.getInfoType());
instructionsZHDto.setContent(item.getInfo());
if ("车辆反馈".equals(item.getInfoType())) {
instructionsZHDto.setCompany("现场反馈");
}
instructionsZHDto.setSubmissionTime(item.getRecDate());
listInstructionsZHDto.add(instructionsZHDto);
});
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.core.util.StrUtil;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService;
import com.yeejoin.amos.boot.module.jcs.api.dto.CarStatusInfoDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.JcSituationDetail;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources;
import com.yeejoin.amos.boot.module.jcs.api.entity.UserCar;
import com.yeejoin.amos.boot.module.jcs.api.enums.FireCarStatusEnum;
import com.yeejoin.amos.boot.module.jcs.api.mapper.JcSituationDetailMapper;
import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResourcesMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyResourcesService;
import com.yeejoin.amos.boot.module.jcs.api.service.IUserCarService;
import com.yeejoin.amos.component.rule.config.RuleConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
......@@ -19,6 +29,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* 调派单位资源 服务实现类
......@@ -33,6 +44,21 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
@Autowired
EquipFeignClient equipFeignClient;
@Autowired
JcSituationDetailMapper jcSituationDetailMapper;
@Autowired
private EmqKeeper emqKeeper;
@Autowired
private IUserCarService userCarService;
@Autowired
private IFireTeamService fireTeamService;
@Value("${mqtt.topic.command.power.deployment}")
private String topic;
@Override
public AlertCalled getByPowerTransferCompanyResourId(Long id) {
......@@ -63,6 +89,8 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
public void updatePowerTransferCompanyResourcesService(Long alertCalledId, Long carId, String code, int type, String remarks) {
PowerTransferCompanyResources powerTransferCompanyResources = powerTransferCompanyResourcesMapper.getByAlertCalledIdCarId(alertCalledId, carId);
UserCar userCar = userCarService.selectByCarId(carId);
FireTeam fireTeam = fireTeamService.getFireTeamBySequenceNbr(Long.valueOf(userCar.getTeamId()));
try {
if (type == 2) {
......@@ -86,6 +114,17 @@ public class PowerTransferCompanyResourcesServiceImpl extends BaseService<PowerT
powerTransferCompanyResources.setRemarks(remarks);
powerTransferCompanyResourcesMapper.updateById(powerTransferCompanyResources);
}
String carInfo = "车辆信息(" + fireTeam.getName() + " + " + powerTransferCompanyResources.getResourcesName() + " + " + powerTransferCompanyResources.getResourcesNum() + "):";
String info = "";
info = StrUtil.isNotBlank(remarks) ? carInfo + remarks + " + " + Objects.requireNonNull(FireCarStatusEnum.getEnum(code)).getName() : carInfo + Objects.requireNonNull(FireCarStatusEnum.getEnum(code)).getName();
JcSituationDetail jcSituationDetail = new JcSituationDetail();
jcSituationDetail.setAlertCalledId(alertCalledId);
jcSituationDetail.setInfoType("车辆反馈");
jcSituationDetail.setInfo(info);
jcSituationDetailMapper.insert(jcSituationDetail);
// 车辆状态更改消息推送
// 定义指令信息消息推送 页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper.getMqttClient().publish(topic, "0".getBytes(), RuleConfig.DEFAULT_QOS, false);
} catch (Exception e) {
throw new RuntimeException("修改失败!");
}
......
......@@ -181,7 +181,7 @@ public class RouteController extends AbstractBaseController {
//2.查询
List<Route> routeList;
if (null != orgCode && 0 == orgCode) {
routeList = routeService.queryRouteList(ownerId, null);
routeList = routeService.queryRouteList(ownerId, org);
} else {
routeList = routeService.queryRouteList(ownerId, org);
}
......
......@@ -220,6 +220,32 @@ public class PlanTaskController extends AbstractBaseController {
}
/**
* 定时任务推送巡检待办任务消息
*/
@Scheduled(cron = "${jobs.cron}")
public void taskMessage() {
planTaskService.taskMessage(null);
}
/**
* 模拟发送巡检待办任务消息定时任务
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "模拟发送巡检待办任务消息定时任务", notes = "模拟发送巡检待办任务消息定时任务")
@RequestMapping(value = "/taskMessage", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public CommonResponse taskMessage(@ApiParam(value = "跑批日期格式yyyyMMdd", required = false) @RequestParam(required = false) String runDate) {
try {
planTaskService.taskMessage(runDate);
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure();
}
}
/**
* 模拟定时任务调起服务
*
* @return
......
package com.yeejoin.amos.patrol.business.dao.mapper;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.patrol.dao.entity.Plan;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.patrol.business.entity.mybatis.CheckChkExListBo;
......@@ -185,5 +187,7 @@ public interface PlanTaskMapper extends BaseMapper {
List<Map<String, Object>> queryTimeAxis(HashMap<String, Object> params);
List<Plan> getPlanIdsByDate(@Param("date") Date date);
List<PlanTask> getPlanTaskList(@Param("date") Date date);
}
......@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Joiner;
import com.yeejoin.amos.boot.biz.common.constants.RuleConstant;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
......@@ -116,6 +117,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Autowired
private RuleTrigger ruleTrigger;
@Autowired
RedisUtils redisUtils;
private final String PATROL_PLAN_TASK_KEY = "PATROL_PLAN_ID:";
private final String packageId = "消息/addCheckRule";
private final String msgType = "patrolSystem";
private final String APP = "APP";
......@@ -713,8 +719,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
planTask.setEndTime(endTime);
// 1.保存执行数据主表
iplanTaskDao.saveAndFlush(planTask);
// 发送APP待办消息
sendMessage(plan, planTask);
// 发送APP待办消息 (20220617 改为定时任务发送消息)
// sendMessage(plan, planTask);
String executorId = planTask.getUserId();
long planId = planTask.getId();
for (int i1 = 0; i1 < pointIdList.size(); i1++) {
......@@ -765,6 +771,35 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
//bug 5980 待办任务消息应只触发执行中的任务,漏检的任务和未开始的任务不需要触发待办任务消息.
@Override
@Transactional
public void taskMessage(String runDate) {
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
//1.扫描plan表查询,需要生成执行数据的任务信息,无则return
Date now = new Date();//今天
String format = df.format(now);
if (runDate != null) {//上送则已上送的为准
runDate = runDate + " " + format;
now = DateUtil.str2Date(runDate, "yyyyMMdd HH:mm:ss");
}
List<Plan> planIdsByDate = planTaskMapper.getPlanIdsByDate(now);
List<PlanTask> planTaskList = planTaskMapper.getPlanTaskList(now);
Map<Long, Plan> collect = planIdsByDate.stream().collect(Collectors.toMap(Plan::getId, t -> t));
for (PlanTask planTask : planTaskList) {
if (!redisUtils.hasKey(PATROL_PLAN_TASK_KEY + planTask.getId())) {
try {
sendMessage(collect.get(planTask.getPlanId()), planTask);
} catch (Exception e) {
e.printStackTrace();
}
redisUtils.set(PATROL_PLAN_TASK_KEY + planTask.getId(), 1, (long) collect.get(planTask.getPlanId()).getDuration() * 60);
}
}
}
public void sendMessage(Plan plan, PlanTask planTask) throws Exception {
MsgRo msgRo = new MsgRo();
// 标题
......
......@@ -46,6 +46,13 @@ public interface IPlanTaskService {
void taskExecution(String runDate);
/**
* 定时任务发送消息执行中的消息
*
* @param runDate
*/
void taskMessage(String runDate);
/**
* 根据路线id获取关联的所有计划任务
*
* @param routeId
......
......@@ -248,9 +248,14 @@
m.classify_type,
m.classify_code,
COUNT( 1 ) AS amount,
SUM(IF(m.maintenance_expiration_time &lt;= CURRENT_DATE,1,0)) AS expirationAmount
SUM(IF(m.maintenance_expiration_time &lt;= CURRENT_DATE,1,0)) AS expirationAmount,
we.img,
wes.code
FROM
`mt_maintenance_resource_data` m
LEFT JOIN wl_equipment_specific wes on m.fire_facility_id = wes.id
LEFT JOIN wl_equipment_detail wed on wes.equipment_detail_id = wed.id
LEFT JOIN wl_equipment we on we.id = wed.equipment_id
<where>
<if test="maintenanceCompanyId != null">
m.maintenance_company_id = #{maintenanceCompanyId}
......@@ -284,10 +289,15 @@
m.maintenance_time,
m.maintenance_cycle,
m.`status`,
we.img,
wes.code,
IF(m.maintenance_expiration_time IS NOT NULL , IF(m.maintenance_expiration_time &lt;= CURRENT_DATE,'已到期','正常'), '') AS `statusText`,
m.location
FROM
`mt_maintenance_resource_data` m
LEFT JOIN wl_equipment_specific wes on m.fire_facility_id = wes.id
LEFT JOIN wl_equipment_detail wed on wes.equipment_detail_id = wed.id
LEFT JOIN wl_equipment we on we.id = wed.equipment_id
<where>
<if test="maintenanceCompanyId != null">
m.maintenance_company_id = #{maintenanceCompanyId}
......
<?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.equipmanage.mapper.VideoImportantEquipmentMapper">
<select id="getVideoImportantEquipmentList"
resultType="com.yeejoin.equipmanage.common.vo.VideoImportantEquipmentVo" parameterType="java.util.Map">
SELECT
v.id AS videoId,
v.`name`,
v.`code`,
v.type_code,
v.type,
v.url,
v.img,
v.address,
vie.important_equipment_id
FROM
wl_video v
LEFT JOIN wl_video_important_equipment vie ON v.id = vie.video_id
<where>
<if test="importantEquipmentId != null">
vie.important_equipment_id = #{importantEquipmentId}
</if>
</where>
</select>
</mapper>
......@@ -111,7 +111,7 @@
GROUP BY id
order by v.create_date
</when>
<when test="dto.buildingId == null and dto.buildingId ==''">
<when test="dto.buildingId == null || dto.buildingId ==''">
<where>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
......@@ -160,7 +160,7 @@
select
vid.id,
vid.token,
vid.name,
vid.remark,
vid.url,
vid.code,
vid.preset_position as presetPosition
......
......@@ -2935,25 +2935,31 @@
<changeSet author="cz" id="2022-06-13-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="jc_powerr_transfer_log" columnName="receive_name"/>
</not>
<tableExists tableName="jc_powerr_transfer_log"/>
</preConditions>
<comment>修改字段长度</comment>
<sql>
ALTER TABLE jc_powerr_transfer_log MODIFY receive_name varchar(5000) NULL COMMENT '接收人' ;
ALTER TABLE jc_powerr_transfer_log MODIFY COLUMN receive_name varchar(5000) DEFAULT NULL COMMENT '接收人' ;
</sql>
</changeSet>
<changeSet author="cz" id="2022-06-13-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="jc_alert_submitted" columnName="submission_content"/>
</not>
<tableExists tableName="jc_alert_submitted"/>
</preConditions>
<comment>修改字段长度</comment>
<sql>
ALTER TABLE jc_alert_submitted MODIFY submission_content varchar(5000) NULL COMMENT '报送内容';
ALTER TABLE jc_alert_submitted MODIFY COLUMN submission_content varchar(5000) DEFAULT NULL COMMENT '报送内容';
</sql>
</changeSet>
<changeSet author="chenzhao" id="2022-06-15-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
</preConditions>
<comment>update data cb_data_dictionary</comment>
<sql>
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1165, '1165', '集结待命', 'XYJBR', NULL, NULL, NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
</databaseChangeLog>
......
......@@ -974,4 +974,29 @@
ORDER BY
ppk.begin_time DESC LIMIT 60
</select>
<select id="getPlanIdsByDate" resultType="com.yeejoin.amos.patrol.dao.entity.Plan">
select *
from p_plan
where id in (
select plan_id
from p_plan_task
where
begin_time &lt;= #{date,jdbcType=TIMESTAMP}
and end_time &gt; #{date,jdbcType=TIMESTAMP}
and finish_status in (0, 1)
and status = 0
group by plan_id
)
</select>
<select id="getPlanTaskList" resultType="com.yeejoin.amos.patrol.dao.entity.PlanTask">
select *
from p_plan_task
where
begin_time &lt;= #{date,jdbcType=TIMESTAMP}
and end_time &gt; #{date,jdbcType=TIMESTAMP}
and finish_status in (0, 1)
and status = 0
</select>
</mapper>
\ No newline at end of file
......@@ -43,17 +43,17 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
recDate[0] = DateUtils.getCurrentDayStartTime(now);
recDate[1] = DateUtils.getCurrentDayEndTime(now);
// 我的任务
// 我的待办
Integer myTaskCount = this.queryForCount(userId, null, null);
// 今日
List<Integer> statusList = getStatus("uncomplete");
Integer todyUnCompletedTaskCount = this.queryForCount(userId, recDate, statusList);
// 今日
List<Integer> statusList = getStatus("complete");
Integer todyCompletedTaskCount = this.queryForCount(userId, recDate, statusList);
// 未完结业务
Integer unCompletedTaskCount = this.queryForCount(userId, null, statusList);
JSONObject jsonObject = new JSONObject();
jsonObject.put("myTask", myTaskCount);
jsonObject.put("todyUnCompletedTask", todyUnCompletedTaskCount);
jsonObject.put("todyCompletedTask", todyCompletedTaskCount);
jsonObject.put("unCompletedTask", unCompletedTaskCount);
return jsonObject;
}
......
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