Commit 02e178d5 authored by tangwei's avatar tangwei

修复扫描出来问题

parent 26274cdf
...@@ -44,7 +44,6 @@ public class PersonIdentifyAspect { ...@@ -44,7 +44,6 @@ public class PersonIdentifyAspect {
UserDto userDto = orgUsrService.getUserParentInfo(userId); UserDto userDto = orgUsrService.getUserParentInfo(userId);
ReginParams.PersonIdentity personIdentity = new ReginParams.PersonIdentity(); ReginParams.PersonIdentity personIdentity = new ReginParams.PersonIdentity();
// TODO 没有绑定机场单位的人员,则赋值不存在的bizOrgCode,规避查询出所有数据 // TODO 没有绑定机场单位的人员,则赋值不存在的bizOrgCode,规避查询出所有数据
// personIdentity.setBizOrgCode(StringUtils.isEmpty(userDto.getBizOrgCode()) ? "-1" : userDto.getBizOrgCode());
personIdentity.setCompanyId(userDto.getCompanyId()); personIdentity.setCompanyId(userDto.getCompanyId());
personIdentity.setCompanyName(userDto.getCompanyName()); personIdentity.setCompanyName(userDto.getCompanyName());
personIdentity.setPersonSeq(userDto.getPersonSeq()); personIdentity.setPersonSeq(userDto.getPersonSeq());
...@@ -59,7 +58,7 @@ public class PersonIdentifyAspect { ...@@ -59,7 +58,7 @@ public class PersonIdentifyAspect {
personIdentity.setCompanyBizOrgCode(userDto.getCompanyBizOrgCode()); personIdentity.setCompanyBizOrgCode(userDto.getCompanyBizOrgCode());
reginParam.setPersonIdentity(personIdentity); reginParam.setPersonIdentity(personIdentity);
redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSONObject.toJSONString(reginParam)); redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSON.toJSONString(reginParam));
} }
} }
......
...@@ -7,7 +7,6 @@ import java.util.Map; ...@@ -7,7 +7,6 @@ import java.util.Map;
@Data @Data
public class BigScreen1VO { public class BigScreen1VO {
// private Map<String, Object> firefightersInfo;
private List<Map<String, Object>> personList; private List<Map<String, Object>> personList;
...@@ -16,5 +15,4 @@ public class BigScreen1VO { ...@@ -16,5 +15,4 @@ public class BigScreen1VO {
private List<Map<String, Object>> usrSignInfo; private List<Map<String, Object>> usrSignInfo;
private List<Map<String, Object>> usrSignInfoByCode; private List<Map<String, Object>> usrSignInfoByCode;
// private Integer teamNum;
} }
//package com.yeejoin.amos.boot.module.common.api.dto;
//
//import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
///**
//* 数据字典
//*
//* @author tb
//* @date 2021-06-07
//*/
//@Data
//@EqualsAndHashCode(callSuper = true)
//@ApiModel(value="DataDictionaryDto", description="数据字典")
//public class DataDictionaryDto extends BaseDto {
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "code")
// private String code;
//
// @ApiModelProperty(value = "名称")
// private String name;
//
// @ApiModelProperty(value = "类型")
// private String type;
//
// @ApiModelProperty(value = "父级")
// private Long parent;
//
// @ApiModelProperty(value = "操作人名称")
// private String recUserName;
//
//}
...@@ -37,12 +37,6 @@ public class DutyFireFightingExcleDto implements Serializable{ ...@@ -37,12 +37,6 @@ public class DutyFireFightingExcleDto implements Serializable{
private String userName; private String userName;
// @ExcelIgnore
// @ApiModelProperty(value = "部门id")
// private String deptId;
// @ExcelIgnore
// @ApiModelProperty(value = "部门名称")
// private String deptName;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "岗位id") @ApiModelProperty(value = "岗位id")
......
...@@ -32,8 +32,7 @@ public class DutyPersonShiftDto extends BaseDto { ...@@ -32,8 +32,7 @@ public class DutyPersonShiftDto extends BaseDto {
@ApiModelProperty(value = "实例id") @ApiModelProperty(value = "实例id")
private Long instanceId; private Long instanceId;
@ApiModelProperty(value = "更新人员")
private String recUserName;
@ApiModelProperty(value = "班次名称") @ApiModelProperty(value = "班次名称")
private String shiftName; private String shiftName;
......
...@@ -200,8 +200,7 @@ public class FirefightersExcelDto extends BaseDto { ...@@ -200,8 +200,7 @@ public class FirefightersExcelDto extends BaseDto {
@ExcelProperty(value = "消防救援人员类别", index = 25) @ExcelProperty(value = "消防救援人员类别", index = 25)
private String category; private String category;
// @ApiModelProperty(value = "消防救援人员状态")
// private String state;
@ApiModelProperty(value = "消防救援衔级别代码") @ApiModelProperty(value = "消防救援衔级别代码")
@ExplicitConstraint(type = "XFJYJB", indexNum = 26, sourceClass = CommonExplicitConstraint.class) //动态下拉内容 @ExplicitConstraint(type = "XFJYJB", indexNum = 26, sourceClass = CommonExplicitConstraint.class) //动态下拉内容
......
...@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.common.api.dto; ...@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import net.bytebuddy.implementation.bind.annotation.Super;
import java.util.List; import java.util.List;
......
...@@ -121,6 +121,5 @@ public class OrgUsrFormDto implements Serializable { ...@@ -121,6 +121,5 @@ public class OrgUsrFormDto implements Serializable {
public OrgUsrFormDto() {
}
} }
...@@ -31,6 +31,5 @@ public class WaterResourceDyDto { ...@@ -31,6 +31,5 @@ public class WaterResourceDyDto {
@ApiModelProperty(value = "表单值") @ApiModelProperty(value = "表单值")
private String data; private String data;
public WaterResourceDyDto() {
}
} }
//package com.yeejoin.amos.boot.module.common.api.entity;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
///**
//* 数据字典
//*
//* @author tb
//* @date 2021-06-07
//*/
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("cb_data_dictionary")
//@ApiModel(value="DataDictionary对象", description="数据字典")
//public class DataDictionary extends BaseEntity {
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// @ApiModelProperty(value = "code")
// private String code;
//
// @ApiModelProperty(value = "名称")
// private String name;
//
// @ApiModelProperty(value = "类型")
// private String type;
//
// @ApiModelProperty(value = "父级")
// private Long parent;
//
// //新加排序字段
// @ApiModelProperty(value = "排序字段")
// private int sortNum;
//
//}
...@@ -52,12 +52,7 @@ public class FailureAudit extends BaseEntity { ...@@ -52,12 +52,7 @@ public class FailureAudit extends BaseEntity {
@TableField("audit_opinion") @TableField("audit_opinion")
private String auditOpinion; private String auditOpinion;
/* *//**
* 审核状态
*//*
@TableField("audit_status")
private String auditStatus;
*/
/** /**
* 设备故障报修单id * 设备故障报修单id
*/ */
......
...@@ -44,8 +44,7 @@ public class FirefightersPost extends BaseEntity { ...@@ -44,8 +44,7 @@ public class FirefightersPost extends BaseEntity {
@ApiModelProperty(value = "消防救援人员类别") @ApiModelProperty(value = "消防救援人员类别")
private String category; private String category;
// @ApiModelProperty(value = "消防救援人员状态")
// private String state;
@ApiModelProperty(value = "消防救援衔级别代码") @ApiModelProperty(value = "消防救援衔级别代码")
private String level; private String level;
...@@ -69,14 +68,12 @@ public class FirefightersPost extends BaseEntity { ...@@ -69,14 +68,12 @@ public class FirefightersPost extends BaseEntity {
@ApiModelProperty(value = "消防救援人员类别字典code") @ApiModelProperty(value = "消防救援人员类别字典code")
private String categoryCode; private String categoryCode;
// @ApiModelProperty(value = "消防救援人员状态")
// private String stateCode;
@ApiModelProperty(value = "消防救援衔级别代码字典code") @ApiModelProperty(value = "消防救援衔级别代码字典code")
private String levelCode; private String levelCode;
// @ApiModelProperty(value = "资质证书字典code")
// private String qualificationCertificateCode;
@ApiModelProperty(value = "消防专家领域字典code") @ApiModelProperty(value = "消防专家领域字典code")
private String areasExpertiseCode; private String areasExpertiseCode;
......
...@@ -14,7 +14,6 @@ import org.apache.poi.ss.usermodel.*; ...@@ -14,7 +14,6 @@ import org.apache.poi.ss.usermodel.*;
public class ExcelStyleUtil implements IExcelExportStyler { public class ExcelStyleUtil implements IExcelExportStyler {
private static final short STRING_FORMAT = (short) BuiltinFormats.getBuiltinFormat("TEXT"); private static final short STRING_FORMAT = (short) BuiltinFormats.getBuiltinFormat("TEXT");
private static final short FONT_SIZE_TEN = 10; private static final short FONT_SIZE_TEN = 10;
private static final short FONT_SIZE_ELEVEN = 11;
private static final short FONT_SIZE_TWELVE = 12; private static final short FONT_SIZE_TWELVE = 12;
/** /**
* 大标题样式 * 大标题样式
...@@ -39,7 +38,6 @@ public class ExcelStyleUtil implements IExcelExportStyler { ...@@ -39,7 +38,6 @@ public class ExcelStyleUtil implements IExcelExportStyler {
* @param workbook * @param workbook
*/ */
private void init(Workbook workbook) { private void init(Workbook workbook) {
//this.headerStyle = initHeaderStyle(workbook);
this.titleStyle = initTitleStyle(workbook); this.titleStyle = initTitleStyle(workbook);
this.styles = initStyles(workbook); this.styles = initStyles(workbook);
} }
...@@ -98,17 +96,7 @@ public class ExcelStyleUtil implements IExcelExportStyler { ...@@ -98,17 +96,7 @@ public class ExcelStyleUtil implements IExcelExportStyler {
return null; return null;
} }
/**
* 初始化--大标题样式
*
* @param workbook
* @return
*/
private CellStyle initHeaderStyle(Workbook workbook) {
CellStyle style = getBaseCellStyle(workbook);
style.setFont(getFont(workbook, FONT_SIZE_TWELVE, true));
return style;
}
/** /**
* 初始化--每列标题样式 * 初始化--每列标题样式
...@@ -118,7 +106,6 @@ public class ExcelStyleUtil implements IExcelExportStyler { ...@@ -118,7 +106,6 @@ public class ExcelStyleUtil implements IExcelExportStyler {
*/ */
private CellStyle initTitleStyle(Workbook workbook) { private CellStyle initTitleStyle(Workbook workbook) {
CellStyle style = getBaseCellStyle(workbook); CellStyle style = getBaseCellStyle(workbook);
//style.setFont(getFont(workbook, FONT_SIZE_ELEVEN, false));
//背景色 //背景色
style.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); style.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex());
style.setFillPattern(FillPatternType.SOLID_FOREGROUND); style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
......
...@@ -30,10 +30,13 @@ import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder; ...@@ -30,10 +30,13 @@ import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder;
import com.alibaba.excel.write.metadata.style.WriteCellStyle; import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont; import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
public class ExcelUtil { public class ExcelUtil {
private static final Integer DUTY_CAR_START_INDEX = 5;
private ExcelUtil() {
}
/** /**
* 生成excel模板 * 生成excel模板
...@@ -69,7 +72,7 @@ public class ExcelUtil { ...@@ -69,7 +72,7 @@ public class ExcelUtil {
.registerWriteHandler(horizontalCellStyleStrategy).doWrite(data); .registerWriteHandler(horizontalCellStyleStrategy).doWrite(data);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException("系统异常!"); throw new BadRequest("系统错误!");
} }
} }
...@@ -126,9 +129,7 @@ public class ExcelUtil { ...@@ -126,9 +129,7 @@ public class ExcelUtil {
} }
} }
} }
// String s = new String(fileName.getBytes(), "UTF-8");
// response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(s, "UTF-8"));
ExcelWriterSheetBuilder excelWriterSheetBuilder =EasyExcel ExcelWriterSheetBuilder excelWriterSheetBuilder =EasyExcel
.write(getOutputStream(fileName, response, ExcelTypeEnum.XLSX)) .write(getOutputStream(fileName, response, ExcelTypeEnum.XLSX))
.head(dutyCarTitleList) .head(dutyCarTitleList)
...@@ -273,8 +274,9 @@ public class ExcelUtil { ...@@ -273,8 +274,9 @@ public class ExcelUtil {
*/ */
public static Map<Integer, String[]> resolveExplicitConstraint(Map<Integer, String[]> explicitListConstraintMap, public static Map<Integer, String[]> resolveExplicitConstraint(Map<Integer, String[]> explicitListConstraintMap,
ExplicitConstraint explicitConstraint, DataSources dataDictionaryMapper) { ExplicitConstraint explicitConstraint, DataSources dataDictionaryMapper) {
Map<Integer, String[]> map =new HashMap<>();
if (explicitConstraint == null) { if (explicitConstraint == null) {
return null; return map;
} }
// 固定下拉信息 // 固定下拉信息
String[] source = explicitConstraint.source(); String[] source = explicitConstraint.source();
...@@ -300,7 +302,7 @@ public class ExcelUtil { ...@@ -300,7 +302,7 @@ public class ExcelUtil {
e.printStackTrace(); e.printStackTrace();
} }
} }
return null; return map;
} }
/** /**
...@@ -330,27 +332,7 @@ public class ExcelUtil { ...@@ -330,27 +332,7 @@ public class ExcelUtil {
*/ */
public static HorizontalCellStyleStrategy setMyCellStyle() { public static HorizontalCellStyleStrategy setMyCellStyle() {
// // 头的策略
// WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// // 设置表头居中对齐
// headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
// // 颜色
// headWriteCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
//
// WriteFont headWriteFont = new WriteFont();
// headWriteFont.setFontHeightInPoints((short) 10);
// // 字体
// headWriteCellStyle.setWriteFont(headWriteFont);
// headWriteCellStyle.setWrapped(true);
// // 内容的策略
// WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
// // 设置内容靠中对齐
// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
// // 这个策略是 头是头的样式 内容是内容的样式 其他的策略可以自己实现
// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy
// (headWriteCellStyle, contentWriteCellStyle);
// // 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
// return horizontalCellStyleStrategy;
// 表头样式策略 // 表头样式策略
WriteCellStyle headWriteCellStyle = new WriteCellStyle(); WriteCellStyle headWriteCellStyle = new WriteCellStyle();
...@@ -375,8 +357,6 @@ public class ExcelUtil { ...@@ -375,8 +357,6 @@ public class ExcelUtil {
contentWriteCellStyle.setWrapped(true); contentWriteCellStyle.setWrapped(true);
// 设置垂直居中 // 设置垂直居中
contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// 头默认了 FillPatternType所以可以不指定。
// contentWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND);
// 设置水平居中 // 设置水平居中
contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
...@@ -409,7 +389,6 @@ public class ExcelUtil { ...@@ -409,7 +389,6 @@ public class ExcelUtil {
for (Object t : data) { for (Object t : data) {
List<Object> rowLine = new ArrayList<>(); List<Object> rowLine = new ArrayList<>();
for(String head: headstr) { for(String head: headstr) {
List<Object> row = new ArrayList<>();
String getMethodName = "get" + head.substring(0,1).toUpperCase() + head.substring(1); String getMethodName = "get" + head.substring(0,1).toUpperCase() + head.substring(1);
Class clazz = t.getClass(); Class clazz = t.getClass();
Method getMethod; Method getMethod;
......
...@@ -48,33 +48,7 @@ public class TemplateCellWriteHandler implements CellWriteHandler { ...@@ -48,33 +48,7 @@ public class TemplateCellWriteHandler implements CellWriteHandler {
cellStyle.setFont(font1); cellStyle.setFont(font1);
cell.setCellStyle(cellStyle); cell.setCellStyle(cellStyle);
} }
// //其他列
// if (!isHead){
// CellStyle style = workbooks.createCellStyle();
// DataFormat dataFormat = workbooks.createDataFormat();
// style.setDataFormat(dataFormat.getFormat("@"));
// style.setVerticalAlignment(VerticalAlignment.CENTER);
// style.setAlignment(HorizontalAlignment.CENTER);
// cell.setCellStyle(style);
// }
// //设置日期
// if (!isHead && cell.getColumnIndex()==19 || !isHead && cell.getColumnIndex()==21|| !isHead && cell.getColumnIndex()==20){
// CellStyle style = workbooks.createCellStyle();
// DataFormat dataFormat = workbooks.createDataFormat();
// style.setDataFormat(dataFormat.getFormat("yyyy/mm/dd hh:mm:ss"));
// style.setVerticalAlignment(VerticalAlignment.CENTER);
// style.setAlignment(HorizontalAlignment.CENTER);
// cell.setCellStyle(style);
// }
// //设置金额
// if (!isHead && cell.getColumnIndex()==15 ||!isHead && cell.getColumnIndex()==16||!isHead && cell.getColumnIndex()==22 ||!isHead && cell.getColumnIndex()==24||!isHead && cell.getColumnIndex()==25){
// CellStyle style = workbooks.createCellStyle();
// DataFormat dataFormat = workbooks.createDataFormat();
// style.setDataFormat(dataFormat.getFormat("0.00"));
// style.setVerticalAlignment(VerticalAlignment.CENTER);
// style.setAlignment(HorizontalAlignment.CENTER);
// cell.setCellStyle(style);
// }
} }
......
...@@ -105,17 +105,7 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler { ...@@ -105,17 +105,7 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler {
workbook.setSheetHidden(hiddenIndex, true); workbook.setSheetHidden(hiddenIndex, true);
} }
} }
// // 下拉列表约束数据
// DataValidationConstraint constraint = helper.createExplicitListConstraint(v);
// // 设置约束
// DataValidation validation = helper.createValidation(constraint, rangeList);
// // 阻止输入非下拉选项的值
// validation.setErrorStyle(DataValidation.ErrorStyle.STOP);
// validation.setShowErrorBox(true);
// validation.setSuppressDropDownArrow(true);
// validation.createErrorBox("提示", "此值与单元格定义格式不一致");
// // validation.createPromptBox("填写说明:","填写内容只能为下拉数据集中的单位,其他单位将会导致无法入仓");
// sheet.addValidationData(validation);
}); });
} }
......
...@@ -57,6 +57,6 @@ public interface AmosTrainingFeignClient { ...@@ -57,6 +57,6 @@ public interface AmosTrainingFeignClient {
* @return * @return
*/ */
@GetMapping("/v1/examination/onlineExamPage?pageSize=10&pageNum=1&flag=online&examinationName=") @GetMapping("/v1/examination/onlineExamPage?pageSize=10&pageNum=1&flag=online&examinationName=")
ResponseModel<PageInfo> getExamStatisticsList(); ResponseModel<PageInfo<Object>> getExamStatisticsList();
} }
...@@ -384,15 +384,15 @@ public interface EquipFeignClient { ...@@ -384,15 +384,15 @@ public interface EquipFeignClient {
@RequestMapping(value = "/car/all/fusion", method = RequestMethod.GET) @RequestMapping(value = "/car/all/fusion", method = RequestMethod.GET)
ResponseModel<List> getCarFusionList(); ResponseModel<List<Object>> getCarFusionList();
@RequestMapping(value = "/equipment/query/classification/", method = RequestMethod.GET) @RequestMapping(value = "/equipment/query/classification/", method = RequestMethod.GET)
ResponseModel<List> getClassification(); ResponseModel<List<Object>> getClassification();
@RequestMapping(value = "/equipment/list/{typeCode}", method = RequestMethod.GET) @RequestMapping(value = "/equipment/list/{typeCode}", method = RequestMethod.GET)
ResponseModel<List> getEquipmentList(@PathVariable("typeCode") String typeCode); ResponseModel<List<Object>> getEquipmentList(@PathVariable("typeCode") String typeCode);
@RequestMapping(value = "equipment-category/list-tree", method = RequestMethod.GET) @RequestMapping(value = "equipment-category/list-tree", method = RequestMethod.GET)
ResponseModel<Object> list() ; ResponseModel<Object> list() ;
......
//package com.yeejoin.amos.boot.module.common.api.mapper;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//
///**
//* 数据字典 Mapper 接口
//*
//* @author tb
//* @date 2021-06-07
//*/
//public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
//
//}
...@@ -55,7 +55,7 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc ...@@ -55,7 +55,7 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc
* @return IPage<Map < String, Object>> * @return IPage<Map < String, Object>>
*/ */
IPage<Map<String, Object>> pageList( IPage<Map<String, Object>> pageList(
Page page, Page<Map<String, Object>> page,
@Param("appKey") String appKey, @Param("appKey") String appKey,
@Param("fieldCodes") Map<String, Object> fieldCodes, @Param("fieldCodes") Map<String, Object> fieldCodes,
@Param("groupCode") String groupCode, @Param("groupCode") String groupCode,
...@@ -106,7 +106,7 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc ...@@ -106,7 +106,7 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc
* @return IPage<Map < String, Object>> * @return IPage<Map < String, Object>>
*/ */
IPage<Map<String, Object>> pageListNew( IPage<Map<String, Object>> pageListNew(
Page page, Page<Map<String, Object>> page,
@Param("appKey") String appKey, @Param("appKey") String appKey,
@Param("fieldCodes") Map<String, Object> fieldCodes, @Param("fieldCodes") Map<String, Object> fieldCodes,
@Param("groupCode") String groupCode, @Param("groupCode") String groupCode,
...@@ -156,7 +156,7 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc ...@@ -156,7 +156,7 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc
* @param page * @param page
* @return * @return
*/ */
Page<Map<String, Object>> getPersonInfoByPage(Page page, @Param("bizOrgCode") String bizOrgCode); Page<Map<String, Object>> getPersonInfoByPage(Page<Map<String, Object>> page, @Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> dutyCardCount(); List<Map<String, Object>> dutyCardCount();
List<Map<String, Object>> dutyCardList (); List<Map<String, Object>> dutyCardList ();
......
...@@ -59,109 +59,4 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> { ...@@ -59,109 +59,4 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
List<FailureDetails> selectForReceive(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId,Long current, Long size,String ruleName); List<FailureDetails> selectForReceive(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId,Long current, Long size,String ruleName);
/* List<StatusDto> selectAudit(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId);
List<StatusDto> selectMaintain(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId);
List<StatusDto> selectUserId(Long currentStatus, String startTime, String endTime, String userId);*/
/* List<FailureDetails> selectYJ(Long currentStatus, String startTime, String endTime, String userId,Long current, Long size);*/
/* List<FailureDetails> selectForAudit(Long currentStatus, String startTime, String endTime,Integer submissionPid, String userId,Long current, Long size);*/
/* List<FailureDetails> selectForMaintain(Long currentStatus, String startTime, String endTime, Integer submissionPid, String userId,Long current, Long size);*/
/**
* 统计 维修人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*/
/* List<StatusDto> selectStatusWx(Long currentStatus, String startTime, String endTime, Integer submissionPid);
*//**
* 统计 应急指挥科人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*//*
List<StatusDto> selectStatusFq(Long currentStatus, String startTime, String endTime, Integer submissionPid);
*//**
* 统计 我发起
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*//*
List<StatusDto> selectStatusFqp(Long currentStatus, String startTime, String endTime, Integer submissionPid);
*//**
* 统计 领导
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @return
*//*
List<StatusDto> selectStatusLeader(Long currentStatus, String startTime, String endTime, Integer submissionPid);*/
/* /**
* 查询待处理 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*//*
List<FailureDetails> selectInProcessing(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);
/**
* 查询待处理 应急指挥科人员分页
*
* @param
* @return
*//*
List<FailureDetails> selectStatusWaitTj(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);*/
/* /**
* 查询待处理 维修人员分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*//*
List<FailureDetails> selectStatusWaitWx(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);*/
/* *//**
* 查询我发起的 分页
* current 当前页
* size 条数
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
*//*
List<FailureDetails> selectISubPage(Long current, Long size, Long currentStatus,
String startTime, String endTime, Integer submissionPid);*/
} }
...@@ -17,22 +17,6 @@ import java.util.List; ...@@ -17,22 +17,6 @@ import java.util.List;
*/ */
public interface FireTeamMapper extends BaseMapper<FireTeam> { public interface FireTeamMapper extends BaseMapper<FireTeam> {
// @Select("<script>"
// + "select a.sequence_nbr sequenceNbr, a.img,a.name,a.contact_user contactUser,a.contact_phone contactPhone, a.address from cb_fire_team a where a.is_delete=0"
// + "<if test='par.parent!=null'>" + "and a.parent= #{par.parent}" + "</if>"
// + "<if test='par.typeCode!=null'>" + "and a.type_code= #{par.typeCode}" + "</if>"
// + "<if test='par.companyCode!=null'>" + "and a.company_code= #{par.companyCode}" + "</if>"
// + "<if test='par.name!=null'>" + "and a.name= #{par.name}" + "</if>"
// + "</script>")
// List<FireTeamVo> getFireTeam(int pageNum, int pageSize, FireTeamListVo par);
// @Select("<script>"
// + "select COUNT(a.sequence_nbr) num from cb_fire_team a where a.is_delete=0"
// + "<if test='par.parent!=null'>" + "and a.parent= #{par.parent}" + "</if>"
// + "<if test='par.typeCode!=null'>" + "and a.type_code= #{par.typeCode}" + "</if>"
// + "<if test='par.companyCode!=null'>" + "and a.company_code= #{par.companyCode}" + "</if>"
// + "<if test='par.name!=null'>" + " and a.name= #{par.name}" + "</if>"
// + "</script>")
// Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par);
/** /**
* 返回监控大队信息列表 * 返回监控大队信息列表
...@@ -48,7 +32,7 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> { ...@@ -48,7 +32,7 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
* @param par * @param par
* @return * @return
*/ */
IPage<FireTeamCardDto> getFireTeamForPage(Page page, FireTeamListDto par); IPage<FireTeamCardDto> getFireTeamForPage(Page<FireTeamCardDto> page, FireTeamListDto par);
/** /**
......
...@@ -55,5 +55,5 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> { ...@@ -55,5 +55,5 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List<Map<String, Object>> getUserInfoByYJYA(String bizOrgCode); List<Map<String, Object>> getUserInfoByYJYA(String bizOrgCode);
IPage<Map<String, Object>> selectSignPersonList(Page page, @Param("bizOrgCode") String bizOrgCode); IPage<Map<String, Object>> selectSignPersonList(Page<Map<String, Object>> page, @Param("bizOrgCode") String bizOrgCode);
} }
...@@ -28,7 +28,7 @@ public interface MaintenanceCompanyMapper extends BaseMapper<MaintenanceCompany> ...@@ -28,7 +28,7 @@ public interface MaintenanceCompanyMapper extends BaseMapper<MaintenanceCompany>
* @param seq * @param seq
* @return * @return
*/ */
public Page<OrgUsrDto> selectOrgUsrPageList(Page page, @Param("seq") Long seq); public Page<OrgUsrDto> selectOrgUsrPageList(Page<OrgUsrDto> page, @Param("seq") Long seq);
List<MaintenanceCompany> findByCodeAndType(String code, String type); List<MaintenanceCompany> findByCodeAndType(String code, String type);
......
//package com.yeejoin.amos.boot.module.common.api.service;
//
//import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
//
//import java.util.List;
//
///**
// * 数据字典 服务类
// *
// * @author tb
// * @date 2021-06-07
// */
//public interface IDataDictionaryService {
//
//
// Object getFireChemical(String type) throws Exception;
//
// Object gwmcDataDictionary(String type) throws Exception;
//
// List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
//}
...@@ -72,7 +72,7 @@ public interface IDutyCommonService { ...@@ -72,7 +72,7 @@ public interface IDutyCommonService {
*/ */
String getGroupCode(); String getGroupCode();
List downloadList(String beginDate, String endDate) throws ParseException; List<Object> downloadList(String beginDate, String endDate) throws ParseException;
/** /**
* 值班数据入库 * 值班数据入库
......
...@@ -161,7 +161,7 @@ public interface IMaintenanceCompanyService { ...@@ -161,7 +161,7 @@ public interface IMaintenanceCompanyService {
* 将所有的维保人员导入到excle中 * 将所有的维保人员导入到excle中
* @return * @return
*/ */
public List<MaintenancePersonExcleDto> exportToMaintenancePersonExcel(Map map); public List<MaintenancePersonExcleDto> exportToMaintenancePersonExcel(Map<String,Object> map);
List<MaintenanceCompany> findByInstanceIdAndType(Long instanceId, String type); List<MaintenanceCompany> findByInstanceIdAndType(Long instanceId, String type);
......
...@@ -42,10 +42,10 @@ public interface IOrgUsrService { ...@@ -42,10 +42,10 @@ public interface IOrgUsrService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<OrgMenuDto> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getTree(Long topId, Collection<Object> entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<OrgMenuDto> getCompanyTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getCompanyTree(Long topId, Collection<Object> entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName) throws Exception;
/** /**
...@@ -62,10 +62,10 @@ public interface IOrgUsrService { ...@@ -62,10 +62,10 @@ public interface IOrgUsrService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<OrgMenuDto> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getSub(Long topId, Collection<Object> entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<OrgMenuDto> getCompanySub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getCompanySub(Long topId, Collection<Object> entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName) throws Exception;
/** /**
...@@ -132,7 +132,7 @@ public interface IOrgUsrService { ...@@ -132,7 +132,7 @@ public interface IOrgUsrService {
OrgUsrFormDto selectCompanyById(Long id) throws Exception; OrgUsrFormDto selectCompanyById(Long id) throws Exception;
IPage bizOrgTypeListPage(String pageNum, String pageSize, String bizOrgType) throws Exception; IPage<Object> bizOrgTypeListPage(String pageNum, String pageSize, String bizOrgType) throws Exception;
void saveDepartment(List<OrgDepartmentDto> OrgDepartmentDto, Long id) throws Exception; void saveDepartment(List<OrgDepartmentDto> OrgDepartmentDto, Long id) throws Exception;
...@@ -195,7 +195,7 @@ public interface IOrgUsrService { ...@@ -195,7 +195,7 @@ public interface IOrgUsrService {
List<Map<String, Object>> getparent(); List<Map<String, Object>> getparent();
List<OrgUsrExcelDto> exportToExcel(Map par); List<OrgUsrExcelDto> exportToExcel(Map<String,Object> par);
UserUnitDto getUserUnit(String userId); UserUnitDto getUserUnit(String userId);
...@@ -304,7 +304,7 @@ public interface IOrgUsrService { ...@@ -304,7 +304,7 @@ public interface IOrgUsrService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<OrgMenuDto> getTreeFlc(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getTreeFlc(Long topId, Collection<Object> entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
......
//package com.yeejoin.amos.boot.module.common.biz.service;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
//
///**
// * @author DELL
// */
//public interface IDutyCarService extends IDutyCommonService {
//
// /**
// * 值班信息保存
// * @param dutyCarDto 对象
// * @return List<DutyCarDto>
// */
// DutyCarDto save(DutyCarDto dutyCarDto);
//
// /**
// * 更新
// * @param instanceId 实例id
// * @param dutyCarDto 业务对象
// * @return List<DutyCarDto>
// */
// DutyCarDto update(Long instanceId, DutyCarDto dutyCarDto);
//}
//package com.yeejoin.amos.boot.module.common.biz.service;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//
//import java.text.ParseException;
//import java.util.List;
//import java.util.Map;
//
///**
// * @author DELL
// */
//public interface IDutyCommonService {
// /**
// * 分页查询
// *
// * @param current 当前页
// * @param size 页大小
// * @param beginDate 开始日期
// * @param endDate 结束日期
// * @return IPage<Map < String, Object>>
// */
// IPage<Map<String, Object>> pageList(int current, int size, String beginDate, String endDate) throws ParseException;
//
// /**
// * 值班明细
// *
// * @param beginDate 开始日期
// * @param endDate 结束日期
// * @return ResponseModel
// */
// List<Map<String, Object>> statisticsDay(String beginDate, String endDate) throws ParseException;
//
// /**
// * 不分页查询
// *
// * @param beginDate 开始日期
// * @param endDate 结束日期
// * @return ResponseModel
// */
// List<Map<String, Object>> list(String beginDate, String endDate) throws ParseException;
//
// /**
// * 获取表单参数
// *
// * @return String
// */
// String getGroupCode();
//
// List downloadList(String beginDate, String endDate) throws ParseException;
//
// /**
// * 值班数据入库
// *
// * @param dataList 数据
// */
// void saveImportData(List<Map<String, Object>> dataList);
//
// /**
// * 删除值班数据
// *
// * @param instanceId 实例id
// * @return Boolean
// */
// Boolean deleteDutyData(Long instanceId);
//
// /**
// * 查询指定条件的值班人信息
// *
// * @param dutyDay 查询条件
// * @param shiftId 班次
// * @param postType 岗位
// * @return List<Map < String, Object>>
// */
// List<Map<String, Object>> dayDutyPersonList(String dutyDay, Long shiftId, String postType);
//
// /**
// * 查询当前值班人信息
// *
// * @return List<Map < String, Object>>
// */
// List<Map<String, Object>> listOnDutyPerson();
//}
//package com.yeejoin.amos.boot.module.common.biz.service;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
//
///**
// * @author DELL
// */
//public interface IDutyPersonService extends IDutyCommonService {
// /**
// * 保存
// *
// * @param dutyPersonDto 业务对象
// * @return List<DutyPersonDto>
// */
// DutyPersonDto save(DutyPersonDto dutyPersonDto);
//
//
// /**
// * 更新
// *
// * @param instanceId 实例id
// * @param dutyPersonDto 业务对象
// * @return List<DutyCarDto>
// */
// DutyPersonDto update(Long instanceId, DutyPersonDto dutyPersonDto);
//}
...@@ -89,7 +89,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont ...@@ -89,7 +89,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
* @throws Exception * @throws Exception
*/ */
private List<FileInfoModel> buildFileInfo(String agencyCode, List<String> attachments, private List<FileInfoModel> buildFileInfo(String agencyCode, List<String> attachments,
ContractDto contractDto, String fileCategory) throws Exception { ContractDto contractDto, String fileCategory) {
List<FileInfoModel> fileInfoModelList = new ArrayList<>(); List<FileInfoModel> fileInfoModelList = new ArrayList<>();
for (String attachment : attachments) { for (String attachment : attachments) {
FileInfoModel fileInfoModel = new FileInfoModel(); FileInfoModel fileInfoModel = new FileInfoModel();
...@@ -112,7 +112,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont ...@@ -112,7 +112,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
* @return * @return
* @throws Exception * @throws Exception
*/ */
private boolean saveAircraftFile(String agencyCode, ContractDto contractDto) throws Exception { private boolean saveAircraftFile(String agencyCode, ContractDto contractDto) {
List<FileInfoModel> fileInfoModelList = new ArrayList<FileInfoModel>(); List<FileInfoModel> fileInfoModelList = new ArrayList<FileInfoModel>();
// 获取附件信息 // 获取附件信息
if (!ValidationUtil.isEmpty(contractDto.getContractAttachment())) { if (!ValidationUtil.isEmpty(contractDto.getContractAttachment())) {
...@@ -137,7 +137,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont ...@@ -137,7 +137,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
* @return * @return
* @throws Exception * @throws Exception
*/ */
public ContractDto saveContractDto(String agencyCode, ContractDto contractDto) throws Exception { public ContractDto saveContractDto(String agencyCode, ContractDto contractDto) {
contractDto.setIsDelete(false); contractDto.setIsDelete(false);
// 保存合同基本信息 // 保存合同基本信息
contractDto = this.createWithModel(contractDto); contractDto = this.createWithModel(contractDto);
...@@ -154,7 +154,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont ...@@ -154,7 +154,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
* @return * @return
* @throws Exception * @throws Exception
*/ */
public ContractDto updateAircraft(String agencyCode, ContractDto model) throws Exception { public ContractDto updateAircraft(String agencyCode, ContractDto model) {
ContractDto oldModel = this.queryBySeq(model.getSequenceNbr()); ContractDto oldModel = this.queryBySeq(model.getSequenceNbr());
if (ValidationUtil.isEmpty(oldModel)) { if (ValidationUtil.isEmpty(oldModel)) {
throw new DataNotFound("找不到指定的合同信息."); throw new DataNotFound("找不到指定的合同信息.");
...@@ -206,7 +206,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont ...@@ -206,7 +206,7 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
* @throws Exception * @throws Exception
*/ */
@Transactional(rollbackFor = {Exception.class, BaseException.class}) @Transactional(rollbackFor = {Exception.class, BaseException.class})
public List<Long> multDeleteAircraft(String agencyCode, String ids) throws Exception { public List<Long> multDeleteAircraft(String agencyCode, String ids) {
List<Long> seqs = StringUtil.String2LongList(ids); List<Long> seqs = StringUtil.String2LongList(ids);
for (Long id : seqs) { for (Long id : seqs) {
//删除附件信息 //删除附件信息
......
//package com.yeejoin.amos.boot.module.common.biz.service.impl;
//
//
//import com.alibaba.fastjson.JSON;
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.yeejoin.amos.boot.biz.common.utils.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DataDictionaryDto;
//import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//import com.yeejoin.amos.boot.module.common.api.mapper.DataDictionaryMapper;
//import com.yeejoin.amos.boot.module.common.api.service.IDataDictionaryService;
//import org.typroject.tyboot.core.restful.utils.ResponseHelper;
//
//import java.util.Collection;
//import java.util.List;
//
///**
// * 数据字典 服务实现类
// *
// * @author tb
// * @date 2021-06-07
// */
//@Service
//public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, DataDictionary, DataDictionaryMapper> implements IDataDictionaryService {
// @Autowired
// RedisUtils redisUtils;
//
// @Value("${redis.cache.failure.time}")
// private long time;
//
//
// @Override
// public Object getFireChemical(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
// Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
// return obj;
// } else {
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
// "getName", "getParent", null);
// MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
// Me.setIsLeaf(false);
// Me.setChildren(menus);
// redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(Me), time);
// return Me;
// }
// }
//
// @Override
// public Object gwmcDataDictionary(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
// Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
// return obj;
// } else {
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
// redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
// return menus;
// }
// }
//
// public List<MenuFrom> getGWMCDataDictionary(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
// return menus;
//
// }
//}
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrSyncDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrSyncDto;
import com.yeejoin.amos.boot.module.common.api.enums.DataSyncTopicEnum; import com.yeejoin.amos.boot.module.common.api.enums.DataSyncTopicEnum;
...@@ -42,7 +43,7 @@ public class DataSyncServiceImpl implements IDataSyncService { ...@@ -42,7 +43,7 @@ public class DataSyncServiceImpl implements IDataSyncService {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
//站端人员信息同步 //站端人员信息同步
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.STATION_USER_UPDATE.getTopic(), JSONObject.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(DataSyncTopicEnum.STATION_USER_UPDATE.getTopic(), JSON.toJSONString(x).getBytes(), RuleConfig.DEFAULT_QOS, false);
} }
} }
...@@ -63,7 +64,7 @@ public class DataSyncServiceImpl implements IDataSyncService { ...@@ -63,7 +64,7 @@ public class DataSyncServiceImpl implements IDataSyncService {
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(DataSyncTopicEnum.EQM_PATROL_CREATED.getTopic(), message.getBytes(), RuleConfig.DEFAULT_QOS, false);
//站端人员信息删除同步 //站端人员信息删除同步
emqKeeper.getMqttClient().publish(DataSyncTopicEnum.STATION_USER_DELETE.getTopic(), JSONObject.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(DataSyncTopicEnum.STATION_USER_DELETE.getTopic(), JSON.toJSONString(orgUsrSyncDto).getBytes(), RuleConfig.DEFAULT_QOS, false);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -75,6 +76,6 @@ public class DataSyncServiceImpl implements IDataSyncService { ...@@ -75,6 +76,6 @@ public class DataSyncServiceImpl implements IDataSyncService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("topic", topic); map.put("topic", topic);
map.put("data", object); map.put("data", object);
return JSONObject.toJSONString(map); return JSON.toJSONString(map);
} }
} }
...@@ -33,8 +33,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IDutyCarService; ...@@ -33,8 +33,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IDutyCarService;
@Service @Service
public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCarService { public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCarService {
@Autowired
DynamicFormInstanceServiceImpl dynamicFormInstanceService;
@Autowired @Autowired
FirefightersMapper firefightersMapper; FirefightersMapper firefightersMapper;
...@@ -47,14 +46,21 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -47,14 +46,21 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
@Autowired @Autowired
EquipFeignClient equipFeign; EquipFeignClient equipFeign;
@Autowired
DutyPersonShiftMapper dutyPersonShiftMapper;
@Override @Override
public String getGroupCode() { public String getGroupCode() {
return "dutyCar"; return "dutyCar";
} }
private static final String USERNAME="userName";
private static final String POSTTYPENAME="postTypeName";
private static final String TEAMNAME="teamName";
private static final String CARNAME="carName";
private static final String CARSTATUS="carStatus";
private static final String CARID="carId";
@Override @Override
public DutyCarDto save(DutyCarDto dutyCarDto) { public DutyCarDto save(DutyCarDto dutyCarDto) {
// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14 // BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14
...@@ -93,17 +99,14 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -93,17 +99,14 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
return dutyCarDto; return dutyCarDto;
} }
private void buildFormInstanceData(Long instanceId, Map<String, Object> map, DynamicFormColumn column,
DynamicFormInstance formInstance) {
fillFormInstanceData(instanceId, map, column, formInstance, sequence.nextId());
}
@Override @Override
public JSONObject isFireCarDriver() { public JSONObject isFireCarDriver() {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put("isDriver", false); result.put("isDriver", false);
result.put("carStatus", ""); result.put(CARSTATUS, "");
result.put("carId", ""); result.put(CARID, "");
String loginUserId = RequestContext.getExeUserId(); String loginUserId = RequestContext.getExeUserId();
// 根据登陆人id查询对应消防人员 // 根据登陆人id查询对应消防人员
...@@ -133,18 +136,18 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -133,18 +136,18 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
} }
result.put("isDriver", true); result.put("isDriver", true);
result.put("carId", personList.get(0).get("carId")); result.put(CARID, personList.get(0).get(CARID));
ResponseModel<Map<String, Object>> resultModel = equipFeignClient ResponseModel<Map<String, Object>> resultModel = equipFeignClient
.queryCarSimpleInfoById((Long) personList.get(0).get("carId")); .queryCarSimpleInfoById((Long) personList.get(0).get(CARID));
Map<String, Object> carInfo = resultModel.getResult(); Map<String, Object> carInfo = resultModel.getResult();
result.put("carStatus", carInfo.get("carStatus")); result.put(CARSTATUS, carInfo.get(CARSTATUS));
return result; return result;
} }
public Object getSchedulingDutyForSpecifyDate(String dutyDay, Long shiftId, String postType, String fieldCode) { public Object getSchedulingDutyForSpecifyDate(String dutyDay, Long shiftId, String postType, String fieldCode) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(dutyDay, List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(dutyDay,
this.getGroupCode(), "carId", "carName", "teamName","result.carId"); this.getGroupCode(), CARID, CARNAME, TEAMNAME,"result.carId");
if(equipmentList==null || equipmentList.size()<1 || equipmentList.get(0)==null) { if(equipmentList==null || equipmentList.size()<1 || equipmentList.get(0)==null) {
return null; return null;
} }
...@@ -152,18 +155,17 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -152,18 +155,17 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
for (Map<String, Object> map : equipmentList) { for (Map<String, Object> map : equipmentList) {
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
LinkedHashMap<String, Object> titleMap_1 =new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> titleMap_1 =new LinkedHashMap<String, Object>();
titleMap_1.put("消防车辆", map.get("carName").toString()); titleMap_1.put("消防车辆", map.get(CARNAME).toString());
if(map.containsKey("carName") && map.get("carName") != null){ if(map.containsKey(CARNAME) && map.get(CARNAME) != null){
titleMap_1.put("消防车辆", map.get("carName").toString()); titleMap_1.put("消防车辆", map.get(CARNAME).toString());
} }
resultList.add(titleMap_1); resultList.add(titleMap_1);
LinkedHashMap<String, Object> titleMap_2 =new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> titleMap_2 =new LinkedHashMap<String, Object>();
//titleMap_2.put("单位/部门", map.get("teamName").toString()); if(map.containsKey(TEAMNAME) && map.get(TEAMNAME) != null){
if(map.containsKey("teamName") && map.get("teamName") != null){ titleMap_2.put("单位/部门", map.get(TEAMNAME).toString());
titleMap_2.put("单位/部门", map.get("teamName").toString());
} }
resultList.add(titleMap_2); resultList.add(titleMap_2);
String carId =map.get("carId").toString(); String carId =map.get(CARID).toString();
Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay, Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay,
this.getGroupCode(), carId); this.getGroupCode(), carId);
if(instanceMap==null) { if(instanceMap==null) {
...@@ -173,36 +175,24 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -173,36 +175,24 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
if (StringUtils.isNotBlank(instanceId)) { if (StringUtils.isNotBlank(instanceId)) {
String[] instanceIds = instanceId.split(","); String[] instanceIds = instanceId.split(",");
// List<Map<String, Object>> dutyList = dutyPersonShiftMapper.getDutyForSpecifyDate(dutyDay);
// if(dutyList!=null && dutyList.size()>0) {
// for (Map<String, Object> dutyDetail : dutyList) {
// if(!dutyDetail.containsKey("name")) {
// continue;
// }
// 获取当前装备ID下的排版数据 // 获取当前装备ID下的排版数据
List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper.getPositionStaffDutyForSpecifyDate(dutyDay, List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper.getPositionStaffDutyForSpecifyDate(dutyDay,
this.getGroupCode(), instanceIds,null, fieldCode); this.getGroupCode(), instanceIds,null, fieldCode);
/*if(specifyDateList==null || specifyDateList.size() < 1 || specifyDateList.get(0)==null) {
continue;
}*/
LinkedHashMap<String, Object> infoMap_1 =new LinkedHashMap<String, Object>();
//取消掉班次的显示---2022-01-16 by chenhao ---start //取消掉班次的显示---2022-01-16 by chenhao ---start
//infoMap_1.put(dutyDetail.get("name").toString(), "");
//resultList.add(infoMap_1);
//取消掉班次的显示---2022-01-16 by chenhao ---end //取消掉班次的显示---2022-01-16 by chenhao ---end
if (specifyDateList.size()>0 && specifyDateList != null) { if (specifyDateList.size()>0 && specifyDateList != null) {
for (Map<String, Object> specify : specifyDateList) { for (Map<String, Object> specify : specifyDateList) {
LinkedHashMap<String, Object> infoMap_2 = new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> infoMap_2 = new LinkedHashMap<String, Object>();
// infoMap_2.put(specify.get("postTypeName").toString(),specify.get("userName").toString());
// resultList.add(infoMap_2); if (specify.containsKey(POSTTYPENAME) && specify.get(POSTTYPENAME) != null && specify.containsKey(USERNAME) && specify.get(USERNAME) != null) {
if (specify.containsKey("postTypeName") && specify.get("postTypeName") != null && specify.containsKey("userName") && specify.get("userName") != null) { infoMap_2.put(specify.get(POSTTYPENAME).toString(), specify.get(USERNAME).toString());
infoMap_2.put(specify.get("postTypeName").toString(), specify.get("userName").toString());
resultList.add(infoMap_2); resultList.add(infoMap_2);
} }
} }
} }
// }
//}
} }
detailList.add(resultList); detailList.add(resultList);
} }
...@@ -211,10 +201,10 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -211,10 +201,10 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
@Override @Override
public int getDutyCarCount(Long carId) { public int getDutyCarCount(Long carId) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(), List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(),
this.getGroupCode(), "carId", "carName", "teamName",""); this.getGroupCode(), CARID, CARNAME, TEAMNAME,"");
int count =0; int count =0;
for (Map<String, Object> map : equipmentList) { for (Map<String, Object> map : equipmentList) {
if(map.containsKey("carId") && map.get("carId").equals(Long.toString(carId))) { if(map.containsKey(CARID) && map.get(CARID).equals(Long.toString(carId))) {
count++; count++;
} }
} }
...@@ -224,10 +214,10 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -224,10 +214,10 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
@Override @Override
public List<Map<String, Object>> getDutyCaruser(Long carId) { public List<Map<String, Object>> getDutyCaruser(Long carId) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(), List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(),
this.getGroupCode(), "carId", "carName", "teamName",""); this.getGroupCode(), CARID, CARNAME, TEAMNAME,"");
equipmentList = equipmentList.stream().filter((e) -> equipmentList = equipmentList.stream().filter((e) ->
e.containsKey("carId") && e.get("carId").equals(Long.toString(carId)) e.containsKey(CARID) && e.get(CARID).equals(Long.toString(carId))
).collect(Collectors.toList()); ).collect(Collectors.toList());
return equipmentList; return equipmentList;
...@@ -240,7 +230,7 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -240,7 +230,7 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay, Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay,
this.getGroupCode(), carId.toString()); this.getGroupCode(), carId.toString());
if(instanceMap==null) { if(instanceMap==null) {
return null; return specifyDateList;
} }
String instanceId = instanceMap.get("instanceIds").toString(); String instanceId = instanceMap.get("instanceIds").toString();
if (StringUtils.isNotBlank(instanceId)) { if (StringUtils.isNotBlank(instanceId)) {
......
...@@ -16,7 +16,6 @@ import org.typroject.tyboot.core.foundation.utils.Bean; ...@@ -16,7 +16,6 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingDto; import com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto; import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDutyFireFightingService; import com.yeejoin.amos.boot.module.common.api.service.IDutyFireFightingService;
@Service @Service
...@@ -25,8 +24,9 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement ...@@ -25,8 +24,9 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
@Autowired @Autowired
FireStationServiceImpl fireStationServiceImpl; FireStationServiceImpl fireStationServiceImpl;
@Autowired private static final String USERNAME="userName";
DutyPersonShiftMapper dutyPersonShiftMapper; private static final String POSTTYPENAME="postTypeName";
private static final String TEAMNAME="teamName";
@Autowired @Autowired
DynamicFormInstanceServiceImpl alertFormValueServiceImpl; DynamicFormInstanceServiceImpl alertFormValueServiceImpl;
...@@ -57,7 +57,7 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement ...@@ -57,7 +57,7 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
} }
public Object getSchedulingDutyForSpecifyDate(String dutyDay, Long shiftId, String postType, String fieldCode) { public Object getSchedulingDutyForSpecifyDate(String dutyDay, Long shiftId, String postType, String fieldCode) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(dutyDay, List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(dutyDay,
this.getGroupCode(), "fireFightingId", "fireFighting", "teamName","result.fireFightingId"); this.getGroupCode(), "fireFightingId", "fireFighting", TEAMNAME,"result.fireFightingId");
if(equipmentList==null || equipmentList.size()<1 || equipmentList.get(0)==null) { if(equipmentList==null || equipmentList.size()<1 || equipmentList.get(0)==null) {
return null; return null;
} }
...@@ -68,8 +68,8 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement ...@@ -68,8 +68,8 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
titleMap_1.put("微型消防站", map.get("fireFighting").toString()); titleMap_1.put("微型消防站", map.get("fireFighting").toString());
resultList.add(titleMap_1); resultList.add(titleMap_1);
LinkedHashMap<String, Object> titleMap_2 =new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> titleMap_2 =new LinkedHashMap<String, Object>();
if(map.containsKey("teamName") && map.get("teamName") != null){ if(map.containsKey(TEAMNAME) && map.get(TEAMNAME) != null){
titleMap_2.put("单位/部门", map.get("teamName").toString()); titleMap_2.put("单位/部门", map.get(TEAMNAME).toString());
} }
resultList.add(titleMap_2); resultList.add(titleMap_2);
String carId =map.get("fireFightingId").toString(); String carId =map.get("fireFightingId").toString();
...@@ -82,29 +82,21 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement ...@@ -82,29 +82,21 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
if (StringUtils.isNotBlank(instanceId)) { if (StringUtils.isNotBlank(instanceId)) {
String[] instanceIds = instanceId.split(","); String[] instanceIds = instanceId.split(",");
// List<Map<String, Object>> dutyList = dutyPersonShiftMapper.getDutyForSpecifyDate(dutyDay);
// if(dutyList!=null && dutyList.size()>0) {
// for (Map<String, Object> dutyDetail : dutyList) {
// if(!dutyDetail.containsKey("name")) {
// continue;
// }
// 获取当前装备ID下的排版数据 // 获取当前装备ID下的排版数据
List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper.getPositionStaffDutyForSpecifyDate(dutyDay, List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper.getPositionStaffDutyForSpecifyDate(dutyDay,
this.getGroupCode(), instanceIds,null, fieldCode); this.getGroupCode(), instanceIds,null, fieldCode);
if(specifyDateList==null || specifyDateList.size() < 1 || specifyDateList.get(0)==null) { if(specifyDateList==null || specifyDateList.size() < 1 || specifyDateList.get(0)==null) {
continue; continue;
} }
// LinkedHashMap<String, Object> infoMap_1 =new LinkedHashMap<String, Object>();
// infoMap_1.put(dutyDetail.get("name").toString(), "");
// resultList.add(infoMap_1);
for (Map<String, Object> specify : specifyDateList) { for (Map<String, Object> specify : specifyDateList) {
LinkedHashMap<String, Object> infoMap_2 =new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> infoMap_2 =new LinkedHashMap<String, Object>();
if( specify.containsKey("postTypeName")&& specify.get("postTypeName")!=null && specify.containsKey("userName")&& specify.get("userName")!=null ) { if( specify.containsKey(POSTTYPENAME)&& specify.get(POSTTYPENAME)!=null && specify.containsKey(USERNAME)&& specify.get(USERNAME)!=null ) {
infoMap_2.put(specify.get("postTypeName").toString(),specify.get("userName").toString()); infoMap_2.put(specify.get(POSTTYPENAME).toString(),specify.get(USERNAME).toString());
resultList.add(infoMap_2); resultList.add(infoMap_2);
} }
// }
// }
} }
} }
detailList.add(resultList); detailList.add(resultList);
...@@ -122,7 +114,7 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement ...@@ -122,7 +114,7 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
for (DynamicFormInstanceDto dto : dyList) { for (DynamicFormInstanceDto dto : dyList) {
if ("positionType".equals(dto.getFieldCode())) { if ("positionType".equals(dto.getFieldCode())) {
map.put("postType", dto.getFieldValue()); map.put("postType", dto.getFieldValue());
map.put("postTypeName", dto.getFieldValueLabel()); map.put(POSTTYPENAME, dto.getFieldValueLabel());
break; break;
} }
} }
......
...@@ -5,31 +5,28 @@ import java.util.HashMap; ...@@ -5,31 +5,28 @@ import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
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.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.api.dto.DutyFirstAidDto; import com.yeejoin.amos.boot.module.common.api.dto.DutyFirstAidDto;
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.mapper.DutyPersonShiftMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDutyFirstAidService; import com.yeejoin.amos.boot.module.common.api.service.IDutyFirstAidService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
@Service @Service
public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements IDutyFirstAidService { public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements IDutyFirstAidService {
@Autowired
DutyPersonShiftMapper dutyPersonShiftMapper;
@Autowired @Autowired
OrgUsrServiceImpl orgUsrServiceImpl; OrgUsrServiceImpl orgUsrServiceImpl;
@Autowired private static final String POSTTYPENAME="postTypeName";
DataDictionaryServiceImpl dataDictionaryService; private static final String USERNAME= "userName";
public String getGroupCode() { public String getGroupCode() {
return "dutyFirstAid"; return "dutyFirstAid";
...@@ -39,7 +36,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -39,7 +36,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
public DutyFirstAidDto save(DutyFirstAidDto dto) { public DutyFirstAidDto save(DutyFirstAidDto dto) {
Map<String, Object> fireStationDtoResult = dutyPersonShiftMapper.getFireTeamBySequenceNbr(Long.parseLong(dto.getFirstAidId())); Map<String, Object> fireStationDtoResult = dutyPersonShiftMapper.getFireTeamBySequenceNbr(Long.parseLong(dto.getFirstAidId()));
if(fireStationDtoResult==null || !fireStationDtoResult.containsKey("name")) { if(fireStationDtoResult==null || !fireStationDtoResult.containsKey("name")) {
throw new RuntimeException("此120急救站不存在"); throw new BadRequest("此120急救站不存在");
} }
dto.setFirstAid(fireStationDtoResult.get("name").toString()); dto.setFirstAid(fireStationDtoResult.get("name").toString());
Map<String, Object> map = Bean.BeantoMap(dto); Map<String, Object> map = Bean.BeantoMap(dto);
...@@ -66,14 +63,9 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -66,14 +63,9 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
List<Object> detailList = new ArrayList<Object>(); List<Object> detailList = new ArrayList<Object>();
for (Map<String, Object> map : equipmentList) { for (Map<String, Object> map : equipmentList) {
List<Object> resultList = new ArrayList<Object>(); List<Object> resultList = new ArrayList<Object>();
//LinkedHashMap<String, Object> titleMap_1 = new LinkedHashMap<String, Object>();
//titleMap_1.put("120急救站", map.get("firstAid").toString());
resultList.add( map.get("firstAid").toString()); resultList.add( map.get("firstAid").toString());
// LinkedHashMap<String, Object> titleMap_2 = new LinkedHashMap<String, Object>();
// if(map.containsKey("teamName") && map.get("teamName") != null){
// titleMap_2.put("单位/部门", map.get("teamName").toString());
// }
// resultList.add(titleMap_2);
String carId = map.get("firstAidId").toString(); String carId = map.get("firstAidId").toString();
Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay, Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay,
this.getGroupCode(), carId); this.getGroupCode(), carId);
...@@ -84,12 +76,6 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -84,12 +76,6 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
if (StringUtils.isNotBlank(instanceId)) { if (StringUtils.isNotBlank(instanceId)) {
String[] instanceIds = instanceId.split(","); String[] instanceIds = instanceId.split(",");
// List<Map<String, Object>> dutyList = dutyPersonShiftMapper.getDutyForSpecifyDate(dutyDay);
// if (dutyList != null && dutyList.size() > 0) {
// for (Map<String, Object> dutyDetail : dutyList) {
// if (!dutyDetail.containsKey("name")) {
// continue;
// }
// 获取当前装备ID下的排版数据 // 获取当前装备ID下的排版数据
List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper
.getPositionStaffDutyForSpecifyDate(dutyDay, this.getGroupCode(), instanceIds, .getPositionStaffDutyForSpecifyDate(dutyDay, this.getGroupCode(), instanceIds,
...@@ -97,20 +83,15 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -97,20 +83,15 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
if (specifyDateList == null || specifyDateList.size() < 1 || specifyDateList.get(0) == null) { if (specifyDateList == null || specifyDateList.size() < 1 || specifyDateList.get(0) == null) {
continue; continue;
} }
// LinkedHashMap<String, Object> infoMap_1 = new LinkedHashMap<String, Object>();
// infoMap_1.put(dutyDetail.get("name").toString(), "");
// resultList.add(infoMap_1);
for (Map<String, Object> specify : specifyDateList) { for (Map<String, Object> specify : specifyDateList) {
LinkedHashMap<String, Object> infoMap_2 = new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> infoMap_2 = new LinkedHashMap<String, Object>();
// infoMap_2.put(specify.get("postTypeName").toString(), specify.get("userName").toString());
// resultList.add(infoMap_2); if( specify.containsKey(POSTTYPENAME)&& specify.get(POSTTYPENAME)!=null && specify.containsKey(USERNAME)&& specify.get(USERNAME)!=null ) {
if( specify.containsKey("postTypeName")&& specify.get("postTypeName")!=null && specify.containsKey("userName")&& specify.get("userName")!=null ) { infoMap_2.put(specify.get(POSTTYPENAME).toString(),specify.get(USERNAME).toString());
infoMap_2.put(specify.get("postTypeName").toString(),specify.get("userName").toString());
resultList.add(infoMap_2); resultList.add(infoMap_2);
} }
// }
//
// }
} }
} }
detailList.add(resultList); detailList.add(resultList);
...@@ -128,7 +109,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -128,7 +109,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
List<String> companyNameList = new ArrayList<String>(); List<String> companyNameList = new ArrayList<String>();
String firstAidCompanyId = dutyPersonShiftMapper.getFirstAidCompanyId(); String firstAidCompanyId = dutyPersonShiftMapper.getFirstAidCompanyId();
if (firstAidCompanyId != "" && firstAidCompanyId != null){ if (!"".equals(firstAidCompanyId) && firstAidCompanyId != null){
ids.add(firstAidCompanyId); ids.add(firstAidCompanyId);
OrgUsr companyDetail = orgUsrServiceImpl.getDetailById(Long.parseLong(firstAidCompanyId)); OrgUsr companyDetail = orgUsrServiceImpl.getDetailById(Long.parseLong(firstAidCompanyId));
String companyNameString = companyDetail.getBizOrgName()+ "@" +companyDetail.getSequenceNbr(); String companyNameString = companyDetail.getBizOrgName()+ "@" +companyDetail.getSequenceNbr();
...@@ -144,7 +125,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -144,7 +125,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
String userNameString =m.getBizOrgName()+ "@" +m.getSequenceNbr(); String userNameString =m.getBizOrgName()+ "@" +m.getSequenceNbr();
userNameList.add(userNameString); userNameList.add(userNameString);
}); });
detailMap.put("userName", userNameList); detailMap.put(USERNAME, userNameList);
} }
//单位默认为 消防救援保障部,不可编辑。 //单位默认为 消防救援保障部,不可编辑。
...@@ -157,7 +138,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID ...@@ -157,7 +138,7 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
dataDicSimpleList.add(dataDic); dataDicSimpleList.add(dataDic);
}); });
detailMap.put("postTypeName",dataDicSimpleList); detailMap.put(POSTTYPENAME,dataDicSimpleList);
List<Map<String, Object>> list = dutyPersonShiftMapper.getFirstAidForTypeCodeAndCompanyId( List<Map<String, Object>> list = dutyPersonShiftMapper.getFirstAidForTypeCodeAndCompanyId(
Long.parseLong(firstAidCompanyId)); Long.parseLong(firstAidCompanyId));
list.stream().forEach(m -> { list.stream().forEach(m -> {
......
...@@ -10,6 +10,7 @@ import java.util.Map; ...@@ -10,6 +10,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto; import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto;
import com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper; import com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper;
...@@ -44,11 +45,17 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut ...@@ -44,11 +45,17 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
@Autowired @Autowired
EquipFeignClient equipFeign; EquipFeignClient equipFeign;
@Autowired
DutyPersonShiftMapper dutyPersonShiftMapper;
@Override
private static final String USERNAME="userName";
private static final String DEPTID="deptId";
private static final String DEPTNAME="deptName";
private static final String POSTTYPENAME="postTypeName";
private static final String WXXFZ="微型消防站";
private static final String VALUE="value";
@Override
public String getGroupCode(){ public String getGroupCode(){
return "dutyPerson"; return "dutyPerson";
} }
...@@ -240,15 +247,15 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut ...@@ -240,15 +247,15 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
for(DynamicFormInstance t : instances) { for(DynamicFormInstance t : instances) {
if("userId".equals(t.getFieldCode())) { if("userId".equals(t.getFieldCode())) {
dto.setUserId(t.getFieldValue()); dto.setUserId(t.getFieldValue());
} else if("userName".equals(t.getFieldCode())) { } else if(USERNAME.equals(t.getFieldCode())) {
dto.setUserName(t.getFieldValue()); dto.setUserName(t.getFieldValue());
} else if("deptId".equals(t.getFieldCode())) { } else if(DEPTID.equals(t.getFieldCode())) {
dto.setDeptId(t.getFieldValue()); dto.setDeptId(t.getFieldValue());
} else if("deptName".equals(t.getFieldCode())) { } else if(DEPTNAME.equals(t.getFieldCode())) {
dto.setDeptName(t.getFieldValue()); dto.setDeptName(t.getFieldValue());
} else if("postType".equals(t.getFieldCode())) { } else if("postType".equals(t.getFieldCode())) {
dto.setPostType(t.getFieldValue()); dto.setPostType(t.getFieldValue());
} else if("postTypeName".equals(t.getFieldCode())) { } else if(POSTTYPENAME.equals(t.getFieldCode())) {
dto.setPostTypeName(t.getFieldValue()); dto.setPostTypeName(t.getFieldValue());
} else if("dutyArea".equals(t.getFieldCode())) { } else if("dutyArea".equals(t.getFieldCode())) {
dto.setDutyArea(t.getFieldValue()); dto.setDutyArea(t.getFieldValue());
...@@ -277,13 +284,13 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType ...@@ -277,13 +284,13 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
List<Object> fieldsList= new ArrayList<Object>(); List<Object> fieldsList= new ArrayList<Object>();
List<Object>infoList= new ArrayList<Object>(); List<Object>infoList= new ArrayList<Object>();
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
map.put("name", "微型消防站"); map.put("name", WXXFZ);
map.put("value",i.get("deptName").toString()); map.put(VALUE,i.get(DEPTNAME).toString());
map.put("id","1"); map.put("id","1");
fieldsList.add(map); fieldsList.add(map);
map.clear(); map.clear();
map.put("name", "微型消防站"); map.put("name", WXXFZ);
map.put("value",i.get("deptName").toString()); map.put(VALUE,i.get(DEPTNAME).toString());
}); });
...@@ -295,26 +302,25 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType ...@@ -295,26 +302,25 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
public static void main(String[] args) { public static void main(String[] args) {
String ssString="[{\"teamName\":\"发士大夫大师傅\",\"shiftId\":\"1437585222345547778\",\"carName\":\"特种消防车(46586458)\",\"postType\":\"\",\"dutyArea\":\"测试控制室\",\"dutyAreaId\":\"1382166994773610497\",\"postTypeName\":\"\",\"userName\":\"故障报修\",\"userId\":\"1428653787706347522\",\"dutyDate\":\"2021-10-12 00:00:00\",\"carId\":\"1432590747256770562\",\"shiftName\":\"晚班\",\"instanceId\":\"1447490875843239937\",\"teamId\":\"1404995716634050561\",\"groupCode\":\"dutyCar\"},{\"teamName\":\"发士大夫大师傅\",\"shiftId\":\"1432883228491972609\",\"carName\":\"特种消防车(46586458)\",\"postType\":\"\",\"dutyArea\":\"消防小室-shg\",\"dutyAreaId\":\"1382530839199387650\",\"postTypeName\":\"\",\"userName\":\"78678676\",\"userId\":\"1435886728803000322\",\"dutyDate\":\"2021-10-12 00:00:00\",\"carId\":\"1432590747256770562\",\"shiftName\":\"夜班\",\"instanceId\":\"1447490812534415361\",\"teamId\":\"1404995716634050561\",\"groupCode\":\"dutyCar\"},{\"teamName\":\"发士大夫大师傅\",\"shiftId\":\"1432883228491972609\",\"carName\":\"特种消防车(46586458)\",\"postType\":\"1\",\"dutyArea\":\"建构住-shg\",\"dutyAreaId\":\"1382157469081407490\",\"postTypeName\":\"指挥员\",\"userName\":\"张小四6\",\"userId\":\"1435072204550225922\",\"dutyDate\":\"2021-10-12 00:00:00\",\"carId\":\"1432590747256770562\",\"shiftName\":\"夜班\",\"instanceId\":\"1447490699435008001\",\"teamId\":\"1404995716634050561\",\"groupCode\":\"dutyCar\"}]\r\n" String ssString="[{\"teamName\":\"发士大夫大师傅\",\"shiftId\":\"1437585222345547778\",\"carName\":\"特种消防车(46586458)\",\"postType\":\"\",\"dutyArea\":\"测试控制室\",\"dutyAreaId\":\"1382166994773610497\",\"postTypeName\":\"\",\"userName\":\"故障报修\",\"userId\":\"1428653787706347522\",\"dutyDate\":\"2021-10-12 00:00:00\",\"carId\":\"1432590747256770562\",\"shiftName\":\"晚班\",\"instanceId\":\"1447490875843239937\",\"teamId\":\"1404995716634050561\",\"groupCode\":\"dutyCar\"},{\"teamName\":\"发士大夫大师傅\",\"shiftId\":\"1432883228491972609\",\"carName\":\"特种消防车(46586458)\",\"postType\":\"\",\"dutyArea\":\"消防小室-shg\",\"dutyAreaId\":\"1382530839199387650\",\"postTypeName\":\"\",\"userName\":\"78678676\",\"userId\":\"1435886728803000322\",\"dutyDate\":\"2021-10-12 00:00:00\",\"carId\":\"1432590747256770562\",\"shiftName\":\"夜班\",\"instanceId\":\"1447490812534415361\",\"teamId\":\"1404995716634050561\",\"groupCode\":\"dutyCar\"},{\"teamName\":\"发士大夫大师傅\",\"shiftId\":\"1432883228491972609\",\"carName\":\"特种消防车(46586458)\",\"postType\":\"1\",\"dutyArea\":\"建构住-shg\",\"dutyAreaId\":\"1382157469081407490\",\"postTypeName\":\"指挥员\",\"userName\":\"张小四6\",\"userId\":\"1435072204550225922\",\"dutyDate\":\"2021-10-12 00:00:00\",\"carId\":\"1432590747256770562\",\"shiftName\":\"夜班\",\"instanceId\":\"1447490699435008001\",\"teamId\":\"1404995716634050561\",\"groupCode\":\"dutyCar\"}]\r\n"
+ ""; + "";
List<Map> jjList= JSONArray.parseArray(ssString, Map.class); List<Map> jjList= JSON.parseArray(ssString, Map.class);
Map< String, String> map20 = new HashMap<String, String>(); Map< String, String> map20 = new HashMap<String, String>();
jjList.forEach(i->{ jjList.forEach(i->{
List<Object> fieldsList= new ArrayList<Object>(); List<Object> fieldsList= new ArrayList<Object>();
List<Object>infoList= new ArrayList<Object>(); List<Object>infoList= new ArrayList<Object>();
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
map.put("name", "微型消防站"); map.put("name", WXXFZ);
map.put("value",i.get("carName").toString()); map.put(VALUE,i.get("carName").toString());
map.put("id","1"); map.put("id","1");
fieldsList.add(map); fieldsList.add(map);
Map<String, String> map1 = new HashMap<String, String>(); Map<String, String> map1 = new HashMap<String, String>();
map1.put("name", "微型消防站"); map1.put("name", WXXFZ);
map1.put("value",i.get("teamName").toString()); map1.put(VALUE,i.get("teamName").toString());
map1.put("id","2"); map1.put("id","2");
fieldsList.add(map1); fieldsList.add(map1);
if(!map20.containsKey(i.get("shiftName").toString())) { if(!map20.containsKey(i.get("shiftName").toString())) {
map20.put(ssString, ssString); map20.put(ssString, ssString);
} }
System.out.println("ssssssssss");
}); });
...@@ -342,7 +348,7 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType ...@@ -342,7 +348,7 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
public Object getSchedulingDutyForSpecifyDate(String dutyDay, Long shiftId, String postType, String fieldCode) { public Object getSchedulingDutyForSpecifyDate(String dutyDay, Long shiftId, String postType, String fieldCode) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getNewEquipmentForSpecifyDate(dutyDay, List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getNewEquipmentForSpecifyDate(dutyDay,
this.getGroupCode(), "deptId", "deptName", "result.deptId"); this.getGroupCode(), DEPTID, DEPTNAME, "result.deptId");
if (equipmentList == null || equipmentList.size() < 1 || equipmentList.get(0) == null) { if (equipmentList == null || equipmentList.size() < 1 || equipmentList.get(0) == null) {
return null; return null;
} }
...@@ -350,10 +356,10 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType ...@@ -350,10 +356,10 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
for (Map<String, Object> map : equipmentList) { for (Map<String, Object> map : equipmentList) {
List<Object> resultList = new ArrayList<Object>(); List<Object> resultList = new ArrayList<Object>();
LinkedHashMap<String, Object> titleMap_2 = new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> titleMap_2 = new LinkedHashMap<String, Object>();
if(map.containsKey("deptName") && map.get("deptName") != null){ if(map.containsKey(DEPTNAME) && map.get(DEPTNAME) != null){
resultList.add( map.get("deptName").toString()); resultList.add( map.get(DEPTNAME).toString());
} }
String carId = map.get("deptId").toString(); String carId = map.get(DEPTID).toString();
Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay, Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay,
this.getGroupCode(), carId); this.getGroupCode(), carId);
if (instanceMap == null) { if (instanceMap == null) {
...@@ -372,8 +378,8 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType ...@@ -372,8 +378,8 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
} }
for (Map<String, Object> specify : specifyDateList) { for (Map<String, Object> specify : specifyDateList) {
LinkedHashMap<String, Object> infoMap_2 = new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> infoMap_2 = new LinkedHashMap<String, Object>();
if( specify.containsKey("postTypeName")&& specify.get("postTypeName")!=null && specify.containsKey("userName")&& specify.get("userName")!=null ) { if( specify.containsKey(POSTTYPENAME)&& specify.get(POSTTYPENAME)!=null && specify.containsKey(USERNAME)&& specify.get(USERNAME)!=null ) {
infoMap_2.put(specify.get("postTypeName").toString(),specify.get("userName").toString()); infoMap_2.put(specify.get(POSTTYPENAME).toString(),specify.get(USERNAME).toString());
resultList.add(infoMap_2); resultList.add(infoMap_2);
} }
} }
......
...@@ -8,6 +8,7 @@ import java.util.Date; ...@@ -8,6 +8,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom; import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -114,8 +115,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD ...@@ -114,8 +115,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
queryWrappercolumnMap.orderByAsc("sort_num"); queryWrappercolumnMap.orderByAsc("sort_num");
Collection<DataDictionary> list = iDataDictionaryService.list(queryWrappercolumnMap); Collection<DataDictionary> list = iDataDictionaryService.list(queryWrappercolumnMap);
// List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
...@@ -149,7 +149,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD ...@@ -149,7 +149,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
String type = ObjectUtils.isEmpty(columnConfigJson) ? "" : columnConfigJson.get("type").toString(); String type = ObjectUtils.isEmpty(columnConfigJson) ? "" : columnConfigJson.get("type").toString();
switch (type) { switch (type) {
case "custom": case "custom":
List<SelectItem> selectItems = JSONArray.parseArray(columnConfigJson.get("data").toString(), SelectItem.class); List<SelectItem> selectItems = JSON.parseArray(columnConfigJson.get("data").toString(), SelectItem.class);
vo = new DynamicFormInitDto(dynamicForm.getFieldCode(), dynamicForm.getFieldName(), vo = new DynamicFormInitDto(dynamicForm.getFieldCode(), dynamicForm.getFieldName(),
dynamicForm.getFieldType(), new SelectItems(selectItems), dynamicForm.getColumnConfig().toJSONString()); dynamicForm.getFieldType(), new SelectItems(selectItems), dynamicForm.getColumnConfig().toJSONString());
dynamicFormValue = new DynamicFormInstanceDto(); dynamicFormValue = new DynamicFormInstanceDto();
......
...@@ -46,6 +46,9 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -46,6 +46,9 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
@Autowired @Autowired
HttpServletRequest request; HttpServletRequest request;
private static final String QUERYSTRATEGY= "queryStrategy";
private static final String FIELDCODE= "fieldCode";
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -103,7 +106,7 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -103,7 +106,7 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
List<DynamicFormInstance> list = this.queryByInstanceId(instanceId); List<DynamicFormInstance> list = this.queryByInstanceId(instanceId);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode)); List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode));
Map<String, Object> instanceMap = Bean.listToMap(list, "fieldCode", "fieldValue", DynamicFormInstance.class); Map<String, Object> instanceMap = Bean.listToMap(list, FIELDCODE, "fieldValue", DynamicFormInstance.class);
for (DynamicFormColumn optionModel : columns) { for (DynamicFormColumn optionModel : columns) {
Optional<DynamicFormInstance> first = list.stream().filter(i -> i.getFieldCode().equals(optionModel.getFieldCode())).findFirst(); Optional<DynamicFormInstance> first = list.stream().filter(i -> i.getFieldCode().equals(optionModel.getFieldCode())).findFirst();
if (first.isPresent()){ if (first.isPresent()){
...@@ -132,19 +135,19 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -132,19 +135,19 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
public IPage<Map<String, Object>> pageList(int current, int size, String groupCode) { public IPage<Map<String, Object>> pageList(int current, int size, String groupCode) {
Map<String, String> params = this.getRequestParamMap(); Map<String, String> params = this.getRequestParamMap();
List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode)); List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode));
Map<String, Object> fieldCodes = Bean.listToMap(columns, "fieldCode", "queryStrategy", DynamicFormColumn.class); Map<String, Object> fieldCodes = Bean.listToMap(columns, FIELDCODE, QUERYSTRATEGY, DynamicFormColumn.class);
Page page = new Page(); Page<Map<String, Object>> page = new Page<Map<String, Object>>();
if (current > 0){ if (current > 0){
page.setCurrent((long) (current - 1) *size); page.setCurrent((long) (current - 1) *size);
page.setSize(size); page.setSize(size);
} }
if (!params.isEmpty()&&params !=null){
if (!params.get("sort").isEmpty() && params.get("sort") != null){ if (!params.isEmpty()&&!params.get("sort").isEmpty() && params.get("sort") != null){
String[] sorts = params.get("sort").split(","); String[] sorts = params.get("sort").split(",");
params.put("date",sorts[0]); params.put("date",sorts[0]);
params.put("lift",sorts[1]); params.put("lift",sorts[1]);
} }
}
return this.getBaseMapper().pageList(page, RequestContext.getAppKey(), fieldCodes, groupCode, params); return this.getBaseMapper().pageList(page, RequestContext.getAppKey(), fieldCodes, groupCode, params);
} }
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14 // 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
...@@ -155,8 +158,8 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -155,8 +158,8 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
params.put("endTime", endDate); params.put("endTime", endDate);
} }
List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode)); List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode));
Map<String, Object> fieldCodes = Bean.listToMap(columns, "fieldCode", "queryStrategy", DynamicFormColumn.class); Map<String, Object> fieldCodes = Bean.listToMap(columns, FIELDCODE, QUERYSTRATEGY, DynamicFormColumn.class);
Page page = new Page(current, size); Page<Map<String, Object>> page = new Page<Map<String, Object>>(current, size);
return this.getBaseMapper().pageListNew(page, RequestContext.getAppKey(), fieldCodes, groupCode, params, beginDate, endDate); return this.getBaseMapper().pageListNew(page, RequestContext.getAppKey(), fieldCodes, groupCode, params, beginDate, endDate);
} }
...@@ -166,15 +169,15 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -166,15 +169,15 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
public IPage<Map<String, Object>> pageList(int current, int size, String groupCode, Map<String, String> params) { public IPage<Map<String, Object>> pageList(int current, int size, String groupCode, Map<String, String> params) {
List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode)); List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode));
Map<String, Object> fieldCodes = Bean.listToMap(columns, "fieldCode", "queryStrategy", DynamicFormColumn.class); Map<String, Object> fieldCodes = Bean.listToMap(columns, FIELDCODE, QUERYSTRATEGY, DynamicFormColumn.class);
Page page = new Page(current, size); Page<Map<String, Object>> page = new Page<Map<String, Object>>(current, size);
return this.getBaseMapper().pageList(page, RequestContext.getAppKey(), fieldCodes, groupCode, params); return this.getBaseMapper().pageList(page, RequestContext.getAppKey(), fieldCodes, groupCode, params);
} }
public List<Map<String, Object>> listAll(String groupCode) { public List<Map<String, Object>> listAll(String groupCode) {
Map<String, String> params = this.getRequestParamMap(); Map<String, String> params = this.getRequestParamMap();
List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode)); List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode));
Map<String, Object> fieldCodes = Bean.listToMap(columns, "fieldCode", "queryStrategy", DynamicFormColumn.class); Map<String, Object> fieldCodes = Bean.listToMap(columns, FIELDCODE, QUERYSTRATEGY, DynamicFormColumn.class);
return this.getBaseMapper().listAll(RequestContext.getAppKey(), fieldCodes, groupCode, params); return this.getBaseMapper().listAll(RequestContext.getAppKey(), fieldCodes, groupCode, params);
} }
......
...@@ -36,9 +36,6 @@ public class ESOrgUsrService { ...@@ -36,9 +36,6 @@ public class ESOrgUsrService {
private OrgUsrServiceImpl orgUsrServiceImpl; private OrgUsrServiceImpl orgUsrServiceImpl;
public void init() throws Exception { public void init() throws Exception {
// elasticsearchTemplate.deleteIndex(ESOrgUsrDto.class);
// elasticsearchTemplate.createIndex(ESOrgUsrDto.class);
// elasticsearchTemplate.putMapping(ESOrgUsrDto.class);
//初始化ES,重建索引 //初始化ES,重建索引
initEs(); initEs();
} }
...@@ -70,10 +67,6 @@ public class ESOrgUsrService { ...@@ -70,10 +67,6 @@ public class ESOrgUsrService {
public void saveAll(List<OrgUsr> orgUsrs) throws Exception { public void saveAll(List<OrgUsr> orgUsrs) throws Exception {
if (!ValidationUtil.isEmpty(orgUsrs)) { if (!ValidationUtil.isEmpty(orgUsrs)) {
// for (OrgUsr orgUsr : orgUsrs) {
// this.saveAlertCalledToES(orgUsr);
// }
this.saveAlertCalledToES(orgUsrs); this.saveAlertCalledToES(orgUsrs);
} }
...@@ -130,12 +123,13 @@ public class ESOrgUsrService { ...@@ -130,12 +123,13 @@ public class ESOrgUsrService {
//设置模糊搜索 //设置模糊搜索
if (orgUsr.getBizOrgName() != null) { if (orgUsr.getBizOrgName() != null) {
queryBuilder = QueryBuilders.matchQuery("bizOrgName", orgUsr.getBizOrgName()); queryBuilder = QueryBuilders.matchQuery("bizOrgName", orgUsr.getBizOrgName());
Iterable<ESOrgUsrDto> search = esOrgUsrDtoRepository.search(queryBuilder);
if (!search.iterator().hasNext()) {
esOrgUsrDto.setBizOrgName(orgUsr.getBizOrgName());
esOrgUsrDtoRepository.save(esOrgUsrDto);
}
} }
Iterable<ESOrgUsrDto> search = esOrgUsrDtoRepository.search(queryBuilder);
if (!search.iterator().hasNext()) {
esOrgUsrDto.setBizOrgName(orgUsr.getBizOrgName());
esOrgUsrDtoRepository.save(esOrgUsrDto);
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -164,16 +158,18 @@ public class ESOrgUsrService { ...@@ -164,16 +158,18 @@ public class ESOrgUsrService {
public Set<ESOrgUsrDto> queryByKeys(String name) { public Set<ESOrgUsrDto> queryByKeys(String name) {
//创建builder //创建builder
FuzzyQueryBuilder queryBuilder = null; FuzzyQueryBuilder queryBuilder = null;
Set<ESOrgUsrDto> list = new LinkedHashSet<>();
//设置模糊搜索 //设置模糊搜索
if (name != null) { if (name != null) {
queryBuilder = QueryBuilders.fuzzyQuery("bizOrgName", name); queryBuilder = QueryBuilders.fuzzyQuery("bizOrgName", name);
Iterable<ESOrgUsrDto> search = esOrgUsrDtoRepository.search(queryBuilder);
search.forEach(esOrgUsrDto -> {
list.add(esOrgUsrDto);
});
} }
Iterable<ESOrgUsrDto> search = esOrgUsrDtoRepository.search(queryBuilder);
Set<ESOrgUsrDto> list = new LinkedHashSet<>();
search.forEach(esOrgUsrDto -> {
list.add(esOrgUsrDto);
});
return list; return list;
......
...@@ -163,7 +163,6 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur ...@@ -163,7 +163,6 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
* 根据FaultId查询 * 根据FaultId查询
*/ */
public List<FailureAudit> findByfaultId(Long faultId) { public List<FailureAudit> findByfaultId(Long faultId) {
Page<FailureAudit> page = new Page<>();
QueryWrapper<FailureAudit> queryWrapper = new QueryWrapper<>(); QueryWrapper<FailureAudit> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("fault_id", faultId).orderByDesc("audit_time"); queryWrapper.eq("fault_id", faultId).orderByDesc("audit_time");
return baseMapper.selectList(queryWrapper); return baseMapper.selectList(queryWrapper);
......
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