Commit 3a8aba59 authored by lisong's avatar lisong

Merge branch 'develop_dl_plan6' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6

# Conflicts: # amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java # amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java # amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java # amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
parents eff4ee07 32826e43
package com.yeejoin.amos.boot.module.common.api.dto;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class BigScreen1VO {
// private Map<String, Object> firefightersInfo;
private List<Map<String, Object>> personList;
private List<Map<String, Object>> teamNumInfo;
private List<Map<String, Object>> usrSignInfo;
// private Integer teamNum;
}
...@@ -42,4 +42,10 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> { ...@@ -42,4 +42,10 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List<Firefighters> getPersonByCodes(@Param("list") List<String> list); List<Firefighters> getPersonByCodes(@Param("list") List<String> list);
List<OrgUsrFireExcelDto> exportToExcelNew(Boolean isDelete, String name, String postQualification, String fireTeamId, String state, String areasExpertise, String jobTitle, String bizOrgCode); List<OrgUsrFireExcelDto> exportToExcelNew(Boolean isDelete, String name, String postQualification, String fireTeamId, String state, String areasExpertise, String jobTitle, String bizOrgCode);
Integer getTeamCountByCode(@Param("companyCode") String companyCode);
Map<String, Object> getFireForceInfoByCode(@Param("companyCode") String companyCode);
List<Map<String, Object>> getStationSignInfo(@Param("companyCode") String companyCode);
} }
...@@ -4,10 +4,7 @@ import java.util.List; ...@@ -4,10 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.yeejoin.amos.boot.biz.common.utils.Menu; import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto;
import com.yeejoin.amos.boot.module.common.api.dto.PeopleInfoDto;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters; import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
...@@ -37,4 +34,6 @@ public interface IFirefightersService { ...@@ -37,4 +34,6 @@ public interface IFirefightersService {
Firefighters getFirefightersByUserId(String sequenceNbr); Firefighters getFirefightersByUserId(String sequenceNbr);
void saveFirefightersByUser(PeopleInfoDto firefighters); void saveFirefightersByUser(PeopleInfoDto firefighters);
BigScreen1VO getFireForceInfoByCode(String companyCode);
} }
...@@ -451,4 +451,89 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr ...@@ -451,4 +451,89 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
<if test='jobTitle!=null'>and f.job_title_code = #{jobTitle}</if> <if test='jobTitle!=null'>and f.job_title_code = #{jobTitle}</if>
<if test='bizOrgCode!=null'>and f.biz_org_code like concat ('%',#{bizOrgCode},'%') </if> <if test='bizOrgCode!=null'>and f.biz_org_code like concat ('%',#{bizOrgCode},'%') </if>
</select> </select>
<select id="getTeamCountByCode" resultType="java.lang.Integer">
SELECT
count( cft.sequence_nbr ) as teamNum
FROM
cb_fire_team cft
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = cft.biz_org_code
WHERE
cft.is_delete = 0
<if test="companyCode != null and companyCode != ''">
AND ou.`code` = #{companyCode}
</if>
</select>
<select id="getFireForceInfoByCode" resultType="java.util.Map">
SELECT
b.*,
( b.firefightersNum - b.fireCer ) AS unfireCer,
( b.opertNum - b.operCer ) AS unoperCer,
TRUNCATE ( abs(( b.fireCer ) / IF (( b.firefightersNum ) = 0, 1, b.firefightersNum )) * 100, 2 ) AS fireAbs,
TRUNCATE ( abs(( b.operCer ) / IF (( b.opertNum ) = 0, 1, b.opertNum )) * 100, 2 ) AS operAbs
FROM
(
SELECT
count( a.is_firefighters = 1 OR NULL ) AS firefightersNum,
count( a.is_firefighters = 0 OR NULL ) AS opertNum,
COUNT(( a.is_firefighters = 1 AND a.certificate_type IS NOT NULL ) OR NULL ) AS fireCer,
COUNT(( a.is_firefighters = 0 AND a.certificate_type IS NOT NULL ) OR NULL ) AS operCer
FROM
(
SELECT
u.sequence_nbr,
cfp.fire_management_post,
( CASE WHEN cf.fire_team_id IS NULL THEN 0 ELSE 1 END ) AS is_firefighters,
cfp.certificate_type
FROM
cb_org_usr u
LEFT JOIN cb_firefighters_post cfp ON cfp.org_usr_id = u.sequence_nbr
AND cfp.is_delete = 0
LEFT JOIN cb_firefighters cf ON cf.org_usr_id = u.sequence_nbr
AND cf.is_delete = 0
WHERE
u.is_delete = 0
AND u.biz_org_type = 'PERSON'
<if test="companyCode != null and companyCode != ''">
AND u.`code` = #{companyCode}
</if>
GROUP BY
u.sequence_nbr
) a
) b
</select>
<select id="getStationSignInfo" resultType="java.util.Map">
SELECT b.qualifiedNum, b.unQualifiedNum, (TRUNCATE ( abs(( b.qualifiedNum ) / IF (( b.totalNum = 0 ),
1,
b.totalNum
)) * 100 ,2)) as qualifiedAbs
FROM
(
SELECT
count( a.signCount &gt;= 8 OR NULL ) AS qualifiedNum,
count( 1 ) AS totalNum,
count( a.signCount &lt; 8 OR NULL ) AS unQualifiedNum
FROM
(
SELECT
si.`code`,
count( DISTINCT cs.user_id ) AS signCount
FROM
idx_biz_station_info si
LEFT JOIN cb_org_usr ou ON ou.`code` = si.`code`
AND ou.is_delete = 0
LEFT JOIN cb_sign cs ON cs.biz_org_code = ou.biz_org_code
AND cs.date LIKE CONCAT( DATE_FORMAT( now(), '%Y-%m' ), '%' )
<where>
<if test="companyCode != null and companyCode != ''">
si.`code` = #{companyCode}
</if>
</where>
GROUP BY
si.`code`
) a
) b
</select>
</mapper> </mapper>
package com.yeejoin.equipmanage.common.vo;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class BigScreenVo {
private List<Map<String, Object>> infoList;
private List<Map<String, Object>> carNumInfo;
private List<Map<String, Object>> systemAlarmInfoNum;
private List<Map<String, Object>> pool;
private List<Map<String, Object>> industryPool;
private List<Map<String, Object>> equipInfo;
private List<Map<String, Object>> breakdownInfo;
// private Integer carNum;
}
package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
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 system_generator
* @date 2022-08-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="SignDto", description="打卡记录")
public class SignDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "打卡人名字")
private String name;
@ApiModelProperty(value = "打卡人id")
private String userId;
@ApiModelProperty(value = "打卡人岗位")
private String jobTitle;
@ApiModelProperty(value = "换流站code")
private String bizOrgCode;
@ApiModelProperty(value = "换流站Name")
private String bizOrgName;
@ApiModelProperty(value = "打卡时间")
private String date;
@ApiModelProperty(value = "打卡来源")
private String source;
@ApiModelProperty(value = "打卡图片")
private String photos;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "打卡时间")
private Date signTime;
@ApiModelProperty(value = "系统标识(数据隔离使用)")
private String appKey;
@ApiModelProperty(value = "组件机构")
private String orgCode;
@ApiModelProperty(value = "打卡类型")
private String type;
}
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 system_generator
* @date 2022-08-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_sign")
public class Sign extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 打卡人名字
*/
@TableField("name")
private String name;
/**
* 打卡人id
*/
@TableField("user_id")
private String userId;
/**
* 打卡人岗位
*/
@TableField("job_title")
private String jobTitle;
/**
* 打卡类型
*/
@TableField("type")
private String type;
/**
* 换流站code
*/
@TableField("biz_org_code")
private String bizOrgCode;
/**
* 换流站Name
*/
@TableField("biz_org_name")
private String bizOrgName;
/**
* 打卡时间
*/
@TableField("date")
private String date;
/**
* 打卡来源
*/
@TableField("source")
private String source;
/**
* 打卡图片
*/
@TableField("photos")
private String photos;
/**
* 备注
*/
@TableField("remarks")
private String remarks;
/**
* 打卡时间
*/
@TableField("sign_time")
private Date signTime;
/**
* 系统标识(数据隔离使用)
*/
@TableField("app_key")
private String appKey;
/**
* 组件机构
*/
@TableField("org_code")
private String orgCode;
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.Sign;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 打卡记录 Mapper 接口
*
* @author system_generator
* @date 2022-08-15
*/
public interface SignMapper extends BaseMapper<Sign> {
}
package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
/**
* 打卡记录接口类
*
* @author system_generator
* @date 2022-08-15
*/
public interface ISignService {
Boolean hasSign(String type,String date,String userId);
Boolean saveSign(SignDto dot);
}
<?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.SignMapper">
</mapper>
...@@ -106,9 +106,9 @@ public class OrgPersonController extends BaseController { ...@@ -106,9 +106,9 @@ public class OrgPersonController extends BaseController {
// 删除时,只作逻辑删除 // 删除时,只作逻辑删除
iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete",
CommonConstant.IS_DELETE_01)); CommonConstant.IS_DELETE_01));
if(redisUtils.get("userList")!= null){ // if(redisUtils.get("userList")!= null){
redisUtils.del("userList"); // redisUtils.del("userList");
} // }
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
...@@ -217,9 +217,9 @@ public class OrgPersonController extends BaseController { ...@@ -217,9 +217,9 @@ public class OrgPersonController extends BaseController {
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Object> listPage(@RequestParam Map<String, Object> requestBody) { public ResponseModel<Object> listPage(@RequestParam Map<String, Object> requestBody) {
if(redisUtils.get("userList") != null){ // if(redisUtils.get("userList") != null){
return ResponseHelper.buildResponse(redisUtils.get("userList")); // return ResponseHelper.buildResponse(redisUtils.get("userList"));
} // }
return ResponseHelper.buildResponse(iOrgUsrService.pagePerson( return ResponseHelper.buildResponse(iOrgUsrService.pagePerson(
requestBody.containsKey("pageNum") ? requestBody.get("pageNum").toString() : null , requestBody.containsKey("pageNum") ? requestBody.get("pageNum").toString() : null ,
requestBody.containsKey("pageSize") ? requestBody.get("pageSize").toString() : null , requestBody.containsKey("pageSize") ? requestBody.get("pageSize").toString() : null ,
...@@ -239,9 +239,9 @@ public class OrgPersonController extends BaseController { ...@@ -239,9 +239,9 @@ public class OrgPersonController extends BaseController {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode(); String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
req.put("bizOrgCode", bizOrgCode); req.put("bizOrgCode", bizOrgCode);
if(redisUtils.get("userList:" + bizOrgCode) != null){ // if(redisUtils.get("userList:" + bizOrgCode) != null){
return ResponseHelper.buildResponse(redisUtils.get("userList:" + bizOrgCode)); // return ResponseHelper.buildResponse(redisUtils.get("userList:" + bizOrgCode));
} // }
return ResponseHelper.buildResponse(iOrgUsrService.listAllByCurrentUser(null, null, req)); return ResponseHelper.buildResponse(iOrgUsrService.listAllByCurrentUser(null, null, req));
} }
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.Collection; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper; import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
...@@ -273,4 +270,35 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi ...@@ -273,4 +270,35 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
} }
return personGenderMap; return personGenderMap;
} }
@Override
public BigScreen1VO getFireForceInfoByCode(String companyCode) {
BigScreen1VO bigScreen1VO = new BigScreen1VO();
Integer teamCount = firefightersMapper.getTeamCountByCode(companyCode);
Map<String, Object> fireForceInfoByCode = firefightersMapper.getFireForceInfoByCode(companyCode);
List<Map<String, Object>> personInfoList = new ArrayList<>();
HashMap<String, Object> fireInfo = new HashMap<>();
fireInfo.put("fireCer", fireForceInfoByCode.get("fireCer"));
fireInfo.put("unfireCer", fireForceInfoByCode.get("unfireCer"));
fireInfo.put("firefightersNum", fireForceInfoByCode.get("firefightersNum"));
fireInfo.put("fireAbs", fireForceInfoByCode.get("fireAbs"));
personInfoList.add(fireInfo);
HashMap<String, Object> operInfo = new HashMap<>();
operInfo.put("operCer", fireForceInfoByCode.get("operCer"));
operInfo.put("unoperCer", fireForceInfoByCode.get("unoperCer"));
operInfo.put("opertNum", fireForceInfoByCode.get("opertNum"));
operInfo.put("operAbs", fireForceInfoByCode.get("operAbs"));
personInfoList.add(operInfo);
bigScreen1VO.setPersonList(personInfoList);
List<Map<String, Object>> teamInfoList = new ArrayList<>();
HashMap<String, Object> teamInfoMap = new HashMap<>();
teamInfoMap.put("teamNum", teamCount);
teamInfoList.add(teamInfoMap);
bigScreen1VO.setTeamNumInfo(teamInfoList);
// bigScreen1VO.setTeamNum(teamCount);
// bigScreen1VO.setFirefightersInfo(fireForceInfoByCode);
List<Map<String, Object>> stationSignInfo = firefightersMapper.getStationSignInfo(companyCode);
bigScreen1VO.setUsrSignInfo(stationSignInfo);
return bigScreen1VO;
}
} }
...@@ -638,16 +638,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -638,16 +638,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
/* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */ /* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */
pageBean.setRecords(list); pageBean.setRecords(list);
//
Calendar calendar = Calendar.getInstance(); // Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_YEAR,1); // calendar.add(Calendar.DAY_OF_YEAR,1);
calendar.set(Calendar.HOUR_OF_DAY,0); // calendar.set(Calendar.HOUR_OF_DAY,0);
calendar.set(Calendar.SECOND,0); // calendar.set(Calendar.SECOND,0);
calendar.set(Calendar.MINUTE,0); // calendar.set(Calendar.MINUTE,0);
calendar.set(Calendar.MILLISECOND,0); // calendar.set(Calendar.MILLISECOND,0);
//当前时间与晚上十二点的秒差 // //当前时间与晚上十二点的秒差
Long timeOut = (calendar.getTimeInMillis()-System.currentTimeMillis()) / 1000; // Long timeOut = (calendar.getTimeInMillis()-System.currentTimeMillis()) / 1000;
redisUtils.set("userList", pageBean, timeOut); // redisUtils.set("userList", pageBean, timeOut);
return pageBean; return pageBean;
} }
...@@ -748,15 +748,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -748,15 +748,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
/* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */ /* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */
pageBean.setRecords(list); pageBean.setRecords(list);
Calendar calendar = Calendar.getInstance(); // Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_YEAR,1); // calendar.add(Calendar.DAY_OF_YEAR,1);
calendar.set(Calendar.HOUR_OF_DAY,0); // calendar.set(Calendar.HOUR_OF_DAY,0);
calendar.set(Calendar.SECOND,0); // calendar.set(Calendar.SECOND,0);
calendar.set(Calendar.MINUTE,0); // calendar.set(Calendar.MINUTE,0);
calendar.set(Calendar.MILLISECOND,0); // calendar.set(Calendar.MILLISECOND,0);
//当前时间与晚上十二点的秒差 // //当前时间与晚上十二点的秒差
Long timeOut = (calendar.getTimeInMillis()-System.currentTimeMillis()) / 1000; // Long timeOut = (calendar.getTimeInMillis()-System.currentTimeMillis()) / 1000;
redisUtils.set("userList:" + bizOrgCode, pageBean, timeOut); // redisUtils.set("userList:" + bizOrgCode, pageBean, timeOut);
return pageBean; return pageBean;
} }
...@@ -1048,9 +1048,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1048,9 +1048,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} else { } else {
orgUsr.setBizOrgCode(getOrgCodeStr()); orgUsr.setBizOrgCode(getOrgCodeStr());
} }
if(redisUtils.get("userList")!= null){ // if(redisUtils.get("userList")!= null){
redisUtils.del("userList"); // redisUtils.del("userList");
} // }
return saveOrgUsrDynamicFormInstance(orgUsr, OrgPersonVo.getDynamicFormValue()); return saveOrgUsrDynamicFormInstance(orgUsr, OrgPersonVo.getDynamicFormValue());
} }
...@@ -1252,9 +1252,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1252,9 +1252,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if (orgUsr.getBizOrgCode() != null) { if (orgUsr.getBizOrgCode() != null) {
orgPersonDto.setBizOrgCode(orgUsr.getBizOrgCode()); orgPersonDto.setBizOrgCode(orgUsr.getBizOrgCode());
} }
if(redisUtils.get("userList")!= null){ // if(redisUtils.get("userList")!= null){
redisUtils.del("userList"); // redisUtils.del("userList");
} // }
return orgPersonDto; return orgPersonDto;
} }
......
package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.vo.BigScreenVo;
import com.yeejoin.equipmanage.service.IFireFightingSystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
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.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@RestController
@Api(tags = "一张图大屏API")
@RequestMapping(value = "/bigScreen", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class BigScreenController {
@Autowired
private IFireFightingSystemService iFireFightingSystemService;
@GetMapping(value = "/list")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "系统、消防水池、工业水池、水源总容积、消防车辆(接口弃用)", notes = "系统、消防水池、工业水池、水源总容积、消防车辆")
public ResponseModel<BigScreenVo> getSystemAlarmInfoNum(@RequestParam(required = false, value = "companyCode") String companyCode) {
return CommonResponseUtil.success(iFireFightingSystemService.getSystemAlarmInfoNum(companyCode));
}
@GetMapping(value = "/getCarInfo")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "系统、消防水池、工业水池、消防车辆", notes = "系统、消防水池、工业水池、消防车辆")
public ResponseModel<BigScreenVo> getCarInfo(@RequestParam(required = false, value = "companyCode") String companyCode) {
return CommonResponseUtil.success(iFireFightingSystemService.getCarInfo(companyCode));
}
}
...@@ -8,6 +8,7 @@ import java.util.Map; ...@@ -8,6 +8,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -52,6 +53,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -52,6 +53,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
@Autowired @Autowired
IEquipmentSpecificAlarmService iEquipmentSpecificAlarmService; IEquipmentSpecificAlarmService iEquipmentSpecificAlarmService;
@Autowired
private EquipmentSpecificMapper equipmentSpecificMapper;
@Value("${equip.enabled}") @Value("${equip.enabled}")
private Boolean equioEnabled; private Boolean equioEnabled;
/** /**
...@@ -379,4 +384,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -379,4 +384,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
return CommonResponseUtil.success(map); return CommonResponseUtil.success(map);
} }
@RequestMapping(value = "/getAllEquipNum", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查装备数量", produces = "application/json;charset=UTF-8", notes = "查装备数量")
public ResponseModel getAllEquipNum(@RequestParam(required = false) String bizOrgCode) {
return CommonResponseUtil.success(equipmentSpecificMapper.getAllEquipNum(bizOrgCode));
}
} }
...@@ -232,4 +232,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -232,4 +232,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings); List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings);
Integer getAllEquipNum(@Param("bizOrgCode") String bizOrgCode);
} }
...@@ -373,6 +373,38 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -373,6 +373,38 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<EquipmentExportVO> exportEquipmentList(@Param("dto") EquipTypeAmountPageDTO dto); List<EquipmentExportVO> exportEquipmentList(@Param("dto") EquipTypeAmountPageDTO dto);
/** /**
* 获取系统告警信息
* @param companyCode
* @return
*/
List<Map<String, Object>> getSystemAlarmInfoNum(@Param("companyCode") String companyCode);
/**
* 消防水池或者工业水池信息
* @param companyCode
* @return
*/
List<Map<String, Object>> getWaterPoolInfoNum(@Param("companyCode") String companyCode, @Param("poolType") String poolType);
/**
* 消防水源总量统计
* @param companyCode
* @return
*/
Map<String, Object> getWaterPoolVolumeInfo(@Param("companyCode") String companyCode);
/**
* 获取车辆总数
* @param companyCode
* @return
*/
Integer getCarNum(@Param("companyCode") String companyCode);
List<Map<String, Object>> getCarInfo(@Param("companyCode") String companyCode);
List<Map<String, Object>> getEquipInfo(@Param("companyCode") String companyCode, @Param("alarmType") String alarmType);
/**
* 统计某站下装备总数、摄像头总数 * 统计某站下装备总数、摄像头总数
* @param bizOrgCode * @param bizOrgCode
* @return * @return
......
...@@ -17,13 +17,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipTypeImgAmountVO; ...@@ -17,13 +17,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipTypeImgAmountVO;
import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO; import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO;
import com.yeejoin.equipmanage.common.entity.vo.EquipmentAlarmBySystemIdOrSourceIdVO; import com.yeejoin.equipmanage.common.entity.vo.EquipmentAlarmBySystemIdOrSourceIdVO;
import com.yeejoin.equipmanage.common.entity.vo.PointTreeVo; import com.yeejoin.equipmanage.common.entity.vo.PointTreeVo;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO; import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.common.vo.EquipmentManageVo;
import com.yeejoin.equipmanage.common.vo.FireFightingSystem3dVo;
import com.yeejoin.equipmanage.common.vo.FireFightingSystemTreeVo;
import com.yeejoin.equipmanage.common.vo.FireFightingSystemTypeTreeVo;
import com.yeejoin.equipmanage.common.vo.FireFightingSystemVo;
import com.yeejoin.equipmanage.common.vo.SpeIndexVo;
public interface IFireFightingSystemService extends IService<FireFightingSystemEntity> { public interface IFireFightingSystemService extends IService<FireFightingSystemEntity> {
...@@ -271,4 +265,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -271,4 +265,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Page<Map<String, Object>> alarmList(Page page, String bizOrgCode); Page<Map<String, Object>> alarmList(Page page, String bizOrgCode);
Page<Map<String, Object>> equipList(Page page, String bizOrgCode); Page<Map<String, Object>> equipList(Page page, String bizOrgCode);
/**
* 获取系统告警数量等信息
* @param companyCode
* @return
*/
BigScreenVo getSystemAlarmInfoNum(String companyCode);
BigScreenVo getCarInfo(String companyCode);
} }
...@@ -1386,4 +1386,45 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1386,4 +1386,45 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public Page<Map<String, Object>> equipList(Page page, String bizOrgCode) { public Page<Map<String, Object>> equipList(Page page, String bizOrgCode) {
return fireFightingSystemMapper.equipList(page, bizOrgCode); return fireFightingSystemMapper.equipList(page, bizOrgCode);
} }
@Override
public BigScreenVo getSystemAlarmInfoNum(String companyCode) {
BigScreenVo bigScreenVo = new BigScreenVo();
List<Map<String, Object>> infoList = new ArrayList<>();
// Map<String, Object> systemAlarmInfoNum = fireFightingSystemMapper.getSystemAlarmInfoNum(companyCode);
//// bigScreenVo.setSystemAlarmInfoNum(systemAlarmInfoNum);
// infoList.add(systemAlarmInfoNum);
// Map<String, Object> pool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "pool");
//// bigScreenVo.setPool(pool);
// infoList.add(pool);
// Map<String, Object> industryPool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "industryPool");
// bigScreenVo.setIndustryPool(industryPool);
// infoList.add(industryPool);
List<Map<String, Object>> carInfoList = new ArrayList<>();
Integer carNum = fireFightingSystemMapper.getCarNum(companyCode);
Map<String, Object> carInfo = new HashMap<>();
carInfo.put("carNum", carNum);
carInfoList.add(carInfo);
// bigScreenVo.setCarNum(carNum);
bigScreenVo.setCarNumInfo(carInfoList);
bigScreenVo.setInfoList(infoList);
return bigScreenVo;
}
@Override
public BigScreenVo getCarInfo(String companyCode) {
BigScreenVo bigScreenVo = new BigScreenVo();
List<Map<String, Object>> carInfo = fireFightingSystemMapper.getCarInfo(companyCode);
bigScreenVo.setCarNumInfo(carInfo);
List<Map<String, Object>> systemAlarmInfoNum = fireFightingSystemMapper.getSystemAlarmInfoNum(companyCode);
List<Map<String, Object>> pool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "pool");
List<Map<String, Object>> industryPool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "industryPool");
bigScreenVo.setSystemAlarmInfoNum(systemAlarmInfoNum);
bigScreenVo.setIndustryPool(industryPool);
bigScreenVo.setPool(pool);
List<Map<String, Object>> equipInfo = fireFightingSystemMapper.getEquipInfo(companyCode, null);
List<Map<String, Object>> breakdown = fireFightingSystemMapper.getEquipInfo(companyCode, "BREAKDOWN");
bigScreenVo.setEquipInfo(equipInfo);
bigScreenVo.setBreakdownInfo(breakdown);
return bigScreenVo;
}
} }
...@@ -285,8 +285,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -285,8 +285,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 报警数据保存 // 报警数据保存
List<EquipmentSpecificAlarmLog> alarmLogs = new ArrayList<>(); List<EquipmentSpecificAlarmLog> alarmLogs = new ArrayList<>();
equipmentSpecificAlarmService.saveOrUpdateBatch(equipmentSpecificAlarms); if(!ObjectUtils.isEmpty(equipmentSpecificAlarms)){
equipmentSpecificAlarmService.saveOrUpdateBatch(equipmentSpecificAlarms);
}
// 需要在事务提交之后,否侧事务隔离查询不出数据 // 需要在事务提交之后,否侧事务隔离查询不出数据
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override @Override
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.yeejoin.amos.boot.module.common.api.service.IFirefightersService;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@RestController
@Api(tags = "一张图大屏Api")
@RequestMapping(value = "/bigScreen")
public class BigScreenController {
@Autowired
private IFirefightersService iFirefightersService;
@GetMapping(value = "/getFireForceInfoByCode")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "消防车、消防力量信息(专职消防队、运维人员)、人员出勤", notes = "消防车、消防力量信息(专职消防队、运维人员、人员出勤)")
public ResponseModel getFireForceInfoByCode(@RequestParam(required = false, value = "companyCode") String companyCode) {
return CommonResponseUtil.success(iFirefightersService.getFireForceInfoByCode(companyCode));
}
}
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.Arrays; import java.util.*;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -19,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -19,6 +18,7 @@ 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.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...@@ -498,4 +498,34 @@ public class FirefightersController extends BaseController { ...@@ -498,4 +498,34 @@ public class FirefightersController extends BaseController {
return ResponseHelper.buildResponse(iFirefightersService.getPersonByCodes(list)); return ResponseHelper.buildResponse(iFirefightersService.getPersonByCodes(list));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/get/persons")
@ApiOperation(httpMethod = "GET", value = "根据当前登陆用户获取换流站驻站消防队专职消防队消防人员", notes = "根据当前登陆用户获取换流站驻站消防队专职消防队消防人员")
public ResponseModel<JSONObject> getPersons() {
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if(null != reginParam) {
QueryWrapper<Firefighters> firefightersQueryWrapper = new QueryWrapper<>();
firefightersQueryWrapper.eq("amos_user_id",reginParam.getUserModel().getUserId());
Firefighters firePerson = iFirefightersService.getOne(firefightersQueryWrapper);
QueryWrapper<Firefighters> firefightersQueryWrapper1 = new QueryWrapper<>();
firefightersQueryWrapper1.eq("fire_team_id",firePerson.getFireTeamId());
List<Firefighters> firefighters = iFirefightersService.getBaseMapper().selectList(firefightersQueryWrapper1);
List<Map<String,Object>> list = new ArrayList<>();
firefighters.stream().forEach(e->{
Map<String,Object> map = new HashMap<>();
map.put("name",e.getName());
map.put("jobTitle",e.getJobTitle());
map.put("bizOrgName",e.getBizOrgName());
map.put("bizOrgCode",e.getBizOrgCode());
map.put("amosUserId",e.getAmosUserId());
map.put("personnelPhotos",e.getPersonnelPhotos());
list.add(map);
});
JSONObject object = new JSONObject();
object.put("persons",list);
return ResponseHelper.buildResponse(object);
}
return ResponseHelper.buildResponse(null);
}
} }
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
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.Date;
import java.util.List;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.SignServiceImpl;
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.SignDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 打卡记录
*
* @author system_generator
* @date 2022-08-15
*/
@RestController
@Api(tags = "打卡记录Api")
@RequestMapping(value = "/sign")
public class SignController extends BaseController {
@Autowired
SignServiceImpl signServiceImpl;
/**
* 新增打卡记录
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增打卡记录", notes = "新增打卡记录")
public ResponseModel<SignDto> save(@RequestBody SignDto model) {
model = signServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新打卡记录", notes = "根据sequenceNbr更新打卡记录")
public ResponseModel<SignDto> updateBySequenceNbrSign(@RequestBody SignDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(signServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除打卡记录", notes = "根据sequenceNbr删除打卡记录")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(signServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个打卡记录", notes = "根据sequenceNbr查询单个打卡记录")
public ResponseModel<SignDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(signServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "打卡记录分页查询", notes = "打卡记录分页查询")
public ResponseModel<Page<SignDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<SignDto> page = new Page<SignDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(signServiceImpl.queryForSignPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "打卡记录列表全部数据查询", notes = "打卡记录列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<SignDto>> selectForList() {
return ResponseHelper.buildResponse(signServiceImpl.queryForSignList());
}
/**
* 当前用户当天是否已打卡
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "打卡记录列表全部数据查询", notes = "打卡记录列表全部数据查询")
@GetMapping(value = "/hasSign")
public ResponseModel<Boolean> hasSign(@RequestParam(value = "type" , required = false) String type,
@RequestParam(value = "userId" , required = false) String userId) {
String date = DateUtils.stampToDate(new Date().getTime(),DateUtils.DATE_PATTERN);
return ResponseHelper.buildResponse(signServiceImpl.hasSign(type,date,userId));
}
/**
* 保存打卡记录
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "保存打卡记录", notes = "保存打卡记录")
@PostMapping(value = "/saveSign")
public ResponseModel<Boolean> hasSign(@RequestBody SignDto dto) {
return ResponseHelper.buildResponse(signServiceImpl.saveSign(dto));
}
}
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.Sign;
import com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.ISignService;
import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.typroject.tyboot.core.foundation.utils.Bean;
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 system_generator
* @date 2022-08-15
*/
@Service
public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implements ISignService {
/**
* 分页查询
*/
public Page<SignDto> queryForSignPage(Page<SignDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<SignDto> queryForSignList() {
return this.queryForList("" , false);
}
@Override
public Boolean hasSign(String type, String date,String userId) {
QueryWrapper<Sign> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("date",date);
if(StringUtils.isNotEmpty(type)) {
queryWrapper.eq("type",type);
}
if(StringUtils.isNotEmpty(userId)) {
queryWrapper.eq("user_id",userId);
}
List<Sign> signs = this.baseMapper.selectList(queryWrapper);
if (StringUtils.isEmpty(type) && signs.size() != 2) {
return true;
} else {
if(StringUtils.isNotEmpty(type) && signs.size() == 1) {
return true;
}
return false;
}
}
@Override
public Boolean saveSign(SignDto dot) {
Sign sign = new Sign();
Bean.copyExistPropertis(dot,sign);
return this.save(sign);
}
}
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</parent> </parent>
<artifactId>amos-boot-system-equip</artifactId> <artifactId>amos-boot-system-equip</artifactId>
<version>3.0.1.7</version> <version>3.6.0.6</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
......
...@@ -1624,4 +1624,13 @@ ...@@ -1624,4 +1624,13 @@
</where> </where>
ORDER BY realtiemIotIndexUpdateDate DESC ORDER BY realtiemIotIndexUpdateDate DESC
</select> </select>
<select id="getAllEquipNum" resultType="java.lang.Integer">
select count(*) from wl_equipment_specific
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
biz_org_code = #{bizOrgCode}
</if>
</where>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -3328,5 +3328,37 @@ ...@@ -3328,5 +3328,37 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="litw" id="2022-08-16-ltw-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="cb_sign"/>
</not>
</preConditions>
<comment>create table jc_rally_point</comment>
<sql>
CREATE TABLE `cb_sign` (
`sequence_nbr` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '物理主键',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡人名字',
`user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡人id',
`job_title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡人岗位',
`biz_org_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '换流站code',
`biz_org_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '换流站Name',
`type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡类型',
`date` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡时间',
`source` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡来源',
`photos` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打卡图片',
`remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
`sign_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '打卡时间',
`rec_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`app_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统标识(数据隔离使用)',
`org_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '组件机构',
`rec_user_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作人名称',
`rec_user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作人员',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打卡记录';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
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