pull/45/head
dxfeng 2 years ago
commit a6952f41b0

@ -565,7 +565,7 @@ create table JCL_ORG_DETACH (
create table JCL_ORG_CARDACCESS ( create table JCL_ORG_CARDACCESS (
id int auto_increment not null, id int auto_increment not null,
type_id int not null, type_id int not null,
type_name int not null, type_name varchar(50) not null,
status int null, status int null,
all_people int null, all_people int null,
superior int null, superior int null,

@ -24,7 +24,7 @@ public class CardAccessPO {
private Integer typeId; private Integer typeId;
private Integer typeName; private String typeName;
private Integer status; private Integer status;
@ -32,7 +32,7 @@ public class CardAccessPO {
private Integer superior; private Integer superior;
private String allSuperior; private Integer allSuperior;
private String custom; private String custom;

@ -42,7 +42,7 @@
<if test="typeId != null "> <if test="typeId != null ">
type_id, type_id,
</if> </if>
<if test="typeName != null "> <if test="typeName != null || typeName != ''">
type_name, type_name,
</if> </if>
<if test="status != null "> <if test="status != null ">
@ -77,7 +77,7 @@
<if test="typeId != null "> <if test="typeId != null ">
#{typeId}, #{typeId},
</if> </if>
<if test="typeName != null "> <if test="typeName != null || typeName != ''">
#{typeName}, #{typeName},
</if> </if>
<if test="status != null "> <if test="status != null ">
@ -119,7 +119,7 @@
<if test="typeId != null "> <if test="typeId != null ">
type_id, type_id,
</if> </if>
<if test="typeName != null "> <if test="typeName != null || typeName != ''">
type_name, type_name,
</if> </if>
<if test="status != null "> <if test="status != null ">
@ -154,7 +154,7 @@
<if test="typeId != null "> <if test="typeId != null ">
#{typeId}, #{typeId},
</if> </if>
<if test="typeName != null "> <if test="typeName != null || typeName != ''">
#{typeName}, #{typeName},
</if> </if>
<if test="status != null "> <if test="status != null ">
@ -220,7 +220,7 @@
UPDATE jcl_org_cardaccess UPDATE jcl_org_cardaccess
SET delete_type = 1 SET delete_type = 1
WHERE delete_type = 0 WHERE delete_type = 0
AND id IN AND type_id IN
<foreach collection="ids" open="(" item="id" separator="," close=")"> <foreach collection="ids" open="(" item="id" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
@ -233,7 +233,7 @@
<include refid="baseColumns"/> <include refid="baseColumns"/>
from jcl_org_cardaccess t from jcl_org_cardaccess t
WHERE delete_type = 0 WHERE delete_type = 0
AND id = #{id} AND type_id = #{id}
</select> </select>
@ -241,6 +241,6 @@
<update id="updateTabName"> <update id="updateTabName">
UPDATE jcl_org_cardaccess UPDATE jcl_org_cardaccess
SET type_name = #{name} SET type_name = #{name}
WHERE id = #{id} WHERE type_id = #{id}
</update> </update>
</mapper> </mapper>

@ -5,6 +5,7 @@ import com.engine.core.impl.Service;
import com.engine.organization.component.OrganizationWeaTable; import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.detach.vo.ManagerDetachVO; import com.engine.organization.entity.detach.vo.ManagerDetachVO;
import com.engine.organization.entity.personnelcard.po.CardAccessPO; import com.engine.organization.entity.personnelcard.po.CardAccessPO;
import com.engine.organization.entity.personnelcard.vo.CardAccessVO;
import com.engine.organization.mapper.personnelcard.CardAccessMapper; import com.engine.organization.mapper.personnelcard.CardAccessMapper;
import com.engine.organization.service.CardAccessService; import com.engine.organization.service.CardAccessService;
import com.engine.organization.util.HasRightUtil; import com.engine.organization.util.HasRightUtil;
@ -31,7 +32,7 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
@Override @Override
public Map<String, Object> tablePage() { public Map<String, Object> tablePage() {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
OrganizationWeaTable<ManagerDetachVO> table = new OrganizationWeaTable<>(user, ManagerDetachVO.class); OrganizationWeaTable<CardAccessVO> table = new OrganizationWeaTable<>(user, CardAccessVO.class);
String sqlWhere = " where delete_type = 0"; String sqlWhere = " where delete_type = 0";
table.setSqlwhere(sqlWhere); table.setSqlwhere(sqlWhere);
WeaResultMsg result = new WeaResultMsg(false); WeaResultMsg result = new WeaResultMsg(false);

@ -3,6 +3,7 @@ package com.engine.organization.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service; import com.engine.core.impl.Service;
import com.engine.organization.entity.DeleteParam; import com.engine.organization.entity.DeleteParam;
import com.engine.organization.entity.SelectOptionParam; import com.engine.organization.entity.SelectOptionParam;
@ -17,11 +18,13 @@ import com.engine.organization.entity.extend.po.ExtendInfoPO;
import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam; import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
import com.engine.organization.entity.fieldset.vo.TypeTreeVO; import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
import com.engine.organization.enums.DeleteTypeEnum; import com.engine.organization.enums.DeleteTypeEnum;
import com.engine.organization.enums.ModuleTypeEnum; import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.mapper.extend.ExtendGroupMapper; import com.engine.organization.mapper.extend.ExtendGroupMapper;
import com.engine.organization.mapper.extend.ExtendInfoMapper; import com.engine.organization.mapper.extend.ExtendInfoMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.service.CardAccessService;
import com.engine.organization.service.FieldDefinedService; import com.engine.organization.service.FieldDefinedService;
import com.engine.organization.util.HasRightUtil; import com.engine.organization.util.HasRightUtil;
import com.engine.organization.util.OrganizationAssert; import com.engine.organization.util.OrganizationAssert;
@ -29,6 +32,7 @@ import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User;
import weaver.systeminfo.SystemEnv; import weaver.systeminfo.SystemEnv;
import weaver.workflow.field.BrowserComInfo; import weaver.workflow.field.BrowserComInfo;
@ -56,6 +60,11 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
return MapperProxyFactory.getProxy(ExtendInfoMapper.class); return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
} }
private CardAccessService getCardAccessService(User user) {
return ServiceUtil.getService(CardAccessServiceImpl.class,user);
}
@Override @Override
public List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum) { public List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum) {
Integer extendType = moduleTypeEnum.getValue(); Integer extendType = moduleTypeEnum.getValue();
@ -208,8 +217,22 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
//默认新增title //默认新增title
ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO, 1); ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO, 1);
MapperProxyFactory.getProxy(ExtendTitleMapper.class).insertIgnoreNull(extendTitlePO); MapperProxyFactory.getProxy(ExtendTitleMapper.class).insertIgnoreNull(extendTitlePO);
CardAccessPO cardAccessPO = CardAccessPO.builder()
.typeId(extendGroupPO.getId().intValue())
.typeName(fieldTypeTreeParam.getName())
.status(1)
.allPeople(0)
.superior(0)
.allSuperior(0)
.creator((long)user.getUID())
.deleteType(0)
.createTime(new Date())
.updateTime(new Date())
.build();
getCardAccessService(user).addData(cardAccessPO);
} else { } else {
MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(), fieldTypeTreeParam.getName()); MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(), fieldTypeTreeParam.getName());
getCardAccessService(user).updateTabName(fieldTypeTreeParam.getName(),fieldTypeTreeParam.getId().intValue());
} }
} }
@ -222,6 +245,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
if (CollectionUtils.isEmpty(titlesByGroupID)) { if (CollectionUtils.isEmpty(titlesByGroupID)) {
// 删除整个分组 // 删除整个分组
getExtendGroupMapper().delete(param.getGroupType()); getExtendGroupMapper().delete(param.getGroupType());
getCardAccessService(user).deleteByIds(DeleteParam.builder().ids(param.getGroupType().toString()).build().getIds());
return 1; return 1;
} }
return 0; return 0;

@ -128,11 +128,11 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
SearchConditionItem nameItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "postInfoName"); SearchConditionItem nameItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "postInfoName");
nameItem.setRules("required|string"); nameItem.setRules("required|string");
// 权限 // 权限
SearchConditionItem authorityItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 50, "权限", "postInfoAuthority"); SearchConditionItem authorityItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 0, "权限", "postInfoAuthority");
// 责任 // 责任
SearchConditionItem dutyItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 50, "责任", "postInfoDuty"); SearchConditionItem dutyItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 0, "责任", "postInfoDuty");
// 资格 // 资格
SearchConditionItem qualificationItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 50, "资格", "postInfoQualification"); SearchConditionItem qualificationItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 0, "资格", "postInfoQualification");
// 职务分类 // 职务分类
SearchConditionItem postIdBrowser = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职务分类", "161", "postId", "postBrowser"); SearchConditionItem postIdBrowser = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职务分类", "161", "postId", "postBrowser");
postIdBrowser.setRules("required|string"); postIdBrowser.setRules("required|string");

Loading…
Cancel
Save