Commit ea271b67 authored by gaodongdong's avatar gaodongdong

提交人员,部门,公司代码重构

parent 7a5874d0
......@@ -52,5 +52,9 @@ public class DynamicFormColumnDto extends BaseDto {
@ApiModelProperty(value = "提示信息")
private String remark;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sort;
}
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;
import lombok.Data;
/**
* 表表单初始值
*
* @author tb
* @date 2021-06-17
*/
@Data
@ApiModel(value="DynamicFormInstanceDto", description="表单初始值")
public class DynamicFormInitDto implements Serializable{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "表单key")
private String key;
@ApiModelProperty(value = "表单名称")
private String label;
@ApiModelProperty(value = "表单类型")
private String type;
@ApiModelProperty(value = "表单默认值")
private Object defaultValue;
@ApiModelProperty(value = "表单值")
private SelectItems data;
@ApiModelProperty(value = "提交表单附加字段")
private DynamicFormInstanceDto formItemDescr;
@ApiModelProperty(value = "接口地址")
private String columnConfig;
public DynamicFormInitDto() {
super();
}
public DynamicFormInitDto(String key, String label, String type, SelectItems data, String columnConfig) {
super();
this.key = key;
this.label = label;
this.type = type;
this.data = data;
this.columnConfig = columnConfig;
}
}
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -16,6 +18,8 @@ import lombok.EqualsAndHashCode;
@ApiModel(value="DynamicFormInstanceDto", description="动态表单实例表")
public class DynamicFormInstanceDto extends BaseDto {
private static final long serialVersionUID = 1L;
......@@ -55,5 +59,31 @@ public class DynamicFormInstanceDto extends BaseDto {
@ApiModelProperty(value = "应用标识(数据隔离使用)")
private String appKey;
/**
* 不能为空
*/
@TableField("not_null")
private Boolean notNull;
@ApiModelProperty(value = "是否一行显示(兼容已有动态表单使用)")
private Boolean block;
@ApiModelProperty(value = "配置json")
private String columnConfig;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sort;
public DynamicFormInstanceDto() {};
public DynamicFormInstanceDto(Long sequenceNbr, String fieldName, String fieldCode, Boolean block,
String groupCode) {
this.sequenceNbr = sequenceNbr;
this.fieldName = fieldName;
this.fieldCode = fieldCode;
this.block = block;
this.groupCode = groupCode;
}
}
......@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
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.common.api.entity.DynamicFormInstance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -22,7 +22,6 @@ import lombok.EqualsAndHashCode;
@ApiModel(value="OrgUsr对象", description="部门信息")
public class OrgDepartmentDto extends BaseDto {
/**
*
*/
......@@ -77,5 +76,5 @@ public class OrgDepartmentDto extends BaseDto {
private String recUserName;
@ApiModelProperty(value = "动态表单值")
private List<AlertFormValue> alertFormValue;
private List<DynamicFormInstance> dynamicFormValue;
}
......@@ -66,7 +66,6 @@ public class OrgMenuDto {
this.key = key;
this.title = title;
this.parentId = parentId;
this.children = children;
this.bizOrgType = bizOrgType;
}
......
......@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
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.common.api.entity.DynamicFormInstance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -77,6 +77,6 @@ public class OrgPersonDto extends BaseDto {
private String recUserName;
@ApiModelProperty(value = "动态表单值")
private List<AlertFormValue> alertFormValue;
private List<DynamicFormInstance> dynamicFormValue;
}
......@@ -5,7 +5,7 @@ import java.util.List;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
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.common.api.entity.DynamicFormInstance;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -74,5 +74,5 @@ public class OrgUsrDto extends BaseDto {
private String recUserName;
@ApiModelProperty(value = "动态表单值")
private List<AlertFormValue> alertFormValue;
private List<DynamicFormInstance> dynamicFormValue;
}
package com.yeejoin.amos.boot.module.common.api.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value="SelectItem", description="下拉表单值")
public class SelectItem implements Serializable{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "key")
private String key;
@ApiModelProperty(value = "名称")
private String label;
@ApiModelProperty(value = "值")
private String value;
public SelectItem(String key, String label, String value) {
super();
this.key = key;
this.label = label;
this.value = value;
}
@Override
public String toString() {
return "SelectItem []";
}
}
package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 动态表单值
*
**/
@Data
@ApiModel(value="SelectItems", description="动态表单值")
public class SelectItems implements Serializable{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "初始化值")
private List<SelectItem> items;
public SelectItems() {
super();
}
public SelectItems(List<SelectItem> items) {
super();
this.items = items;
}
}
......@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -76,4 +79,8 @@ public class DynamicFormColumn extends BaseEntity {
*/
@TableField("remark")
private String remark;
//新加排序字段
@TableField("sort")
private int sort;
}
......@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -81,4 +84,65 @@ public class DynamicFormInstance extends BaseEntity {
*/
@TableField("app_key")
private String appKey;
/**
* 不能为空
*/
@TableField("not_null")
private Boolean notNull;
/**
* 是否一行显示(兼容已有动态表单使用)
*/
@TableField("block")
private Boolean block;
@TableField(value = "column_config")
private String columnConfig;
//新加排序字段
@TableField("sort")
private int sort;
public DynamicFormInstance() {
super();
}
public DynamicFormInstance(Long alertFormId, String fieldName, String fieldCode, boolean block) {
this.instanceId = alertFormId;
this.fieldName = fieldName;
this.fieldCode = fieldCode;
this.block = block;
}
public DynamicFormInstance(Long alertFormId, String fieldName, String fieldCode, boolean block, String alertTypeCode) {
this.instanceId = alertFormId;
this.fieldName = fieldName;
this.fieldCode = fieldCode;
this.block = block;
this.fieldValueLabel = alertTypeCode;
}
public DynamicFormInstance(Long alertFormId, String fieldName, String fieldCode, boolean block, String groupCode,
String fieldValue, String fieldValueCode) {
this.instanceId = alertFormId;
this.fieldName = fieldName;
this.fieldCode = fieldCode;
this.block = block;
this.groupCode = groupCode;
this.fieldValue = fieldValue;
this.fieldValueLabel = fieldValueCode;
}
public DynamicFormInstance(Long alertFormId, String groupCode, String fieldName, String fieldCode,
String fieldValue, String fieldValueCode, Boolean block) {
this.instanceId = alertFormId;
this.groupCode = groupCode;
this.fieldName = fieldName;
this.fieldCode = fieldCode;
this.fieldValue = fieldValue;
this.fieldValueLabel = fieldValueCode;
this.block = block;
}
}
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
......@@ -11,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstance> {
public List<DynamicFormInstanceDto> selectListByCalledId(Long id);
}
......@@ -13,7 +13,7 @@ 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.AlertFormValue;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
......@@ -93,14 +93,14 @@ public interface IOrgUsrService {
* @param orgUsr
* @param alertFromValuelist
*/
void saveOrgUsrAlertFormValue (OrgUsr orgUsr,List<AlertFormValue> alertFromValuelist)throws Exception;
void saveOrgUsrDynamicFormInstance (OrgUsr orgUsr,List<DynamicFormInstance> alertFromValuelist)throws Exception;
/**
* 更新机构/部门/人员基本信息和动态表单数据
* @param alertFromValuelist
* @throws Exception
*/
void updateAlertFormValue(OrgUsr orgUsr,Long alertCalledId,List<AlertFormValue> alertFromValuelist)throws Exception;
void updateDynamicFormInstance(OrgUsr orgUsr,Long alertCalledId,List<DynamicFormInstance> alertFromValuelist)throws Exception;
/**
*
......
<?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.DynamicFormInstanceMapper">
<select id="selectListByCalledId" resultType="com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto">
SELECT
v.sequence_nbr sequenceNbr,
v.form_column_id formColumnId,
v.instance_id instanceId,
v.group_code groupCode,
v.field_name fieldName,
v.field_code fieldCode,
v.field_value fieldValue,
v.field_value_label fieldValueLabel,
v.rec_user_name recUserName,
v.rec_user_id recUserId,
v.rec_date recDate,
v.is_delete isDelete,
v.block block,
f.field_type fieldType
FROM
cb_dynamic_form_instance v
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
WHERE v.instance_id=#{id}
</select>
</mapper>
......@@ -30,8 +30,8 @@
</if>
FROM
cb_org_usr u LEFT JOIN
jc_alert_form_value v on u.sequence_nbr = v.alert_called_id
LEFT JOIN jc_alert_form f ON f.sequence_nbr = v.alert_form_id
cb_dynamic_form_instance v on u.sequence_nbr = v.instance_id
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
where
u.biz_org_type = #{bizOrgType}
AND u.is_delete = 0
......@@ -67,8 +67,8 @@
</if>
FROM
cb_org_usr u LEFT JOIN
jc_alert_form_value v on u.sequence_nbr = v.alert_called_id
LEFT JOIN jc_alert_form f ON f.sequence_nbr = v.alert_form_id
cb_dynamic_form_instance v on u.sequence_nbr = v.instance_id
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
where
u.biz_org_type = #{bizOrgType}
AND u.is_delete = 0
......@@ -104,8 +104,8 @@
</if>
FROM
cb_org_usr u LEFT JOIN
jc_alert_form_value v on u.sequence_nbr = v.alert_called_id
LEFT JOIN jc_alert_form f ON f.sequence_nbr = v.alert_form_id
cb_dynamic_form_instance v on u.sequence_nbr = v.instance_id
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
where u.parent_id = #{parentId}
AND u.biz_org_type = #{bizOrgType}
AND U.is_delete = 0
......@@ -176,7 +176,7 @@
from cb_org_usr u
left join
(
select alert_called_id,
select instance_id,
max(case field_code when 'personNumber' then field_value end) person_number,
max(case field_code when 'certificatesTypeCode' then field_value end) certificates_type,
max(case field_code when 'gender' then field_value end) gender,
......@@ -194,11 +194,11 @@
max(case field_code when 'auditCycle' then field_value end) audit_cycle,
max(case field_code when 'personImg' then field_value end) person_img,
max(case field_code when 'certificateImg' then field_value end) certificate_img
from jc_alert_form_value
where alert_type_code = 246
group by alert_called_id
from cb_dynamic_form_instance
where group_code = 246
group by instance_id
) v
on u.sequence_nbr = v.alert_called_id
on u.sequence_nbr = v.instance_id
where u.is_delete = #{isDelete}
</select>
</mapper>
......@@ -94,11 +94,11 @@ public class AlertFormServiceImpl extends BaseService<AlertFormDto, AlertForm, A
return listAlertListvalue;
}
public List<String> queryListByFormId(String typeCode) {
return this.queryListByTypeCode(typeCode).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
public List<String> queryListByFormId(String groupId) {
return this.queryListByTypeCode(groupId).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
}
public List<AlertFormDto> queryListByTypeCode(String alertTypeCode) {
return this.queryForList(null, false, alertTypeCode);
public List<AlertFormDto> queryListByTypeCode(String groupId) {
return this.queryForList(null, false, groupId);
}
}
package com.yeejoin.amos.boot.module.common.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.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormColumnDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInitDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.SelectItem;
import com.yeejoin.amos.boot.module.common.api.dto.SelectItems;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormColumnMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDynamicFormColumnService;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormColumnDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 动态表单树形分组字段表服务实现类
*
......@@ -16,7 +31,10 @@ import java.util.List;
*/
@Service
public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnDto,DynamicFormColumn,DynamicFormColumnMapper> implements IDynamicFormColumnService {
/**
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
/**
* 分页查询
*/
public Page<DynamicFormColumnDto> queryForDynamicFormColumnPage(Page<DynamicFormColumnDto> page) {
......@@ -29,4 +47,84 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
public List<DynamicFormColumnDto> queryForDynamicFormColumnList() {
return this.queryForList("" , false);
}
public List<String> queryListByFormId(String groupCode) {
return this.queryListByTypeCode(groupCode).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
}
public List<DynamicFormColumnDto> queryListByTypeCode(String groupCode) {
return this.queryForList(null, false, groupCode);
}
public List<DynamicFormInitDto> getFormlist(String code) {
QueryWrapper<DynamicFormColumn> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("group_code", code);
queryWrapper.orderByAsc("sort");
List<DynamicFormColumn> dynamicFormColumn = this.list(queryWrapper);
List<DynamicFormInitDto> listfrom = new ArrayList<DynamicFormInitDto>();
// 组装数据
for (DynamicFormColumn dynamicForm : dynamicFormColumn) {
if ( dynamicForm.getFieldType().equals("input") ||
dynamicForm.getFieldType().equals("string") ||
dynamicForm.getFieldType().equals("datetime") ||
dynamicForm.getFieldType().equals("textarea") ||
dynamicForm.getFieldType().equals("inputBitmap")) {
DynamicFormInitDto vo = new DynamicFormInitDto(dynamicForm.getFieldCode(), dynamicForm.getFieldName(),
dynamicForm.getFieldType(), null, null);
DynamicFormInstanceDto dynamicFormValue = new DynamicFormInstanceDto(dynamicForm.getSequenceNbr(), dynamicForm.getFieldName(),
dynamicForm.getFieldCode(), dynamicForm.getBlock(), dynamicForm.getGroupCode());
if (dynamicForm.getFieldType().equals("datetime")) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
String dateString = formatter.format(date);
dynamicFormValue.setFieldValue(dateString);
vo.setDefaultValue(date);
}
vo.setFormItemDescr(dynamicFormValue);
listfrom.add(vo);
} else {
// 查询数据项
String columnConfig = dynamicForm.getColumnConfig();
JSONObject columnConfigJson = JSONObject.parseObject(columnConfig);
if (!"custom".equals(columnConfigJson.get("type"))) {
}
QueryWrapper<DataDictionary> queryWrappercolumnMap = new QueryWrapper<>();
queryWrappercolumnMap.eq("type", dynamicForm.getGroupCode());
queryWrappercolumnMap.orderByAsc("sort_num");
Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap);
List<SelectItem> list = getdata(listDataDictionary);
DynamicFormInitDto vo = new DynamicFormInitDto(dynamicForm.getFieldCode(), dynamicForm.getFieldName(),
dynamicForm.getFieldType(), new SelectItems(list), dynamicForm.getColumnConfig());
DynamicFormInstanceDto dynamicFormValue = new DynamicFormInstanceDto(dynamicForm.getSequenceNbr(), dynamicForm.getFieldName(),
dynamicForm.getFieldCode(), dynamicForm.getBlock(), dynamicForm.getGroupCode());
if (dynamicForm.getFieldType().equals("radio")) {
vo.setDefaultValue(list.get(0).getValue());
dynamicFormValue.setFieldValue(list.get(0).getLabel());
dynamicFormValue.setFieldValueLabel(list.get(0).getValue());
}
vo.setFormItemDescr(dynamicFormValue);
listfrom.add(vo);
}
}
return listfrom;
}
public List<SelectItem> getdata(Collection<DataDictionary> list) {
List<SelectItem> listAlertListvalue = new ArrayList<SelectItem>();
for (DataDictionary dataDictionary : list) {
listAlertListvalue.add(new SelectItem(dataDictionary.getSequenceNbr().toString(),
dataDictionary.getName(), dataDictionary.getCode()));
}
return listAlertListvalue;
}
}
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.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormInstanceMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDynamicFormInstanceService;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 动态表单实例表服务实现类
*
......@@ -16,7 +19,10 @@ import java.util.List;
*/
@Service
public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInstanceDto,DynamicFormInstance,DynamicFormInstanceMapper> implements IDynamicFormInstanceService {
/**
@Autowired
private DynamicFormInstanceMapper dynamicFormInstanceMapper;
/**
* 分页查询
*/
public Page<DynamicFormInstanceDto> queryForDynamicFormInstancePage(Page<DynamicFormInstanceDto> page) {
......@@ -29,4 +35,14 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
public List<DynamicFormInstanceDto> queryForDynamicFormInstanceList() {
return this.queryForList("" , false);
}
public List<DynamicFormInstanceDto> queryByCalledId(Long instanceId) {
return this.queryForList(null, false, instanceId);
}
public List<DynamicFormInstanceDto> listByCalledId(Long instanceId) {
return dynamicFormInstanceMapper.selectListByCalledId(instanceId);
}
}
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService;
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.*;
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;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.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.AlertFormValue;
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;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* 机构/部门/人员表 服务实现类
......@@ -38,9 +59,9 @@ import java.util.stream.Collectors;
@Service
public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapper> implements IOrgUsrService {
@Autowired
AlertFormValueServiceImpl alertFormValueServiceImpl;
DynamicFormInstanceServiceImpl alertFormValueServiceImpl;
@Autowired
AlertFormServiceImpl alertFormServiceImpl;
DynamicFormColumnServiceImpl alertFormServiceImpl;
@Resource
OrgUsrMapper orgUsrMapper;
......@@ -242,9 +263,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Map<String, Object> phone = new HashMap<>();
phone.put("alert_called_id", company.getSequenceNbr());
phone.put("field_code", "companyPhone");
QueryWrapper<AlertFormValue> phoneWrapper = new QueryWrapper<AlertFormValue>();
QueryWrapper<DynamicFormInstance> phoneWrapper = new QueryWrapper<DynamicFormInstance>();
phoneWrapper.allEq(phone);
AlertFormValue phoneValue = alertFormValueServiceImpl.getOne(phoneWrapper);
DynamicFormInstance phoneValue = alertFormValueServiceImpl.getOne(phoneWrapper);
if (phoneValue == null) {
resultMap.put("tel", "");
} else {
......@@ -316,10 +337,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public List<FormValue> getFormValue(Long id) throws Exception {
// 动态表单数据
List<AlertFormValueDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<DynamicFormInstanceDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<FormValue> formValue = new ArrayList<>();
for (AlertFormValueDto alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null) {
for (DynamicFormInstanceDto alertFormValue : list) {
if (alertFormValue.getFieldValue()== null) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getBlock());
......@@ -327,7 +348,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
alertFormValue.getFieldType(),
alertFormValue.getFieldValueCode(), alertFormValue.getBlock());
alertFormValue.getFieldValueLabel(), alertFormValue.getBlock());
formValue.add(value);
}
}
......@@ -336,9 +357,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public List<FormValue> getFormValueDetail(Long id) throws Exception {
// 动态表单数据
List<AlertFormValueDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<DynamicFormInstanceDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<FormValue> formValue = new ArrayList<>();
for (AlertFormValueDto alertFormValue : list) {
for (DynamicFormInstanceDto alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getBlock());
......@@ -391,7 +412,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
@Override
public void saveOrgUsrAlertFormValue(OrgUsr orgUsr, List<AlertFormValue> alertFromValuelist) {
public void saveOrgUsrDynamicFormInstance(OrgUsr orgUsr, List<DynamicFormInstance> alertFromValuelist) {
orgUsr.setRecDate(new Date());
AgencyUserModel user = Privilege.agencyUserClient.getme().getResult();
orgUsr.setRecUserName(user.getRealName());
......@@ -401,33 +422,33 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> {
if (OrgPersonEnum.公司.getKey().equals(orgUsr.getBizOrgType())) {
alertFromValue.setAlertTypeCode(OrgPersonEnum.公司.getCode());
alertFromValue.setGroupCode(OrgPersonEnum.公司.getCode());
} else if (OrgPersonEnum.部门.getKey().equals(orgUsr.getBizOrgType())) {
alertFromValue.setAlertTypeCode(OrgPersonEnum.部门.getCode());
alertFromValue.setGroupCode(OrgPersonEnum.部门.getCode());
}
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
alertFromValue.setInstanceId(orgUsr.getSequenceNbr());
});
// 保存动态表单数据
alertFormValueServiceImpl.saveBatch(alertFromValuelist);
}
@Override
public void updateAlertFormValue(OrgUsr orgUsr, Long alertCalledId, List<AlertFormValue> alertFromValuelist) throws Exception {
public void updateDynamicFormInstance(OrgUsr orgUsr, Long alertCalledId, List<DynamicFormInstance> alertFromValuelist) throws Exception {
// 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
alertFromValue.setInstanceId(orgUsr.getSequenceNbr());
});
List<AlertFormValueDto> formList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr());
List<DynamicFormInstanceDto> formList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr());
if (formList != null && formList.size() > 0) {
for (AlertFormValue dis : alertFromValuelist) {
for (AlertFormValueDto src : formList) {
if (dis.getAlertFormId() == src.getAlertFormId()) {
for (DynamicFormInstance dis : alertFromValuelist) {
for (DynamicFormInstanceDto src : formList) {
if (dis.getFormColumnId() == src.getFormColumnId()) {
dis.setSequenceNbr(src.getSequenceNbr());
dis.setRecDate(new Date());
dis.setRecUserId(orgUsr.getRecUserId());
dis.setRecUserName(orgUsr.getRecUserName());
dis.setAlertTypeCode(src.getAlertTypeCode());
dis.setAlertFormId(src.getAlertFormId());
dis.setFieldValue(src.getFieldValue());
dis.setFieldValueLabel(src.getFieldValueLabel());
dis.setSequenceNbr(src.getSequenceNbr());
break;
}
......@@ -436,16 +457,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 保存动态表单数据
alertFormValueServiceImpl.updateBatchById(alertFromValuelist);
List<AlertFormDto> form = alertFormServiceImpl.queryListByTypeCode(formList.get(0).getAlertTypeCode());
List<DynamicFormColumnDto> form = alertFormServiceImpl.queryListByTypeCode(formList.get(0).getGroupCode());
if (form.size() != alertFromValuelist.size()) {
List<AlertFormValue> creatList = new ArrayList<>();
List<DynamicFormInstance> creatList = new ArrayList<>();
for (AlertFormValue dis : alertFromValuelist) {
for (DynamicFormInstance dis : alertFromValuelist) {
boolean exist = false;
for (AlertFormValueDto src : formList) {
if (dis.getAlertFormId() == src.getSequenceNbr()) {
for (DynamicFormInstanceDto src : formList) {
if (dis.getFormColumnId() == src.getSequenceNbr()) {
exist = true;
break;
}
......@@ -458,7 +479,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
alertFormValueServiceImpl.saveBatch(creatList);
}
List<AlertFormValue> creatList =
List<DynamicFormInstance> creatList =
alertFromValuelist.stream().filter(v -> v.getSequenceNbr() == null || v.getSequenceNbr() == 0).collect(Collectors.toList());
if (creatList != null && creatList.size() > 0) {
alertFormValueServiceImpl.saveBatch(creatList);
......@@ -471,19 +492,19 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public Map<String, Object> selectForShowById(OrgUsr orgUsr, Long id) throws Exception {
QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<AlertForm>();
queryWrapper.eq("alert_type_code", OrgPersonEnum.人员.getCode());
List<AlertForm> alertForms = alertFormServiceImpl.list(queryWrapper);
QueryWrapper<DynamicFormColumn> queryWrapper = new QueryWrapper<DynamicFormColumn>();
queryWrapper.eq("group_id", OrgPersonEnum.人员.getCode());
List<DynamicFormColumn> alertForms = alertFormServiceImpl.list(queryWrapper);
// 动态表单数据
List<AlertFormValueDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<DynamicFormInstanceDto> list = alertFormValueServiceImpl.listByCalledId(id);
Map<String, Object> result = new HashMap<>();
result = Bean.BeantoMap(orgUsr);
result.put("parenName", getById(orgUsr.getParentId()).getBizOrgName());
// 放入所有动态表单数据
for (AlertForm alertForm : alertForms) {
for (DynamicFormColumn alertForm : alertForms) {
result.put(alertForm.getFieldCode(), null);
}
for (AlertFormValueDto alertFormValue : list) {
for (DynamicFormInstanceDto alertFormValue : list) {
result.replace(alertFormValue.getFieldCode(), alertFormValue.getFieldValue());
}
return result;
......@@ -512,7 +533,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} else {
orgUsr.setBizOrgCode(getOrgCodeStr());
}
saveOrgUsrAlertFormValue(orgUsr, OrgUsrVo.getAlertFormValue());
saveOrgUsrDynamicFormInstance(orgUsr, OrgUsrVo.getDynamicFormValue());
}
@Override
......@@ -535,7 +556,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgPersonVo.setAmosOrgCode(user.getRealName());
}
saveOrgUsrAlertFormValue(orgUsr, OrgPersonVo.getAlertFormValue());
saveOrgUsrDynamicFormInstance(orgUsr, OrgPersonVo.getDynamicFormValue());
}
@Override
......@@ -554,7 +575,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
saveOrgUsr(orgUsr, id);
// 保存动态表单数据
updateAlertFormValue(oriOrgUsr, orgUsr.getSequenceNbr(), OrgUsrVo.getAlertFormValue());
updateDynamicFormInstance(oriOrgUsr, orgUsr.getSequenceNbr(), OrgUsrVo.getDynamicFormValue());
}
@Override
......@@ -573,7 +594,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
saveOrgUsr(oriOrgUsr, id);
// 保存动态表单数据
updateAlertFormValue(oriOrgUsr, orgUsr.getSequenceNbr(), OrgPersonVo.getAlertFormValue());
updateDynamicFormInstance(oriOrgUsr, orgUsr.getSequenceNbr(), OrgPersonVo.getDynamicFormValue());
}
@Override
......@@ -613,7 +634,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgDepartmentVo.get(i), orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_DEPARTMENT);
saveOrgUsrAlertFormValue(orgUsr, OrgDepartmentVo.get(i).getAlertFormValue());
saveOrgUsrDynamicFormInstance(orgUsr, OrgDepartmentVo.get(i).getDynamicFormValue());
}
}
}
......@@ -624,7 +645,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgUsrVo.get(i), orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_COMPANY);
saveOrgUsrAlertFormValue(orgUsr, OrgUsrVo.get(i).getAlertFormValue());
saveOrgUsrDynamicFormInstance(orgUsr, OrgUsrVo.get(i).getDynamicFormValue());
}
}
......@@ -672,7 +693,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgPersonVo.get(i), orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
saveOrgUsrAlertFormValue(orgUsr, OrgPersonVo.get(i).getAlertFormValue());
saveOrgUsrDynamicFormInstance(orgUsr, OrgPersonVo.get(i).getDynamicFormValue());
}
}
......@@ -689,7 +710,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} else {
orgUsr.setBizOrgCode(getOrgCodeStr());
}
saveOrgUsrAlertFormValue(orgUsr, OrgDepartmentVo.getAlertFormValue());
saveOrgUsrDynamicFormInstance(orgUsr, OrgDepartmentVo.getDynamicFormValue());
}
@Override
......@@ -708,7 +729,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
saveOrgUsr(orgUsr, id);
// 保存动态表单数据
updateAlertFormValue(oriOrgUsr, orgUsr.getSequenceNbr(), OrgDepartmentVo.getAlertFormValue());
updateDynamicFormInstance(oriOrgUsr, orgUsr.getSequenceNbr(), OrgDepartmentVo.getDynamicFormValue());
}
@Override
......@@ -748,109 +769,109 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
list.forEach(item -> {
OrgPersonDto orgPersonDto = new OrgPersonDto();
orgPersonDto = Bean.toPo(item, orgPersonDto);
List<AlertFormValue> alertFormValueList = new ArrayList<>();
List<DynamicFormInstance> alertFormValueList = new ArrayList<>();
if (item.getPersonNumber() != null) {
AlertFormValue alertFormValue = new AlertFormValue(102L, "246", "员工编号", "personNumber",
DynamicFormInstance alertFormValue = new DynamicFormInstance(102L, OrgPersonEnum.人员.getCode(), "员工编号", "personNumber",
item.getPersonNumber(), null, false);
alertFormValueList.add(alertFormValue);
}
if (item.getCertificatesType() != null) {
String certificatesType = item.getCertificatesType();
String[] split = certificatesType.split("@");
AlertFormValue alertFormValue = new AlertFormValue(23L, "246", "证件类型", "certificatesTypeCode"
DynamicFormInstance alertFormValue = new DynamicFormInstance(23L, OrgPersonEnum.人员.getCode(), "证件类型", "certificatesTypeCode"
, split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getGender() != null) {
String gender = item.getGender();
String[] split = gender.split("@");
AlertFormValue alertFormValue = new AlertFormValue(22L, "246", "性别", "gender", split[0],
DynamicFormInstance alertFormValue = new DynamicFormInstance(22L, OrgPersonEnum.人员.getCode(), "性别", "gender", split[0],
split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getCertificatesNumber() != null) {
AlertFormValue alertFormValue = new AlertFormValue(100L, "246", "证件号码", "certificatesNumber",
DynamicFormInstance alertFormValue = new DynamicFormInstance(100L, OrgPersonEnum.人员.getCode(), "证件号码", "certificatesNumber",
item.getCertificatesNumber(), null, false);
alertFormValueList.add(alertFormValue);
}
if (item.getTelephone() != null) {
AlertFormValue alertFormValue = new AlertFormValue(24L, "246", "联系电话", "telephone",
DynamicFormInstance alertFormValue = new DynamicFormInstance(24L, OrgPersonEnum.人员.getCode(), "联系电话", "telephone",
item.getTelephone(), null, false);
alertFormValueList.add(alertFormValue);
}
if (item.getState() != null) {
String state = item.getState();
String[] split = state.split("@");
AlertFormValue alertFormValue = new AlertFormValue(25L, "246", "人员状态", "stateCode", split[0],
DynamicFormInstance alertFormValue = new DynamicFormInstance(25L, OrgPersonEnum.人员.getCode(), "人员状态", "stateCode", split[0],
split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getSafetyTraining() != null) {
String safetyTraining = item.getSafetyTraining();
String[] split = safetyTraining.split("@");
AlertFormValue alertFormValue = new AlertFormValue(29L, "246", "是否进行安全培训", "safetyTraining",
DynamicFormInstance alertFormValue = new DynamicFormInstance(29L, OrgPersonEnum.人员.getCode(), "是否进行安全培训", "safetyTraining",
split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getAdministrativePosition() != null) {
String administrativePosition = item.getAdministrativePosition();
String[] split = administrativePosition.split("@");
AlertFormValue alertFormValue = new AlertFormValue(28L, "246", "行政职务",
DynamicFormInstance alertFormValue = new DynamicFormInstance(28L, OrgPersonEnum.人员.getCode(), "行政职务",
"administrativePositionCode", split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getInternalPosition() != null) {
String internalPosition = item.getInternalPosition();
String[] split = internalPosition.split("@");
AlertFormValue alertFormValue = new AlertFormValue(26L, "246", "消防管理组织机构内部职务",
DynamicFormInstance alertFormValue = new DynamicFormInstance(26L, OrgPersonEnum.人员.getCode(), "消防管理组织机构内部职务",
"internalPositionCode", split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getFireManagementPost() != null) {
String fireManagementPost = item.getFireManagementPost();
String[] split = fireManagementPost.split("@");
AlertFormValue alertFormValue = new AlertFormValue(27L, "246", "消防管理岗位",
DynamicFormInstance alertFormValue = new DynamicFormInstance(27L, OrgPersonEnum.人员.getCode(), "消防管理岗位",
"fireManagementPostCode", split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getPositionType() != null) {
String positionType = item.getPositionType();
String[] split = positionType.split("@");
AlertFormValue alertFormValue = new AlertFormValue(30L, "246", "岗位类型", "positionType",
DynamicFormInstance alertFormValue = new DynamicFormInstance(30L, OrgPersonEnum.人员.getCode(), "岗位类型", "positionType",
split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getCertificateType() != null) {
String certificateType = item.getCertificateType();
String[] split = certificateType.split("@");
AlertFormValue alertFormValue = new AlertFormValue(31L, "246", "持证类别", "certificateType",
DynamicFormInstance alertFormValue = new DynamicFormInstance(31L, OrgPersonEnum.人员.getCode(), "持证类别", "certificateType",
split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getHoldingTime() != null) {
AlertFormValue alertFormValue = new AlertFormValue(32L, "246", "持证时间", "holdingTime",
DynamicFormInstance alertFormValue = new DynamicFormInstance(32L, OrgPersonEnum.人员.getCode(), "持证时间", "holdingTime",
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(item.getHoldingTime()), null, false);
alertFormValueList.add(alertFormValue);
}
if (item.getAuditCycle() != null) {
String auditCycle = item.getAuditCycle();
String[] split = auditCycle.split("@");
AlertFormValue alertFormValue = new AlertFormValue(33L, "246", "审核周期", "auditCycle",
DynamicFormInstance alertFormValue = new DynamicFormInstance(33L, OrgPersonEnum.人员.getCode(), "审核周期", "auditCycle",
split[0], split[1], false);
alertFormValueList.add(alertFormValue);
}
if (item.getPersonImg() != null) {
AlertFormValue alertFormValue = new AlertFormValue(34L, "246", "人员照片", "personImg",
DynamicFormInstance alertFormValue = new DynamicFormInstance(34L, OrgPersonEnum.人员.getCode(), "人员照片", "personImg",
item.getPersonImg(), null, false);
alertFormValueList.add(alertFormValue);
}
if (item.getCertificateImg() != null) {
AlertFormValue alertFormValue = new AlertFormValue(101L, "246", "重点工种资质证书", "certificateImg",
DynamicFormInstance alertFormValue = new DynamicFormInstance(101L, OrgPersonEnum.人员.getCode(), "重点工种资质证书", "certificateImg",
item.getCertificateImg(), null, false);
alertFormValueList.add(alertFormValue);
}
try {
orgPersonDto.setAlertFormValue(alertFormValueList);
orgPersonDto.setDynamicFormValue(alertFormValueList);
this.saveOrgPerson(orgPersonDto);
} catch (Exception e) {
e.printStackTrace();
......
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