字段允许个人修改
This commit is contained in:
parent
a3a0ce8046
commit
b0021dae20
|
|
@ -102,8 +102,8 @@ public class ExtendInfoBO {
|
|||
.extendGroupId(extendGroupId)
|
||||
.isenable("1".equals(infoFieldParam.getEnable()) ? 1 : 0)
|
||||
.isrequired("1".equals(infoFieldParam.getRequired()) ? 1 : 0)
|
||||
.isModify("1".equals(infoFieldParam.getIsModify()) ? 1 : 0)
|
||||
.listShow(1)
|
||||
// .editShow("0".equals(infoFieldParam.getIsModify()) ? 0 : 1)
|
||||
.editShow(1)
|
||||
.addShow(1)
|
||||
.browserShow(1)
|
||||
|
|
|
|||
|
|
@ -111,10 +111,22 @@ public class ExtendInfoPO {
|
|||
|
||||
private Integer isSystemDefault;
|
||||
|
||||
/**
|
||||
* 允许个人修改
|
||||
*/
|
||||
private Integer isModify;
|
||||
|
||||
/**
|
||||
* 允许个人修改属性
|
||||
*/
|
||||
private Integer modifyProps;
|
||||
|
||||
/**
|
||||
* 启用、必填check框属性
|
||||
*/
|
||||
private Integer checkProps;
|
||||
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
<result column="show_order" property="showOrder"/>
|
||||
<result column="is_system_default" property="isSystemDefault"/>
|
||||
<result column="ismodify" property="isModify"/>
|
||||
<result column="modify_props" property="modifyProps"/>
|
||||
<result column="check_props" property="checkProps"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
, t.show_order
|
||||
, t.is_system_default
|
||||
, t.ismodify
|
||||
, t.modify_props
|
||||
, t.check_props
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
|
|
@ -130,6 +132,11 @@
|
|||
<if test="isSystemDefault != null ">
|
||||
is_system_default,
|
||||
</if>
|
||||
<if test="isModify != null ">
|
||||
ismodify,
|
||||
</if>
|
||||
check_props,
|
||||
modify_props,
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
|
|
@ -198,6 +205,11 @@
|
|||
<if test="isSystemDefault != null ">
|
||||
#{isSystemDefault},
|
||||
</if>
|
||||
<if test="isModify != null ">
|
||||
#{isModify},
|
||||
</if>
|
||||
2,
|
||||
2,
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -274,6 +286,11 @@
|
|||
<if test="isSystemDefault != null ">
|
||||
is_system_default,
|
||||
</if>
|
||||
<if test="isModify != null ">
|
||||
ismodify,
|
||||
</if>
|
||||
check_props,
|
||||
modify_props,
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
|
|
@ -342,6 +359,11 @@
|
|||
<if test="isSystemDefault != null ">
|
||||
#{isSystemDefault},
|
||||
</if>
|
||||
<if test="isModify != null ">
|
||||
#{isModify},
|
||||
</if>
|
||||
2,
|
||||
2,
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="addTableColumn">
|
||||
|
|
@ -355,6 +377,7 @@
|
|||
field_name_desc=#{fieldNameDesc},
|
||||
isenable=#{isenable},
|
||||
isrequired=#{isrequired},
|
||||
ismodify=#{isModify},
|
||||
show_order=#{showOrder},
|
||||
custom_value=#{customValue},
|
||||
</set>
|
||||
|
|
|
|||
|
|
@ -373,13 +373,17 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|||
if (null == checkProps) {
|
||||
checkProps = 1;
|
||||
}
|
||||
// TODO
|
||||
// 1:只读,2:可编辑,
|
||||
Integer modifyProps = extendInfoPO.getModifyProps();
|
||||
if (null == modifyProps) {
|
||||
modifyProps = 1;
|
||||
}
|
||||
// 启用列是否可编辑
|
||||
checkPropsEnableInfo.put("viewAttr", checkProps == 3 ? 2 : 1);
|
||||
checkPropsEnableInfo.put("viewAttr", checkProps);
|
||||
// 必填列是否可编辑
|
||||
checkPropsRequiredInfo.put("viewAttr", checkProps == 3 ? 2 : 1);
|
||||
checkPropsRequiredInfo.put("viewAttr", checkProps);
|
||||
//允许个人修改列是否可编辑
|
||||
checkPropsModifyInfo.put("viewAttr", checkProps);
|
||||
checkPropsModifyInfo.put("viewAttr", modifyProps);
|
||||
|
||||
checkPropsInfo.put("enable", checkPropsEnableInfo);
|
||||
checkPropsInfo.put("required", checkPropsRequiredInfo);
|
||||
|
|
|
|||
|
|
@ -141,9 +141,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName, ExtendInfoOperateType.LIST.getValue(), "1");
|
||||
List<ExtendInfoPO> filterList = infoPOList.stream().filter(item -> !excludeFields.contains(item.getFieldName()) && 6 != item.getControlType()).collect(Collectors.toList());
|
||||
List<FieldTransferParam> fieldDatas = filterList.stream().map(item -> FieldTransferParam.builder().id(item.getId().toString()).name(item.getFieldNameDesc()).build()).collect(Collectors.toList());
|
||||
//fieldDatas.addAll(0, includeFields);
|
||||
List<String> selectedKeys = filterList.stream().filter(item -> (0 == item.getIsSystemDefault()) && 1 == item.getIsrequired()).map(item -> item.getId().toString()).collect(Collectors.toList());
|
||||
//selectedKeys.addAll(0, selectedList);
|
||||
returnMaps.put("data", fieldDatas);
|
||||
returnMaps.put("selectedKeys", selectedKeys);
|
||||
|
||||
|
|
@ -203,37 +201,12 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
returnMap.put("pId", jobImport(operateType, excelFile));
|
||||
break;
|
||||
case "resource":
|
||||
//Long importHistoryId = saveImportLog("resource", operateType);
|
||||
//HrmImportAdaptExcelE9 importAdapt = new HrmImportAdaptExcelE9();
|
||||
//FileUploadToPath fu = new FileUploadToPath(request);
|
||||
//
|
||||
//List<String> errorInfo = importAdapt.creatImportMap(fu);
|
||||
//
|
||||
////如果读取数据和验证模板没有发生错误
|
||||
//if (errorInfo.isEmpty()) {
|
||||
// Map<String, HrmResourceVo> hrMap = importAdapt.getHrmImportMap();
|
||||
//
|
||||
// HrmImportProcessE9 importProcess = new HrmImportProcessE9();
|
||||
// importProcess.init(request, importHistoryId);
|
||||
//
|
||||
//
|
||||
// importProcess.processMap(hrMap);
|
||||
//} else {
|
||||
// for (String s : errorInfo) {
|
||||
// MapperProxyFactory.getProxy(JclImportHistoryDetailMapper.class).insertHistoryDetail(JclImportHistoryDetailPO.builder().pid(importHistoryId).operateDetail(Util.null2String(s)).status("0").build());
|
||||
// }
|
||||
//}
|
||||
//returnMap.put("pId", importHistoryId);
|
||||
|
||||
returnMap.put("pId", hrmResourceImport(operateType, excelFile,keyField));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 列表
|
||||
// importstatus
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue