Commit a7fe6583 by Suvalue

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

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