Commit 58f70d3a authored by kongfm's avatar kongfm

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

parents 77561afa c0dd1e5f
package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import lombok.Data;
import java.io.Serializable;
/**
* @author ZeHua Li
* @date 2020/9/8 13:46
* @since v2.0
*/
@Data
public class EquipmentDetailDownloadTemplateDto implements Serializable {
@ExcelProperty(value = "器材名称", index = 0)
// @Excel(name = "器材名称", width = 30, orderNum = "1")
private String name;
@ExcelProperty(value = "器材编码(从装备定义中获取)", index = 1)
//@Excel(name = "器材编码(从装备定义中获取)", width = 30, orderNum = "2")
private String code;
@ExcelProperty(value = "规格型号", index = 2)
//@Excel(name = "规格型号", width = 30, orderNum = "3")
private String standard;
@ExcelProperty(value = "品牌", index = 3)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private String brand;
@ExcelProperty(value = "生产厂家名称", index = 4)
//@Excel(name = "生产厂家名称", width = 30, orderNum = "5")
private String manufacturerName;
@ExcelProperty(value = "设备编码", index = 5)
//@Excel(name = "设备编码", width = 30, orderNum = "6")
private String systemCode;
@ExcelProperty(value = "物联编码", index = 6)
//@Excel(name = "物联编码", width = 30, orderNum = "7")
private String iotCode;
@ExcelProperty(value = "存放位置(货位编码)", index = 7)
//@Excel(name = "存放位置(货位编码)", width = 30, orderNum = "8")
private String warehouseStructCode;
@ExcelProperty(value = "位置信息", index = 8)
//@Excel(name = "位置信息", width = 30, orderNum = "9")
private String description;
@ExcelProperty(value = "消防系统编码", index = 9)
//@Excel(name = "消防系统编码", width = 30, orderNum = "10")
private String fightingSysCodes;
@ExplicitConstraint(indexNum = 10, sourceClass = RoleNameExplicitConstraint.class,method="getFireTeam") //动态下拉内容
@ExcelProperty(value = "所属队伍", index = 10)
//@Excel(name = "所属队伍",width = 30,orderNum = "11")
private String fireTeam;
//动态下拉内容
@ExplicitConstraint(indexNum = 11, sourceClass = RoleNameExplicitConstraint.class,method="getCompany") //动态下拉内容
@ExcelProperty(value = "所属单位", index = 11)
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private String companyName;
}
......@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
......@@ -306,6 +305,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "物联参数")
private WaterResourceIotDto waterResourceIotDto;
@ExcelIgnore
@ApiModelProperty("设施定义id")
private Long equipId;
......@@ -313,6 +313,7 @@ public class WaterResourceDto extends BaseDto {
@ExcelProperty(value = "设施定义名称", index = 44)
private String equipName;
@ExcelIgnore
@ApiModelProperty("设施分类id")
private Long equipCategoryId;
......
......@@ -24,7 +24,8 @@ public enum ExcelEnums {
RYZB ("人员值班", "人员值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto","RYZB"),//("RYZB","人员值班")
// BUG 2455 相关代码 bykongfm
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","消防装备")
private String fileName;
private String sheetName;
......
......@@ -66,7 +66,9 @@ public class FirefightersThoughtController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增消防员思想谈话记录", notes = "新增消防员思想谈话记录")
public ResponseModel<FirefightersThought> saveFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){
iFirefightersThoughtService.save(firefightersThought);
if (!firefightersThought.getAttachments().isEmpty()){
/*bug 2883 消防人员,新增思想状态保存报错 2021-09-15 陈召 开始*/
if (firefightersThought.getAttachments() != null && !firefightersThought.getAttachments().isEmpty()){
/*bug 2883 消防人员,新增思想状态保存报错 2021-09-15 陈召 开始*/
sourceFileService.saveAttachments(firefightersThought.getSequenceNbr(),firefightersThought.getAttachments());
}
return ResponseHelper.buildResponse(firefightersThought);
......@@ -104,7 +106,7 @@ public class FirefightersThoughtController extends BaseController {
@ApiOperation(httpMethod = "PUT", value = "修改消防员思想谈话记录", notes = "修改消防员思想谈话记录")
public ResponseModel<FirefightersThought> updateByIdFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){
if (!firefightersThought.getAttachments().isEmpty()){
if (firefightersThought.getAttachments() != null && !firefightersThought.getAttachments().isEmpty()){
sourceFileService.saveAttachments(firefightersThought.getSequenceNbr(),firefightersThought.getAttachments());
}
iFirefightersThoughtService.updateById(firefightersThought);
......
......@@ -210,6 +210,7 @@ public class MaintenanceCompanyServiceImpl
// 新增删除维保单位逻辑,BUG 2500 单位下有子单位或者人员时应无法直接删除. by litw satrt
LambdaQueryWrapper<MaintenanceCompany> wrapperCompany = new LambdaQueryWrapper<MaintenanceCompany>();
wrapperCompany.eq(MaintenanceCompany::getParentId,sequenceNbr);
wrapperCompany.eq(MaintenanceCompany::getIsDelete,false);
int count = maintenanceCompanyMapper.selectCount(wrapperCompany);
if(count > 0) {
throw new BadRequest("单位下有子单位或者人员,无法删除");
......
......@@ -551,11 +551,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
// 机场人员AMOS角色丢失修正, by litw end 2021年9月10日
result = Bean.BeantoMap(orgUsr);
/*bug 2869 部门为空人员详情报空指针 2021-09-14 陈召 开始*/
if (getById(orgUsr.getParentId()) != null){
/*bug 2869 部门为空人员详情报空指针 2021-09-15 陈召 开始*/
if (orgUsr.getParentId()!= null){
result.put("parenName", getById(orgUsr.getParentId()).getBizOrgName());
}
/*bug 2869 部门为空人员详情报空指针 2021-09-14 陈召 结束*/
/*bug 2869 部门为空人员详情报空指针 2021-09-15 陈召 结束*/
// 放入所有动态表单数据
for (DynamicFormColumn alertForm : alertForms) {
result.put(alertForm.getFieldCode(), null);
......@@ -772,7 +772,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List<FormValue> formValue = getFormValueDetail(id);
OrgPersonFormDto orgPersonFormVo = new OrgPersonFormDto(formValue);
BeanUtils.copyProperties(orgUsr, orgPersonFormVo);
orgPersonFormVo.setParentName(getById(orgUsr.getParentId()).getBizOrgName());
/*bug 2869 部门为空人员详情报空指针 2021-09-15 陈召 开始*/
if (orgUsr.getParentId() != null){
orgPersonFormVo.setParentName(getById(orgUsr.getParentId()).getBizOrgName());
}
/*bug 2869 部门为空人员详情报空指针 2021-09-15 陈召 结束*/
return orgPersonFormVo;
}
......
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;
......@@ -31,6 +33,9 @@ public class ExcelController extends BaseController {
@Autowired
ExcelServiceImpl excelService;
@Autowired
DataSourcesImpl dataSources;
private static final String NOT_DUTY = "休班";
......@@ -167,4 +172,17 @@ public class ExcelController extends BaseController {
throw new RuntimeException("系统异常!");
}
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出给提供设备接口")
@PostMapping("/exportForEquipment")
public ResponseModel<String[]> getFireStationFileByParams(@RequestParam(value = "type") String type,
@RequestParam(value = "method") String method) {
try {
return ResponseHelper.buildResponse(dataSources.selectList(type,method));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常!");
}
}
}
......@@ -15,7 +15,7 @@ public class RoutePointItemVo {
/**
* 检查项名称
*/
private String itemName;
private String name;
private String itemType;
private String inputClassify;
private String checkType;
......
......@@ -61,7 +61,7 @@
SELECT
pi.id,
i.id AS itemId,
i.`name` AS itemName,
i.`name`,
i.item_type,
i.input_classify,
i.check_type,
......
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