Commit a7fe6583 by Suvalue

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

parent 5f16ef05
...@@ -27,6 +27,8 @@ public class DicOrg { ...@@ -27,6 +27,8 @@ public class DicOrg {
private Long parentId; private Long parentId;
private Long isNew;
public Long getId() { public Long getId() {
return id; return id;
} }
...@@ -123,6 +125,14 @@ public class DicOrg { ...@@ -123,6 +125,14 @@ public class DicOrg {
this.parentId = parentId; this.parentId = parentId;
} }
public Long getIsNew() {
return isNew;
}
public void setIsNew(Long isNew) {
this.isNew = isNew;
}
@Override @Override
public String toString() { public String toString() {
return "DicOrg{" + return "DicOrg{" +
...@@ -138,6 +148,7 @@ public class DicOrg { ...@@ -138,6 +148,7 @@ public class DicOrg {
", orgType='" + orgType + '\'' + ", orgType='" + orgType + '\'' +
", orgAddress='" + orgAddress + '\'' + ", orgAddress='" + orgAddress + '\'' +
", parentId=" + parentId + ", parentId=" + parentId +
", isNew=" + isNew +
'}'; '}';
} }
} }
\ No newline at end of file
...@@ -77,6 +77,10 @@ public class OrgReq { ...@@ -77,6 +77,10 @@ public class OrgReq {
@NotNull(message = "父级关系 参数必传") @NotNull(message = "父级关系 参数必传")
private Long parentId; private Long parentId;
@ApiModelProperty(value = "是否为新机构", required = true)
@NotNull(message = "是否为新机构 参数必传")
private Long isNEw;
public String getOrgCode() { public String getOrgCode() {
return orgCode; return orgCode;
} }
...@@ -141,6 +145,14 @@ public class OrgReq { ...@@ -141,6 +145,14 @@ public class OrgReq {
this.parentId = parentId; this.parentId = parentId;
} }
public Long getIsNEw() {
return isNEw;
}
public void setIsNEw(Long isNEw) {
this.isNEw = isNEw;
}
@Override @Override
public String toString() { public String toString() {
return "AddOrgReq{" + return "AddOrgReq{" +
...@@ -152,6 +164,7 @@ public class OrgReq { ...@@ -152,6 +164,7 @@ public class OrgReq {
", orgType='" + orgType + '\'' + ", orgType='" + orgType + '\'' +
", orgAddress='" + orgAddress + '\'' + ", orgAddress='" + orgAddress + '\'' +
", parentId=" + parentId + ", parentId=" + parentId +
", isNEw=" + isNEw +
'}'; '}';
} }
} }
...@@ -210,6 +223,11 @@ public class OrgReq { ...@@ -210,6 +223,11 @@ public class OrgReq {
@NotNull(message = "父级关系 参数必传") @NotNull(message = "父级关系 参数必传")
private Long parentId; private Long parentId;
@ApiModelProperty(value = "是否为新机构", required = true)
@NotNull(message = "是否为新机构 参数必传")
private Long isNEw;
public Long getOrgId() { public Long getOrgId() {
return orgId; return orgId;
} }
...@@ -282,9 +300,17 @@ public class OrgReq { ...@@ -282,9 +300,17 @@ public class OrgReq {
this.parentId = parentId; this.parentId = parentId;
} }
public Long getIsNEw() {
return isNEw;
}
public void setIsNEw(Long 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 +320,7 @@ public class OrgReq { ...@@ -294,6 +320,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.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
...@@ -27,11 +28,11 @@ ...@@ -27,11 +28,11 @@
insert into DIC_ORG (ID,CREATE_DATE, CREATE_USERID, "STATE", insert into DIC_ORG (ID,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 (#{id,jdbcType=DECIMAL},#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{id,jdbcType=DECIMAL},#{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,24 +46,25 @@ ...@@ -45,24 +46,25 @@
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=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" 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=DECIMAL} and "STATE"=1 where ID = #{id,jdbcType=DECIMAL} and "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
where "STATE"=1 where "STATE"=1
</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>
......
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