Commit a3de7b36 by Suvalue

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

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