自定义字段BUG修复

pull/202/MERGE^2
dxfeng 3 years ago
parent e135b02ed7
commit 477a2f3bce

@ -9,6 +9,7 @@ update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_na
update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_name ='JCL_ORG_JOB' and field_name='description' ;
update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_name ='JCL_ORG_JOB' and field_name='work_duty' ;
update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_name ='JCL_ORG_JOB' and field_name='work_authority';
update jcl_field_extendinfo set browser_type='666', custom_value='["browser",{"valueSpan":"聚才林岗位","replaceDatas":[{"itemorderid":"0","name":"聚才林岗位","id":"666","parenttitle":"资产","title":"资产-聚才林岗位"}],"value":"666"}]' where table_name ='JCL_ORG_JOB' and field_name='parent_job';
delete from SystemRightDetail where rightid =2714;

@ -53,7 +53,7 @@ public class ExtendGroupBO {
private static boolean isHasGroup(Long id) {
List<ExtendTitlePO> titlesByGroupID = MapperProxyFactory.getProxy(ExtendTitleMapper.class).getTitlesByGroupID(id);
List<ExtendTitlePO> titlesByGroupID = MapperProxyFactory.getProxy(ExtendTitleMapper.class).getTitlesByGroupID(id,null);
return titlesByGroupID.size() > 0;
}

@ -103,7 +103,8 @@ public class ExtendInfoBO {
.isenable("1".equals(infoFieldParam.getEnable()) ? 1 : 0)
.isrequired("1".equals(infoFieldParam.getRequired()) ? 1 : 0)
.listShow(1)
.editShow("0".equals(infoFieldParam.getIsModify()) ? 0 : 1)
// .editShow("0".equals(infoFieldParam.getIsModify()) ? 0 : 1)
.editShow(1)
.addShow(1)
.browserShow(1)
.customValue(convertSelectCustom(controlType, infoFieldParam.getFieldType().toString()))

@ -89,6 +89,10 @@ public class JobPO {
*/
private Integer showOrder;
private Integer gradeId;
private String levelId;
private Long creator;
private int deleteType;

@ -20,7 +20,7 @@ public interface ExtendGroupMapper {
* @param extendType
* @return
*/
List<ExtendGroupPO> listByType(@Param("extendType") Integer extendType);
List<ExtendGroupPO> listByType(@Param("extendType") Integer extendType, @Param("isShow") String isShow);
/**
* ID
@ -38,7 +38,7 @@ public interface ExtendGroupMapper {
* @param pid
* @return
*/
List<ExtendGroupPO> listGroupByPid(@Param("pid") Long pid);
List<ExtendGroupPO> listGroupByPid(@Param("pid") Long pid, @Param("isShow") String isShow);
/**
* ID

@ -40,6 +40,9 @@
<if test=" extendType != null and extendType != '' ">
and extend_type = #{extendType}
</if>
<if test=" isShow !=null">
and is_show = #{isShow}
</if>
order by show_order
</select>
<select id="getGroupNameById" resultType="java.lang.String">
@ -66,6 +69,9 @@
from jcl_field_extendgroup t
WHERE t.delete_type = 0
and t.pid= #{pid}
<if test=" isShow !=null">
and is_show = #{isShow}
</if>
order by show_order
</select>
<select id="getGroupById" resultMap="BaseResultMap">
@ -148,9 +154,10 @@
</trim>
</insert>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.extend.po.ExtendGroupPO" databaseId="oracle">
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.extend.po.ExtendGroupPO"
databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select JCL_FIELD_GROUP_ID.currval from dual
</selectKey>
INSERT INTO jcl_field_extendgroup

@ -18,7 +18,7 @@ public interface ExtendTitleMapper {
* @param groupId
* @return
*/
List<ExtendTitlePO> getTitlesByGroupID(@Param("groupId") Long groupId);
List<ExtendTitlePO> getTitlesByGroupID(@Param("groupId") Long groupId, @Param("isShow") String isShow);
/**
* ID

@ -95,9 +95,10 @@
</trim>
</insert>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.extend.po.ExtendTitlePO" databaseId="oracle">
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.extend.po.ExtendTitlePO"
databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select JCL_FIELD_TITLE_ID.currval from dual
</selectKey>
@ -194,6 +195,9 @@
<if test=" groupId != null ">
and group_id = #{groupId}
</if>
<if test=" isShow !=null">
and is_show = #{isShow}
</if>
order by show_order
</select>
@ -207,6 +211,7 @@
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
and is_show = '1'
order by show_order
</select>

@ -19,6 +19,8 @@
<result column="description" property="description"/>
<result column="show_order" property="showOrder"/>
<result column="forbidden_tag" property="forbiddenTag"/>
<result column="grade_id" property="gradeId"/>
<result column="level_id" property="levelId"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime"/>
@ -46,7 +48,9 @@
t.work_duty,
t.work_authority,
t.show_order,
t.forbidden_tag
t.forbidden_tag,
t.grade_id,
t.level_id
</sql>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.job.po.JobPO"
keyProperty="id"
@ -165,7 +169,7 @@
</insert>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.job.po.JobPO" databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select JCL_ORG_JOB_ID.currval from dual
</selectKey>
INSERT INTO jcl_org_job

@ -273,7 +273,7 @@ public class CompServiceImpl extends Service implements CompService {
if ("0".equals(groupId)) {
groupId = GROUP_ID.toString();
}
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId),"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
@ -305,7 +305,7 @@ public class CompServiceImpl extends Service implements CompService {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendTitle.getId() + "", "comp_no", RuleCodeType.SUBCOMPANY.getValue());

@ -326,7 +326,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if ("0".equals(groupId)) {
groupId = GROUP_ID.toString();
}
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId),"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_DEPT : JCL_ORG_DEPTEXT, viewAttr, id, extendTitle.getId().toString(), "");
@ -357,7 +357,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {

@ -132,7 +132,7 @@ public class ExtServiceImpl extends Service implements ExtService {
List<Map<String, Object>> tables = new ArrayList<>();
List<ExtendInfoPO> infoPOList = new ArrayList<>();
// 查询明细表
List<ExtendGroupPO> extendGroupList = getExtendGroupMapper().listGroupByPid(groupId);
List<ExtendGroupPO> extendGroupList = getExtendGroupMapper().listGroupByPid(groupId, "1");
for (ExtendGroupPO extendGroup : extendGroupList) {
infoPOList.addAll(getExtendInfoMapper().listFields(extendType, extendGroup.getId() + "", tableName, "", "1"));
}
@ -188,7 +188,7 @@ public class ExtServiceImpl extends Service implements ExtService {
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByIds(ids);
Set<Long> groupIds = extendTitles.stream().map(ExtendTitlePO::getGroupId).collect(Collectors.toSet());
List<ExtendGroupPO> extendGroupList = getExtendGroupMapper().listByType(Integer.parseInt(extendType));
List<ExtendGroupPO> extendGroupList = getExtendGroupMapper().listByType(Integer.parseInt(extendType), "1");
// 拓展信息
if (CollectionUtils.isNotEmpty(extendGroupList) && CollectionUtils.isNotEmpty(groupIds)) {

@ -59,7 +59,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
@Override
public List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum) {
Integer extendType = moduleTypeEnum.getValue();
List<ExtendGroupPO> extendGroupPOS = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(extendType);
List<ExtendGroupPO> extendGroupPOS = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(extendType,null);
return ExtendGroupBO.buildTypeTree(extendGroupPOS);
}
@ -69,7 +69,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
Map<String, Object> datas = new HashMap<>();
Long groupId = Long.parseLong(groupType);
String tableName = ExtendGroupBO.getTableNameByGroupPO(getExtendGroupMapper().getGroupById(groupId));
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupId);
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupId,null);
List<Map<String, Object>> tabs = new ArrayList<>();
int idx = 1;
for (ExtendTitlePO extendTitle : extendTitleList) {
@ -135,7 +135,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
Map<String, Object> datas = new HashMap<>();
Long groupType = param.getGroupType();
Set<Long> lsDelGroupId = new HashSet<>();
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupType);
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupType,null);
extendTitleList.forEach(item -> lsDelGroupId.add(item.getId()));
String data = param.getData();
JSONObject jsonObject = JSON.parseObject(data);
@ -178,7 +178,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
public Map<String, Object> saveTitle(ExtendTitleSaveParam param) {
Map<String, Object> datas = new HashMap<>();
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType());
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType(),null);
ExtendTitlePO extendTitlePO = titlesByGroupID.stream().max(Comparator.comparing(ExtendTitlePO::getShowOrder)).orElse(ExtendTitlePO.builder().showOrder(1).build());
Set<Long> ids = titlesByGroupID.stream().map(ExtendTitlePO::getId).collect(Collectors.toSet());
ExtendTitlePO extendTitle = new ExtendTitlePO();
@ -201,7 +201,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
@Override
public void changeTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
if (fieldTypeTreeParam.getId() == null) {
List<ExtendGroupPO> extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(moduleTypeEnum.getValue());
List<ExtendGroupPO> extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(moduleTypeEnum.getValue(),null);
ExtendGroupPO extendGroup = extendGroupPOList.stream().max(Comparator.comparing(ExtendGroupPO::getShowOrder)).get();
ExtendGroupPO extendGroupPO = buildExtendGroupType(moduleTypeEnum, fieldTypeTreeParam, extendGroup.getShowOrder());
MapperProxyFactory.getProxy(ExtendGroupMapper.class).insertIgnoreNull(extendGroupPO);
@ -217,7 +217,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
@Override
public int deleteTitle(ExtendTitleSaveParam param) {
getExtendTitleMapper().deleteExtendTitleByIds(DeleteParam.builder().ids(param.getId().toString()).build().getIds());
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType());
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType(),null);
if (CollectionUtils.isEmpty(titlesByGroupID)) {
// 删除整个分组
@ -469,7 +469,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
@Override
public void saveTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
Set<Long> collect = MapperProxyFactory.getProxy(ExtendGroupMapper.class)
.listGroupByPid(fieldTypeTreeParam.getParentId()).stream().map(ExtendGroupPO::getId).collect(Collectors.toSet());
.listGroupByPid(fieldTypeTreeParam.getParentId(),null).stream().map(ExtendGroupPO::getId).collect(Collectors.toSet());
Integer extendType = moduleTypeEnum.getValue();
List<ExtendGroupPO> extendGroupPOS = JSONArray.parseArray(fieldTypeTreeParam.getData(), ExtendGroupPO.class);

@ -34,7 +34,6 @@ public class GroupServiceImpl extends Service implements GroupService {
List<SearchConditionGroup> addGroups = new ArrayList<>();
SearchConditionItem companyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "总部名称", "companyname");
SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "总部全称", "companydesc");
companyDescItem.setRules("required|string");
SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 1, 60, "公司网站", "companyweb");
// 赋值

@ -172,7 +172,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
public Map<String, Object> getSaveForm() {
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_HRM, 2, extendTitle.getId() + "", null, null)));
@ -203,7 +203,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
if ("0".equals(groupId)) {
groupId = GROUP_ID.toString();
}
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId),"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {

@ -24,6 +24,7 @@ import com.engine.organization.entity.job.dto.JobListDTO;
import com.engine.organization.entity.job.param.JobMergeParam;
import com.engine.organization.entity.job.param.JobSearchParam;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.scheme.po.GradePO;
import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.enums.LogModuleNameEnum;
@ -36,6 +37,7 @@ import com.engine.organization.mapper.extend.ExtMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
import com.engine.organization.mapper.job.JobMapper;
import com.engine.organization.mapper.scheme.GradeMapper;
import com.engine.organization.service.ExtService;
import com.engine.organization.service.JobService;
import com.engine.organization.thread.OrganizationRunable;
@ -248,7 +250,7 @@ public class JobServiceImpl extends Service implements JobService {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue(), "scheme_id", "parent_comp");
@ -278,7 +280,7 @@ public class JobServiceImpl extends Service implements JobService {
if ("0".equals(groupId)) {
groupId = GROUP_ID.toString();
}
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId), "1");
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "scheme_id", "parent_comp");
@ -301,6 +303,14 @@ public class JobServiceImpl extends Service implements JobService {
Map<String, Object> apiDatas = new HashMap<>();
apiDatas.put("result", resultMap);
// 返回职等信息
JobPO jobById = getJobMapper().getJobById(id);
if (null != jobById) {
GradePO gradeByID = MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(jobById.getGradeId());
if (null != gradeByID) {
apiDatas.put("levelIds", gradeByID.getLevelId());
}
}
return apiDatas;
}

Loading…
Cancel
Save