Commit a3de7b36 by Suvalue

添加“是否为新机构”字段

parent 7a7cb86d
...@@ -27,6 +27,8 @@ public class DicOrg { ...@@ -27,6 +27,8 @@ public class DicOrg {
private Integer parentId; private Integer parentId;
private Integer isNew;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -122,4 +124,12 @@ public class DicOrg { ...@@ -122,4 +124,12 @@ public class DicOrg {
public void setParentId(Integer parentId) { public void setParentId(Integer parentId) {
this.parentId = parentId; this.parentId = parentId;
} }
public Integer getIsNew() {
return isNew;
}
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
} }
\ No newline at end of file
...@@ -77,6 +77,12 @@ public class OrgReq { ...@@ -77,6 +77,12 @@ public class OrgReq {
@NotNull(message = "父级关系 参数必传") @NotNull(message = "父级关系 参数必传")
private Integer parentId; private Integer parentId;
@ApiModelProperty(value = "是否为新机构", required = true)
@NotNull(message = "是否为新机构 参数必传")
private Integer isNew;
public String getOrgCode() { public String getOrgCode() {
return orgCode; return orgCode;
} }
...@@ -141,6 +147,14 @@ public class OrgReq { ...@@ -141,6 +147,14 @@ public class OrgReq {
this.parentId = parentId; this.parentId = parentId;
} }
public Integer getIsNew() {
return isNew;
}
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
@Override @Override
public String toString() { public String toString() {
return "AddOrgReq{" + return "AddOrgReq{" +
...@@ -152,6 +166,7 @@ public class OrgReq { ...@@ -152,6 +166,7 @@ public class OrgReq {
", orgType='" + orgType + '\'' + ", orgType='" + orgType + '\'' +
", orgAddress='" + orgAddress + '\'' + ", orgAddress='" + orgAddress + '\'' +
", parentId=" + parentId + ", parentId=" + parentId +
", isNew=" + isNew +
'}'; '}';
} }
} }
...@@ -210,6 +225,10 @@ public class OrgReq { ...@@ -210,6 +225,10 @@ public class OrgReq {
@NotNull(message = "父级关系 参数必传") @NotNull(message = "父级关系 参数必传")
private Integer parentId; private Integer parentId;
@ApiModelProperty(value = "是否为新机构", required = true)
@NotNull(message = "是否为新机构 参数必传")
private Integer isNew;
public Integer getOrgId() { public Integer getOrgId() {
return orgId; return orgId;
} }
...@@ -282,9 +301,17 @@ public class OrgReq { ...@@ -282,9 +301,17 @@ public class OrgReq {
this.parentId = parentId; this.parentId = parentId;
} }
public Integer getIsNew() {
return isNew;
}
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
@Override @Override
public String toString() { public String toString() {
return "Update{" + return "UpdateOrgReq{" +
"orgId=" + orgId + "orgId=" + orgId +
", orgCode='" + orgCode + '\'' + ", orgCode='" + orgCode + '\'' +
", orgName='" + orgName + '\'' + ", orgName='" + orgName + '\'' +
...@@ -294,6 +321,7 @@ public class OrgReq { ...@@ -294,6 +321,7 @@ public class OrgReq {
", orgType='" + orgType + '\'' + ", orgType='" + orgType + '\'' +
", orgAddress='" + orgAddress + '\'' + ", orgAddress='" + orgAddress + '\'' +
", parentId=" + parentId + ", parentId=" + parentId +
", isNew=" + isNew +
'}'; '}';
} }
} }
......
...@@ -72,6 +72,7 @@ public class DicOrgServiceImpl implements DicOrgService { ...@@ -72,6 +72,7 @@ public class DicOrgServiceImpl implements DicOrgService {
dicOrg.setOrgType(org.getOrgType()); dicOrg.setOrgType(org.getOrgType());
dicOrg.setOrgAddress(org.getOrgAddress()); dicOrg.setOrgAddress(org.getOrgAddress());
dicOrg.setParentId(org.getParentId()); dicOrg.setParentId(org.getParentId());
dicOrg.setIsNew(org.getIsNew());
dicOrgMapper.insert(dicOrg); dicOrgMapper.insert(dicOrg);
return true; return true;
} }
...@@ -101,6 +102,7 @@ public class DicOrgServiceImpl implements DicOrgService { ...@@ -101,6 +102,7 @@ public class DicOrgServiceImpl implements DicOrgService {
dicOrg.setOrgType(org.getOrgType()); dicOrg.setOrgType(org.getOrgType());
dicOrg.setOrgAddress(org.getOrgAddress()); dicOrg.setOrgAddress(org.getOrgAddress());
dicOrg.setParentId(org.getParentId()); dicOrg.setParentId(org.getParentId());
dicOrg.setIsNew(org.getIsNew());
dicOrgMapper.updateByPrimaryKey(dicOrg); dicOrgMapper.updateByPrimaryKey(dicOrg);
return true; return true;
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<result column="ORG_TYPE" jdbcType="VARCHAR" property="orgType" /> <result column="ORG_TYPE" jdbcType="VARCHAR" property="orgType" />
<result column="ORG_ADDRESS" jdbcType="VARCHAR" property="orgAddress" /> <result column="ORG_ADDRESS" jdbcType="VARCHAR" property="orgAddress" />
<result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" /> <result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" />
<result column="IS_NEW" jdbcType="DECIMAL" property="isNew" />
</resultMap> </resultMap>
<resultMap id="DicOrgResultMap" extends="BaseResultMap" type="com.bsoft.admin.model.respmodel.DicOrgList" /> <resultMap id="DicOrgResultMap" extends="BaseResultMap" type="com.bsoft.admin.model.respmodel.DicOrgList" />
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
...@@ -27,11 +28,11 @@ ...@@ -27,11 +28,11 @@
insert into dic_org (CREATE_DATE, CREATE_USERID, `STATE`, insert into dic_org (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_CODE, ORG_NAME, ORG_NO, ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE, ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID) ORG_ADDRESS, PARENT_ID,IS_NEW)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR}, #{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL}) #{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL}, #{isNew,jdbcType=DECIMAL})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.admin.model.DicOrg"> <update id="updateByPrimaryKey" parameterType="com.bsoft.admin.model.DicOrg">
update dic_org update dic_org
...@@ -45,31 +46,32 @@ ...@@ -45,31 +46,32 @@
ORG_GROUP = #{orgGroup,jdbcType=VARCHAR}, ORG_GROUP = #{orgGroup,jdbcType=VARCHAR},
ORG_TYPE = #{orgType,jdbcType=VARCHAR}, ORG_TYPE = #{orgType,jdbcType=VARCHAR},
ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR}, ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL} PARENT_ID = #{parentId,jdbcType=DECIMAL},
IS_NEW = #{isNew,jdbcType=DECIMAL}
where ID = #{id,jdbcType=INTEGER} where ID = #{id,jdbcType=INTEGER}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID,IS_NEW
from dic_org from dic_org
where ID = #{id,jdbcType=INTEGER} where ID = #{id,jdbcType=INTEGER}
</select> </select>
<select id="selectParentAll" resultMap="DicOrgResultMap"> <select id="selectParentAll" resultMap="DicOrgResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID,IS_NEW
from DIC_ORG from DIC_ORG
where "STATE"=1 where `STATE`=1
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID,IS_NEW
from dic_org from dic_org
</select> </select>
<select id="selectByUser" resultMap="BaseResultMap"> <select id="selectByUser" resultMap="BaseResultMap">
SELECT o.* SELECT o.*
FROM SYS_USER_ORG_RS uor,DIC_ORG o FROM SYS_USER_ORG_RS uor,DIC_ORG o
where uor.ORG_ID=o.ID and uor.USER_ID= #{userId,jdbcType=DECIMAL} where uor.ORG_ID=o.ID and uor.USER_ID= #{userId,jdbcType=DECIMAL}
and o.`STATE`=1 and uor."STATE"=1 and o.`STATE`=1 and uor.`STATE`=1
</select> </select>
<select id="selectByName" resultMap="BaseResultMap"> <select id="selectByName" resultMap="BaseResultMap">
select * from DIC_ORG where ORG_NAME=#{orgName,jdbcType=VARCHAR} and `STATE`=1 select * from DIC_ORG where ORG_NAME=#{orgName,jdbcType=VARCHAR} and `STATE`=1
......
...@@ -56,10 +56,10 @@ ...@@ -56,10 +56,10 @@
from sys_menu from sys_menu
</select> </select>
<select id="selectParentAll" resultMap="sysMenuResultMap"> <select id="selectParentAll" resultMap="sysMenuResultMap">
select ID, CREATE_DATA, CREATE_USERID, "STATE", MENU_NAME, MENU_URL, MENU_IMAGE, select ID, CREATE_DATA, CREATE_USERID, `STATE`, MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT PARENT_ID, PAGE_CODE, SORT
from SYS_MENU from SYS_MENU
where "STATE"=1 where `STATE`=1
</select> </select>
<select id="selectMenuAllByUser" resultMap="sysMenuResultMap"> <select id="selectMenuAllByUser" resultMap="sysMenuResultMap">
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT,umr.STATE select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT,umr.STATE
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
select MAP.*,m.PARENT_ID select MAP.*,m.PARENT_ID
from SYS_ROLE_MENU_RS MAP from SYS_ROLE_MENU_RS MAP
join SYS_MENU m on m.ID=MAP.MENU_ID join SYS_MENU m on m.ID=MAP.MENU_ID
where MAP."STATE"=1 and MAP.ROLE_ID = #{roleId,jdbcType=DECIMAL} where MAP.`STATE`=1 and MAP.ROLE_ID = #{roleId,jdbcType=DECIMAL}
</select> </select>
<update id="deleteAllByRole"> <update id="deleteAllByRole">
update SYS_ROLE_MENU_RS set `STATE`=0 where ROLE_ID = #{roleId,jdbcType=DECIMAL} update SYS_ROLE_MENU_RS set `STATE`=0 where ROLE_ID = #{roleId,jdbcType=DECIMAL}
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
select map.*,o.PARENT_ID select map.*,o.PARENT_ID
from SYS_USER_ORG_RS MAP from SYS_USER_ORG_RS MAP
join DIC_ORG o on o.ID=map.ORG_ID join DIC_ORG o on o.ID=map.ORG_ID
where MAP."STATE" = 1 and MAP.USER_ID = #{userId,jdbcType=DECIMAL} where MAP.`STATE` = 1 and MAP.USER_ID = #{userId,jdbcType=DECIMAL}
</select> </select>
<select id="selectByUserWithOrg" resultMap="BaseResultMap"> <select id="selectByUserWithOrg" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into DIC_ORG (CREATE_DATE, CREATE_USERID, "STATE", insert into DIC_ORG (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_CODE, ORG_NAME, ORG_NO, ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE, ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID) ORG_ADDRESS, PARENT_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE, select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE,
HOSCODE HOSCODE
from SER_PROJ_VALUE_SZ from SER_PROJ_VALUE_SZ
</select> </select>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SYS_MENU (CREATE_DATA, CREATE_USERID, "STATE", insert into SYS_MENU (CREATE_DATA, CREATE_USERID, `STATE`,
MENU_NAME, MENU_URL, MENU_IMAGE, MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT PARENT_ID, PAGE_CODE, SORT
) )
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SYS_ROLE (CREATE_DATE, CREATE_USERID, "STATE", insert into SYS_ROLE (CREATE_DATE, CREATE_USERID, `STATE`,
ROLE_NAME, ROLE_CODE) ROLE_NAME, ROLE_CODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{roleName,jdbcType=VARCHAR}, #{roleCode,jdbcType=DECIMAL}) #{roleName,jdbcType=VARCHAR}, #{roleCode,jdbcType=DECIMAL})
......
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