Commit ca17eaa4 authored by 廖旭伟's avatar 廖旭伟

协议管理增加协议类型字段

parent c3f63132
...@@ -277,3 +277,8 @@ CREATE TABLE `mortals_xhx_converge_apps_access` ( ...@@ -277,3 +277,8 @@ CREATE TABLE `mortals_xhx_converge_apps_access` (
ALTER TABLE `mortals_xhx_sst_apps_desk` ADD COLUMN `clickSum` int(8) DEFAULT '0' COMMENT '应用点击次数'; ALTER TABLE `mortals_xhx_sst_apps_desk` ADD COLUMN `clickSum` int(8) DEFAULT '0' COMMENT '应用点击次数';
ALTER TABLE `mortals_xhx_sst_apps` ADD COLUMN `clickSum` int(8) DEFAULT '0' COMMENT '应用点击次数'; ALTER TABLE `mortals_xhx_sst_apps` ADD COLUMN `clickSum` int(8) DEFAULT '0' COMMENT '应用点击次数';
ALTER TABLE `mortals_xhx_sst_agreement` ADD COLUMN `protocolType` tinyint(2) DEFAULT '1' COMMENT '协议类型' AFTER `name`;
INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `paramKey`, `paramValue`, `validStatus`, `modStatus`, `displayType`, `remark`, `createTime`, `createUserId`, `createUserName`) VALUES ('协议类型', 'SstAgreement', 'protocolType', '1', '注册协议', '1', '4', '0', NULL, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `paramKey`, `paramValue`, `validStatus`, `modStatus`, `displayType`, `remark`, `createTime`, `createUserId`, `createUserName`) VALUES ('协议类型', 'SstAgreement', 'protocolType', '2', '申报协议', '1', '4', '0', NULL, NULL, NULL, NULL);
package com.mortals.xhx.module.sst.model; package com.mortals.xhx.module.sst.model;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.sst.model.vo.SstAgreementVo; import com.mortals.xhx.module.sst.model.vo.SstAgreementVo;
import lombok.Data;
/** /**
* 协议管理实体对象 * 协议管理实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-12-26 * @date 2023-07-10
*/ */
@Data
public class SstAgreementEntity extends SstAgreementVo { public class SstAgreementEntity extends SstAgreementVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -32,70 +32,10 @@ public class SstAgreementEntity extends SstAgreementVo { ...@@ -32,70 +32,10 @@ public class SstAgreementEntity extends SstAgreementVo {
* 协议内容 * 协议内容
*/ */
private String content; private String content;
public SstAgreementEntity(){}
/**
* 获取 站点id
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点id
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 协议名称
* @return String
*/
public String getName(){
return name;
}
/**
* 设置 协议名称
* @param name
*/
public void setName(String name){
this.name = name;
}
/** /**
* 获取 协议描述 * 协议类型
* @return String
*/ */
public String getDescribe(){ private Integer protocolType;
return describe;
}
/**
* 设置 协议描述
* @param describe
*/
public void setDescribe(String describe){
this.describe = describe;
}
/**
* 获取 协议内容
* @return String
*/
public String getContent(){
return content;
}
/**
* 设置 协议内容
* @param content
*/
public void setContent(String content){
this.content = content;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -112,23 +52,16 @@ public class SstAgreementEntity extends SstAgreementVo { ...@@ -112,23 +52,16 @@ public class SstAgreementEntity extends SstAgreementVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",name:").append(getName());
sb.append(",describe:").append(getDescribe());
sb.append(",content:").append(getContent());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.siteId = null; this.siteId = -1L;
this.name = ""; this.name = "";
this.describe = ""; this.describe = "";
this.content = ""; this.content = "";
this.protocolType = 1;
} }
} }
\ No newline at end of file
...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.sst.model; ...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.sst.model;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.sst.model.SstAgreementEntity; import com.mortals.xhx.module.sst.model.SstAgreementEntity;
/** /**
* 协议管理查询对象 * 协议管理查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-12-26 * @date 2023-07-10
*/ */
public class SstAgreementQuery extends SstAgreementEntity { public class SstAgreementQuery extends SstAgreementEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -21,6 +21,9 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -21,6 +21,9 @@ public class SstAgreementQuery extends SstAgreementEntity {
/** 序号,主键,自增长列表 */ /** 序号,主键,自增长列表 */
private List <Long> idList; private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 站点id */ /** 开始 站点id */
private Long siteIdStart; private Long siteIdStart;
...@@ -33,15 +36,24 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -33,15 +36,24 @@ public class SstAgreementQuery extends SstAgreementEntity {
/** 站点id列表 */ /** 站点id列表 */
private List <Long> siteIdList; private List <Long> siteIdList;
/** 站点id排除列表 */
private List <Long> siteIdNotList;
/** 协议名称 */ /** 协议名称 */
private List<String> nameList; private List<String> nameList;
/** 协议名称排除列表 */
private List <String> nameNotList;
/** 协议描述 */ /** 协议描述 */
private List<String> describeList; private List<String> describeList;
/** 协议描述排除列表 */
private List <String> describeNotList;
/** 协议内容 */ /** 协议内容 */
private List<String> contentList; private List<String> contentList;
/** 协议内容排除列表 */
private List <String> contentNotList;
/** 开始 创建用户 */ /** 开始 创建用户 */
private Long createUserIdStart; private Long createUserIdStart;
...@@ -54,6 +66,9 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -54,6 +66,9 @@ public class SstAgreementQuery extends SstAgreementEntity {
/** 创建用户列表 */ /** 创建用户列表 */
private List <Long> createUserIdList; private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 创建时间 */ /** 开始 创建时间 */
private String createTimeStart; private String createTimeStart;
...@@ -72,12 +87,30 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -72,12 +87,30 @@ public class SstAgreementQuery extends SstAgreementEntity {
/** 更新用户列表 */ /** 更新用户列表 */
private List <Long> updateUserIdList; private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */ /** 开始 更新时间 */
private String updateTimeStart; private String updateTimeStart;
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 协议类型 */
private Integer protocolTypeStart;
/** 结束 协议类型 */
private Integer protocolTypeEnd;
/** 增加 协议类型 */
private Integer protocolTypeIncrement;
/** 协议类型列表 */
private List <Integer> protocolTypeList;
/** 协议类型排除列表 */
private List <Integer> protocolTypeNotList;
/** 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<SstAgreementQuery> orConditionList; private List<SstAgreementQuery> orConditionList;
...@@ -150,6 +183,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -150,6 +183,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
this.idList = idList; this.idList = idList;
} }
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/** /**
* 获取 开始 站点id * 获取 开始 站点id
* @return siteIdStart * @return siteIdStart
...@@ -214,6 +264,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -214,6 +264,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
this.siteIdList = siteIdList; this.siteIdList = siteIdList;
} }
/**
* 获取 站点id
* @return siteIdNotList
*/
public List<Long> getSiteIdNotList(){
return this.siteIdNotList;
}
/**
* 设置 站点id
* @param siteIdNotList
*/
public void setSiteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
}
/** /**
* 获取 协议名称 * 获取 协议名称
* @return nameList * @return nameList
...@@ -229,6 +296,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -229,6 +296,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
public void setNameList(List<String> nameList){ public void setNameList(List<String> nameList){
this.nameList = nameList; this.nameList = nameList;
} }
/**
* 获取 协议名称
* @return nameNotList
*/
public List<String> getNameNotList(){
return this.nameNotList;
}
/**
* 设置 协议名称
* @param nameNotList
*/
public void setNameNotList(List<String> nameNotList){
this.nameNotList = nameNotList;
}
/** /**
* 获取 协议描述 * 获取 协议描述
* @return describeList * @return describeList
...@@ -244,6 +328,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -244,6 +328,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
public void setDescribeList(List<String> describeList){ public void setDescribeList(List<String> describeList){
this.describeList = describeList; this.describeList = describeList;
} }
/**
* 获取 协议描述
* @return describeNotList
*/
public List<String> getDescribeNotList(){
return this.describeNotList;
}
/**
* 设置 协议描述
* @param describeNotList
*/
public void setDescribeNotList(List<String> describeNotList){
this.describeNotList = describeNotList;
}
/** /**
* 获取 协议内容 * 获取 协议内容
* @return contentList * @return contentList
...@@ -259,6 +360,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -259,6 +360,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
public void setContentList(List<String> contentList){ public void setContentList(List<String> contentList){
this.contentList = contentList; this.contentList = contentList;
} }
/**
* 获取 协议内容
* @return contentNotList
*/
public List<String> getContentNotList(){
return this.contentNotList;
}
/**
* 设置 协议内容
* @param contentNotList
*/
public void setContentNotList(List<String> contentNotList){
this.contentNotList = contentNotList;
}
/** /**
* 获取 开始 创建用户 * 获取 开始 创建用户
* @return createUserIdStart * @return createUserIdStart
...@@ -323,6 +441,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -323,6 +441,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
this.createUserIdList = createUserIdList; this.createUserIdList = createUserIdList;
} }
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/** /**
* 获取 开始 创建时间 * 获取 开始 创建时间
* @return createTimeStart * @return createTimeStart
...@@ -419,6 +554,23 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -419,6 +554,23 @@ public class SstAgreementQuery extends SstAgreementEntity {
this.updateUserIdList = updateUserIdList; this.updateUserIdList = updateUserIdList;
} }
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/** /**
* 获取 开始 更新时间 * 获取 开始 更新时间
* @return updateTimeStart * @return updateTimeStart
...@@ -451,6 +603,87 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -451,6 +603,87 @@ public class SstAgreementQuery extends SstAgreementEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 协议类型
* @return protocolTypeStart
*/
public Integer getProtocolTypeStart(){
return this.protocolTypeStart;
}
/**
* 设置 开始 协议类型
* @param protocolTypeStart
*/
public void setProtocolTypeStart(Integer protocolTypeStart){
this.protocolTypeStart = protocolTypeStart;
}
/**
* 获取 结束 协议类型
* @return $protocolTypeEnd
*/
public Integer getProtocolTypeEnd(){
return this.protocolTypeEnd;
}
/**
* 设置 结束 协议类型
* @param protocolTypeEnd
*/
public void setProtocolTypeEnd(Integer protocolTypeEnd){
this.protocolTypeEnd = protocolTypeEnd;
}
/**
* 获取 增加 协议类型
* @return protocolTypeIncrement
*/
public Integer getProtocolTypeIncrement(){
return this.protocolTypeIncrement;
}
/**
* 设置 增加 协议类型
* @param protocolTypeIncrement
*/
public void setProtocolTypeIncrement(Integer protocolTypeIncrement){
this.protocolTypeIncrement = protocolTypeIncrement;
}
/**
* 获取 协议类型
* @return protocolTypeList
*/
public List<Integer> getProtocolTypeList(){
return this.protocolTypeList;
}
/**
* 设置 协议类型
* @param protocolTypeList
*/
public void setProtocolTypeList(List<Integer> protocolTypeList){
this.protocolTypeList = protocolTypeList;
}
/**
* 获取 协议类型
* @return protocolTypeNotList
*/
public List<Integer> getProtocolTypeNotList(){
return this.protocolTypeNotList;
}
/**
* 设置 协议类型
* @param protocolTypeNotList
*/
public void setProtocolTypeNotList(List<Integer> protocolTypeNotList){
this.protocolTypeNotList = protocolTypeNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -496,6 +729,15 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -496,6 +729,15 @@ public class SstAgreementQuery extends SstAgreementEntity {
return this; return this;
} }
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public SstAgreementQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/** /**
* 设置 站点id * 设置 站点id
* @param siteId * @param siteId
...@@ -541,6 +783,15 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -541,6 +783,15 @@ public class SstAgreementQuery extends SstAgreementEntity {
return this; return this;
} }
/**
* 设置 站点id
* @param siteIdNotList
*/
public SstAgreementQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/** /**
* 设置 协议名称 * 设置 协议名称
...@@ -643,6 +894,15 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -643,6 +894,15 @@ public class SstAgreementQuery extends SstAgreementEntity {
return this; return this;
} }
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public SstAgreementQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/** /**
* 设置 更新用户 * 设置 更新用户
...@@ -689,6 +949,69 @@ public class SstAgreementQuery extends SstAgreementEntity { ...@@ -689,6 +949,69 @@ public class SstAgreementQuery extends SstAgreementEntity {
return this; return this;
} }
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public SstAgreementQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 设置 协议类型
* @param protocolType
*/
public SstAgreementQuery protocolType(Integer protocolType){
setProtocolType(protocolType);
return this;
}
/**
* 设置 开始 协议类型
* @param protocolTypeStart
*/
public SstAgreementQuery protocolTypeStart(Integer protocolTypeStart){
this.protocolTypeStart = protocolTypeStart;
return this;
}
/**
* 设置 结束 协议类型
* @param protocolTypeEnd
*/
public SstAgreementQuery protocolTypeEnd(Integer protocolTypeEnd){
this.protocolTypeEnd = protocolTypeEnd;
return this;
}
/**
* 设置 增加 协议类型
* @param protocolTypeIncrement
*/
public SstAgreementQuery protocolTypeIncrement(Integer protocolTypeIncrement){
this.protocolTypeIncrement = protocolTypeIncrement;
return this;
}
/**
* 设置 协议类型
* @param protocolTypeList
*/
public SstAgreementQuery protocolTypeList(List<Integer> protocolTypeList){
this.protocolTypeList = protocolTypeList;
return this;
}
/**
* 设置 协议类型
* @param protocolTypeNotList
*/
public SstAgreementQuery protocolTypeNotList(List<Integer> protocolTypeNotList){
this.protocolTypeNotList = protocolTypeNotList;
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)
......
...@@ -42,6 +42,7 @@ public class SstAgreementController extends BaseCRUDJsonBodyMappingController<Ss ...@@ -42,6 +42,7 @@ public class SstAgreementController extends BaseCRUDJsonBodyMappingController<Ss
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "protocolType", paramService.getParamBySecondOrganize("SstAgreement","protocolType"));
super.init(model, context); super.init(model, context);
} }
......
...@@ -240,8 +240,8 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas ...@@ -240,8 +240,8 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
rootNode.setType("area"); rootNode.setType("area");
rootNode.setIcon("el-icon-folder"); rootNode.setIcon("el-icon-folder");
rootNode.setIsLeaf(false); rootNode.setIsLeaf(false);
rootNode.setLatitude("30.595081"); rootNode.setLatitude("28.732286");
rootNode.setLongitude("104.062983"); rootNode.setLongitude("104.623552");
rootNode.setSiteCount(getChildrenCount(resultList,2,siteMap,siteDeviceMap)-1); rootNode.setSiteCount(getChildrenCount(resultList,2,siteMap,siteDeviceMap)-1);
rootNode.setChildren(resultList); rootNode.setChildren(resultList);
rootNode.setLevel(1); rootNode.setLevel(1);
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.sst.dao.ibatis.SstAgreementDaoImpl"> <mapper namespace="com.mortals.xhx.module.sst.dao.ibatis.SstAgreementDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="protocolType" column="protocolType" />
</resultMap> </resultMap>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
a.siteId, a.siteId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('name') or colPickMode == 1 and data.containsKey('name')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('name') or colPickMode == 1 and data.containsKey('name')))">
a.`name`, a.name,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('describe') or colPickMode == 1 and data.containsKey('describe')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('describe') or colPickMode == 1 and data.containsKey('describe')))">
a.`describe`, a.`describe`,
...@@ -48,23 +49,26 @@ ...@@ -48,23 +49,26 @@
<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('protocolType') or colPickMode == 1 and data.containsKey('protocolType')))">
a.protocolType,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="SstAgreementEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="SstAgreementEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_sst_agreement insert into mortals_xhx_sst_agreement
(siteId,`name`,`describe`,content,createUserId,createTime,updateUserId,updateTime) (siteId,name,`describe`,content,createUserId,createTime,updateUserId,updateTime,protocolType)
VALUES VALUES
(#{siteId},#{name},#{describe},#{content},#{createUserId},#{createTime},#{updateUserId},#{updateTime}) (#{siteId},#{name},#{describe},#{content},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{protocolType})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_sst_agreement insert into mortals_xhx_sst_agreement
(siteId,`name`,`describe`,content,createUserId,createTime,updateUserId,updateTime) (siteId,name,`describe`,content,createUserId,createTime,updateUserId,updateTime,protocolType)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.name},#{item.describe},#{item.content},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime}) (#{item.siteId},#{item.name},#{item.describe},#{item.content},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.protocolType})
</foreach> </foreach>
</insert> </insert>
...@@ -81,7 +85,7 @@ ...@@ -81,7 +85,7 @@
a.siteId=ifnull(a.siteId,0) + #{data.siteIdIncrement}, a.siteId=ifnull(a.siteId,0) + #{data.siteIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('name')) or (colPickMode==1 and !data.containsKey('name'))"> <if test="(colPickMode==0 and data.containsKey('name')) or (colPickMode==1 and !data.containsKey('name'))">
a.`name`=#{data.name}, a.name=#{data.name},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('describe')) or (colPickMode==1 and !data.containsKey('describe'))"> <if test="(colPickMode==0 and data.containsKey('describe')) or (colPickMode==1 and !data.containsKey('describe'))">
a.`describe`=#{data.describe}, a.`describe`=#{data.describe},
...@@ -107,6 +111,12 @@ ...@@ -107,6 +111,12 @@
<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('protocolType')) or (colPickMode==1 and !data.containsKey('protocolType'))">
a.protocolType=#{data.protocolType},
</if>
<if test="(colPickMode==0 and data.containsKey('protocolTypeIncrement')) or (colPickMode==1 and !data.containsKey('protocolTypeIncrement'))">
a.protocolType=ifnull(a.protocolType,0) + #{data.protocolTypeIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -138,7 +148,7 @@ ...@@ -138,7 +148,7 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="describe=(case" suffix="ELSE describe end),"> <trim prefix="`describe`=(case" suffix="ELSE `describe` 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('describe')) or (colPickMode==1 and !item.containsKey('describe'))"> <if test="(colPickMode==0 and item.containsKey('describe')) or (colPickMode==1 and !item.containsKey('describe'))">
when a.id=#{item.id} then #{item.describe} when a.id=#{item.id} then #{item.describe}
...@@ -190,6 +200,18 @@ ...@@ -190,6 +200,18 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="protocolType=(case" suffix="ELSE protocolType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('protocolType')) or (colPickMode==1 and !item.containsKey('protocolType'))">
when a.id=#{item.id} then #{item.protocolType}
</when>
<when test="(colPickMode==0 and item.containsKey('protocolTypeIncrement')) or (colPickMode==1 and !item.containsKey('protocolTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.protocolType,0) + #{item.protocolTypeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -314,12 +336,18 @@ ...@@ -314,12 +336,18 @@
${_conditionType_} a.id is null ${_conditionType_} a.id is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('idList')"> <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in ${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null"> <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart} ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if> </if>
...@@ -335,12 +363,18 @@ ...@@ -335,12 +363,18 @@
${_conditionType_} a.siteId is null ${_conditionType_} a.siteId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('siteIdList')"> <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.siteId in ${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.siteId not in
<foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null"> <if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart} ${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if> </if>
...@@ -351,18 +385,24 @@ ...@@ -351,18 +385,24 @@
<if test="conditionParamRef.containsKey('name')"> <if test="conditionParamRef.containsKey('name')">
<if test="conditionParamRef.name != null and conditionParamRef.name != ''"> <if test="conditionParamRef.name != null and conditionParamRef.name != ''">
${_conditionType_} a.`name` like #{${_conditionParam_}.name} ${_conditionType_} a.name like #{${_conditionParam_}.name}
</if> </if>
<if test="conditionParamRef.name == null"> <if test="conditionParamRef.name == null">
${_conditionType_} a.`name` is null ${_conditionType_} a.name is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('nameList')"> <if test="conditionParamRef.containsKey('nameList') and conditionParamRef.nameList.size() > 0">
${_conditionType_} a.`name` in ${_conditionType_} a.name in
<foreach collection="conditionParamRef.nameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.nameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('nameNotList') and conditionParamRef.nameNotList.size() > 0">
${_conditionType_} a.name not in
<foreach collection="conditionParamRef.nameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('describe')"> <if test="conditionParamRef.containsKey('describe')">
<if test="conditionParamRef.describe != null and conditionParamRef.describe != ''"> <if test="conditionParamRef.describe != null and conditionParamRef.describe != ''">
...@@ -372,12 +412,18 @@ ...@@ -372,12 +412,18 @@
${_conditionType_} a.`describe` is null ${_conditionType_} a.`describe` is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('describeList')"> <if test="conditionParamRef.containsKey('describeList') and conditionParamRef.describeList.size() > 0">
${_conditionType_} a.`describe` in ${_conditionType_} a.`describe` in
<foreach collection="conditionParamRef.describeList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.describeList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('describeNotList') and conditionParamRef.describeNotList.size() > 0">
${_conditionType_} a.`describe` not in
<foreach collection="conditionParamRef.describeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('content')"> <if test="conditionParamRef.containsKey('content')">
<if test="conditionParamRef.content != null and conditionParamRef.content != ''"> <if test="conditionParamRef.content != null and conditionParamRef.content != ''">
...@@ -387,12 +433,18 @@ ...@@ -387,12 +433,18 @@
${_conditionType_} a.content is null ${_conditionType_} a.content is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('contentList')"> <if test="conditionParamRef.containsKey('contentList') and conditionParamRef.contentList.size() > 0">
${_conditionType_} a.content in ${_conditionType_} a.content in
<foreach collection="conditionParamRef.contentList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.contentList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('contentNotList') and conditionParamRef.contentNotList.size() > 0">
${_conditionType_} a.content not in
<foreach collection="conditionParamRef.contentNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')"> <if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null "> <if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId} ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
...@@ -401,12 +453,18 @@ ...@@ -401,12 +453,18 @@
${_conditionType_} a.createUserId is null ${_conditionType_} a.createUserId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdList')"> <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in ${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null"> <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart} ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if> </if>
...@@ -437,12 +495,18 @@ ...@@ -437,12 +495,18 @@
${_conditionType_} a.updateUserId is null ${_conditionType_} a.updateUserId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('updateUserIdList')"> <if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in ${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null"> <if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart} ${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if> </if>
...@@ -465,6 +529,33 @@ ...@@ -465,6 +529,33 @@
<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('protocolType')">
<if test="conditionParamRef.protocolType != null ">
${_conditionType_} a.protocolType = #{${_conditionParam_}.protocolType}
</if>
<if test="conditionParamRef.protocolType == null">
${_conditionType_} a.protocolType is null
</if>
</if>
<if test="conditionParamRef.containsKey('protocolTypeList') and conditionParamRef.protocolTypeList.size() > 0">
${_conditionType_} a.protocolType in
<foreach collection="conditionParamRef.protocolTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('protocolTypeNotList') and conditionParamRef.protocolTypeNotList.size() > 0">
${_conditionType_} a.protocolType not in
<foreach collection="conditionParamRef.protocolTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('protocolTypeStart') and conditionParamRef.protocolTypeStart != null">
${_conditionType_} a.protocolType <![CDATA[ >= ]]> #{${_conditionParam_}.protocolTypeStart}
</if>
<if test="conditionParamRef.containsKey('protocolTypeEnd') and conditionParamRef.protocolTypeEnd != null">
${_conditionType_} a.protocolType <![CDATA[ <= ]]> #{${_conditionParam_}.protocolTypeEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -489,7 +580,7 @@ ...@@ -489,7 +580,7 @@
, ,
</if> </if>
<if test="orderCol.containsKey('name')"> <if test="orderCol.containsKey('name')">
a.`name` a.name
<if test='orderCol.name != null and "DESC".equalsIgnoreCase(orderCol.name)'>DESC</if> <if test='orderCol.name != null and "DESC".equalsIgnoreCase(orderCol.name)'>DESC</if>
, ,
</if> </if>
...@@ -523,6 +614,11 @@ ...@@ -523,6 +614,11 @@
<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('protocolType')">
a.protocolType
<if test='orderCol.protocolType != null and "DESC".equalsIgnoreCase(orderCol.protocolType)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
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