Commit 90c4671a authored by 李腾威's avatar 李腾威

任务3857开发机场单位消防安全报告

parent edf6c1d6
...@@ -232,4 +232,7 @@ public interface IOrgUsrService { ...@@ -232,4 +232,7 @@ public interface IOrgUsrService {
* @return * @return
*/ */
List<Map<String, Object>> getPersonDetailByCompanyIds(List<String> ids); List<Map<String, Object>> getPersonDetailByCompanyIds(List<String> ids);
List<OrgUsr> selectCompanyUsers(Long orgUnitId);
} }
package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* @author litw
* @date 2021-10-12.
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="OrgUsrSafeReportDto", description="机场单位消防安全报告")
public class OrgUsrSafeReportExcelDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "报告名称", index = 0)
@ApiModelProperty(value = "报告名称")
private String name;
@ExcelProperty(value = "报告类型", index = 1)
@ApiModelProperty(value = "报告类型")
private String type;
@ExcelIgnore
@ApiModelProperty(value = "报告类型code")
private String typeCode;
@ExcelProperty(value = "生效年份", index = 2)
@ApiModelProperty(value = "生效年份")
private Date takeEffectYear;
@ExcelProperty(value = "签订时间", index = 3)
@ApiModelProperty(value = "签订时间")
private Date signedDate;
@ExcelIgnore
@ApiModelProperty(value = "机构代码用于权限过滤")
private String orgCode;
@ExplicitConstraint(method = "getCompany", indexNum = 4, sourceClass = CommonExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "所属机场单位名称", index = 4)
@ApiModelProperty(value = "所属机场单位名称")
private String company;
@ExcelIgnore
@ApiModelProperty(value = "所属机场单位id")
private Long companyId;
@ExcelIgnore
@ApiModelProperty(value = "单位类型(1机场单位,0机场部门)")
private String companyType;
@ExcelProperty(value = "责任人", index = 5)
@ApiModelProperty(value = "责任人")
private String dutyPerson;
@ExcelIgnore
@ApiModelProperty(value = "责任人Id")
private String dutyPersonId;
}
...@@ -26,7 +26,8 @@ public enum ExcelEnums { ...@@ -26,7 +26,8 @@ public enum ExcelEnums {
TGRY ("特岗人员", "特岗人员", "com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto","TGRY"),//("TGRY","特岗人员") TGRY ("特岗人员", "特岗人员", "com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto","TGRY"),//("TGRY","特岗人员")
JYZB ("救援装备", "救援装备", "com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto","JYZB"),//("JYZB","救援装备") JYZB ("救援装备", "救援装备", "com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto","JYZB"),//("JYZB","救援装备")
XFZB ("消防装备", "消防装备", "com.yeejoin.amos.boot.module.common.api.dto.EquipmentDetailDownloadTemplateDto","XFZB"),//("XFZB","消防装备") XFZB ("消防装备", "消防装备", "com.yeejoin.amos.boot.module.common.api.dto.EquipmentDetailDownloadTemplateDto","XFZB"),//("XFZB","消防装备")
WXXFZB("微型消防站值班", "微型消防站值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingExcleDto","WXXFZB");//("WXXFZB","微型消防站值班") WXXFZB("微型消防站值班", "微型消防站值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingExcleDto","WXXFZB"),//("WXXFZB","微型消防站值班")
XFAQBG("消防安全报告", "消防安全报告", "com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrSafeReportExcelDto","XFAQBG");//("XFAQBG","微型消防站值班")
private String fileName; private String fileName;
private String sheetName; private String sheetName;
private String classUrl; private String classUrl;
......
...@@ -11,7 +11,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -11,7 +11,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson;
import com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.UserDto;
import com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam; import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient; import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
...@@ -19,13 +27,16 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper; ...@@ -19,13 +27,16 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
import com.yeejoin.amos.boot.module.common.biz.service.impl.ESOrgUsrService; import com.yeejoin.amos.boot.module.common.biz.service.impl.ESOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.UserOrgTreeModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
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;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...@@ -325,6 +336,19 @@ public class OrgUsrController extends BaseController { ...@@ -325,6 +336,19 @@ public class OrgUsrController extends BaseController {
} }
/** /**
* 获取当前登陆人所在机场单位人员
*
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/company/users/{orgUnitId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据amos userid获取单位", notes = "根据amos userid获取单位")
public ResponseModel<List<OrgUsr>> selectCompanyUsers(@PathVariable Long orgUnitId) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectCompanyUsers(orgUnitId));
}
/**
* 根据名称模糊匹配 * 根据名称模糊匹配
* *
* @param name * @param name
......
...@@ -8,7 +8,25 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -8,7 +8,25 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.dto.UserDto;
import com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany; import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
...@@ -39,7 +57,14 @@ import javax.annotation.Resource; ...@@ -39,7 +57,14 @@ import javax.annotation.Resource;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -1634,7 +1659,21 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1634,7 +1659,21 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return list; return list;
} }
@Override @Override
public List<OrgUsr> selectCompanyUsers(Long orgUnitId) {
OrgUsr orgUsr = this.getById(orgUnitId);
if(null == orgUnitId) {
return null;
}
LambdaQueryWrapper<OrgUsr> queryWrapper = new LambdaQueryWrapper();
queryWrapper.like(OrgUsr::getBizOrgCode,orgUsr.getBizOrgCode());
queryWrapper.eq(OrgUsr::getBizOrgType,CommonConstant.BIZ_ORG_TYPE_PERSON);
queryWrapper.eq(OrgUsr::getIsDelete,false);
List<OrgUsr> list = this.list(queryWrapper);
return list;
}
@Override
public AgencyUserModel getAmosIdByOrgUserId(String orgUserId) throws Exception { public AgencyUserModel getAmosIdByOrgUserId(String orgUserId) throws Exception {
OrgUsr orgUsr = this.baseMapper.selectOne(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getSequenceNbr, OrgUsr orgUsr = this.baseMapper.selectOne(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getSequenceNbr,
orgUserId)); orgUserId));
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.alibaba.excel.support.ExcelTypeEnum; import com.alibaba.excel.support.ExcelTypeEnum;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Sequence; import com.baomidou.mybatisplus.core.toolkit.Sequence;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil; import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...@@ -106,11 +78,39 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.RescueEquipmentServi ...@@ -106,11 +78,39 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.RescueEquipmentServi
import com.yeejoin.amos.boot.module.common.biz.service.impl.SpecialPositionStaffServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.SpecialPositionStaffServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrSafeReportExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft; import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsrSafeReport;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums; import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
/** /**
* @author tb * @author tb
...@@ -183,6 +183,9 @@ public class ExcelServiceImpl { ...@@ -183,6 +183,9 @@ public class ExcelServiceImpl {
@Autowired @Autowired
IDutyFireFightingService dutyFireFightingService; IDutyFireFightingService dutyFireFightingService;
@Autowired
OrgUsrSafeReportServiceImpl orgUsrSafeReportService;
public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException { public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException {
String url = excelDto.getClassUrl(); String url = excelDto.getClassUrl();
Class<?> clz = Class.forName(url); Class<?> clz = Class.forName(url);
...@@ -321,6 +324,9 @@ public class ExcelServiceImpl { ...@@ -321,6 +324,9 @@ public class ExcelServiceImpl {
case "WXXFZB": case "WXXFZB":
excelImportDutyPerson(multipartFile, "WXXFZB"); excelImportDutyPerson(multipartFile, "WXXFZB");
break; break;
case "XFAQBG":
excelImportSafeReport(multipartFile);
break;
} }
return; return;
} }
...@@ -945,6 +951,32 @@ public class ExcelServiceImpl { ...@@ -945,6 +951,32 @@ public class ExcelServiceImpl {
} }
} }
private void excelImportSafeReport(MultipartFile multipartFile) throws Exception {
String fileName = multipartFile.getOriginalFilename();
if (fileName == null) {
throw new Exception("文件不存在!");
}
if (!fileName.toLowerCase().endsWith(ExcelTypeEnum.XLS.getValue())
&& !fileName.toLowerCase().endsWith(ExcelTypeEnum.XLSX.getValue())) {
throw new Exception("文件类型异常!");
}
List<OrgUsrSafeReportExcelDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile, OrgUsrSafeReportExcelDto.class, 1);
List<OrgUsrSafeReport> excelEntityList = new ArrayList<>();
excelDtoList.forEach(fireExpertsDto -> {
OrgUsrSafeReport reportExcel= new OrgUsrSafeReport();
reportExcel = Bean.toPo(fireExpertsDto, reportExcel);
reportExcel = Bean.toPo(getCurrentInfo(), reportExcel);
if (reportExcel.getCompany() != null) {
String[] compandyArr = reportExcel.getCompany().split("@");
reportExcel.setCompany(compandyArr[0]);
reportExcel.setCompanyId(Long.valueOf(compandyArr[1]));
}
excelEntityList.add(reportExcel);
});
orgUsrSafeReportService.saveBatch(excelEntityList);
}
private void initDutyCarData(XSSFSheet sheet, List<Map<String, Object>> dataList, List<Date> dayByMonth) { private void initDutyCarData(XSSFSheet sheet, List<Map<String, Object>> dataList, List<Date> dayByMonth) {
// 遍历行,i = 1,从第二行开始,第一行是表头跳过。 // 遍历行,i = 1,从第二行开始,第一行是表头跳过。
for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) {
......
...@@ -1635,7 +1635,52 @@ ...@@ -1635,7 +1635,52 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="ltw" id="2021-10-12-ltw-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="cb_org_usr_safe_report"/>
</not>
</preConditions>
<comment>create table cb_org_usr_safe_report</comment>
<sql>
CREATE TABLE cb_org_usr_safe_report (
`sequence_nbr` bigint(30) NOT NULL COMMENT '唯一主键',
`name` varchar(100) NOT NULL COMMENT '报告名称',
`type` varchar(30) DEFAULT NULL COMMENT '报告类型',
`type_code` varchar(30) DEFAULT NULL COMMENT '报告类型code',
`take_effect_year` datetime DEFAULT NULL COMMENT '生效年份',
`signed_date` datetime DEFAULT NULL COMMENT '签订时间',
`org_code` varchar(30) DEFAULT NULL COMMENT '机构代码用于权限过滤',
`company` varchar(30) DEFAULT NULL COMMENT '所属机场单位名称',
`attachment` varchar(500) DEFAULT NULL COMMENT '报告附件',
`company_id` bigint(20) DEFAULT NULL COMMENT '所属机场单位id',
`company_type` varchar(10) DEFAULT NULL COMMENT '单位类型(1机场单位,0机场部门)',
`duty_person` varchar(30) NOT NULL COMMENT '责任人',
`duty_person_id` bigint(20) NOT NULL COMMENT '责任人id',
`rec_user_id` bigint(20) NOT NULL COMMENT '更新人id',
`rec_user_name` varchar(30) NOT NULL COMMENT '更新人名称',
`rec_date` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机场单位消防安全报告';
</sql>
</changeSet>
<changeSet author="ltw" id="2021-10-12-2">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT 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(1322, '1322', '消防安全责任人报告书', 'XFAQBG', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT 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(1323, '1323', '消防安全管理人报告书', 'XFAQBG', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT 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(1324, '1324', '消防安全管理规章制度', 'XFAQBG', NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT 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(1325, '1325', '其他', 'XFAQBG', NULL, NULL, NULL, NULL, NULL, 0, 1);
</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