Commit 54457b34 authored by 廖旭伟's avatar 廖旭伟

窗口负责人详情增加字段

parent d7fb9baa
......@@ -35,6 +35,18 @@ public class WindowOwnerDetailEntity extends WindowOwnerDetailVo {
* 备注
*/
private String remark;
/**
* 窗口编号
*/
private String windowCode;
/**
* 所属楼栋
*/
private Integer building;
/**
* 所属楼层
*/
private Integer level;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -56,5 +68,8 @@ public class WindowOwnerDetailEntity extends WindowOwnerDetailVo {
this.windowId = null;
this.windowName = "";
this.remark = "";
this.windowCode = "";
this.building = 1;
this.level = 1;
}
}
\ No newline at end of file
......@@ -106,6 +106,41 @@ public class WindowOwnerDetailQuery extends WindowOwnerDetailEntity {
/** 结束 修改时间 */
private String updateTimeEnd;
/** 窗口编号 */
private List<String> windowCodeList;
/** 窗口编号排除列表 */
private List <String> windowCodeNotList;
/** 开始 所属楼栋 */
private Integer buildingStart;
/** 结束 所属楼栋 */
private Integer buildingEnd;
/** 增加 所属楼栋 */
private Integer buildingIncrement;
/** 所属楼栋列表 */
private List <Integer> buildingList;
/** 所属楼栋排除列表 */
private List <Integer> buildingNotList;
/** 开始 所属楼层 */
private Integer levelStart;
/** 结束 所属楼层 */
private Integer levelEnd;
/** 增加 所属楼层 */
private Integer levelIncrement;
/** 所属楼层列表 */
private List <Integer> levelList;
/** 所属楼层排除列表 */
private List <Integer> levelNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WindowOwnerDetailQuery> orConditionList;
......@@ -647,6 +682,200 @@ public class WindowOwnerDetailQuery extends WindowOwnerDetailEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 窗口编号
* @return windowCodeList
*/
public List<String> getWindowCodeList(){
return this.windowCodeList;
}
/**
* 设置 窗口编号
* @param windowCodeList
*/
public void setWindowCodeList(List<String> windowCodeList){
this.windowCodeList = windowCodeList;
}
/**
* 获取 窗口编号
* @return windowCodeNotList
*/
public List<String> getWindowCodeNotList(){
return this.windowCodeNotList;
}
/**
* 设置 窗口编号
* @param windowCodeNotList
*/
public void setWindowCodeNotList(List<String> windowCodeNotList){
this.windowCodeNotList = windowCodeNotList;
}
/**
* 获取 开始 所属楼栋
* @return buildingStart
*/
public Integer getBuildingStart(){
return this.buildingStart;
}
/**
* 设置 开始 所属楼栋
* @param buildingStart
*/
public void setBuildingStart(Integer buildingStart){
this.buildingStart = buildingStart;
}
/**
* 获取 结束 所属楼栋
* @return $buildingEnd
*/
public Integer getBuildingEnd(){
return this.buildingEnd;
}
/**
* 设置 结束 所属楼栋
* @param buildingEnd
*/
public void setBuildingEnd(Integer buildingEnd){
this.buildingEnd = buildingEnd;
}
/**
* 获取 增加 所属楼栋
* @return buildingIncrement
*/
public Integer getBuildingIncrement(){
return this.buildingIncrement;
}
/**
* 设置 增加 所属楼栋
* @param buildingIncrement
*/
public void setBuildingIncrement(Integer buildingIncrement){
this.buildingIncrement = buildingIncrement;
}
/**
* 获取 所属楼栋
* @return buildingList
*/
public List<Integer> getBuildingList(){
return this.buildingList;
}
/**
* 设置 所属楼栋
* @param buildingList
*/
public void setBuildingList(List<Integer> buildingList){
this.buildingList = buildingList;
}
/**
* 获取 所属楼栋
* @return buildingNotList
*/
public List<Integer> getBuildingNotList(){
return this.buildingNotList;
}
/**
* 设置 所属楼栋
* @param buildingNotList
*/
public void setBuildingNotList(List<Integer> buildingNotList){
this.buildingNotList = buildingNotList;
}
/**
* 获取 开始 所属楼层
* @return levelStart
*/
public Integer getLevelStart(){
return this.levelStart;
}
/**
* 设置 开始 所属楼层
* @param levelStart
*/
public void setLevelStart(Integer levelStart){
this.levelStart = levelStart;
}
/**
* 获取 结束 所属楼层
* @return $levelEnd
*/
public Integer getLevelEnd(){
return this.levelEnd;
}
/**
* 设置 结束 所属楼层
* @param levelEnd
*/
public void setLevelEnd(Integer levelEnd){
this.levelEnd = levelEnd;
}
/**
* 获取 增加 所属楼层
* @return levelIncrement
*/
public Integer getLevelIncrement(){
return this.levelIncrement;
}
/**
* 设置 增加 所属楼层
* @param levelIncrement
*/
public void setLevelIncrement(Integer levelIncrement){
this.levelIncrement = levelIncrement;
}
/**
* 获取 所属楼层
* @return levelList
*/
public List<Integer> getLevelList(){
return this.levelList;
}
/**
* 设置 所属楼层
* @param levelList
*/
public void setLevelList(List<Integer> levelList){
this.levelList = levelList;
}
/**
* 获取 所属楼层
* @return levelNotList
*/
public List<Integer> getLevelNotList(){
return this.levelNotList;
}
/**
* 设置 所属楼层
* @param levelNotList
*/
public void setLevelNotList(List<Integer> levelNotList){
this.levelNotList = levelNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -957,6 +1186,133 @@ public class WindowOwnerDetailQuery extends WindowOwnerDetailEntity {
}
/**
* 设置 窗口编号
* @param windowCode
*/
public WindowOwnerDetailQuery windowCode(String windowCode){
setWindowCode(windowCode);
return this;
}
/**
* 设置 窗口编号
* @param windowCodeList
*/
public WindowOwnerDetailQuery windowCodeList(List<String> windowCodeList){
this.windowCodeList = windowCodeList;
return this;
}
/**
* 设置 所属楼栋
* @param building
*/
public WindowOwnerDetailQuery building(Integer building){
setBuilding(building);
return this;
}
/**
* 设置 开始 所属楼栋
* @param buildingStart
*/
public WindowOwnerDetailQuery buildingStart(Integer buildingStart){
this.buildingStart = buildingStart;
return this;
}
/**
* 设置 结束 所属楼栋
* @param buildingEnd
*/
public WindowOwnerDetailQuery buildingEnd(Integer buildingEnd){
this.buildingEnd = buildingEnd;
return this;
}
/**
* 设置 增加 所属楼栋
* @param buildingIncrement
*/
public WindowOwnerDetailQuery buildingIncrement(Integer buildingIncrement){
this.buildingIncrement = buildingIncrement;
return this;
}
/**
* 设置 所属楼栋
* @param buildingList
*/
public WindowOwnerDetailQuery buildingList(List<Integer> buildingList){
this.buildingList = buildingList;
return this;
}
/**
* 设置 所属楼栋
* @param buildingNotList
*/
public WindowOwnerDetailQuery buildingNotList(List<Integer> buildingNotList){
this.buildingNotList = buildingNotList;
return this;
}
/**
* 设置 所属楼层
* @param level
*/
public WindowOwnerDetailQuery level(Integer level){
setLevel(level);
return this;
}
/**
* 设置 开始 所属楼层
* @param levelStart
*/
public WindowOwnerDetailQuery levelStart(Integer levelStart){
this.levelStart = levelStart;
return this;
}
/**
* 设置 结束 所属楼层
* @param levelEnd
*/
public WindowOwnerDetailQuery levelEnd(Integer levelEnd){
this.levelEnd = levelEnd;
return this;
}
/**
* 设置 增加 所属楼层
* @param levelIncrement
*/
public WindowOwnerDetailQuery levelIncrement(Integer levelIncrement){
this.levelIncrement = levelIncrement;
return this;
}
/**
* 设置 所属楼层
* @param levelList
*/
public WindowOwnerDetailQuery levelList(List<Integer> levelList){
this.levelList = levelList;
return this;
}
/**
* 设置 所属楼层
* @param levelNotList
*/
public WindowOwnerDetailQuery levelNotList(List<Integer> levelNotList){
this.levelNotList = levelNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -14,6 +14,9 @@
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="windowCode" column="windowCode" />
<result property="building" column="building" />
<result property="level" column="level" />
</resultMap>
......@@ -48,23 +51,32 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowCode') or colPickMode == 1 and data.containsKey('windowCode')))">
a.windowCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('building') or colPickMode == 1 and data.containsKey('building')))">
a.building,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('level') or colPickMode == 1 and data.containsKey('level')))">
a.level,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WindowOwnerDetailEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_window_owner_detail
(ownerId,windowId,windowName,remark,createTime,createUserId,updateUserId,updateTime)
(ownerId,windowId,windowName,remark,createTime,createUserId,updateUserId,updateTime,windowCode,building,level)
VALUES
(#{ownerId},#{windowId},#{windowName},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime})
(#{ownerId},#{windowId},#{windowName},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{windowCode},#{building},#{level})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_window_owner_detail
(ownerId,windowId,windowName,remark,createTime,createUserId,updateUserId,updateTime)
(ownerId,windowId,windowName,remark,createTime,createUserId,updateUserId,updateTime,windowCode,building,level)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.ownerId},#{item.windowId},#{item.windowName},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime})
(#{item.ownerId},#{item.windowId},#{item.windowName},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.windowCode},#{item.building},#{item.level})
</foreach>
</insert>
......@@ -110,6 +122,21 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('windowCode')) or (colPickMode==1 and !data.containsKey('windowCode'))">
a.windowCode=#{data.windowCode},
</if>
<if test="(colPickMode==0 and data.containsKey('building')) or (colPickMode==1 and !data.containsKey('building'))">
a.building=#{data.building},
</if>
<if test="(colPickMode==0 and data.containsKey('buildingIncrement')) or (colPickMode==1 and !data.containsKey('buildingIncrement'))">
a.building=ifnull(a.building,0) + #{data.buildingIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('level')) or (colPickMode==1 and !data.containsKey('level'))">
a.level=#{data.level},
</if>
<if test="(colPickMode==0 and data.containsKey('levelIncrement')) or (colPickMode==1 and !data.containsKey('levelIncrement'))">
a.level=ifnull(a.level,0) + #{data.levelIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -198,6 +225,37 @@
</if>
</foreach>
</trim>
<trim prefix="windowCode=(case" suffix="ELSE windowCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('windowCode')) or (colPickMode==1 and !item.containsKey('windowCode'))">
when a.id=#{item.id} then #{item.windowCode}
</if>
</foreach>
</trim>
<trim prefix="building=(case" suffix="ELSE building end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('building')) or (colPickMode==1 and !item.containsKey('building'))">
when a.id=#{item.id} then #{item.building}
</when>
<when test="(colPickMode==0 and item.containsKey('buildingIncrement')) or (colPickMode==1 and !item.containsKey('buildingIncrement'))">
when a.id=#{item.id} then ifnull(a.building,0) + #{item.buildingIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="level=(case" suffix="ELSE level end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('level')) or (colPickMode==1 and !item.containsKey('level'))">
when a.id=#{item.id} then #{item.level}
</when>
<when test="(colPickMode==0 and item.containsKey('levelIncrement')) or (colPickMode==1 and !item.containsKey('levelIncrement'))">
when a.id=#{item.id} then ifnull(a.level,0) + #{item.levelIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -521,6 +579,81 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('windowCode')">
<if test="conditionParamRef.windowCode != null and conditionParamRef.windowCode != ''">
${_conditionType_} a.windowCode like #{${_conditionParam_}.windowCode}
</if>
<if test="conditionParamRef.windowCode == null">
${_conditionType_} a.windowCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('windowCodeList') and conditionParamRef.windowCodeList.size() > 0">
${_conditionType_} a.windowCode in
<foreach collection="conditionParamRef.windowCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('windowCodeNotList') and conditionParamRef.windowCodeNotList.size() > 0">
${_conditionType_} a.windowCode not in
<foreach collection="conditionParamRef.windowCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('building')">
<if test="conditionParamRef.building != null ">
${_conditionType_} a.building = #{${_conditionParam_}.building}
</if>
<if test="conditionParamRef.building == null">
${_conditionType_} a.building is null
</if>
</if>
<if test="conditionParamRef.containsKey('buildingList') and conditionParamRef.buildingList.size() > 0">
${_conditionType_} a.building in
<foreach collection="conditionParamRef.buildingList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('buildingNotList') and conditionParamRef.buildingNotList.size() > 0">
${_conditionType_} a.building not in
<foreach collection="conditionParamRef.buildingNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('buildingStart') and conditionParamRef.buildingStart != null">
${_conditionType_} a.building <![CDATA[ >= ]]> #{${_conditionParam_}.buildingStart}
</if>
<if test="conditionParamRef.containsKey('buildingEnd') and conditionParamRef.buildingEnd != null">
${_conditionType_} a.building <![CDATA[ <= ]]> #{${_conditionParam_}.buildingEnd}
</if>
<if test="conditionParamRef.containsKey('level')">
<if test="conditionParamRef.level != null ">
${_conditionType_} a.level = #{${_conditionParam_}.level}
</if>
<if test="conditionParamRef.level == null">
${_conditionType_} a.level is null
</if>
</if>
<if test="conditionParamRef.containsKey('levelList') and conditionParamRef.levelList.size() > 0">
${_conditionType_} a.level in
<foreach collection="conditionParamRef.levelList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('levelNotList') and conditionParamRef.levelNotList.size() > 0">
${_conditionType_} a.level not in
<foreach collection="conditionParamRef.levelNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('levelStart') and conditionParamRef.levelStart != null">
${_conditionType_} a.level <![CDATA[ >= ]]> #{${_conditionParam_}.levelStart}
</if>
<if test="conditionParamRef.containsKey('levelEnd') and conditionParamRef.levelEnd != null">
${_conditionType_} a.level <![CDATA[ <= ]]> #{${_conditionParam_}.levelEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -560,6 +693,20 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('buildingList') and conditionParamRef.buildingList.size() > 0">
field(a.building,
<foreach collection="conditionParamRef.buildingList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('levelList') and conditionParamRef.levelList.size() > 0">
field(a.level,
<foreach collection="conditionParamRef.levelList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind}
......@@ -603,6 +750,20 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('buildingList') and conditionParamRef.buildingList.size() > 0">
field(a.building,
<foreach collection="conditionParamRef.buildingList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('levelList') and conditionParamRef.levelList.size() > 0">
field(a.level,
<foreach collection="conditionParamRef.levelList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -649,6 +810,21 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('windowCode')">
a.windowCode
<if test='orderCol.windowCode != null and "DESC".equalsIgnoreCase(orderCol.windowCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('building')">
a.building
<if test='orderCol.building != null and "DESC".equalsIgnoreCase(orderCol.building)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('level')">
a.level
<if test='orderCol.level != null and "DESC".equalsIgnoreCase(orderCol.level)'>DESC</if>
,
</if>
</trim>
</if>
......
......@@ -1044,6 +1044,9 @@ CREATE TABLE mortals_xhx_window_owner_detail(
`ownerId` bigint(20) DEFAULT '0' COMMENT '负责人Id',
`windowId` bigint(20) DEFAULT '0' COMMENT '窗口id',
`windowName` varchar(64) COMMENT '窗口名称',
`windowCode` varchar(64) COMMENT '窗口编号',
`building` tinyint(2) DEFAULT '1' COMMENT '所属楼栋',
`level` tinyint(2) DEFAULT '1' COMMENT '所属楼层',
`remark` varchar(255) COMMENT '备注',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
......
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