Commit a42121c8 authored by tangwei's avatar tangwei

迁移文件

parent 2539a558
......@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import java.io.Serializable;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
......@@ -3,8 +3,8 @@ package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.util.List;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.yeejoin.amos.boot.module.common.api.dto;
package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
......
package com.yeejoin.amos.boot.module.common.api.dto;
package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.io.Serializable;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.yeejoin.amos.boot.module.common.api.dto;
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......
package com.yeejoin.amos.boot.module.common.api.entity;
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
......
package com.yeejoin.amos.boot.module.common.api.entity;
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
......
package com.yeejoin.amos.boot.module.common.api.entity;
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
......
package com.yeejoin.amos.boot.module.common.api.mapper;
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.AlertForm;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm;
/**
* 警情表单 Mapper 接口
......
package com.yeejoin.amos.boot.module.common.api.mapper;
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormType;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType;
/**
* 动态表单类型 Mapper 接口
......
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.AlertFormValueDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormValueDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
/**
* Mapper 接口
*
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.AlertFormMapper">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.AlertFormTypeMapper">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormTypeMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.AlertFormValueMapper">
<select id="selectListByCalledId" resultType="com.yeejoin.amos.boot.module.common.api.dto.AlertFormValueDto">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormValueMapper">
<select id="selectListByCalledId" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormValueDto">
SELECT
v.sequence_nbr sequenceNbr,
v.alert_form_id alertFormId,
......
......@@ -25,7 +25,6 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import io.swagger.annotations.Api;
......@@ -41,8 +40,7 @@ import io.swagger.annotations.ApiOperation;
public class OrgDepartmentController {
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
AlertFormValueServiceImpl iAlertFromValueService;
/**
* 新增部门信息
......
......@@ -5,7 +5,6 @@ import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -35,8 +34,7 @@ import java.util.Map;
public class OrgPersonController {
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
AlertFormValueServiceImpl iAlertFromValueService;
/**
* 新增人员信息
......
......@@ -31,7 +31,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import io.swagger.annotations.Api;
......@@ -51,9 +50,7 @@ public class OrgUsrController extends BaseController {
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
AlertFormValueServiceImpl iAlertFromValueService;
/**
* 新增单位信息
*
......
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.common.api.dto.AlertFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.common.api.dto.AlertListvalue;
import com.yeejoin.amos.boot.module.common.api.dto.Items;
import com.yeejoin.amos.boot.module.common.api.entity.AlertForm;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.mapper.AlertFormMapper;
import com.yeejoin.amos.boot.module.common.api.service.IAlertFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 警情表单 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public class AlertFormServiceImpl extends BaseService<AlertFormDto, AlertForm, AlertFormMapper>
implements IAlertFormService {
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
public List<AlertFormInitDto> getFormlist(String code) {
QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_type_code", code);
queryWrapper.orderByAsc("sort_num");
List<AlertForm> alertFormValue = this.list(queryWrapper);
List<AlertFormInitDto> listfrom = new ArrayList<AlertFormInitDto>();
// 组装数据
for (AlertForm alertFrom : alertFormValue) {
if (alertFrom.getFieldType().equals("string") || alertFrom.getFieldType().equals("datetime")
|| alertFrom.getFieldType().equals("textarea") || alertFrom.getFieldType().equals("inputBitmap")) {
AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(),
alertFrom.getFieldType(), null, alertFrom.getUrl());
AlertFormValue alertFormValu = new AlertFormValue(alertFrom.getSequenceNbr(), alertFrom.getFieldName(),
alertFrom.getFieldCode(), alertFrom.getBlock(), alertFrom.getAlertTypeCode(), null, null);
if (alertFrom.getFieldType().equals("datetime")) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
String dateString = formatter.format(date);
alertFormValu.setFieldValue(dateString);
vo.setDefaultValue(date);
}
vo.setFormItemDescr(alertFormValu);
listfrom.add(vo);
} else {
// 查询数据项
QueryWrapper<DataDictionary> queryWrappercolumnMap = new QueryWrapper<>();
queryWrappercolumnMap.eq("type", alertFrom.getFieldValueCode());
queryWrappercolumnMap.orderByAsc("sort_num");
Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap);
List<AlertListvalue> list = getdata(listDataDictionary);
AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(),
alertFrom.getFieldType(), new Items(list), alertFrom.getUrl());
AlertFormValue alertFormValu = new AlertFormValue(alertFrom.getSequenceNbr(), alertFrom.getFieldName(),
alertFrom.getFieldCode(), alertFrom.getBlock(), alertFrom.getAlertTypeCode(), null, null);
if (alertFrom.getFieldType().equals("radio")) {
vo.setDefaultValue(list.get(0).getValue());
alertFormValu.setFieldValue(list.get(0).getLabel());
alertFormValu.setFieldValueCode(list.get(0).getValue());
}
vo.setFormItemDescr(alertFormValu);
listfrom.add(vo);
}
}
return listfrom;
}
public List<AlertListvalue> getdata(Collection<DataDictionary> list) {
List<AlertListvalue> listAlertListvalue = new ArrayList<AlertListvalue>();
for (DataDictionary dataDictionary : list) {
listAlertListvalue.add(new AlertListvalue(dataDictionary.getSequenceNbr().toString(),
dataDictionary.getName(), dataDictionary.getCode()));
}
return listAlertListvalue;
}
public List<String> queryListByFormId(String groupId) {
return this.queryListByTypeCode(groupId).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
}
public List<AlertFormDto> queryListByTypeCode(String groupId) {
return this.queryForList(null, false, groupId);
}
}
//package com.yeejoin.amos.boot.module.common.biz.service.impl;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.yeejoin.amos.boot.module.common.api.dto.AlertFormDto;
//import com.yeejoin.amos.boot.module.common.api.dto.AlertFormInitDto;
//import com.yeejoin.amos.boot.module.common.api.dto.AlertListvalue;
//import com.yeejoin.amos.boot.module.common.api.dto.Items;
//import com.yeejoin.amos.boot.module.common.api.entity.AlertForm;
//import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
//import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//import com.yeejoin.amos.boot.module.common.api.mapper.AlertFormMapper;
//import com.yeejoin.amos.boot.module.common.api.service.IAlertFormService;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Collection;
//import java.util.Date;
//import java.util.List;
//import java.util.stream.Collectors;
//
///**
// * 警情表单 服务实现类
// *
// * @author tb
// * @date 2021-06-17
// */
//@Service
//public class AlertFormServiceImpl extends BaseService<AlertFormDto, AlertForm, AlertFormMapper>
// implements IAlertFormService {
// @Autowired
// DataDictionaryServiceImpl iDataDictionaryService;
//
// public List<AlertFormInitDto> getFormlist(String code) {
//
// QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("alert_type_code", code);
// queryWrapper.orderByAsc("sort_num");
// List<AlertForm> alertFormValue = this.list(queryWrapper);
// List<AlertFormInitDto> listfrom = new ArrayList<AlertFormInitDto>();
// // 组装数据
// for (AlertForm alertFrom : alertFormValue) {
// if (alertFrom.getFieldType().equals("string") || alertFrom.getFieldType().equals("datetime")
// || alertFrom.getFieldType().equals("textarea") || alertFrom.getFieldType().equals("inputBitmap")) {
//
// AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(),
// alertFrom.getFieldType(), null, alertFrom.getUrl());
// AlertFormValue alertFormValu = new AlertFormValue(alertFrom.getSequenceNbr(), alertFrom.getFieldName(),
// alertFrom.getFieldCode(), alertFrom.getBlock(), alertFrom.getAlertTypeCode(), null, null);
//
// if (alertFrom.getFieldType().equals("datetime")) {
// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date date = new Date();
// String dateString = formatter.format(date);
// alertFormValu.setFieldValue(dateString);
// vo.setDefaultValue(date);
// }
// vo.setFormItemDescr(alertFormValu);
// listfrom.add(vo);
// } else {
// // 查询数据项
// QueryWrapper<DataDictionary> queryWrappercolumnMap = new QueryWrapper<>();
// queryWrappercolumnMap.eq("type", alertFrom.getFieldValueCode());
// queryWrappercolumnMap.orderByAsc("sort_num");
// Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap);
// List<AlertListvalue> list = getdata(listDataDictionary);
// AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(),
// alertFrom.getFieldType(), new Items(list), alertFrom.getUrl());
// AlertFormValue alertFormValu = new AlertFormValue(alertFrom.getSequenceNbr(), alertFrom.getFieldName(),
// alertFrom.getFieldCode(), alertFrom.getBlock(), alertFrom.getAlertTypeCode(), null, null);
// if (alertFrom.getFieldType().equals("radio")) {
// vo.setDefaultValue(list.get(0).getValue());
// alertFormValu.setFieldValue(list.get(0).getLabel());
// alertFormValu.setFieldValueCode(list.get(0).getValue());
// }
//
// vo.setFormItemDescr(alertFormValu);
// listfrom.add(vo);
// }
// }
// return listfrom;
// }
//
// public List<AlertListvalue> getdata(Collection<DataDictionary> list) {
// List<AlertListvalue> listAlertListvalue = new ArrayList<AlertListvalue>();
// for (DataDictionary dataDictionary : list) {
//
// listAlertListvalue.add(new AlertListvalue(dataDictionary.getSequenceNbr().toString(),
// dataDictionary.getName(), dataDictionary.getCode()));
// }
// return listAlertListvalue;
// }
//
// public List<String> queryListByFormId(String groupId) {
// return this.queryListByTypeCode(groupId).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
// }
//
// public List<AlertFormDto> queryListByTypeCode(String groupId) {
// return this.queryForList(null, false, groupId);
// }
//}
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.yeejoin.amos.boot.module.common.api.dto.AlertFormTypeDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormType;
import com.yeejoin.amos.boot.module.common.api.mapper.AlertFormTypeMapper;
import com.yeejoin.amos.boot.module.common.api.service.IAlertFormTypeService;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
/**
* 动态表单类型 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public class AlertFormTypeServiceImpl extends BaseService<AlertFormTypeDto, AlertFormType,AlertFormTypeMapper> implements IAlertFormTypeService {
}
//package com.yeejoin.amos.boot.module.common.biz.service.impl;
//
//import com.yeejoin.amos.boot.module.common.api.dto.AlertFormTypeDto;
//import com.yeejoin.amos.boot.module.common.api.entity.AlertFormType;
//import com.yeejoin.amos.boot.module.common.api.mapper.AlertFormTypeMapper;
//import com.yeejoin.amos.boot.module.common.api.service.IAlertFormTypeService;
//
//import org.springframework.stereotype.Service;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
///**
//* 动态表单类型 服务实现类
//*
//* @author tb
//* @date 2021-06-17
//*/
//@Service
//public class AlertFormTypeServiceImpl extends BaseService<AlertFormTypeDto, AlertFormType,AlertFormTypeMapper> implements IAlertFormTypeService {
//
//}
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.boot.module.common.api.dto.AlertFormValueDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.common.api.mapper.AlertFormValueMapper;
import com.yeejoin.amos.boot.module.common.api.service.IAlertFormValueService;
/**
* 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public class AlertFormValueServiceImpl extends BaseService<AlertFormValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService {
@Autowired
private AlertFormValueMapper alertFormValueMapper;
public List<AlertFormValueDto> queryByCalledId(Long alertCalledId) {
return this.queryForList(null, false, alertCalledId);
}
public List<AlertFormValueDto> listByCalledId(Long id) {
return alertFormValueMapper.selectListByCalledId(id);
}
}
//package com.yeejoin.amos.boot.module.common.biz.service.impl;
//
//import java.util.List;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.boot.module.common.api.dto.AlertFormValueDto;
//import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
//import com.yeejoin.amos.boot.module.common.api.mapper.AlertFormValueMapper;
//import com.yeejoin.amos.boot.module.common.api.service.IAlertFormValueService;
//
//
///**
//* 服务实现类
//*
//* @author tb
//* @date 2021-06-17
//*/
//@Service
//public class AlertFormValueServiceImpl extends BaseService<AlertFormValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService {
//
// @Autowired
// private AlertFormValueMapper alertFormValueMapper;
//
// public List<AlertFormValueDto> queryByCalledId(Long alertCalledId) {
// return this.queryForList(null, false, alertCalledId);
// }
//
// public List<AlertFormValueDto> listByCalledId(Long id) {
// return alertFormValueMapper.selectListByCalledId(id);
// }
//
//}
......@@ -27,7 +27,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.module.common.api.dto.AlertFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormColumnDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelOrgPersonDto;
......@@ -39,7 +38,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertForm;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
......
......@@ -38,14 +38,14 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.common.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledRequestDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ESAlertCalledService;
import io.swagger.annotations.Api;
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 警情表单
*
* @author tb
* @date 2021-06-17
*/
@RestController
@Api(tags = "警情表单Api")
@RequestMapping(value = "/alert-form")
public class AlertFormController extends BaseController {
@Autowired
AlertFormServiceImpl iAlertFormService;
@Autowired
RedisUtils redisUtils;
@Value("${redis.cache.failure.time}")
private long time;
/**
* 新增警情表单
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增警情表单", notes = "新增警情表单")
public boolean saveAlertForm(HttpServletRequest request, @RequestBody AlertForm alertForm){
return iAlertFormService.save(alertForm);
}
/**
* 根据id删除
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public boolean deleteById(HttpServletRequest request, @PathVariable Long id){
return iAlertFormService.removeById(id);
}
/**
* 修改警情表单
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改警情表单", notes = "修改警情表单")
public boolean updateByIdAlertForm(HttpServletRequest request, @RequestBody AlertForm alertForm){
return iAlertFormService.updateById(alertForm);
}
/**
* 根据id查询
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public AlertForm selectById(HttpServletRequest request, @PathVariable Long id){
return iAlertFormService.getById(id);
}
/**
* 根据表态类型code查询表单数据项
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/form/{code}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据表态类型code查询表单数据项", notes = "根据表态类型code查询表单数据项")
public ResponseModel<Object> selectFormdItem(HttpServletRequest request, @PathVariable String code){
List<AlertFormInitDto> list=new ArrayList<AlertFormInitDto>();
if(redisUtils.hasKey(RedisKey.FORM_CODE+code)){
Object obj= redisUtils.get(RedisKey.FORM_CODE+code);
return ResponseHelper.buildResponse(obj);
}else{
list= iAlertFormService.getFormlist(code);
redisUtils.set(RedisKey.FORM_CODE+code,JSON.toJSON(list),time);
return ResponseHelper.buildResponse(list);
}
}
/**
* 列表分页查询
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<AlertForm> listPage(String pageNum,String pageSize, AlertForm alertForm){
Page<AlertForm> pageBean;
QueryWrapper<AlertForm> alertFormQueryWrapper = new QueryWrapper<>();
Class<? extends AlertForm> aClass = alertForm.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
Object o = field.get(alertForm);
if (o != null) {
Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(alertForm);
alertFormQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(alertForm);
alertFormQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(alertForm);
alertFormQueryWrapper.eq(name, fileValue);
} else {
String fileValue = (String) field.get(alertForm);
alertFormQueryWrapper.eq(name, fileValue);
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
}
});
IPage<AlertForm> page;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
} else {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iAlertFormService.page(pageBean, alertFormQueryWrapper);
return page;
}
}
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormTypeServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 动态表单类型
*
* @author tb
* @date 2021-06-17
*/
@RestController
@Api(tags = "动态表单类型Api")
@RequestMapping(value = "/alert-Form-type")
public class AlertFormTypeController extends BaseController {
@Autowired
AlertFormTypeServiceImpl iAlertFormTypeService;
/**
* 新增动态表单类型
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增动态表单类型", notes = "新增动态表单类型")
public boolean saveAlertFormType(HttpServletRequest request, @RequestBody AlertFormType alertFormType){
return iAlertFormTypeService.save(alertFormType);
}
/**
* 根据id删除
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public boolean deleteById(HttpServletRequest request, @PathVariable Long id){
return iAlertFormTypeService.removeById(id);
}
/**
* 修改动态表单类型
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改动态表单类型", notes = "修改动态表单类型")
public boolean updateByIdAlertFormType(HttpServletRequest request, @RequestBody AlertFormType alertFormType){
return iAlertFormTypeService.updateById(alertFormType);
}
/**
* 根据id查询
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public AlertFormType selectById(HttpServletRequest request, @PathVariable Long id){
return iAlertFormTypeService.getById(id);
}
/**
* 列表分页查询
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<AlertFormType> listPage(String pageNum,String pageSize, AlertFormType alertFormType){
Page<AlertFormType> pageBean;
QueryWrapper<AlertFormType> alertFormTypeQueryWrapper = new QueryWrapper<>();
Class<? extends AlertFormType> aClass = alertFormType.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
Object o = field.get(alertFormType);
if (o != null) {
Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(alertFormType);
alertFormTypeQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(alertFormType);
alertFormTypeQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(alertFormType);
alertFormTypeQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(alertFormType);
alertFormTypeQueryWrapper.eq(name, fileValue);
}
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
}
});
IPage<AlertFormType> page;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
} else {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iAlertFormTypeService.page(pageBean, alertFormTypeQueryWrapper);
return page;
}
}
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
*
*
* @author tb
* @date 2021-06-17
*/
@RestController
@Api(tags = "Api")
@RequestMapping(value = "/alert-Form-value")
public class AlertFormValueController extends BaseController {
@Autowired
AlertFormValueServiceImpl iAlertFormValueService;
/**
* 新增
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public boolean saveAlertFormValue(HttpServletRequest request, @RequestBody AlertFormValue alertFormValue){
return iAlertFormValueService.save(alertFormValue);
}
/**
* 根据id删除
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public boolean deleteById(HttpServletRequest request, @PathVariable Long id){
return iAlertFormValueService.removeById(id);
}
/**
* 修改
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改", notes = "修改")
public boolean updateByIdAlertFormValue(HttpServletRequest request, @RequestBody AlertFormValue alertFormValue){
return iAlertFormValueService.updateById(alertFormValue);
}
/**
* 根据id查询
* @param id
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public AlertFormValue selectById(HttpServletRequest request, @PathVariable Long id){
return iAlertFormValueService.getById(id);
}
/**
* 列表分页查询
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<AlertFormValue> listPage(String pageNum,String pageSize, AlertFormValue alertFormValue){
Page<AlertFormValue> pageBean;
QueryWrapper<AlertFormValue> alertFormValueQueryWrapper = new QueryWrapper<>();
Class<? extends AlertFormValue> aClass = alertFormValue.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
Object o = field.get(alertFormValue);
if (o != null) {
Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(alertFormValue);
alertFormValueQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(alertFormValue);
alertFormValueQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(alertFormValue);
alertFormValueQueryWrapper.eq(name, fileValue);
} else {
String fileValue = (String) field.get(alertFormValue);
alertFormValueQueryWrapper.eq(name, fileValue);
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
}
});
IPage<AlertFormValue> page;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
} else {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iAlertFormValueService.page(pageBean, alertFormValueQueryWrapper);
return page;
}
}
......@@ -13,11 +13,10 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.common.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertListvalue;
import com.yeejoin.amos.boot.module.jcs.api.dto.Items;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormService;
/**
* 警情表单 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public class AlertFormServiceImpl extends BaseService<AlertFormDto, AlertForm, AlertFormMapper>
implements IAlertFormService {
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
public List<AlertFormInitDto> getFormlist(String code) {
QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_type_code", code);
queryWrapper.orderByAsc("sort_num");
List<AlertForm> alertFormValue = this.list(queryWrapper);
List<AlertFormInitDto> listfrom = new ArrayList<AlertFormInitDto>();
// 组装数据
for (AlertForm alertFrom : alertFormValue) {
if (alertFrom.getFieldType().equals("string") || alertFrom.getFieldType().equals("datetime")
|| alertFrom.getFieldType().equals("textarea") || alertFrom.getFieldType().equals("inputBitmap")) {
AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(),
alertFrom.getFieldType(), null, alertFrom.getUrl());
AlertFormValue alertFormValu = new AlertFormValue(alertFrom.getSequenceNbr(), alertFrom.getFieldName(),
alertFrom.getFieldCode(), alertFrom.getBlock(), alertFrom.getAlertTypeCode(), null, null);
if (alertFrom.getFieldType().equals("datetime")) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
String dateString = formatter.format(date);
alertFormValu.setFieldValue(dateString);
vo.setDefaultValue(date);
}
vo.setFormItemDescr(alertFormValu);
listfrom.add(vo);
} else {
// 查询数据项
QueryWrapper<DataDictionary> queryWrappercolumnMap = new QueryWrapper<>();
queryWrappercolumnMap.eq("type", alertFrom.getFieldValueCode());
queryWrappercolumnMap.orderByAsc("sort_num");
Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap);
List<AlertListvalue> list = getdata(listDataDictionary);
AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(),
alertFrom.getFieldType(), new Items(list), alertFrom.getUrl());
AlertFormValue alertFormValu = new AlertFormValue(alertFrom.getSequenceNbr(), alertFrom.getFieldName(),
alertFrom.getFieldCode(), alertFrom.getBlock(), alertFrom.getAlertTypeCode(), null, null);
if (alertFrom.getFieldType().equals("radio")) {
vo.setDefaultValue(list.get(0).getValue());
alertFormValu.setFieldValue(list.get(0).getLabel());
alertFormValu.setFieldValueCode(list.get(0).getValue());
}
vo.setFormItemDescr(alertFormValu);
listfrom.add(vo);
}
}
return listfrom;
}
public List<AlertListvalue> getdata(Collection<DataDictionary> list) {
List<AlertListvalue> listAlertListvalue = new ArrayList<AlertListvalue>();
for (DataDictionary dataDictionary : list) {
listAlertListvalue.add(new AlertListvalue(dataDictionary.getSequenceNbr().toString(),
dataDictionary.getName(), dataDictionary.getCode()));
}
return listAlertListvalue;
}
public List<String> queryListByFormId(String groupId) {
return this.queryListByTypeCode(groupId).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
}
public List<AlertFormDto> queryListByTypeCode(String groupId) {
return this.queryForList(null, false, groupId);
}
}
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormTypeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormTypeMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormTypeService;
/**
* 动态表单类型 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public class AlertFormTypeServiceImpl extends BaseService<AlertFormTypeDto, AlertFormType,AlertFormTypeMapper> implements IAlertFormTypeService {
}
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormValueDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormValueMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormValueService;
/**
* 服务实现类
*
* @author tb
* @date 2021-06-17
*/
@Service
public class AlertFormValueServiceImpl extends BaseService<AlertFormValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService {
@Autowired
private AlertFormValueMapper alertFormValueMapper;
public List<AlertFormValueDto> queryByCalledId(Long alertCalledId) {
return this.queryForList(null, false, alertCalledId);
}
public List<AlertFormValueDto> listByCalledId(Long id) {
return alertFormValueMapper.selectListByCalledId(id);
}
}
......@@ -31,7 +31,6 @@ import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
......@@ -46,6 +45,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmittedObject;
import com.yeejoin.amos.boot.module.jcs.api.entity.Template;
......
......@@ -21,15 +21,14 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.CarStatusInfoDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources;
......
......@@ -7,10 +7,10 @@ import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.boot.module.common.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.component.rule.RuleTrigger;
/**
......
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