人员信息管理
This commit is contained in:
parent
ca7d34a5bd
commit
6bfc6eae27
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.organization.entity.hrmresource.vo;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||
import com.engine.organization.annotation.OperatePopedom;
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||
|
|
@ -29,13 +30,17 @@ import lombok.NoArgsConstructor;
|
|||
fromSql = "FROM jcl_org_item t ",
|
||||
orderby = "fno",
|
||||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
primarykey = "fid",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除"),
|
||||
@OrganizationTableOperate(index = "2", text = "恢复")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX
|
||||
tableType = WeaTableType.CHECKBOX,
|
||||
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatResourceOperates", otherpara = "column:fdelete"
|
||||
)
|
||||
|
||||
|
||||
)
|
||||
public class ResourceBasicInfoVO {
|
||||
|
||||
|
|
@ -43,7 +48,7 @@ public class ResourceBasicInfoVO {
|
|||
* 主键
|
||||
*/
|
||||
@OrganizationTableColumn(column = "fid", display = false)
|
||||
private Integer id;
|
||||
private Integer fId;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ public interface ResourceBasicInfoMapper {
|
|||
|
||||
int recoverByIds(@Param("ids")Collection<Long> ids);
|
||||
|
||||
List<ResourceItemPO> selectItemByFNo(@Param("fno")String fno);
|
||||
List<ResourceItemPO> selectItemByFNo(@Param("fno")String fno,@Param("fclassid")Integer fclassid);
|
||||
|
||||
int insertIgnoreNull(ResourceItemPO resourceItemPO);
|
||||
|
||||
int update(ResourceItemPO resourceItemPO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
</resultMap>
|
||||
|
||||
<resultMap id="TreeResultMap" type="com.engine.organization.entity.TreeData">
|
||||
<result column="id" property="key"/>
|
||||
<result column="scheme_name" property="title"/>
|
||||
<result column="fid" property="key"/>
|
||||
<result column="fname" property="title"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getTreeData" resultMap="TreeResultMap">
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
fid as `id`,
|
||||
fname as `name`
|
||||
from jcl_org_itemclass
|
||||
AND id IN
|
||||
where fid IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
@ -55,8 +55,8 @@
|
|||
<select id="selectItemByFNo" resultMap="ItemResultMap">
|
||||
select fid,fclassid,fno,fname,fmemo,fdelete,creator,create_time,update_time
|
||||
from jcl_org_item
|
||||
where fdelete = 0
|
||||
AND fno = #{fno}
|
||||
where fno = #{fno}
|
||||
and fclassid = #{fclassid}
|
||||
</select>
|
||||
|
||||
<update id="deleteByIds">
|
||||
|
|
@ -81,8 +81,8 @@
|
|||
</update>
|
||||
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO" keyProperty="fid"
|
||||
keyColumn="fid" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="fclassid != null">
|
||||
|
|
@ -143,5 +143,13 @@
|
|||
<!--databaseId="oracle">-->
|
||||
<!--</insert>-->
|
||||
|
||||
|
||||
<update id="update" parameterType="com.engine.organization.entity.hrmresource.po.ResourceItemPO">
|
||||
update jcl_org_item
|
||||
<set>
|
||||
fname=#{fname},
|
||||
fmemo=#{fmemo},
|
||||
update_time=#{updateTime},
|
||||
</set>
|
||||
WHERE fid = #{fid} AND fdelete = 0
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -80,13 +80,13 @@ public class ResourceBasicInfoServiceImpl extends Service implements ResourceBas
|
|||
@Override
|
||||
public List<SearchConditionGroup> getForm(Map<String, Object> params) {
|
||||
|
||||
String id = Util.null2String(params.get("id"));
|
||||
String id = Util.null2String(params.get("fid"));
|
||||
String fClassId = Util.null2String(params.get("fclassid"));
|
||||
List<SearchConditionItem> selectItems = new ArrayList<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
SearchConditionItem resourceTypeItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "类型", "161", "fclassid", "resourceTypeBrowser");
|
||||
resourceTypeItem.setRules("required|string");
|
||||
if (StringUtils.isNotBlank(fClassId)) {
|
||||
if (StringUtils.isNotBlank(fClassId) && !"-1".equals(fClassId)) {
|
||||
BrowserBean browserBean = resourceTypeItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> maps = getResourceBasicInfoMapper().browserDatas(DeleteParam.builder().ids(fClassId).build().getIds());
|
||||
browserBean.setReplaceDatas(maps);
|
||||
|
|
@ -135,19 +135,19 @@ public class ResourceBasicInfoServiceImpl extends Service implements ResourceBas
|
|||
|
||||
@Override
|
||||
public int save(ResourceItemPO resourceItemPO) {
|
||||
List<ResourceItemPO> list = getResourceBasicInfoMapper().selectItemByFNo(resourceItemPO.getFno());
|
||||
List<ResourceItemPO> list = getResourceBasicInfoMapper().selectItemByFNo(resourceItemPO.getFno(),resourceItemPO.getFclassid());
|
||||
OrganizationAssert.isEmpty(list,"编号不允许重复");
|
||||
return getResourceBasicInfoMapper().insertIgnoreNull(resourceItemPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceItemPO selectById(Integer fid) {
|
||||
return null;
|
||||
return getResourceBasicInfoMapper().getResourceItemByFid(fid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(ResourceItemPO resourceItemPO) {
|
||||
return 0;
|
||||
return getResourceBasicInfoMapper().update(resourceItemPO);
|
||||
}
|
||||
|
||||
private String buildSqlWhere(Map<String, Object> params) {
|
||||
|
|
|
|||
|
|
@ -42,4 +42,18 @@ public class ConfigTrans {
|
|||
return list;
|
||||
}
|
||||
|
||||
public static List<Object> formatResourceOperates(String id,String isDefault) {
|
||||
List list = Lists.newArrayList();
|
||||
if ("0".equals(isDefault)) {
|
||||
list.add(true);
|
||||
list.add(true);
|
||||
list.add(false);
|
||||
} else {
|
||||
list.add(false);
|
||||
list.add(false);
|
||||
list.add(true);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue