Commit 74a4efed authored by 廖旭伟's avatar 廖旭伟

窗口负责人修改

parent 4c0adf10
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 窗口负责人角色类型
*/
public enum WindowRoleType {
窗口首席代表(1, "窗口首席代表"),
运维人员(2, "运维人员"),
审核人员(3, "审核人员"),
其他(4, "其他");
private Integer value;
private String desc;
WindowRoleType(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static WindowRoleType getByValue(Integer value) {
for (WindowRoleType WindowRoleType : WindowRoleType.values()) {
if (WindowRoleType.getValue() == value) {
return WindowRoleType;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (WindowRoleType item : WindowRoleType.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
...@@ -13,7 +13,7 @@ import lombok.Data; ...@@ -13,7 +13,7 @@ import lombok.Data;
* 窗口负责人实体对象 * 窗口负责人实体对象
* *
* @author zxfei * @author zxfei
* @date 2024-01-17 * @date 2024-04-26
*/ */
@Data @Data
public class WindowOwnerEntity extends WindowOwnerVo { public class WindowOwnerEntity extends WindowOwnerVo {
...@@ -59,6 +59,18 @@ public class WindowOwnerEntity extends WindowOwnerVo { ...@@ -59,6 +59,18 @@ public class WindowOwnerEntity extends WindowOwnerVo {
* 备注 * 备注
*/ */
private String remark; private String remark;
/**
* 角色类型(首席代表,运维,审核,其他)
*/
private Integer roleType;
/**
* 是否允许巡检
*/
private Integer inspect;
/**
* 管辖人员
*/
private String staffIds;
/** /**
* 窗口负责人详细信息 * 窗口负责人详细信息
...@@ -99,5 +111,8 @@ public class WindowOwnerEntity extends WindowOwnerVo { ...@@ -99,5 +111,8 @@ public class WindowOwnerEntity extends WindowOwnerVo {
this.phone = ""; this.phone = "";
this.windowCount = 0; this.windowCount = 0;
this.remark = ""; this.remark = "";
this.roleType = 0;
this.inspect = 0;
this.staffIds = "";
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.window.model.WindowOwnerEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.window.model.WindowOwnerEntity;
* 窗口负责人查询对象 * 窗口负责人查询对象
* *
* @author zxfei * @author zxfei
* @date 2024-01-17 * @date 2024-04-26
*/ */
public class WindowOwnerQuery extends WindowOwnerEntity { public class WindowOwnerQuery extends WindowOwnerEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -156,6 +156,41 @@ public class WindowOwnerQuery extends WindowOwnerEntity { ...@@ -156,6 +156,41 @@ public class WindowOwnerQuery extends WindowOwnerEntity {
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 角色类型(首席代表,运维,审核,其他) */
private Integer roleTypeStart;
/** 结束 角色类型(首席代表,运维,审核,其他) */
private Integer roleTypeEnd;
/** 增加 角色类型(首席代表,运维,审核,其他) */
private Integer roleTypeIncrement;
/** 角色类型(首席代表,运维,审核,其他)列表 */
private List <Integer> roleTypeList;
/** 角色类型(首席代表,运维,审核,其他)排除列表 */
private List <Integer> roleTypeNotList;
/** 开始 是否允许巡检 */
private Integer inspectStart;
/** 结束 是否允许巡检 */
private Integer inspectEnd;
/** 增加 是否允许巡检 */
private Integer inspectIncrement;
/** 是否允许巡检列表 */
private List <Integer> inspectList;
/** 是否允许巡检排除列表 */
private List <Integer> inspectNotList;
/** 管辖人员 */
private List<String> staffIdsList;
/** 管辖人员排除列表 */
private List <String> staffIdsNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WindowOwnerQuery> orConditionList; private List<WindowOwnerQuery> orConditionList;
...@@ -987,6 +1022,200 @@ public class WindowOwnerQuery extends WindowOwnerEntity { ...@@ -987,6 +1022,200 @@ public class WindowOwnerQuery extends WindowOwnerEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 角色类型(首席代表,运维,审核,其他)
* @return roleTypeStart
*/
public Integer getRoleTypeStart(){
return this.roleTypeStart;
}
/**
* 设置 开始 角色类型(首席代表,运维,审核,其他)
* @param roleTypeStart
*/
public void setRoleTypeStart(Integer roleTypeStart){
this.roleTypeStart = roleTypeStart;
}
/**
* 获取 结束 角色类型(首席代表,运维,审核,其他)
* @return $roleTypeEnd
*/
public Integer getRoleTypeEnd(){
return this.roleTypeEnd;
}
/**
* 设置 结束 角色类型(首席代表,运维,审核,其他)
* @param roleTypeEnd
*/
public void setRoleTypeEnd(Integer roleTypeEnd){
this.roleTypeEnd = roleTypeEnd;
}
/**
* 获取 增加 角色类型(首席代表,运维,审核,其他)
* @return roleTypeIncrement
*/
public Integer getRoleTypeIncrement(){
return this.roleTypeIncrement;
}
/**
* 设置 增加 角色类型(首席代表,运维,审核,其他)
* @param roleTypeIncrement
*/
public void setRoleTypeIncrement(Integer roleTypeIncrement){
this.roleTypeIncrement = roleTypeIncrement;
}
/**
* 获取 角色类型(首席代表,运维,审核,其他)
* @return roleTypeList
*/
public List<Integer> getRoleTypeList(){
return this.roleTypeList;
}
/**
* 设置 角色类型(首席代表,运维,审核,其他)
* @param roleTypeList
*/
public void setRoleTypeList(List<Integer> roleTypeList){
this.roleTypeList = roleTypeList;
}
/**
* 获取 角色类型(首席代表,运维,审核,其他)
* @return roleTypeNotList
*/
public List<Integer> getRoleTypeNotList(){
return this.roleTypeNotList;
}
/**
* 设置 角色类型(首席代表,运维,审核,其他)
* @param roleTypeNotList
*/
public void setRoleTypeNotList(List<Integer> roleTypeNotList){
this.roleTypeNotList = roleTypeNotList;
}
/**
* 获取 开始 是否允许巡检
* @return inspectStart
*/
public Integer getInspectStart(){
return this.inspectStart;
}
/**
* 设置 开始 是否允许巡检
* @param inspectStart
*/
public void setInspectStart(Integer inspectStart){
this.inspectStart = inspectStart;
}
/**
* 获取 结束 是否允许巡检
* @return $inspectEnd
*/
public Integer getInspectEnd(){
return this.inspectEnd;
}
/**
* 设置 结束 是否允许巡检
* @param inspectEnd
*/
public void setInspectEnd(Integer inspectEnd){
this.inspectEnd = inspectEnd;
}
/**
* 获取 增加 是否允许巡检
* @return inspectIncrement
*/
public Integer getInspectIncrement(){
return this.inspectIncrement;
}
/**
* 设置 增加 是否允许巡检
* @param inspectIncrement
*/
public void setInspectIncrement(Integer inspectIncrement){
this.inspectIncrement = inspectIncrement;
}
/**
* 获取 是否允许巡检
* @return inspectList
*/
public List<Integer> getInspectList(){
return this.inspectList;
}
/**
* 设置 是否允许巡检
* @param inspectList
*/
public void setInspectList(List<Integer> inspectList){
this.inspectList = inspectList;
}
/**
* 获取 是否允许巡检
* @return inspectNotList
*/
public List<Integer> getInspectNotList(){
return this.inspectNotList;
}
/**
* 设置 是否允许巡检
* @param inspectNotList
*/
public void setInspectNotList(List<Integer> inspectNotList){
this.inspectNotList = inspectNotList;
}
/**
* 获取 管辖人员
* @return staffIdsList
*/
public List<String> getStaffIdsList(){
return this.staffIdsList;
}
/**
* 设置 管辖人员
* @param staffIdsList
*/
public void setStaffIdsList(List<String> staffIdsList){
this.staffIdsList = staffIdsList;
}
/**
* 获取 管辖人员
* @return staffIdsNotList
*/
public List<String> getStaffIdsNotList(){
return this.staffIdsNotList;
}
/**
* 设置 管辖人员
* @param staffIdsNotList
*/
public void setStaffIdsNotList(List<String> staffIdsNotList){
this.staffIdsNotList = staffIdsNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1481,6 +1710,133 @@ public class WindowOwnerQuery extends WindowOwnerEntity { ...@@ -1481,6 +1710,133 @@ public class WindowOwnerQuery extends WindowOwnerEntity {
} }
/**
* 设置 角色类型(首席代表,运维,审核,其他)
* @param roleType
*/
public WindowOwnerQuery roleType(Integer roleType){
setRoleType(roleType);
return this;
}
/**
* 设置 开始 角色类型(首席代表,运维,审核,其他)
* @param roleTypeStart
*/
public WindowOwnerQuery roleTypeStart(Integer roleTypeStart){
this.roleTypeStart = roleTypeStart;
return this;
}
/**
* 设置 结束 角色类型(首席代表,运维,审核,其他)
* @param roleTypeEnd
*/
public WindowOwnerQuery roleTypeEnd(Integer roleTypeEnd){
this.roleTypeEnd = roleTypeEnd;
return this;
}
/**
* 设置 增加 角色类型(首席代表,运维,审核,其他)
* @param roleTypeIncrement
*/
public WindowOwnerQuery roleTypeIncrement(Integer roleTypeIncrement){
this.roleTypeIncrement = roleTypeIncrement;
return this;
}
/**
* 设置 角色类型(首席代表,运维,审核,其他)
* @param roleTypeList
*/
public WindowOwnerQuery roleTypeList(List<Integer> roleTypeList){
this.roleTypeList = roleTypeList;
return this;
}
/**
* 设置 角色类型(首席代表,运维,审核,其他)
* @param roleTypeNotList
*/
public WindowOwnerQuery roleTypeNotList(List<Integer> roleTypeNotList){
this.roleTypeNotList = roleTypeNotList;
return this;
}
/**
* 设置 是否允许巡检
* @param inspect
*/
public WindowOwnerQuery inspect(Integer inspect){
setInspect(inspect);
return this;
}
/**
* 设置 开始 是否允许巡检
* @param inspectStart
*/
public WindowOwnerQuery inspectStart(Integer inspectStart){
this.inspectStart = inspectStart;
return this;
}
/**
* 设置 结束 是否允许巡检
* @param inspectEnd
*/
public WindowOwnerQuery inspectEnd(Integer inspectEnd){
this.inspectEnd = inspectEnd;
return this;
}
/**
* 设置 增加 是否允许巡检
* @param inspectIncrement
*/
public WindowOwnerQuery inspectIncrement(Integer inspectIncrement){
this.inspectIncrement = inspectIncrement;
return this;
}
/**
* 设置 是否允许巡检
* @param inspectList
*/
public WindowOwnerQuery inspectList(List<Integer> inspectList){
this.inspectList = inspectList;
return this;
}
/**
* 设置 是否允许巡检
* @param inspectNotList
*/
public WindowOwnerQuery inspectNotList(List<Integer> inspectNotList){
this.inspectNotList = inspectNotList;
return this;
}
/**
* 设置 管辖人员
* @param staffIds
*/
public WindowOwnerQuery staffIds(String staffIds){
setStaffIds(staffIds);
return this;
}
/**
* 设置 管辖人员
* @param staffIdsList
*/
public WindowOwnerQuery staffIdsList(List<String> staffIdsList){
this.staffIdsList = staffIdsList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -18,4 +18,7 @@ public class WindowOwnerVo extends BaseEntityLong { ...@@ -18,4 +18,7 @@ public class WindowOwnerVo extends BaseEntityLong {
private Long windowId; private Long windowId;
private List<Long> staffIdList;
private Integer staffCount;
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.RespData; import com.mortals.xhx.common.pdu.RespData;
...@@ -18,6 +19,7 @@ import com.mortals.xhx.module.window.model.*; ...@@ -18,6 +19,7 @@ import com.mortals.xhx.module.window.model.*;
import com.mortals.xhx.module.window.service.WindowPerformService; import com.mortals.xhx.module.window.service.WindowPerformService;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformService; import com.mortals.xhx.module.window.service.WindowWorkmanPerformService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -182,6 +184,12 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -182,6 +184,12 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
if(!ObjectUtils.isEmpty(windowOwnerEntity)){ if(!ObjectUtils.isEmpty(windowOwnerEntity)){
throw new AppException("已经存在该负责人窗口记录!"); throw new AppException("已经存在该负责人窗口记录!");
} }
if(CollectionUtils.isNotEmpty(entity.getStaffIdList())){
entity.setStaffIds(StringUtils.join(entity.getStaffIdList(),","));
}else {
entity.setStaffIds("");
}
} }
@Override @Override
...@@ -190,6 +198,11 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -190,6 +198,11 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) { if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.setWindowCount(entity.getWindowOwnerDetailList().size()); entity.setWindowCount(entity.getWindowOwnerDetailList().size());
} }
if(CollectionUtils.isNotEmpty(entity.getStaffIdList())){
entity.setStaffIds(StringUtils.join(entity.getStaffIdList(),","));
}else {
entity.setStaffIds("");
}
} }
@Override @Override
...@@ -272,4 +285,21 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -272,4 +285,21 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
} }
} }
@Override
protected void findAfter(WindowOwnerEntity params, PageInfo pageInfo, Context context, List<WindowOwnerEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
list.forEach(item->{
if(StringUtils.isNotEmpty(item.getStaffIds())){
List<Long> staffIdList = Arrays.asList(item.getStaffIds().split(",")).stream().map(s -> Long.parseLong(s.trim())).collect(Collectors.toList());
item.setStaffIdList(staffIdList);
item.setStaffCount(staffIdList.size());
}else {
item.setStaffIdList(Collections.emptyList());
item.setStaffCount(0);
}
});
}
}
} }
\ No newline at end of file
...@@ -8,6 +8,8 @@ import com.mortals.xhx.base.system.param.service.ParamService; ...@@ -8,6 +8,8 @@ import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.site.model.SiteQuery; import com.mortals.xhx.base.system.site.model.SiteQuery;
import com.mortals.xhx.base.system.user.model.UserQuery; import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.FillStatusEnum;
import com.mortals.xhx.common.code.WindowRoleType;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.RespData; import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.site.SiteHallPdu; import com.mortals.xhx.common.pdu.site.SiteHallPdu;
...@@ -91,7 +93,7 @@ public class WindowOwnerController extends BaseCRUDJsonBodyMappingController<Win ...@@ -91,7 +93,7 @@ public class WindowOwnerController extends BaseCRUDJsonBodyMappingController<Win
// this.addDict(model, "updateUserId", collect); // this.addDict(model, "updateUserId", collect);
this.addDict(model, "deptId", deptService.getDeptBySalaId(-1l).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n))); this.addDict(model, "deptId", deptService.getDeptBySalaId(-1l).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
this.addDict(model, "salaId", deptService.getAllSala().stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n))); this.addDict(model, "salaId", deptService.getAllSala().stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
this.addDict(model, "roleType", WindowRoleType.getEnumMap());
super.init(model, context); super.init(model, context);
} }
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<id property="id" column="id" /> <id property="id" column="id" />
<result property="deptId" column="deptId" /> <result property="deptId" column="deptId" />
<result property="deptName" column="deptName" /> <result property="deptName" column="deptName" />
<result property="salaId" column="salaId" />
<result property="salaName" column="salaName" />
<result property="staffId" column="staffId" />
<result property="staffName" column="staffName" />
<result property="number" column="number" /> <result property="number" column="number" />
<result property="phone" column="phone" /> <result property="phone" column="phone" />
<result property="windowCount" column="windowCount" /> <result property="windowCount" column="windowCount" />
...@@ -16,10 +20,9 @@ ...@@ -16,10 +20,9 @@
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="salaId" column="salaId" /> <result property="roleType" column="roleType" />
<result property="salaName" column="salaName" /> <result property="inspect" column="inspect" />
<result property="staffId" column="staffId" /> <result property="staffIds" column="staffIds" />
<result property="staffName" column="staffName" />
<collection property="windowOwnerDetailList" column="staffId" ofType="WindowOwnerDetailEntity" javaType="ArrayList" select="getWindowOwnerDetailByOwnerId"></collection> <collection property="windowOwnerDetailList" column="staffId" ofType="WindowOwnerDetailEntity" javaType="ArrayList" select="getWindowOwnerDetailByOwnerId"></collection>
</resultMap> </resultMap>
<resultMap type="WindowOwnerDetailEntity" id="WindowOwnerDetailEntity-Map"> <resultMap type="WindowOwnerDetailEntity" id="WindowOwnerDetailEntity-Map">
...@@ -37,7 +40,6 @@ ...@@ -37,7 +40,6 @@
<result property="level" column="level" /> <result property="level" column="level" />
</resultMap> </resultMap>
<!-- 表所有列 --> <!-- 表所有列 -->
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
...@@ -50,6 +52,18 @@ ...@@ -50,6 +52,18 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName, a.deptName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaId') or colPickMode == 1 and data.containsKey('salaId')))">
a.salaId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaName') or colPickMode == 1 and data.containsKey('salaName')))">
a.salaName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffId') or colPickMode == 1 and data.containsKey('staffId')))">
a.staffId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
a.staffName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('number') or colPickMode == 1 and data.containsKey('number')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('number') or colPickMode == 1 and data.containsKey('number')))">
a.number, a.number,
</if> </if>
...@@ -74,17 +88,14 @@ ...@@ -74,17 +88,14 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaId') or colPickMode == 1 and data.containsKey('salaId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleType') or colPickMode == 1 and data.containsKey('roleType')))">
a.salaId, a.roleType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaName') or colPickMode == 1 and data.containsKey('salaName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('inspect') or colPickMode == 1 and data.containsKey('inspect')))">
a.salaName, a.inspect,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffId') or colPickMode == 1 and data.containsKey('staffId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffIds') or colPickMode == 1 and data.containsKey('staffIds')))">
a.staffId, a.staffIds,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
a.staffName,
</if> </if>
</trim> </trim>
</sql> </sql>
...@@ -97,18 +108,18 @@ ...@@ -97,18 +108,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WindowOwnerEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="WindowOwnerEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_window_owner insert into mortals_xhx_window_owner
(deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName) (deptId,deptName,salaId,salaName,staffId,staffName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,roleType,inspect,staffIds)
VALUES VALUES
(#{deptId},#{deptName},#{number},#{phone},#{windowCount},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{salaId},#{salaName},#{staffId},#{staffName}) (#{deptId},#{deptName},#{salaId},#{salaName},#{staffId},#{staffName},#{number},#{phone},#{windowCount},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{roleType},#{inspect},#{staffIds})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_window_owner insert into mortals_xhx_window_owner
(deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName) (deptId,deptName,salaId,salaName,staffId,staffName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,roleType,inspect,staffIds)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.deptId},#{item.deptName},#{item.number},#{item.phone},#{item.windowCount},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.salaId},#{item.salaName},#{item.staffId},#{item.staffName}) (#{item.deptId},#{item.deptName},#{item.salaId},#{item.salaName},#{item.staffId},#{item.staffName},#{item.number},#{item.phone},#{item.windowCount},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.roleType},#{item.inspect},#{item.staffIds})
</foreach> </foreach>
</insert> </insert>
...@@ -127,6 +138,24 @@ ...@@ -127,6 +138,24 @@
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))"> <if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName}, a.deptName=#{data.deptName},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('salaId')) or (colPickMode==1 and !data.containsKey('salaId'))">
a.salaId=#{data.salaId},
</if>
<if test="(colPickMode==0 and data.containsKey('salaIdIncrement')) or (colPickMode==1 and !data.containsKey('salaIdIncrement'))">
a.salaId=ifnull(a.salaId,0) + #{data.salaIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('salaName')) or (colPickMode==1 and !data.containsKey('salaName'))">
a.salaName=#{data.salaName},
</if>
<if test="(colPickMode==0 and data.containsKey('staffId')) or (colPickMode==1 and !data.containsKey('staffId'))">
a.staffId=#{data.staffId},
</if>
<if test="(colPickMode==0 and data.containsKey('staffIdIncrement')) or (colPickMode==1 and !data.containsKey('staffIdIncrement'))">
a.staffId=ifnull(a.staffId,0) + #{data.staffIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))">
a.staffName=#{data.staffName},
</if>
<if test="(colPickMode==0 and data.containsKey('number')) or (colPickMode==1 and !data.containsKey('number'))"> <if test="(colPickMode==0 and data.containsKey('number')) or (colPickMode==1 and !data.containsKey('number'))">
a.number=#{data.number}, a.number=#{data.number},
</if> </if>
...@@ -160,23 +189,20 @@ ...@@ -160,23 +189,20 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('salaId')) or (colPickMode==1 and !data.containsKey('salaId'))"> <if test="(colPickMode==0 and data.containsKey('roleType')) or (colPickMode==1 and !data.containsKey('roleType'))">
a.salaId=#{data.salaId}, a.roleType=#{data.roleType},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('salaIdIncrement')) or (colPickMode==1 and !data.containsKey('salaIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('roleTypeIncrement')) or (colPickMode==1 and !data.containsKey('roleTypeIncrement'))">
a.salaId=ifnull(a.salaId,0) + #{data.salaIdIncrement}, a.roleType=ifnull(a.roleType,0) + #{data.roleTypeIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('salaName')) or (colPickMode==1 and !data.containsKey('salaName'))"> <if test="(colPickMode==0 and data.containsKey('inspect')) or (colPickMode==1 and !data.containsKey('inspect'))">
a.salaName=#{data.salaName}, a.inspect=#{data.inspect},
</if>
<if test="(colPickMode==0 and data.containsKey('staffId')) or (colPickMode==1 and !data.containsKey('staffId'))">
a.staffId=#{data.staffId},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('staffIdIncrement')) or (colPickMode==1 and !data.containsKey('staffIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('inspectIncrement')) or (colPickMode==1 and !data.containsKey('inspectIncrement'))">
a.staffId=ifnull(a.staffId,0) + #{data.staffIdIncrement}, a.inspect=ifnull(a.inspect,0) + #{data.inspectIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))"> <if test="(colPickMode==0 and data.containsKey('staffIds')) or (colPickMode==1 and !data.containsKey('staffIds'))">
a.staffName=#{data.staffName}, a.staffIds=#{data.staffIds},
</if> </if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
...@@ -209,6 +235,44 @@ ...@@ -209,6 +235,44 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="salaId=(case" suffix="ELSE salaId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('salaId')) or (colPickMode==1 and !item.containsKey('salaId'))">
when a.id=#{item.id} then #{item.salaId}
</when>
<when test="(colPickMode==0 and item.containsKey('salaIdIncrement')) or (colPickMode==1 and !item.containsKey('salaIdIncrement'))">
when a.id=#{item.id} then ifnull(a.salaId,0) + #{item.salaIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="salaName=(case" suffix="ELSE salaName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('salaName')) or (colPickMode==1 and !item.containsKey('salaName'))">
when a.id=#{item.id} then #{item.salaName}
</if>
</foreach>
</trim>
<trim prefix="staffId=(case" suffix="ELSE staffId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('staffId')) or (colPickMode==1 and !item.containsKey('staffId'))">
when a.id=#{item.id} then #{item.staffId}
</when>
<when test="(colPickMode==0 and item.containsKey('staffIdIncrement')) or (colPickMode==1 and !item.containsKey('staffIdIncrement'))">
when a.id=#{item.id} then ifnull(a.staffId,0) + #{item.staffIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="staffName=(case" suffix="ELSE staffName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('staffName')) or (colPickMode==1 and !item.containsKey('staffName'))">
when a.id=#{item.id} then #{item.staffName}
</if>
</foreach>
</trim>
<trim prefix="number=(case" suffix="ELSE number end),"> <trim prefix="number=(case" suffix="ELSE number end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('number')) or (colPickMode==1 and !item.containsKey('number'))"> <if test="(colPickMode==0 and item.containsKey('number')) or (colPickMode==1 and !item.containsKey('number'))">
...@@ -280,41 +344,34 @@ ...@@ -280,41 +344,34 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="salaId=(case" suffix="ELSE salaId end),"> <trim prefix="roleType=(case" suffix="ELSE roleType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('salaId')) or (colPickMode==1 and !item.containsKey('salaId'))"> <when test="(colPickMode==0 and item.containsKey('roleType')) or (colPickMode==1 and !item.containsKey('roleType'))">
when a.id=#{item.id} then #{item.salaId} when a.id=#{item.id} then #{item.roleType}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('salaIdIncrement')) or (colPickMode==1 and !item.containsKey('salaIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('roleTypeIncrement')) or (colPickMode==1 and !item.containsKey('roleTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.salaId,0) + #{item.salaIdIncrement} when a.id=#{item.id} then ifnull(a.roleType,0) + #{item.roleTypeIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="salaName=(case" suffix="ELSE salaName end),"> <trim prefix="inspect=(case" suffix="ELSE inspect end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('salaName')) or (colPickMode==1 and !item.containsKey('salaName'))">
when a.id=#{item.id} then #{item.salaName}
</if>
</foreach>
</trim>
<trim prefix="staffId=(case" suffix="ELSE staffId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('staffId')) or (colPickMode==1 and !item.containsKey('staffId'))"> <when test="(colPickMode==0 and item.containsKey('inspect')) or (colPickMode==1 and !item.containsKey('inspect'))">
when a.id=#{item.id} then #{item.staffId} when a.id=#{item.id} then #{item.inspect}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('staffIdIncrement')) or (colPickMode==1 and !item.containsKey('staffIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('inspectIncrement')) or (colPickMode==1 and !item.containsKey('inspectIncrement'))">
when a.id=#{item.id} then ifnull(a.staffId,0) + #{item.staffIdIncrement} when a.id=#{item.id} then ifnull(a.inspect,0) + #{item.inspectIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="staffName=(case" suffix="ELSE staffName end),"> <trim prefix="staffIds=(case" suffix="ELSE staffIds end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('staffName')) or (colPickMode==1 and !item.containsKey('staffName'))"> <if test="(colPickMode==0 and item.containsKey('staffIds')) or (colPickMode==1 and !item.containsKey('staffIds'))">
when a.id=#{item.id} then #{item.staffName} when a.id=#{item.id} then #{item.staffIds}
</if> </if>
</foreach> </foreach>
</trim> </trim>
...@@ -378,6 +435,7 @@ ...@@ -378,6 +435,7 @@
</trim> </trim>
<include refid="_orderCols_"/> <include refid="_orderCols_"/>
</select> </select>
<!-- 获取子列表 --> <!-- 获取子列表 -->
<select id="getWindowOwnerDetailByOwnerId" parameterType="java.lang.Long" resultMap="WindowOwnerDetailEntity-Map"> <select id="getWindowOwnerDetailByOwnerId" parameterType="java.lang.Long" resultMap="WindowOwnerDetailEntity-Map">
select <include refid="_columns_sub"/> select <include refid="_columns_sub"/>
...@@ -388,7 +446,6 @@ ...@@ -388,7 +446,6 @@
</select> </select>
<!-- 获取 --> <!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int"> <select id="getListCount" parameterType="paramDto" resultType="int">
select count(1) select count(1)
...@@ -517,6 +574,102 @@ ...@@ -517,6 +574,102 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('salaId')">
<if test="conditionParamRef.salaId != null ">
${_conditionType_} a.salaId = #{${_conditionParam_}.salaId}
</if>
<if test="conditionParamRef.salaId == null">
${_conditionType_} a.salaId is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
${_conditionType_} a.salaId in
<foreach collection="conditionParamRef.salaIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaIdNotList') and conditionParamRef.salaIdNotList.size() > 0">
${_conditionType_} a.salaId not in
<foreach collection="conditionParamRef.salaIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaIdStart') and conditionParamRef.salaIdStart != null">
${_conditionType_} a.salaId <![CDATA[ >= ]]> #{${_conditionParam_}.salaIdStart}
</if>
<if test="conditionParamRef.containsKey('salaIdEnd') and conditionParamRef.salaIdEnd != null">
${_conditionType_} a.salaId <![CDATA[ <= ]]> #{${_conditionParam_}.salaIdEnd}
</if>
<if test="conditionParamRef.containsKey('salaName')">
<if test="conditionParamRef.salaName != null and conditionParamRef.salaName != ''">
${_conditionType_} a.salaName like #{${_conditionParam_}.salaName}
</if>
<if test="conditionParamRef.salaName == null">
${_conditionType_} a.salaName is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaNameList') and conditionParamRef.salaNameList.size() > 0">
${_conditionType_} a.salaName in
<foreach collection="conditionParamRef.salaNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaNameNotList') and conditionParamRef.salaNameNotList.size() > 0">
${_conditionType_} a.salaName not in
<foreach collection="conditionParamRef.salaNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffId')">
<if test="conditionParamRef.staffId != null ">
${_conditionType_} a.staffId = #{${_conditionParam_}.staffId}
</if>
<if test="conditionParamRef.staffId == null">
${_conditionType_} a.staffId is null
</if>
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
${_conditionType_} a.staffId in
<foreach collection="conditionParamRef.staffIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffIdNotList') and conditionParamRef.staffIdNotList.size() > 0">
${_conditionType_} a.staffId not in
<foreach collection="conditionParamRef.staffIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffIdStart') and conditionParamRef.staffIdStart != null">
${_conditionType_} a.staffId <![CDATA[ >= ]]> #{${_conditionParam_}.staffIdStart}
</if>
<if test="conditionParamRef.containsKey('staffIdEnd') and conditionParamRef.staffIdEnd != null">
${_conditionType_} a.staffId <![CDATA[ <= ]]> #{${_conditionParam_}.staffIdEnd}
</if>
<if test="conditionParamRef.containsKey('staffName')">
<if test="conditionParamRef.staffName != null and conditionParamRef.staffName != ''">
${_conditionType_} a.staffName like #{${_conditionParam_}.staffName}
</if>
<if test="conditionParamRef.staffName == null">
${_conditionType_} a.staffName is null
</if>
</if>
<if test="conditionParamRef.containsKey('staffNameList') and conditionParamRef.staffNameList.size() > 0">
${_conditionType_} a.staffName in
<foreach collection="conditionParamRef.staffNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffNameNotList') and conditionParamRef.staffNameNotList.size() > 0">
${_conditionType_} a.staffName not in
<foreach collection="conditionParamRef.staffNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('number')"> <if test="conditionParamRef.containsKey('number')">
<if test="conditionParamRef.number != null and conditionParamRef.number != ''"> <if test="conditionParamRef.number != null and conditionParamRef.number != ''">
...@@ -691,99 +844,78 @@ ...@@ -691,99 +844,78 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <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') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('salaId')"> <if test="conditionParamRef.containsKey('roleType')">
<if test="conditionParamRef.salaId != null "> <if test="conditionParamRef.roleType != null ">
${_conditionType_} a.salaId = #{${_conditionParam_}.salaId} ${_conditionType_} a.roleType = #{${_conditionParam_}.roleType}
</if> </if>
<if test="conditionParamRef.salaId == null"> <if test="conditionParamRef.roleType == null">
${_conditionType_} a.salaId is null ${_conditionType_} a.roleType is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0"> <if test="conditionParamRef.containsKey('roleTypeList') and conditionParamRef.roleTypeList.size() > 0">
${_conditionType_} a.salaId in ${_conditionType_} a.roleType in
<foreach collection="conditionParamRef.salaIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.roleTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('salaIdNotList') and conditionParamRef.salaIdNotList.size() > 0"> <if test="conditionParamRef.containsKey('roleTypeNotList') and conditionParamRef.roleTypeNotList.size() > 0">
${_conditionType_} a.salaId not in ${_conditionType_} a.roleType not in
<foreach collection="conditionParamRef.salaIdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.roleTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('salaIdStart') and conditionParamRef.salaIdStart != null"> <if test="conditionParamRef.containsKey('roleTypeStart') and conditionParamRef.roleTypeStart != null">
${_conditionType_} a.salaId <![CDATA[ >= ]]> #{${_conditionParam_}.salaIdStart} ${_conditionType_} a.roleType <![CDATA[ >= ]]> #{${_conditionParam_}.roleTypeStart}
</if> </if>
<if test="conditionParamRef.containsKey('salaIdEnd') and conditionParamRef.salaIdEnd != null"> <if test="conditionParamRef.containsKey('roleTypeEnd') and conditionParamRef.roleTypeEnd != null">
${_conditionType_} a.salaId <![CDATA[ <= ]]> #{${_conditionParam_}.salaIdEnd} ${_conditionType_} a.roleType <![CDATA[ <= ]]> #{${_conditionParam_}.roleTypeEnd}
</if> </if>
<if test="conditionParamRef.containsKey('inspect')">
<if test="conditionParamRef.containsKey('salaName')"> <if test="conditionParamRef.inspect != null ">
<if test="conditionParamRef.salaName != null and conditionParamRef.salaName != ''"> ${_conditionType_} a.inspect = #{${_conditionParam_}.inspect}
${_conditionType_} a.salaName like #{${_conditionParam_}.salaName}
</if>
<if test="conditionParamRef.salaName == null">
${_conditionType_} a.salaName is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaNameList') and conditionParamRef.salaNameList.size() > 0">
${_conditionType_} a.salaName in
<foreach collection="conditionParamRef.salaNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaNameNotList') and conditionParamRef.salaNameNotList.size() > 0">
${_conditionType_} a.salaName not in
<foreach collection="conditionParamRef.salaNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffId')">
<if test="conditionParamRef.staffId != null ">
${_conditionType_} a.staffId = #{${_conditionParam_}.staffId}
</if> </if>
<if test="conditionParamRef.staffId == null"> <if test="conditionParamRef.inspect == null">
${_conditionType_} a.staffId is null ${_conditionType_} a.inspect is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0"> <if test="conditionParamRef.containsKey('inspectList') and conditionParamRef.inspectList.size() > 0">
${_conditionType_} a.staffId in ${_conditionType_} a.inspect in
<foreach collection="conditionParamRef.staffIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.inspectList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('staffIdNotList') and conditionParamRef.staffIdNotList.size() > 0"> <if test="conditionParamRef.containsKey('inspectNotList') and conditionParamRef.inspectNotList.size() > 0">
${_conditionType_} a.staffId not in ${_conditionType_} a.inspect not in
<foreach collection="conditionParamRef.staffIdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.inspectNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('staffIdStart') and conditionParamRef.staffIdStart != null"> <if test="conditionParamRef.containsKey('inspectStart') and conditionParamRef.inspectStart != null">
${_conditionType_} a.staffId <![CDATA[ >= ]]> #{${_conditionParam_}.staffIdStart} ${_conditionType_} a.inspect <![CDATA[ >= ]]> #{${_conditionParam_}.inspectStart}
</if> </if>
<if test="conditionParamRef.containsKey('staffIdEnd') and conditionParamRef.staffIdEnd != null"> <if test="conditionParamRef.containsKey('inspectEnd') and conditionParamRef.inspectEnd != null">
${_conditionType_} a.staffId <![CDATA[ <= ]]> #{${_conditionParam_}.staffIdEnd} ${_conditionType_} a.inspect <![CDATA[ <= ]]> #{${_conditionParam_}.inspectEnd}
</if> </if>
<if test="conditionParamRef.containsKey('staffName')"> <if test="conditionParamRef.containsKey('staffIds')">
<if test="conditionParamRef.staffName != null and conditionParamRef.staffName != ''"> <if test="conditionParamRef.staffIds != null and conditionParamRef.staffIds != ''">
${_conditionType_} a.staffName like #{${_conditionParam_}.staffName} ${_conditionType_} a.staffIds like #{${_conditionParam_}.staffIds}
</if> </if>
<if test="conditionParamRef.staffName == null"> <if test="conditionParamRef.staffIds == null">
${_conditionType_} a.staffName is null ${_conditionType_} a.staffIds is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('staffNameList') and conditionParamRef.staffNameList.size() > 0"> <if test="conditionParamRef.containsKey('staffIdsList') and conditionParamRef.staffIdsList.size() > 0">
${_conditionType_} a.staffName in ${_conditionType_} a.staffIds in
<foreach collection="conditionParamRef.staffNameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.staffIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('staffNameNotList') and conditionParamRef.staffNameNotList.size() > 0"> <if test="conditionParamRef.containsKey('staffIdsNotList') and conditionParamRef.staffIdsNotList.size() > 0">
${_conditionType_} a.staffName not in ${_conditionType_} a.staffIds not in
<foreach collection="conditionParamRef.staffNameNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.staffIdsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
...@@ -805,6 +937,20 @@ ...@@ -805,6 +937,20 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
field(a.salaId,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
field(a.staffId,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('windowCountList') and conditionParamRef.windowCountList.size() > 0"> <if test="conditionParamRef.containsKey('windowCountList') and conditionParamRef.windowCountList.size() > 0">
field(a.windowCount, field(a.windowCount,
<foreach collection="conditionParamRef.windowCountList" open="" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.windowCountList" open="" close=")" index="index" item="item" separator=",">
...@@ -826,16 +972,16 @@ ...@@ -826,16 +972,16 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0"> <if test="conditionParamRef.containsKey('roleTypeList') and conditionParamRef.roleTypeList.size() > 0">
field(a.salaId, field(a.roleType,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.roleTypeList" open="" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0"> <if test="conditionParamRef.containsKey('inspectList') and conditionParamRef.inspectList.size() > 0">
field(a.staffId, field(a.inspect,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.inspectList" open="" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
, ,
...@@ -862,6 +1008,20 @@ ...@@ -862,6 +1008,20 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
field(a.salaId,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
field(a.staffId,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('windowCountList') and conditionParamRef.windowCountList.size() > 0"> <if test="conditionParamRef.containsKey('windowCountList') and conditionParamRef.windowCountList.size() > 0">
field(a.windowCount, field(a.windowCount,
<foreach collection="conditionParamRef.windowCountList" open="" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.windowCountList" open="" close=")" index="index" item="item" separator=",">
...@@ -883,16 +1043,16 @@ ...@@ -883,16 +1043,16 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0"> <if test="conditionParamRef.containsKey('roleTypeList') and conditionParamRef.roleTypeList.size() > 0">
field(a.salaId, field(a.roleType,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.roleTypeList" open="" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0"> <if test="conditionParamRef.containsKey('inspectList') and conditionParamRef.inspectList.size() > 0">
field(a.staffId, field(a.inspect,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.inspectList" open="" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
, ,
...@@ -913,6 +1073,26 @@ ...@@ -913,6 +1073,26 @@
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if> <if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('salaId')">
a.salaId
<if test='orderCol.salaId != null and "DESC".equalsIgnoreCase(orderCol.salaId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('salaName')">
a.salaName
<if test='orderCol.salaName != null and "DESC".equalsIgnoreCase(orderCol.salaName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('staffId')">
a.staffId
<if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('staffName')">
a.staffName
<if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('number')"> <if test="orderCol.containsKey('number')">
a.number a.number
<if test='orderCol.number != null and "DESC".equalsIgnoreCase(orderCol.number)'>DESC</if> <if test='orderCol.number != null and "DESC".equalsIgnoreCase(orderCol.number)'>DESC</if>
...@@ -953,24 +1133,19 @@ ...@@ -953,24 +1133,19 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('salaId')"> <if test="orderCol.containsKey('roleType')">
a.salaId a.roleType
<if test='orderCol.salaId != null and "DESC".equalsIgnoreCase(orderCol.salaId)'>DESC</if> <if test='orderCol.roleType != null and "DESC".equalsIgnoreCase(orderCol.roleType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('salaName')">
a.salaName
<if test='orderCol.salaName != null and "DESC".equalsIgnoreCase(orderCol.salaName)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('staffId')"> <if test="orderCol.containsKey('inspect')">
a.staffId a.inspect
<if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if> <if test='orderCol.inspect != null and "DESC".equalsIgnoreCase(orderCol.inspect)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('staffName')"> <if test="orderCol.containsKey('staffIds')">
a.staffName a.staffIds
<if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if> <if test='orderCol.staffIds != null and "DESC".equalsIgnoreCase(orderCol.staffIds)'>DESC</if>
, ,
</if> </if>
</trim> </trim>
......
...@@ -1275,3 +1275,13 @@ CREATE TABLE mortals_xhx_door( ...@@ -1275,3 +1275,13 @@ CREATE TABLE mortals_xhx_door(
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
,KEY `deviceCode` (`deviceCode`) USING BTREE ,KEY `deviceCode` (`deviceCode`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='门禁设备'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='门禁设备';
-- ----------------------------
2024-04-26
-- ----------------------------
-- ----------------------------
-- 窗口负责人
-- ----------------------------
ALTER TABLE `mortals_xhx_window_owner` ADD COLUMN `roleType` tinyint(2) COMMENT '角色类型(首席代表,运维,审核,其他)' AFTER `remark`,
ADD COLUMN `inspect` tinyint(2) DEFAULT '0' COMMENT '是否允许巡检' AFTER `roleType`,
ADD COLUMN `staffIds` varchar(255) COMMENT '管辖人员' AFTER `inspect`;
\ No newline at end of file
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