Commit 3f31c7e8 authored by tangwei's avatar tangwei

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 8f6ff9da b8666f6c
...@@ -19,7 +19,7 @@ public class AlertFromValueDto extends BaseDto { ...@@ -19,7 +19,7 @@ public class AlertFromValueDto extends BaseDto {
@ApiModelProperty(value = "表单id") @ApiModelProperty(value = "表单id")
private Integer alertFromId; private Long alertFormId;
@ApiModelProperty(value = "警情id") @ApiModelProperty(value = "警情id")
private Long alertCalledId; private Long alertCalledId;
...@@ -42,4 +42,7 @@ public class AlertFromValueDto extends BaseDto { ...@@ -42,4 +42,7 @@ public class AlertFromValueDto extends BaseDto {
@ApiModelProperty(value = "操作人名称") @ApiModelProperty(value = "操作人名称")
private String recUserName; private String recUserName;
private Boolean isBlock;
private Boolean isDelete;
} }
...@@ -49,7 +49,7 @@ public class AlertFormValue extends BaseEntity { ...@@ -49,7 +49,7 @@ public class AlertFormValue extends BaseEntity {
private String recUserName; private String recUserName;
@ApiModelProperty(value = "是否一行显示") @ApiModelProperty(value = "是否一行显示")
private boolean isBlock; private Boolean isBlock;
public AlertFormValue() { public AlertFormValue() {
super(); super();
......
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -18,7 +20,7 @@ import java.util.List; ...@@ -18,7 +20,7 @@ import java.util.List;
@Accessors(chain = true) @Accessors(chain = true)
@TableName("cb_org_usr") @TableName("cb_org_usr")
@ApiModel(value="OrgUsrVo", description="人员信息") @ApiModel(value="OrgUsrVo", description="人员信息")
public class OrgPersonFormVo { public class OrgPersonFormVo extends BaseEntity{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -138,7 +138,7 @@ public class AlertCalledController extends BaseController { ...@@ -138,7 +138,7 @@ public class AlertCalledController extends BaseController {
List<FormValue> formValue = new ArrayList<FormValue>(); List<FormValue> formValue = new ArrayList<FormValue>();
if(list!=null&&list.size()>0) { if(list!=null&&list.size()>0) {
for (AlertFormValue alertFormValue : list) { for (AlertFormValue alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
} }
} }
......
...@@ -143,10 +143,10 @@ public class OrgDepartmentController { ...@@ -143,10 +143,10 @@ public class OrgDepartmentController {
List<FormValue> formValue = new ArrayList<FormValue>(); List<FormValue> formValue = new ArrayList<FormValue>();
for (AlertFormValue alertFormValue : list) { for (AlertFormValue alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null){ if (alertFormValue.getFieldValueCode() == null){
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
}else { }else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
} }
} }
......
...@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.utils.ExcelUtils; import com.yeejoin.amos.boot.biz.common.utils.ExcelUtils;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue; import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
...@@ -45,8 +46,6 @@ import io.swagger.annotations.Api; ...@@ -45,8 +46,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
/** /**
* @author fengwang * @author fengwang
* @date 2021-06-21. * @date 2021-06-21.
...@@ -55,204 +54,229 @@ import org.springframework.beans.BeanUtils; ...@@ -55,204 +54,229 @@ import org.springframework.beans.BeanUtils;
@Api(tags = "人员Api") @Api(tags = "人员Api")
@RequestMapping(value = "/org-person") @RequestMapping(value = "/org-person")
public class OrgPersonController { public class OrgPersonController {
@Autowired @Autowired
OrgUsrServiceImpl iOrgUsrService; OrgUsrServiceImpl iOrgUsrService;
@Autowired @Autowired
AlertFormValueServiceImpl iAlertFromValueService; AlertFormValueServiceImpl iAlertFromValueService;
/**
* 新增人员信息
*
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增人员信息", notes = "新增人员信息")
public ResponseModel saveOrgUsr(HttpServletRequest request, @RequestBody OrgPersonVo OrgPersonVo) {
OrgUsr orgUsr = new OrgUsr() ;
BeanUtils.copyProperties(OrgPersonVo,orgUsr);
// 单位新增情况
iOrgUsrService.save(orgUsr);
// 动态表单
List<AlertFormValue> alertFromValuelist = OrgPersonVo.getAlertFormValue();
// 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
});
// 保存动态表单数据
iAlertFromValueService.saveBatch(alertFromValuelist);
return ResponseHelper.buildResponse(null);
}
/** /**
* 根据id删除 * 新增人员信息
* *
* @param id * @return
* @return */
*/ @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @RequestMapping(value = "/save", method = RequestMethod.POST)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ApiOperation(httpMethod = "POST", value = "新增人员信息", notes = "新增人员信息")
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除") public ResponseModel saveOrgUsr(HttpServletRequest request, @RequestBody OrgPersonVo OrgPersonVo) {
public ResponseModel deleteById(HttpServletRequest request, @PathVariable Long id) { OrgUsr orgUsr = new OrgUsr();
// 删除时,只作逻辑删除 BeanUtils.copyProperties(OrgPersonVo, orgUsr);
iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01)); orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
return ResponseHelper.buildResponse(null); // 单位新增情况
} iOrgUsrService.save(orgUsr);
// 动态表单
List<AlertFormValue> alertFromValuelist = OrgPersonVo.getAlertFormValue();
// 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
});
// 保存动态表单数据
iAlertFromValueService.saveBatch(alertFromValuelist);
return ResponseHelper.buildResponse(null);
}
/**
* 根据id删除
*
* @param id
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public ResponseModel deleteById(HttpServletRequest request, @PathVariable Long id) {
// 删除时,只作逻辑删除
iOrgUsrService.update(
new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01));
return ResponseHelper.buildResponse(null);
}
/** /**
* 更新人员数据 * 更新人员数据
* *
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据") @ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据")
public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgPersonVo OrgPersonVo, @PathVariable Long id) { public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgPersonVo OrgPersonVo,
// 修改人员信息 @PathVariable Long id) {
OrgUsr orgUsr = new OrgUsr(); // 修改人员信息
BeanUtils.copyProperties(OrgPersonVo,orgUsr); OrgUsr orgUsr = new OrgUsr();
iOrgUsrService.updateById(orgUsr); OrgUsr oriOrgUsr = iOrgUsrService.getById(id);
// 动态表单 BeanUtils.copyProperties(OrgPersonVo, orgUsr);
List<AlertFormValue> alertFromValuelist = OrgPersonVo.getAlertFormValue(); orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
// 填充主键 orgUsr.setSequenceNbr(id);
alertFromValuelist.stream().forEach(alertFromValue -> { orgUsr.setRecDate(new Date());
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr()); orgUsr.setRecUserId(oriOrgUsr.getRecUserId());
}); orgUsr.setRecUserName(oriOrgUsr.getRecUserName());
// 保存动态表单数据 iOrgUsrService.updateById(orgUsr);
iAlertFromValueService.updateBatchById(alertFromValuelist); // 动态表单
return ResponseHelper.buildResponse(null); List<AlertFormValue> alertFromValuelist = OrgPersonVo.getAlertFormValue();
} // 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
});
List<AlertFromValueDto> formList = iAlertFromValueService.queryByCalledId(orgUsr.getSequenceNbr());
for (AlertFormValue dis : alertFromValuelist) {
for (AlertFromValueDto src : formList) {
if (dis.getAlertFormId() == src.getAlertFormId()) {
dis.setSequenceNbr(src.getSequenceNbr());
dis.setRecDate(new Date());
dis.setRecUserId(oriOrgUsr.getRecUserId());
dis.setRecUserName(oriOrgUsr.getRecUserName());
break;
}
}
}
/** // 保存动态表单数据
* 根据id查询人员 iAlertFromValueService.updateBatchById(alertFromValuelist);
* return ResponseHelper.buildResponse(null);
* @param id }
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情")
public ResponseModel selectById(HttpServletRequest request, @PathVariable Long id) {
OrgUsr orgUsr = iOrgUsrService.getById(id);
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_called_id", id);
// 动态表单数据
List<AlertFormValue> list = iAlertFromValueService.list(queryWrapper);
List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null){
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.isBlock());
formValue.add(value);
}else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.isBlock());
formValue.add(value);
}
}
OrgPersonFormVo orgUsrFormVo = new OrgPersonFormVo();
BeanUtils.copyProperties(orgUsr,orgUsrFormVo);
orgUsrFormVo.setDynamicFormAlert(formValue);
return ResponseHelper.buildResponse(orgUsrFormVo);
}
/** /**
* 获取人员树 * 根据id查询人员
* *
* @param * @param id
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyTree", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员树", notes = "获取人员树") @ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情")
public ResponseModel selectCompanyTree() throws Exception { public ResponseModel selectById(HttpServletRequest request, @PathVariable Long id) {
Map<String, Object> columnMap = new HashMap<>(); OrgUsr orgUsr = iOrgUsrService.getById(id);
columnMap.put("is_delete", CommonConstant.IS_DELETE_00); QueryWrapper queryWrapper = new QueryWrapper<>();
columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON); queryWrapper.eq("alert_called_id", id);
Collection<OrgUsr> list = iOrgUsrService.listByMap(columnMap); // 动态表单数据
return ResponseHelper.buildResponse(iOrgUsrService.getTree(null, list, OrgUsr.class.getName(), "getSequenceNbr", 2, "getBizOrgName", "getParentId", "getBizOrgType")); List<AlertFormValue> list = iAlertFromValueService.list(queryWrapper);
} List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text",
alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value);
} else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text",
alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock());
formValue.add(value);
}
}
OrgPersonFormVo orgUsrFormVo = new OrgPersonFormVo();
BeanUtils.copyProperties(orgUsr, orgUsrFormVo);
orgUsrFormVo.setDynamicFormAlert(formValue);
return ResponseHelper.buildResponse(orgUsrFormVo);
}
/**
* 获取人员树
*
* @param
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员树", notes = "获取人员树")
public ResponseModel selectCompanyTree() throws Exception {
Map<String, Object> columnMap = new HashMap<>();
columnMap.put("is_delete", CommonConstant.IS_DELETE_00);
columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON);
Collection<OrgUsr> list = iOrgUsrService.listByMap(columnMap);
return ResponseHelper.buildResponse(iOrgUsrService.getTree(null, list, OrgUsr.class.getName(), "getSequenceNbr",
2, "getBizOrgName", "getParentId", "getBizOrgType"));
}
/** /**
* 列表分页查询 * 列表分页查询
* *
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Object> listPage(String pageNum, String pageSize, OrgUsr orgUsr) { public ResponseModel<Object> listPage(String pageNum, String pageSize, OrgUsr orgUsr) {
Page<OrgUsr> pageBean; Page<OrgUsr> pageBean;
QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>(); QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>();
Class<? extends OrgUsr> aClass = orgUsr.getClass(); Class<? extends OrgUsr> aClass = orgUsr.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); field.setAccessible(true);
Object o = field.get(orgUsr); Object o = field.get(orgUsr);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName()); String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) { if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(orgUsr); Integer fileValue = (Integer) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue); orgUsrQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) { } else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(orgUsr); Long fileValue = (Long) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue); orgUsrQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) { } else if (type.equals(String.class)) {
String fileValue = (String) field.get(orgUsr); String fileValue = (String) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue); orgUsrQueryWrapper.eq(name, fileValue);
} else { } else {
String fileValue = (String) field.get(orgUsr); String fileValue = (String) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue); orgUsrQueryWrapper.eq(name, fileValue);
} }
} }
} catch (Exception e) { } catch (Exception e) {
} }
}); });
IPage<OrgUsr> page; IPage<OrgUsr> page;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) { if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE); pageBean = new Page<>(0, Long.MAX_VALUE);
} else { } else {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize)); pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
} }
page = iOrgUsrService.page(pageBean, orgUsrQueryWrapper); page = iOrgUsrService.page(pageBean, orgUsrQueryWrapper);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
} }
/** /**
* *
* *
* @param orgCode * @param orgCode
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET) @RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据orgCode查询", notes = "根据orgCode查询") @ApiOperation(httpMethod = "GET", value = "根据orgCode查询", notes = "根据orgCode查询")
public ResponseModel selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize, @PathVariable Long orgCode) { public ResponseModel selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize,
Map<String, Object> columnMap = new HashMap<>(); @PathVariable Long orgCode) {
columnMap.put("is_delete",CommonConstant.IS_DELETE_00); Map<String, Object> columnMap = new HashMap<>();
columnMap.put("biz_org_code", orgCode); columnMap.put("is_delete", CommonConstant.IS_DELETE_00);
columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON); columnMap.put("biz_org_code", orgCode);
iOrgUsrService.listByMap(columnMap); columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON);
return ResponseHelper.buildResponse(null); iOrgUsrService.listByMap(columnMap);
} return ResponseHelper.buildResponse(null);
}
/** /**
* 导出人员模板 * 导出人员模板
* *
* @param response * @param response
* @param OrgUsrDownloadTemplateVO * @param OrgUsrDownloadTemplateVO
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/download-template", method = RequestMethod.GET) @RequestMapping(value = "/download-template", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "导出人员模板", notes = "导出人员模板") @ApiOperation(httpMethod = "GET", value = "导出人员模板", notes = "导出人员模板")
public ResponseModel downloadTemplate(HttpServletResponse response) throws UnsupportedEncodingException { public ResponseModel downloadTemplate(HttpServletResponse response) throws UnsupportedEncodingException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO = new ArrayList<>(); List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO = new ArrayList<>();
ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "人员信息", "人员信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response); ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "人员信息", "人员信息", OrgUsrDownloadTemplateVO.class,
return ResponseHelper.buildResponse(null); simpleDateFormat.format(new Date()) + ".xls", response);
} return ResponseHelper.buildResponse(null);
}
} }
...@@ -146,10 +146,10 @@ public class OrgUsrController extends BaseController { ...@@ -146,10 +146,10 @@ public class OrgUsrController extends BaseController {
List<FormValue> formValue = new ArrayList(); List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) { for (AlertFormValue alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null){ if (alertFormValue.getFieldValueCode() == null){
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
}else { }else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
} }
} }
......
...@@ -4,6 +4,9 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto; ...@@ -4,6 +4,9 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; 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.mapper.AlertFormValueMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormValueService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormValueService;
import java.util.List;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -16,4 +19,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -16,4 +19,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
@Service @Service
public class AlertFormValueServiceImpl extends BaseService<AlertFromValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService { public class AlertFormValueServiceImpl extends BaseService<AlertFromValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService {
public List<AlertFromValueDto> queryByCalledId(Long alertCalledId) {
return this.queryForList(null, false, alertCalledId);
}
} }
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