Commit 7422e1ac authored by 赵啸非's avatar 赵啸非

添加排号与评价统计报表

parent a98846b0
...@@ -28,7 +28,7 @@ CREATE TABLE mortals_xhx_ph_queue( ...@@ -28,7 +28,7 @@ CREATE TABLE mortals_xhx_ph_queue(
`device_name` varchar(128) NOT NULL COMMENT '取号设备名', `device_name` varchar(128) NOT NULL COMMENT '取号设备名',
`call_name` varchar(128) NOT NULL COMMENT '呼叫设备', `call_name` varchar(128) NOT NULL COMMENT '呼叫设备',
`matter_name` varchar(256) NOT NULL COMMENT '事项名', `matter_name` varchar(256) NOT NULL COMMENT '事项名',
`queueid` varchar(128) NOT NULL COMMENT '排号队列ID,唯一', `queueid` varchar(128) NOT NULL COMMENT '排号队列ID',
`wy_signin` varchar(16) NOT NULL DEFAULT '现场取号' COMMENT '取号方式 (现场取号,微信取号)', `wy_signin` varchar(16) NOT NULL DEFAULT '现场取号' COMMENT '取号方式 (现场取号,微信取号)',
`section_name` varchar(128) NOT NULL COMMENT '部门名称', `section_name` varchar(128) NOT NULL COMMENT '部门名称',
`hall_name` varchar(128) NOT NULL COMMENT '大厅名称', `hall_name` varchar(128) NOT NULL COMMENT '大厅名称',
...@@ -49,10 +49,65 @@ PRIMARY KEY (`id`) ...@@ -49,10 +49,65 @@ PRIMARY KEY (`id`)
,KEY `workman_number` (`workman_number`) USING BTREE ,KEY `workman_number` (`workman_number`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='排号汇总'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='排号汇总';
-- ----------------------------
-- 排号汇总统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_ph_queue_stat`;
CREATE TABLE `mortals_xhx_ph_queue_stat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`site_id` bigint(20) DEFAULT '0' COMMENT '站点Id',
`site_code` varchar(128) COMMENT '站点编码',
`site_name` varchar(128) COMMENT '站点名称',
`business` varchar(128) NOT NULL COMMENT '业务名',
`section_name` varchar(128) NOT NULL COMMENT '部门',
`hall_name` varchar(128) DEFAULT NULL COMMENT '大厅名称',
`wait_time` int(9) DEFAULT '0' COMMENT '平均等待时间,单位s',
`window_fromnum` varchar(128) NOT NULL COMMENT '窗口编号',
`ph_count` int(9) NOT NULL COMMENT '取号数量',
`year` int(9) NOT NULL COMMENT '年',
`month` int(9) NOT NULL COMMENT '月',
`day` int(9) NOT NULL COMMENT '日',
`createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) DEFAULT NULL COMMENT '更新用户',
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
,KEY `year` (`year`) USING BTREE
,KEY `month` (`month`) USING BTREE
,KEY `day` (`day`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='排队叫号汇总统计';
-- ---------------------------- -- ----------------------------
-- 评价汇总表 -- 评价汇总表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_pj_evaluate`; DROP TABLE IF EXISTS `mortals_xhx_pj_evaluate_stat`;
CREATE TABLE `mortals_xhx_pj_evaluate_stat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`site_id` bigint(20) DEFAULT '0' COMMENT '站点Id',
`site_code` varchar(128) COMMENT '站点编码',
`site_name` varchar(128) COMMENT '站点名称',
`section_name` varchar(128) NOT NULL COMMENT '部门',
`pj_option` varchar(32) NOT NULL COMMENT '评价选项(非常满意,满意,基本满意,不满意,非常不满意)',
`window_fromnum` varchar(128) NOT NULL COMMENT '窗口编号',
`hall_name` varchar(128) DEFAULT NULL COMMENT '大厅名称',
`pj_count` int(9) NOT NULL COMMENT '评价数量',
`year` int(9) NOT NULL COMMENT '年',
`month` int(9) NOT NULL COMMENT '月',
`day` int(9) NOT NULL COMMENT '日',
`createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) DEFAULT NULL COMMENT '更新用户',
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
,KEY `year` (`year`) USING BTREE
,KEY `month` (`month`) USING BTREE
,KEY `day` (`day`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='评价汇总统计';
-- ----------------------------
-- 评价汇总统计表
-- ----------------------------
CREATE TABLE mortals_xhx_pj_evaluate( CREATE TABLE mortals_xhx_pj_evaluate(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`people_idcard` varchar(64) NOT NULL COMMENT '评价人身份证号', `people_idcard` varchar(64) NOT NULL COMMENT '评价人身份证号',
...@@ -97,3 +152,5 @@ PRIMARY KEY (`id`) ...@@ -97,3 +152,5 @@ PRIMARY KEY (`id`)
,KEY `site_id` (`site_id`) USING BTREE ,KEY `site_id` (`site_id`) USING BTREE
,KEY `site_code` (`site_code`) USING BTREE ,KEY `site_code` (`site_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评价汇总'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评价汇总';
DROP TABLE IF EXISTS `mortals_xhx_pj_evaluate_stat`;
package com.mortals.xhx.daemon.task;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.common.code.PlatformTypeEnum;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.module.ph.service.PhQueueService;
import com.mortals.xhx.module.ph.service.PhQueueStatService;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import com.mortals.xhx.module.pj.service.PjEvaluateService;
import com.mortals.xhx.module.pj.service.PjEvaluateStatService;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 站点评价统计任务
*
* @author: zxfei
* @date: 2022/3/9 15:19
*/
@Slf4j
@Service("SiteStatTask")
public class SitePjStatTaskImpl implements ITaskExcuteService {
@Autowired
private ISiteFeign siteFeign;
@Autowired
private PjEvaluateStatService pjEvaluateStatService;
@Autowired
private PhQueueStatService phQueueStatService;
@Override
public void excuteTask(ITask task) throws AppException {
log.info("站点评价统计任务");
int year = DateUtil.date().year();
int month = DateUtil.date().month()+1;
int day = DateUtil.date().dayOfMonth();
SitePdu sitePdu = new SitePdu();
sitePdu.setSize(-1);
Rest<RespData<List<SitePdu>>> resp = siteFeign.list(sitePdu);
if (resp.getCode() == 1) {
List<SitePdu> sitePduList = resp.getData().getData();
sitePduList.stream().forEach(site -> {
PjEvaluateStatEntity sitestatEntity = new PjEvaluateStatEntity();
sitestatEntity.initAttrValue();
sitestatEntity.setSiteId(site.getId());
sitestatEntity.setSiteName(site.getSiteName());
sitestatEntity.setSiteCode(site.getSiteCode());
sitestatEntity.setYear(year);
sitestatEntity.setMonth(month);
sitestatEntity.setDay(day);
//设置年月日
pjEvaluateStatService.updateSitePjStat(sitestatEntity, null);
});
}
}
@Override
public void stopTask(ITask task) throws AppException {
}
public static void main(String[] args) {
int year = DateUtil.date().year();
int month = DateUtil.date().month()+1;
int day = DateUtil.date().dayOfMonth();
System.out.println(year + "年" + month + "月" + day + "日");
}
}
package com.mortals.xhx.module.ph.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
import java.util.List;
/**
* 排队叫号汇总统计Dao
* 排队叫号汇总统计 DAO接口
*
* @author zxfei
* @date 2024-06-24
*/
public interface PhQueueStatDao extends ICRUDDao<PhQueueStatEntity,Long>{
}
package com.mortals.xhx.module.ph.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.ph.dao.PhQueueStatDao;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 排队叫号汇总统计DaoImpl DAO接口
*
* @author zxfei
* @date 2024-06-24
*/
@Repository("phQueueStatDao")
public class PhQueueStatDaoImpl extends BaseCRUDDaoMybatis<PhQueueStatEntity,Long> implements PhQueueStatDao {
}
package com.mortals.xhx.module.ph.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.ph.model.vo.PhQueueStatVo;
import lombok.Data;
/**
* 排队叫号汇总统计实体对象
*
* @author zxfei
* @date 2024-06-24
*/
@Data
public class PhQueueStatEntity extends PhQueueStatVo {
private static final long serialVersionUID = 1L;
/**
* 站点Id
*/
private Long siteId;
/**
* 站点编码
*/
private String siteCode;
/**
* 站点名称
*/
private String siteName;
/**
* 业务名
*/
private String business;
/**
* 部门
*/
private String sectionName;
/**
* 大厅名称
*/
private String hallName;
/**
* 平均等待时间,单位s
*/
private Integer waitTime;
/**
* 窗口编号
*/
private String windowFromnum;
/**
* 取号数量
*/
private Integer phCount;
/**
* 年
*/
private Integer year;
/**
* 月
*/
private Integer month;
/**
* 日
*/
private Integer day;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PhQueueStatEntity) {
PhQueueStatEntity tmp = (PhQueueStatEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.siteId = 0L;
this.siteCode = "";
this.siteName = "";
this.business = "";
this.sectionName = "";
this.hallName = "";
this.waitTime = 0;
this.windowFromnum = "";
this.phCount = 0;
this.year = DateUtil.year(new Date());
this.month = DateUtil.month(new Date())+1;
this.day = DateUtil.dayOfMonth(new Date());
}
}
\ No newline at end of file
package com.mortals.xhx.module.ph.model;
import java.util.List;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
/**
* 排队叫号汇总统计查询对象
*
* @author zxfei
* @date 2024-06-24
*/
public class PhQueueStatQuery extends PhQueueStatEntity {
/** 开始 ID */
private Long idStart;
/** 结束 ID */
private Long idEnd;
/** 增加 ID */
private Long idIncrement;
/** ID列表 */
private List <Long> idList;
/** ID排除列表 */
private List <Long> idNotList;
/** 开始 站点Id */
private Long siteIdStart;
/** 结束 站点Id */
private Long siteIdEnd;
/** 增加 站点Id */
private Long siteIdIncrement;
/** 站点Id列表 */
private List <Long> siteIdList;
/** 站点Id排除列表 */
private List <Long> siteIdNotList;
/** 站点编码 */
private List<String> siteCodeList;
/** 站点编码排除列表 */
private List <String> siteCodeNotList;
/** 站点名称 */
private List<String> siteNameList;
/** 站点名称排除列表 */
private List <String> siteNameNotList;
/** 业务名 */
private List<String> businessList;
/** 业务名排除列表 */
private List <String> businessNotList;
/** 部门 */
private List<String> sectionNameList;
/** 部门排除列表 */
private List <String> sectionNameNotList;
/** 大厅名称 */
private List<String> hallNameList;
/** 大厅名称排除列表 */
private List <String> hallNameNotList;
/** 开始 平均等待时间,单位s */
private Integer waitTimeStart;
/** 结束 平均等待时间,单位s */
private Integer waitTimeEnd;
/** 增加 平均等待时间,单位s */
private Integer waitTimeIncrement;
/** 平均等待时间,单位s列表 */
private List <Integer> waitTimeList;
/** 平均等待时间,单位s排除列表 */
private List <Integer> waitTimeNotList;
/** 窗口编号 */
private List<String> windowFromnumList;
/** 窗口编号排除列表 */
private List <String> windowFromnumNotList;
/** 开始 取号数量 */
private Integer phCountStart;
/** 结束 取号数量 */
private Integer phCountEnd;
/** 增加 取号数量 */
private Integer phCountIncrement;
/** 取号数量列表 */
private List <Integer> phCountList;
/** 取号数量排除列表 */
private List <Integer> phCountNotList;
/** 开始 年 */
private Integer yearStart;
/** 结束 年 */
private Integer yearEnd;
/** 增加 年 */
private Integer yearIncrement;
/** 年列表 */
private List <Integer> yearList;
/** 年排除列表 */
private List <Integer> yearNotList;
/** 开始 月 */
private Integer monthStart;
/** 结束 月 */
private Integer monthEnd;
/** 增加 月 */
private Integer monthIncrement;
/** 月列表 */
private List <Integer> monthList;
/** 月排除列表 */
private List <Integer> monthNotList;
/** 开始 日 */
private Integer dayStart;
/** 结束 日 */
private Integer dayEnd;
/** 增加 日 */
private Integer dayIncrement;
/** 日列表 */
private List <Integer> dayList;
/** 日排除列表 */
private List <Integer> dayNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<PhQueueStatQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<PhQueueStatQuery> andConditionList;
public PhQueueStatQuery(){}
/**
* 获取 开始 ID
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 ID
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 ID
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 ID
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 ID
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 ID
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 ID
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 ID
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 ID
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 ID
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 站点Id
* @return siteIdStart
*/
public Long getSiteIdStart(){
return this.siteIdStart;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public void setSiteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
}
/**
* 获取 结束 站点Id
* @return $siteIdEnd
*/
public Long getSiteIdEnd(){
return this.siteIdEnd;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public void setSiteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
}
/**
* 获取 增加 站点Id
* @return siteIdIncrement
*/
public Long getSiteIdIncrement(){
return this.siteIdIncrement;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public void setSiteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
}
/**
* 获取 站点Id
* @return siteIdList
*/
public List<Long> getSiteIdList(){
return this.siteIdList;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public void setSiteIdList(List<Long> 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 siteCodeList
*/
public List<String> getSiteCodeList(){
return this.siteCodeList;
}
/**
* 设置 站点编码
* @param siteCodeList
*/
public void setSiteCodeList(List<String> siteCodeList){
this.siteCodeList = siteCodeList;
}
/**
* 获取 站点编码
* @return siteCodeNotList
*/
public List<String> getSiteCodeNotList(){
return this.siteCodeNotList;
}
/**
* 设置 站点编码
* @param siteCodeNotList
*/
public void setSiteCodeNotList(List<String> siteCodeNotList){
this.siteCodeNotList = siteCodeNotList;
}
/**
* 获取 站点名称
* @return siteNameList
*/
public List<String> getSiteNameList(){
return this.siteNameList;
}
/**
* 设置 站点名称
* @param siteNameList
*/
public void setSiteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
}
/**
* 获取 站点名称
* @return siteNameNotList
*/
public List<String> getSiteNameNotList(){
return this.siteNameNotList;
}
/**
* 设置 站点名称
* @param siteNameNotList
*/
public void setSiteNameNotList(List<String> siteNameNotList){
this.siteNameNotList = siteNameNotList;
}
/**
* 获取 业务名
* @return businessList
*/
public List<String> getBusinessList(){
return this.businessList;
}
/**
* 设置 业务名
* @param businessList
*/
public void setBusinessList(List<String> businessList){
this.businessList = businessList;
}
/**
* 获取 业务名
* @return businessNotList
*/
public List<String> getBusinessNotList(){
return this.businessNotList;
}
/**
* 设置 业务名
* @param businessNotList
*/
public void setBusinessNotList(List<String> businessNotList){
this.businessNotList = businessNotList;
}
/**
* 获取 部门
* @return sectionNameList
*/
public List<String> getSectionNameList(){
return this.sectionNameList;
}
/**
* 设置 部门
* @param sectionNameList
*/
public void setSectionNameList(List<String> sectionNameList){
this.sectionNameList = sectionNameList;
}
/**
* 获取 部门
* @return sectionNameNotList
*/
public List<String> getSectionNameNotList(){
return this.sectionNameNotList;
}
/**
* 设置 部门
* @param sectionNameNotList
*/
public void setSectionNameNotList(List<String> sectionNameNotList){
this.sectionNameNotList = sectionNameNotList;
}
/**
* 获取 大厅名称
* @return hallNameList
*/
public List<String> getHallNameList(){
return this.hallNameList;
}
/**
* 设置 大厅名称
* @param hallNameList
*/
public void setHallNameList(List<String> hallNameList){
this.hallNameList = hallNameList;
}
/**
* 获取 大厅名称
* @return hallNameNotList
*/
public List<String> getHallNameNotList(){
return this.hallNameNotList;
}
/**
* 设置 大厅名称
* @param hallNameNotList
*/
public void setHallNameNotList(List<String> hallNameNotList){
this.hallNameNotList = hallNameNotList;
}
/**
* 获取 开始 平均等待时间,单位s
* @return waitTimeStart
*/
public Integer getWaitTimeStart(){
return this.waitTimeStart;
}
/**
* 设置 开始 平均等待时间,单位s
* @param waitTimeStart
*/
public void setWaitTimeStart(Integer waitTimeStart){
this.waitTimeStart = waitTimeStart;
}
/**
* 获取 结束 平均等待时间,单位s
* @return $waitTimeEnd
*/
public Integer getWaitTimeEnd(){
return this.waitTimeEnd;
}
/**
* 设置 结束 平均等待时间,单位s
* @param waitTimeEnd
*/
public void setWaitTimeEnd(Integer waitTimeEnd){
this.waitTimeEnd = waitTimeEnd;
}
/**
* 获取 增加 平均等待时间,单位s
* @return waitTimeIncrement
*/
public Integer getWaitTimeIncrement(){
return this.waitTimeIncrement;
}
/**
* 设置 增加 平均等待时间,单位s
* @param waitTimeIncrement
*/
public void setWaitTimeIncrement(Integer waitTimeIncrement){
this.waitTimeIncrement = waitTimeIncrement;
}
/**
* 获取 平均等待时间,单位s
* @return waitTimeList
*/
public List<Integer> getWaitTimeList(){
return this.waitTimeList;
}
/**
* 设置 平均等待时间,单位s
* @param waitTimeList
*/
public void setWaitTimeList(List<Integer> waitTimeList){
this.waitTimeList = waitTimeList;
}
/**
* 获取 平均等待时间,单位s
* @return waitTimeNotList
*/
public List<Integer> getWaitTimeNotList(){
return this.waitTimeNotList;
}
/**
* 设置 平均等待时间,单位s
* @param waitTimeNotList
*/
public void setWaitTimeNotList(List<Integer> waitTimeNotList){
this.waitTimeNotList = waitTimeNotList;
}
/**
* 获取 窗口编号
* @return windowFromnumList
*/
public List<String> getWindowFromnumList(){
return this.windowFromnumList;
}
/**
* 设置 窗口编号
* @param windowFromnumList
*/
public void setWindowFromnumList(List<String> windowFromnumList){
this.windowFromnumList = windowFromnumList;
}
/**
* 获取 窗口编号
* @return windowFromnumNotList
*/
public List<String> getWindowFromnumNotList(){
return this.windowFromnumNotList;
}
/**
* 设置 窗口编号
* @param windowFromnumNotList
*/
public void setWindowFromnumNotList(List<String> windowFromnumNotList){
this.windowFromnumNotList = windowFromnumNotList;
}
/**
* 获取 开始 取号数量
* @return phCountStart
*/
public Integer getPhCountStart(){
return this.phCountStart;
}
/**
* 设置 开始 取号数量
* @param phCountStart
*/
public void setPhCountStart(Integer phCountStart){
this.phCountStart = phCountStart;
}
/**
* 获取 结束 取号数量
* @return $phCountEnd
*/
public Integer getPhCountEnd(){
return this.phCountEnd;
}
/**
* 设置 结束 取号数量
* @param phCountEnd
*/
public void setPhCountEnd(Integer phCountEnd){
this.phCountEnd = phCountEnd;
}
/**
* 获取 增加 取号数量
* @return phCountIncrement
*/
public Integer getPhCountIncrement(){
return this.phCountIncrement;
}
/**
* 设置 增加 取号数量
* @param phCountIncrement
*/
public void setPhCountIncrement(Integer phCountIncrement){
this.phCountIncrement = phCountIncrement;
}
/**
* 获取 取号数量
* @return phCountList
*/
public List<Integer> getPhCountList(){
return this.phCountList;
}
/**
* 设置 取号数量
* @param phCountList
*/
public void setPhCountList(List<Integer> phCountList){
this.phCountList = phCountList;
}
/**
* 获取 取号数量
* @return phCountNotList
*/
public List<Integer> getPhCountNotList(){
return this.phCountNotList;
}
/**
* 设置 取号数量
* @param phCountNotList
*/
public void setPhCountNotList(List<Integer> phCountNotList){
this.phCountNotList = phCountNotList;
}
/**
* 获取 开始 年
* @return yearStart
*/
public Integer getYearStart(){
return this.yearStart;
}
/**
* 设置 开始 年
* @param yearStart
*/
public void setYearStart(Integer yearStart){
this.yearStart = yearStart;
}
/**
* 获取 结束 年
* @return $yearEnd
*/
public Integer getYearEnd(){
return this.yearEnd;
}
/**
* 设置 结束 年
* @param yearEnd
*/
public void setYearEnd(Integer yearEnd){
this.yearEnd = yearEnd;
}
/**
* 获取 增加 年
* @return yearIncrement
*/
public Integer getYearIncrement(){
return this.yearIncrement;
}
/**
* 设置 增加 年
* @param yearIncrement
*/
public void setYearIncrement(Integer yearIncrement){
this.yearIncrement = yearIncrement;
}
/**
* 获取 年
* @return yearList
*/
public List<Integer> getYearList(){
return this.yearList;
}
/**
* 设置 年
* @param yearList
*/
public void setYearList(List<Integer> yearList){
this.yearList = yearList;
}
/**
* 获取 年
* @return yearNotList
*/
public List<Integer> getYearNotList(){
return this.yearNotList;
}
/**
* 设置 年
* @param yearNotList
*/
public void setYearNotList(List<Integer> yearNotList){
this.yearNotList = yearNotList;
}
/**
* 获取 开始 月
* @return monthStart
*/
public Integer getMonthStart(){
return this.monthStart;
}
/**
* 设置 开始 月
* @param monthStart
*/
public void setMonthStart(Integer monthStart){
this.monthStart = monthStart;
}
/**
* 获取 结束 月
* @return $monthEnd
*/
public Integer getMonthEnd(){
return this.monthEnd;
}
/**
* 设置 结束 月
* @param monthEnd
*/
public void setMonthEnd(Integer monthEnd){
this.monthEnd = monthEnd;
}
/**
* 获取 增加 月
* @return monthIncrement
*/
public Integer getMonthIncrement(){
return this.monthIncrement;
}
/**
* 设置 增加 月
* @param monthIncrement
*/
public void setMonthIncrement(Integer monthIncrement){
this.monthIncrement = monthIncrement;
}
/**
* 获取 月
* @return monthList
*/
public List<Integer> getMonthList(){
return this.monthList;
}
/**
* 设置 月
* @param monthList
*/
public void setMonthList(List<Integer> monthList){
this.monthList = monthList;
}
/**
* 获取 月
* @return monthNotList
*/
public List<Integer> getMonthNotList(){
return this.monthNotList;
}
/**
* 设置 月
* @param monthNotList
*/
public void setMonthNotList(List<Integer> monthNotList){
this.monthNotList = monthNotList;
}
/**
* 获取 开始 日
* @return dayStart
*/
public Integer getDayStart(){
return this.dayStart;
}
/**
* 设置 开始 日
* @param dayStart
*/
public void setDayStart(Integer dayStart){
this.dayStart = dayStart;
}
/**
* 获取 结束 日
* @return $dayEnd
*/
public Integer getDayEnd(){
return this.dayEnd;
}
/**
* 设置 结束 日
* @param dayEnd
*/
public void setDayEnd(Integer dayEnd){
this.dayEnd = dayEnd;
}
/**
* 获取 增加 日
* @return dayIncrement
*/
public Integer getDayIncrement(){
return this.dayIncrement;
}
/**
* 设置 增加 日
* @param dayIncrement
*/
public void setDayIncrement(Integer dayIncrement){
this.dayIncrement = dayIncrement;
}
/**
* 获取 日
* @return dayList
*/
public List<Integer> getDayList(){
return this.dayList;
}
/**
* 设置 日
* @param dayList
*/
public void setDayList(List<Integer> dayList){
this.dayList = dayList;
}
/**
* 获取 日
* @return dayNotList
*/
public List<Integer> getDayNotList(){
return this.dayNotList;
}
/**
* 设置 日
* @param dayNotList
*/
public void setDayNotList(List<Integer> dayNotList){
this.dayNotList = dayNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> 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
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 ID
* @param id
*/
public PhQueueStatQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 ID
* @param idStart
*/
public PhQueueStatQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 ID
* @param idEnd
*/
public PhQueueStatQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 ID
* @param idIncrement
*/
public PhQueueStatQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 ID
* @param idList
*/
public PhQueueStatQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 ID
* @param idNotList
*/
public PhQueueStatQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 站点Id
* @param siteId
*/
public PhQueueStatQuery siteId(Long siteId){
setSiteId(siteId);
return this;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public PhQueueStatQuery siteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
return this;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public PhQueueStatQuery siteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
return this;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public PhQueueStatQuery siteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
return this;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public PhQueueStatQuery siteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
return this;
}
/**
* 设置 站点Id
* @param siteIdNotList
*/
public PhQueueStatQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/**
* 设置 站点编码
* @param siteCode
*/
public PhQueueStatQuery siteCode(String siteCode){
setSiteCode(siteCode);
return this;
}
/**
* 设置 站点编码
* @param siteCodeList
*/
public PhQueueStatQuery siteCodeList(List<String> siteCodeList){
this.siteCodeList = siteCodeList;
return this;
}
/**
* 设置 站点名称
* @param siteName
*/
public PhQueueStatQuery siteName(String siteName){
setSiteName(siteName);
return this;
}
/**
* 设置 站点名称
* @param siteNameList
*/
public PhQueueStatQuery siteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
return this;
}
/**
* 设置 业务名
* @param business
*/
public PhQueueStatQuery business(String business){
setBusiness(business);
return this;
}
/**
* 设置 业务名
* @param businessList
*/
public PhQueueStatQuery businessList(List<String> businessList){
this.businessList = businessList;
return this;
}
/**
* 设置 部门
* @param sectionName
*/
public PhQueueStatQuery sectionName(String sectionName){
setSectionName(sectionName);
return this;
}
/**
* 设置 部门
* @param sectionNameList
*/
public PhQueueStatQuery sectionNameList(List<String> sectionNameList){
this.sectionNameList = sectionNameList;
return this;
}
/**
* 设置 大厅名称
* @param hallName
*/
public PhQueueStatQuery hallName(String hallName){
setHallName(hallName);
return this;
}
/**
* 设置 大厅名称
* @param hallNameList
*/
public PhQueueStatQuery hallNameList(List<String> hallNameList){
this.hallNameList = hallNameList;
return this;
}
/**
* 设置 平均等待时间,单位s
* @param waitTime
*/
public PhQueueStatQuery waitTime(Integer waitTime){
setWaitTime(waitTime);
return this;
}
/**
* 设置 开始 平均等待时间,单位s
* @param waitTimeStart
*/
public PhQueueStatQuery waitTimeStart(Integer waitTimeStart){
this.waitTimeStart = waitTimeStart;
return this;
}
/**
* 设置 结束 平均等待时间,单位s
* @param waitTimeEnd
*/
public PhQueueStatQuery waitTimeEnd(Integer waitTimeEnd){
this.waitTimeEnd = waitTimeEnd;
return this;
}
/**
* 设置 增加 平均等待时间,单位s
* @param waitTimeIncrement
*/
public PhQueueStatQuery waitTimeIncrement(Integer waitTimeIncrement){
this.waitTimeIncrement = waitTimeIncrement;
return this;
}
/**
* 设置 平均等待时间,单位s
* @param waitTimeList
*/
public PhQueueStatQuery waitTimeList(List<Integer> waitTimeList){
this.waitTimeList = waitTimeList;
return this;
}
/**
* 设置 平均等待时间,单位s
* @param waitTimeNotList
*/
public PhQueueStatQuery waitTimeNotList(List<Integer> waitTimeNotList){
this.waitTimeNotList = waitTimeNotList;
return this;
}
/**
* 设置 窗口编号
* @param windowFromnum
*/
public PhQueueStatQuery windowFromnum(String windowFromnum){
setWindowFromnum(windowFromnum);
return this;
}
/**
* 设置 窗口编号
* @param windowFromnumList
*/
public PhQueueStatQuery windowFromnumList(List<String> windowFromnumList){
this.windowFromnumList = windowFromnumList;
return this;
}
/**
* 设置 取号数量
* @param phCount
*/
public PhQueueStatQuery phCount(Integer phCount){
setPhCount(phCount);
return this;
}
/**
* 设置 开始 取号数量
* @param phCountStart
*/
public PhQueueStatQuery phCountStart(Integer phCountStart){
this.phCountStart = phCountStart;
return this;
}
/**
* 设置 结束 取号数量
* @param phCountEnd
*/
public PhQueueStatQuery phCountEnd(Integer phCountEnd){
this.phCountEnd = phCountEnd;
return this;
}
/**
* 设置 增加 取号数量
* @param phCountIncrement
*/
public PhQueueStatQuery phCountIncrement(Integer phCountIncrement){
this.phCountIncrement = phCountIncrement;
return this;
}
/**
* 设置 取号数量
* @param phCountList
*/
public PhQueueStatQuery phCountList(List<Integer> phCountList){
this.phCountList = phCountList;
return this;
}
/**
* 设置 取号数量
* @param phCountNotList
*/
public PhQueueStatQuery phCountNotList(List<Integer> phCountNotList){
this.phCountNotList = phCountNotList;
return this;
}
/**
* 设置 年
* @param year
*/
public PhQueueStatQuery year(Integer year){
setYear(year);
return this;
}
/**
* 设置 开始 年
* @param yearStart
*/
public PhQueueStatQuery yearStart(Integer yearStart){
this.yearStart = yearStart;
return this;
}
/**
* 设置 结束 年
* @param yearEnd
*/
public PhQueueStatQuery yearEnd(Integer yearEnd){
this.yearEnd = yearEnd;
return this;
}
/**
* 设置 增加 年
* @param yearIncrement
*/
public PhQueueStatQuery yearIncrement(Integer yearIncrement){
this.yearIncrement = yearIncrement;
return this;
}
/**
* 设置 年
* @param yearList
*/
public PhQueueStatQuery yearList(List<Integer> yearList){
this.yearList = yearList;
return this;
}
/**
* 设置 年
* @param yearNotList
*/
public PhQueueStatQuery yearNotList(List<Integer> yearNotList){
this.yearNotList = yearNotList;
return this;
}
/**
* 设置 月
* @param month
*/
public PhQueueStatQuery month(Integer month){
setMonth(month);
return this;
}
/**
* 设置 开始 月
* @param monthStart
*/
public PhQueueStatQuery monthStart(Integer monthStart){
this.monthStart = monthStart;
return this;
}
/**
* 设置 结束 月
* @param monthEnd
*/
public PhQueueStatQuery monthEnd(Integer monthEnd){
this.monthEnd = monthEnd;
return this;
}
/**
* 设置 增加 月
* @param monthIncrement
*/
public PhQueueStatQuery monthIncrement(Integer monthIncrement){
this.monthIncrement = monthIncrement;
return this;
}
/**
* 设置 月
* @param monthList
*/
public PhQueueStatQuery monthList(List<Integer> monthList){
this.monthList = monthList;
return this;
}
/**
* 设置 月
* @param monthNotList
*/
public PhQueueStatQuery monthNotList(List<Integer> monthNotList){
this.monthNotList = monthNotList;
return this;
}
/**
* 设置 日
* @param day
*/
public PhQueueStatQuery day(Integer day){
setDay(day);
return this;
}
/**
* 设置 开始 日
* @param dayStart
*/
public PhQueueStatQuery dayStart(Integer dayStart){
this.dayStart = dayStart;
return this;
}
/**
* 设置 结束 日
* @param dayEnd
*/
public PhQueueStatQuery dayEnd(Integer dayEnd){
this.dayEnd = dayEnd;
return this;
}
/**
* 设置 增加 日
* @param dayIncrement
*/
public PhQueueStatQuery dayIncrement(Integer dayIncrement){
this.dayIncrement = dayIncrement;
return this;
}
/**
* 设置 日
* @param dayList
*/
public PhQueueStatQuery dayList(List<Integer> dayList){
this.dayList = dayList;
return this;
}
/**
* 设置 日
* @param dayNotList
*/
public PhQueueStatQuery dayNotList(List<Integer> dayNotList){
this.dayNotList = dayNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public PhQueueStatQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public PhQueueStatQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public PhQueueStatQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public PhQueueStatQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public PhQueueStatQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public PhQueueStatQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<PhQueueStatQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<PhQueueStatQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<PhQueueStatQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<PhQueueStatQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.ph.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 排队叫号汇总统计视图对象
*
* @author zxfei
* @date 2024-06-24
*/
@Data
public class PhQueueStatVo extends BaseEntityLong {
/** ID列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.ph.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
import com.mortals.xhx.module.ph.dao.PhQueueStatDao;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
/**
* PhQueueStatService
*
* 排队叫号汇总统计 service接口
*
* @author zxfei
* @date 2024-06-24
*/
public interface PhQueueStatService extends ICRUDService<PhQueueStatEntity,Long>{
PhQueueStatDao getDao();
Rest<Void> updateSitePhStat(PhQueueStatEntity entity, Context context);
}
\ No newline at end of file
package com.mortals.xhx.module.ph.service.impl;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.ph.model.PhQueueEntity;
import com.mortals.xhx.module.ph.model.PhQueueQuery;
import com.mortals.xhx.module.ph.model.PhQueueStatQuery;
import com.mortals.xhx.module.ph.service.PhQueueService;
import com.mortals.xhx.module.pj.model.PjEvaluateEntity;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import com.mortals.xhx.module.pj.model.PjEvaluateStatQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.ph.dao.PhQueueStatDao;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
import com.mortals.xhx.module.ph.service.PhQueueStatService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* PhQueueStatService
* 排队叫号汇总统计 service实现
*
* @author zxfei
* @date 2024-06-24
*/
@Service("phQueueStatService")
@Slf4j
public class PhQueueStatServiceImpl extends AbstractCRUDServiceImpl<PhQueueStatDao, PhQueueStatEntity, Long> implements PhQueueStatService {
@Autowired
private PhQueueService phQueueService;
@Override
public Rest<Void> updateSitePhStat(PhQueueStatEntity entity, Context context) {
Calendar calendar = Calendar.getInstance();
calendar.set(entity.getYear(), entity.getMonth(), entity.getDay());
SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd");//yyyy-年,MM-月,dd-日,HH-时,mm-分,ss-秒
String currentDate = date.format(calendar.getTime());
PhQueueQuery phQueueQuery = new PhQueueQuery();
phQueueQuery.setSiteId(entity.getSiteId());
phQueueQuery.setTaketimeStart(currentDate);
phQueueQuery.setTaketimeEnd(currentDate);
List<PhQueueEntity> phQueueEntities = phQueueService.find(phQueueQuery);
log.info("更新站点评价统计数据,站点ID:{},站点名称:{},日期:{},评价数量:{}", entity.getSiteId(), entity.getSiteName(), currentDate, phQueueEntities.size());
updateSitePhCount(entity, phQueueEntities);
updateSiteSectionNamePhCount(currentDate, entity, phQueueEntities);
return Rest.ok();
}
private void updateSitePhCount(PhQueueStatEntity entity, List<PhQueueEntity> phQueueEntities) {
PhQueueStatEntity phQueueStatEntity = this.selectOne(new PhQueueStatQuery()
.siteId(entity.getSiteId())
.year(entity.getYear())
.month(entity.getMonth())
.day(entity.getDay()));
if (ObjectUtils.isEmpty(phQueueStatEntity)) {
//统计当前站点新增所有评价数量
phQueueStatEntity = new PhQueueStatEntity();
phQueueStatEntity.initAttrValue();
phQueueStatEntity.setSiteId(entity.getSiteId());
phQueueStatEntity.setSiteCode(entity.getSiteCode());
phQueueStatEntity.setSiteName(entity.getSiteName());
phQueueStatEntity.setPhCount(phQueueEntities.size());
phQueueStatEntity.setYear(entity.getYear());
phQueueStatEntity.setMonth(entity.getMonth());
phQueueStatEntity.setDay(entity.getDay());
phQueueStatEntity.setCreateTime(new Date());
phQueueStatEntity.setCreateUserId(1L);
this.save(phQueueStatEntity);
} else {
phQueueStatEntity.setPhCount(phQueueEntities.size());
phQueueStatEntity.setYear(entity.getYear());
phQueueStatEntity.setMonth(entity.getMonth());
phQueueStatEntity.setDay(entity.getDay());
phQueueStatEntity.setUpdateTime(new Date());
phQueueStatEntity.setUpdateUserId(1L);
this.update(phQueueStatEntity);
}
}
private void updateSiteSectionNamePhCount(String currentDate, PhQueueStatEntity entity, List<PhQueueEntity> phQueueEntities) {
Map<String, Long> collect = phQueueEntities.stream().collect(Collectors.groupingBy(x -> x.getSectionName(), Collectors.counting()));
collect.entrySet().stream().forEach(item -> {
String sectionName = item.getKey();
Long value = item.getValue();
log.info("更新站点评价统计数据,站点名称:{},日期:{},部门:{},评价数量:{}", entity.getSiteName(), currentDate, entity.getSectionName(), phQueueEntities.size());
PhQueueStatEntity phQueueStatEntity = this.selectOne(new PhQueueStatQuery()
.siteId(entity.getSiteId())
.sectionName(sectionName)
.year(entity.getYear())
.month(entity.getMonth())
.day(entity.getDay()));
if (ObjectUtils.isEmpty(phQueueStatEntity)) {
//统计当前站点新增所有评价数量
phQueueStatEntity = new PhQueueStatEntity();
phQueueStatEntity.initAttrValue();
phQueueStatEntity.setSiteId(entity.getSiteId());
phQueueStatEntity.setSiteCode(entity.getSiteCode());
phQueueStatEntity.setSiteName(entity.getSiteName());
phQueueStatEntity.setSectionName(sectionName);
phQueueStatEntity.setPhCount(value.intValue());
phQueueStatEntity.setYear(entity.getYear());
phQueueStatEntity.setMonth(entity.getMonth());
phQueueStatEntity.setDay(entity.getDay());
phQueueStatEntity.setCreateTime(new Date());
phQueueStatEntity.setCreateUserId(1L);
this.save(phQueueStatEntity);
} else {
phQueueStatEntity.setPhCount(value.intValue());
phQueueStatEntity.setYear(entity.getYear());
phQueueStatEntity.setMonth(entity.getMonth());
phQueueStatEntity.setDay(entity.getDay());
phQueueStatEntity.setUpdateTime(new Date());
phQueueStatEntity.setUpdateUserId(1L);
this.update(phQueueStatEntity);
}
});
}
}
\ No newline at end of file
package com.mortals.xhx.module.ph.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.ph.model.PhQueueStatEntity;
import com.mortals.xhx.module.ph.service.PhQueueStatService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import com.mortals.xhx.common.code.*;
/**
*
* 排队叫号汇总统计
*
* @author zxfei
* @date 2024-06-24
*/
@RestController
@RequestMapping("ph/queue/stat")
public class PhQueueStatController extends BaseCRUDJsonBodyMappingController<PhQueueStatService,PhQueueStatEntity,Long> {
@Autowired
private ParamService paramService;
public PhQueueStatController(){
super.setModuleDesc( "排队叫号汇总统计");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
package com.mortals.xhx.module.pj.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import java.util.List;
/**
* 评价汇总统计Dao
* 评价汇总统计 DAO接口
*
* @author zxfei
* @date 2024-06-24
*/
public interface PjEvaluateStatDao extends ICRUDDao<PjEvaluateStatEntity,Long>{
}
package com.mortals.xhx.module.pj.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.pj.dao.PjEvaluateStatDao;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 评价汇总统计DaoImpl DAO接口
*
* @author zxfei
* @date 2024-06-24
*/
@Repository("pjEvaluateStatDao")
public class PjEvaluateStatDaoImpl extends BaseCRUDDaoMybatis<PjEvaluateStatEntity,Long> implements PjEvaluateStatDao {
}
package com.mortals.xhx.module.pj.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.pj.model.vo.PjEvaluateStatVo;
import lombok.Data;
/**
* 评价汇总统计实体对象
*
* @author zxfei
* @date 2024-06-24
*/
@Data
public class PjEvaluateStatEntity extends PjEvaluateStatVo {
private static final long serialVersionUID = 1L;
/**
* 站点Id
*/
private Long siteId;
/**
* 站点编码
*/
private String siteCode;
/**
* 站点名称
*/
private String siteName;
/**
* 部门
*/
private String sectionName;
/**
* 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
*/
private String pjOption;
/**
* 窗口编号
*/
private String windowFromnum;
/**
* 大厅名称
*/
private String hallName;
/**
* 评价数量
*/
private Integer pjCount;
/**
* 年
*/
private Integer year;
/**
* 月
*/
private Integer month;
/**
* 日
*/
private Integer day;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PjEvaluateStatEntity) {
PjEvaluateStatEntity tmp = (PjEvaluateStatEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.siteId = 0L;
this.siteCode = "";
this.siteName = "";
this.sectionName = "";
this.pjOption = "";
this.windowFromnum = "";
this.hallName = "";
this.pjCount = 0;
this.year = DateUtil.year(new Date());
this.month = DateUtil.month(new Date())+1;
this.day = DateUtil.dayOfMonth(new Date());
}
}
\ No newline at end of file
package com.mortals.xhx.module.pj.model;
import java.util.List;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
/**
* 评价汇总统计查询对象
*
* @author zxfei
* @date 2024-06-24
*/
public class PjEvaluateStatQuery extends PjEvaluateStatEntity {
/** 开始 ID */
private Long idStart;
/** 结束 ID */
private Long idEnd;
/** 增加 ID */
private Long idIncrement;
/** ID列表 */
private List <Long> idList;
/** ID排除列表 */
private List <Long> idNotList;
/** 开始 站点Id */
private Long siteIdStart;
/** 结束 站点Id */
private Long siteIdEnd;
/** 增加 站点Id */
private Long siteIdIncrement;
/** 站点Id列表 */
private List <Long> siteIdList;
/** 站点Id排除列表 */
private List <Long> siteIdNotList;
/** 站点编码 */
private List<String> siteCodeList;
/** 站点编码排除列表 */
private List <String> siteCodeNotList;
/** 站点名称 */
private List<String> siteNameList;
/** 站点名称排除列表 */
private List <String> siteNameNotList;
/** 部门 */
private List<String> sectionNameList;
/** 部门排除列表 */
private List <String> sectionNameNotList;
/** 评价选项(非常满意,满意,基本满意,不满意,非常不满意) */
private List<String> pjOptionList;
/** 评价选项(非常满意,满意,基本满意,不满意,非常不满意)排除列表 */
private List <String> pjOptionNotList;
/** 窗口编号 */
private List<String> windowFromnumList;
/** 窗口编号排除列表 */
private List <String> windowFromnumNotList;
/** 大厅名称 */
private List<String> hallNameList;
/** 大厅名称排除列表 */
private List <String> hallNameNotList;
/** 开始 评价数量 */
private Integer pjCountStart;
/** 结束 评价数量 */
private Integer pjCountEnd;
/** 增加 评价数量 */
private Integer pjCountIncrement;
/** 评价数量列表 */
private List <Integer> pjCountList;
/** 评价数量排除列表 */
private List <Integer> pjCountNotList;
/** 开始 年 */
private Integer yearStart;
/** 结束 年 */
private Integer yearEnd;
/** 增加 年 */
private Integer yearIncrement;
/** 年列表 */
private List <Integer> yearList;
/** 年排除列表 */
private List <Integer> yearNotList;
/** 开始 月 */
private Integer monthStart;
/** 结束 月 */
private Integer monthEnd;
/** 增加 月 */
private Integer monthIncrement;
/** 月列表 */
private List <Integer> monthList;
/** 月排除列表 */
private List <Integer> monthNotList;
/** 开始 日 */
private Integer dayStart;
/** 结束 日 */
private Integer dayEnd;
/** 增加 日 */
private Integer dayIncrement;
/** 日列表 */
private List <Integer> dayList;
/** 日排除列表 */
private List <Integer> dayNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<PjEvaluateStatQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<PjEvaluateStatQuery> andConditionList;
public PjEvaluateStatQuery(){}
/**
* 获取 开始 ID
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 ID
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 ID
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 ID
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 ID
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 ID
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 ID
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 ID
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 ID
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 ID
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 站点Id
* @return siteIdStart
*/
public Long getSiteIdStart(){
return this.siteIdStart;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public void setSiteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
}
/**
* 获取 结束 站点Id
* @return $siteIdEnd
*/
public Long getSiteIdEnd(){
return this.siteIdEnd;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public void setSiteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
}
/**
* 获取 增加 站点Id
* @return siteIdIncrement
*/
public Long getSiteIdIncrement(){
return this.siteIdIncrement;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public void setSiteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
}
/**
* 获取 站点Id
* @return siteIdList
*/
public List<Long> getSiteIdList(){
return this.siteIdList;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public void setSiteIdList(List<Long> 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 siteCodeList
*/
public List<String> getSiteCodeList(){
return this.siteCodeList;
}
/**
* 设置 站点编码
* @param siteCodeList
*/
public void setSiteCodeList(List<String> siteCodeList){
this.siteCodeList = siteCodeList;
}
/**
* 获取 站点编码
* @return siteCodeNotList
*/
public List<String> getSiteCodeNotList(){
return this.siteCodeNotList;
}
/**
* 设置 站点编码
* @param siteCodeNotList
*/
public void setSiteCodeNotList(List<String> siteCodeNotList){
this.siteCodeNotList = siteCodeNotList;
}
/**
* 获取 站点名称
* @return siteNameList
*/
public List<String> getSiteNameList(){
return this.siteNameList;
}
/**
* 设置 站点名称
* @param siteNameList
*/
public void setSiteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
}
/**
* 获取 站点名称
* @return siteNameNotList
*/
public List<String> getSiteNameNotList(){
return this.siteNameNotList;
}
/**
* 设置 站点名称
* @param siteNameNotList
*/
public void setSiteNameNotList(List<String> siteNameNotList){
this.siteNameNotList = siteNameNotList;
}
/**
* 获取 部门
* @return sectionNameList
*/
public List<String> getSectionNameList(){
return this.sectionNameList;
}
/**
* 设置 部门
* @param sectionNameList
*/
public void setSectionNameList(List<String> sectionNameList){
this.sectionNameList = sectionNameList;
}
/**
* 获取 部门
* @return sectionNameNotList
*/
public List<String> getSectionNameNotList(){
return this.sectionNameNotList;
}
/**
* 设置 部门
* @param sectionNameNotList
*/
public void setSectionNameNotList(List<String> sectionNameNotList){
this.sectionNameNotList = sectionNameNotList;
}
/**
* 获取 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
* @return pjOptionList
*/
public List<String> getPjOptionList(){
return this.pjOptionList;
}
/**
* 设置 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
* @param pjOptionList
*/
public void setPjOptionList(List<String> pjOptionList){
this.pjOptionList = pjOptionList;
}
/**
* 获取 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
* @return pjOptionNotList
*/
public List<String> getPjOptionNotList(){
return this.pjOptionNotList;
}
/**
* 设置 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
* @param pjOptionNotList
*/
public void setPjOptionNotList(List<String> pjOptionNotList){
this.pjOptionNotList = pjOptionNotList;
}
/**
* 获取 窗口编号
* @return windowFromnumList
*/
public List<String> getWindowFromnumList(){
return this.windowFromnumList;
}
/**
* 设置 窗口编号
* @param windowFromnumList
*/
public void setWindowFromnumList(List<String> windowFromnumList){
this.windowFromnumList = windowFromnumList;
}
/**
* 获取 窗口编号
* @return windowFromnumNotList
*/
public List<String> getWindowFromnumNotList(){
return this.windowFromnumNotList;
}
/**
* 设置 窗口编号
* @param windowFromnumNotList
*/
public void setWindowFromnumNotList(List<String> windowFromnumNotList){
this.windowFromnumNotList = windowFromnumNotList;
}
/**
* 获取 大厅名称
* @return hallNameList
*/
public List<String> getHallNameList(){
return this.hallNameList;
}
/**
* 设置 大厅名称
* @param hallNameList
*/
public void setHallNameList(List<String> hallNameList){
this.hallNameList = hallNameList;
}
/**
* 获取 大厅名称
* @return hallNameNotList
*/
public List<String> getHallNameNotList(){
return this.hallNameNotList;
}
/**
* 设置 大厅名称
* @param hallNameNotList
*/
public void setHallNameNotList(List<String> hallNameNotList){
this.hallNameNotList = hallNameNotList;
}
/**
* 获取 开始 评价数量
* @return pjCountStart
*/
public Integer getPjCountStart(){
return this.pjCountStart;
}
/**
* 设置 开始 评价数量
* @param pjCountStart
*/
public void setPjCountStart(Integer pjCountStart){
this.pjCountStart = pjCountStart;
}
/**
* 获取 结束 评价数量
* @return $pjCountEnd
*/
public Integer getPjCountEnd(){
return this.pjCountEnd;
}
/**
* 设置 结束 评价数量
* @param pjCountEnd
*/
public void setPjCountEnd(Integer pjCountEnd){
this.pjCountEnd = pjCountEnd;
}
/**
* 获取 增加 评价数量
* @return pjCountIncrement
*/
public Integer getPjCountIncrement(){
return this.pjCountIncrement;
}
/**
* 设置 增加 评价数量
* @param pjCountIncrement
*/
public void setPjCountIncrement(Integer pjCountIncrement){
this.pjCountIncrement = pjCountIncrement;
}
/**
* 获取 评价数量
* @return pjCountList
*/
public List<Integer> getPjCountList(){
return this.pjCountList;
}
/**
* 设置 评价数量
* @param pjCountList
*/
public void setPjCountList(List<Integer> pjCountList){
this.pjCountList = pjCountList;
}
/**
* 获取 评价数量
* @return pjCountNotList
*/
public List<Integer> getPjCountNotList(){
return this.pjCountNotList;
}
/**
* 设置 评价数量
* @param pjCountNotList
*/
public void setPjCountNotList(List<Integer> pjCountNotList){
this.pjCountNotList = pjCountNotList;
}
/**
* 获取 开始 年
* @return yearStart
*/
public Integer getYearStart(){
return this.yearStart;
}
/**
* 设置 开始 年
* @param yearStart
*/
public void setYearStart(Integer yearStart){
this.yearStart = yearStart;
}
/**
* 获取 结束 年
* @return $yearEnd
*/
public Integer getYearEnd(){
return this.yearEnd;
}
/**
* 设置 结束 年
* @param yearEnd
*/
public void setYearEnd(Integer yearEnd){
this.yearEnd = yearEnd;
}
/**
* 获取 增加 年
* @return yearIncrement
*/
public Integer getYearIncrement(){
return this.yearIncrement;
}
/**
* 设置 增加 年
* @param yearIncrement
*/
public void setYearIncrement(Integer yearIncrement){
this.yearIncrement = yearIncrement;
}
/**
* 获取 年
* @return yearList
*/
public List<Integer> getYearList(){
return this.yearList;
}
/**
* 设置 年
* @param yearList
*/
public void setYearList(List<Integer> yearList){
this.yearList = yearList;
}
/**
* 获取 年
* @return yearNotList
*/
public List<Integer> getYearNotList(){
return this.yearNotList;
}
/**
* 设置 年
* @param yearNotList
*/
public void setYearNotList(List<Integer> yearNotList){
this.yearNotList = yearNotList;
}
/**
* 获取 开始 月
* @return monthStart
*/
public Integer getMonthStart(){
return this.monthStart;
}
/**
* 设置 开始 月
* @param monthStart
*/
public void setMonthStart(Integer monthStart){
this.monthStart = monthStart;
}
/**
* 获取 结束 月
* @return $monthEnd
*/
public Integer getMonthEnd(){
return this.monthEnd;
}
/**
* 设置 结束 月
* @param monthEnd
*/
public void setMonthEnd(Integer monthEnd){
this.monthEnd = monthEnd;
}
/**
* 获取 增加 月
* @return monthIncrement
*/
public Integer getMonthIncrement(){
return this.monthIncrement;
}
/**
* 设置 增加 月
* @param monthIncrement
*/
public void setMonthIncrement(Integer monthIncrement){
this.monthIncrement = monthIncrement;
}
/**
* 获取 月
* @return monthList
*/
public List<Integer> getMonthList(){
return this.monthList;
}
/**
* 设置 月
* @param monthList
*/
public void setMonthList(List<Integer> monthList){
this.monthList = monthList;
}
/**
* 获取 月
* @return monthNotList
*/
public List<Integer> getMonthNotList(){
return this.monthNotList;
}
/**
* 设置 月
* @param monthNotList
*/
public void setMonthNotList(List<Integer> monthNotList){
this.monthNotList = monthNotList;
}
/**
* 获取 开始 日
* @return dayStart
*/
public Integer getDayStart(){
return this.dayStart;
}
/**
* 设置 开始 日
* @param dayStart
*/
public void setDayStart(Integer dayStart){
this.dayStart = dayStart;
}
/**
* 获取 结束 日
* @return $dayEnd
*/
public Integer getDayEnd(){
return this.dayEnd;
}
/**
* 设置 结束 日
* @param dayEnd
*/
public void setDayEnd(Integer dayEnd){
this.dayEnd = dayEnd;
}
/**
* 获取 增加 日
* @return dayIncrement
*/
public Integer getDayIncrement(){
return this.dayIncrement;
}
/**
* 设置 增加 日
* @param dayIncrement
*/
public void setDayIncrement(Integer dayIncrement){
this.dayIncrement = dayIncrement;
}
/**
* 获取 日
* @return dayList
*/
public List<Integer> getDayList(){
return this.dayList;
}
/**
* 设置 日
* @param dayList
*/
public void setDayList(List<Integer> dayList){
this.dayList = dayList;
}
/**
* 获取 日
* @return dayNotList
*/
public List<Integer> getDayNotList(){
return this.dayNotList;
}
/**
* 设置 日
* @param dayNotList
*/
public void setDayNotList(List<Integer> dayNotList){
this.dayNotList = dayNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> 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
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 ID
* @param id
*/
public PjEvaluateStatQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 ID
* @param idStart
*/
public PjEvaluateStatQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 ID
* @param idEnd
*/
public PjEvaluateStatQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 ID
* @param idIncrement
*/
public PjEvaluateStatQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 ID
* @param idList
*/
public PjEvaluateStatQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 ID
* @param idNotList
*/
public PjEvaluateStatQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 站点Id
* @param siteId
*/
public PjEvaluateStatQuery siteId(Long siteId){
setSiteId(siteId);
return this;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public PjEvaluateStatQuery siteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
return this;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public PjEvaluateStatQuery siteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
return this;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public PjEvaluateStatQuery siteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
return this;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public PjEvaluateStatQuery siteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
return this;
}
/**
* 设置 站点Id
* @param siteIdNotList
*/
public PjEvaluateStatQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/**
* 设置 站点编码
* @param siteCode
*/
public PjEvaluateStatQuery siteCode(String siteCode){
setSiteCode(siteCode);
return this;
}
/**
* 设置 站点编码
* @param siteCodeList
*/
public PjEvaluateStatQuery siteCodeList(List<String> siteCodeList){
this.siteCodeList = siteCodeList;
return this;
}
/**
* 设置 站点名称
* @param siteName
*/
public PjEvaluateStatQuery siteName(String siteName){
setSiteName(siteName);
return this;
}
/**
* 设置 站点名称
* @param siteNameList
*/
public PjEvaluateStatQuery siteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
return this;
}
/**
* 设置 部门
* @param sectionName
*/
public PjEvaluateStatQuery sectionName(String sectionName){
setSectionName(sectionName);
return this;
}
/**
* 设置 部门
* @param sectionNameList
*/
public PjEvaluateStatQuery sectionNameList(List<String> sectionNameList){
this.sectionNameList = sectionNameList;
return this;
}
/**
* 设置 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
* @param pjOption
*/
public PjEvaluateStatQuery pjOption(String pjOption){
setPjOption(pjOption);
return this;
}
/**
* 设置 评价选项(非常满意,满意,基本满意,不满意,非常不满意)
* @param pjOptionList
*/
public PjEvaluateStatQuery pjOptionList(List<String> pjOptionList){
this.pjOptionList = pjOptionList;
return this;
}
/**
* 设置 窗口编号
* @param windowFromnum
*/
public PjEvaluateStatQuery windowFromnum(String windowFromnum){
setWindowFromnum(windowFromnum);
return this;
}
/**
* 设置 窗口编号
* @param windowFromnumList
*/
public PjEvaluateStatQuery windowFromnumList(List<String> windowFromnumList){
this.windowFromnumList = windowFromnumList;
return this;
}
/**
* 设置 大厅名称
* @param hallName
*/
public PjEvaluateStatQuery hallName(String hallName){
setHallName(hallName);
return this;
}
/**
* 设置 大厅名称
* @param hallNameList
*/
public PjEvaluateStatQuery hallNameList(List<String> hallNameList){
this.hallNameList = hallNameList;
return this;
}
/**
* 设置 评价数量
* @param pjCount
*/
public PjEvaluateStatQuery pjCount(Integer pjCount){
setPjCount(pjCount);
return this;
}
/**
* 设置 开始 评价数量
* @param pjCountStart
*/
public PjEvaluateStatQuery pjCountStart(Integer pjCountStart){
this.pjCountStart = pjCountStart;
return this;
}
/**
* 设置 结束 评价数量
* @param pjCountEnd
*/
public PjEvaluateStatQuery pjCountEnd(Integer pjCountEnd){
this.pjCountEnd = pjCountEnd;
return this;
}
/**
* 设置 增加 评价数量
* @param pjCountIncrement
*/
public PjEvaluateStatQuery pjCountIncrement(Integer pjCountIncrement){
this.pjCountIncrement = pjCountIncrement;
return this;
}
/**
* 设置 评价数量
* @param pjCountList
*/
public PjEvaluateStatQuery pjCountList(List<Integer> pjCountList){
this.pjCountList = pjCountList;
return this;
}
/**
* 设置 评价数量
* @param pjCountNotList
*/
public PjEvaluateStatQuery pjCountNotList(List<Integer> pjCountNotList){
this.pjCountNotList = pjCountNotList;
return this;
}
/**
* 设置 年
* @param year
*/
public PjEvaluateStatQuery year(Integer year){
setYear(year);
return this;
}
/**
* 设置 开始 年
* @param yearStart
*/
public PjEvaluateStatQuery yearStart(Integer yearStart){
this.yearStart = yearStart;
return this;
}
/**
* 设置 结束 年
* @param yearEnd
*/
public PjEvaluateStatQuery yearEnd(Integer yearEnd){
this.yearEnd = yearEnd;
return this;
}
/**
* 设置 增加 年
* @param yearIncrement
*/
public PjEvaluateStatQuery yearIncrement(Integer yearIncrement){
this.yearIncrement = yearIncrement;
return this;
}
/**
* 设置 年
* @param yearList
*/
public PjEvaluateStatQuery yearList(List<Integer> yearList){
this.yearList = yearList;
return this;
}
/**
* 设置 年
* @param yearNotList
*/
public PjEvaluateStatQuery yearNotList(List<Integer> yearNotList){
this.yearNotList = yearNotList;
return this;
}
/**
* 设置 月
* @param month
*/
public PjEvaluateStatQuery month(Integer month){
setMonth(month);
return this;
}
/**
* 设置 开始 月
* @param monthStart
*/
public PjEvaluateStatQuery monthStart(Integer monthStart){
this.monthStart = monthStart;
return this;
}
/**
* 设置 结束 月
* @param monthEnd
*/
public PjEvaluateStatQuery monthEnd(Integer monthEnd){
this.monthEnd = monthEnd;
return this;
}
/**
* 设置 增加 月
* @param monthIncrement
*/
public PjEvaluateStatQuery monthIncrement(Integer monthIncrement){
this.monthIncrement = monthIncrement;
return this;
}
/**
* 设置 月
* @param monthList
*/
public PjEvaluateStatQuery monthList(List<Integer> monthList){
this.monthList = monthList;
return this;
}
/**
* 设置 月
* @param monthNotList
*/
public PjEvaluateStatQuery monthNotList(List<Integer> monthNotList){
this.monthNotList = monthNotList;
return this;
}
/**
* 设置 日
* @param day
*/
public PjEvaluateStatQuery day(Integer day){
setDay(day);
return this;
}
/**
* 设置 开始 日
* @param dayStart
*/
public PjEvaluateStatQuery dayStart(Integer dayStart){
this.dayStart = dayStart;
return this;
}
/**
* 设置 结束 日
* @param dayEnd
*/
public PjEvaluateStatQuery dayEnd(Integer dayEnd){
this.dayEnd = dayEnd;
return this;
}
/**
* 设置 增加 日
* @param dayIncrement
*/
public PjEvaluateStatQuery dayIncrement(Integer dayIncrement){
this.dayIncrement = dayIncrement;
return this;
}
/**
* 设置 日
* @param dayList
*/
public PjEvaluateStatQuery dayList(List<Integer> dayList){
this.dayList = dayList;
return this;
}
/**
* 设置 日
* @param dayNotList
*/
public PjEvaluateStatQuery dayNotList(List<Integer> dayNotList){
this.dayNotList = dayNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public PjEvaluateStatQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public PjEvaluateStatQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public PjEvaluateStatQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public PjEvaluateStatQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public PjEvaluateStatQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public PjEvaluateStatQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<PjEvaluateStatQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<PjEvaluateStatQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<PjEvaluateStatQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<PjEvaluateStatQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.pj.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 评价汇总统计视图对象
*
* @author zxfei
* @date 2024-06-24
*/
@Data
public class PjEvaluateStatVo extends BaseEntityLong {
/** ID列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.pj.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import com.mortals.xhx.module.pj.dao.PjEvaluateStatDao;
/**
* PjEvaluateStatService
*
* 评价汇总统计 service接口
*
* @author zxfei
* @date 2024-06-24
*/
public interface PjEvaluateStatService extends ICRUDService<PjEvaluateStatEntity,Long>{
PjEvaluateStatDao getDao();
/**
* 更新站点评价统计
* @param entity
* @param context
* @return
*/
Rest<Void> updateSitePjStat(PjEvaluateStatEntity entity, Context context);
}
\ No newline at end of file
package com.mortals.xhx.module.pj.service.impl;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.pj.model.PjEvaluateEntity;
import com.mortals.xhx.module.pj.model.PjEvaluateQuery;
import com.mortals.xhx.module.pj.model.PjEvaluateStatQuery;
import com.mortals.xhx.module.pj.service.PjEvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.pj.dao.PjEvaluateStatDao;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import com.mortals.xhx.module.pj.service.PjEvaluateStatService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* PjEvaluateStatService
* 评价汇总统计 service实现
*
* @author zxfei
* @date 2024-06-24
*/
@Service("pjEvaluateStatService")
@Slf4j
public class PjEvaluateStatServiceImpl extends AbstractCRUDServiceImpl<PjEvaluateStatDao, PjEvaluateStatEntity, Long> implements PjEvaluateStatService {
@Autowired
private PjEvaluateService pjEvaluateService;
@Override
public Rest<Void> updateSitePjStat(PjEvaluateStatEntity entity, Context context) {
//todo 统计站点评价 分站点--部门 ||窗口编号||评价选项 ==》评价数量
//查询指定日期当前站点所有评价数量
Calendar calendar = Calendar.getInstance();
calendar.set(entity.getYear(), entity.getMonth(), entity.getDay());
SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd");//yyyy-年,MM-月,dd-日,HH-时,mm-分,ss-秒
String currentDate = date.format(calendar.getTime());
PjEvaluateQuery pjEvaluateQuery = new PjEvaluateQuery();
pjEvaluateQuery.setSiteId(entity.getSiteId());
pjEvaluateQuery.setPjTimeStart(currentDate);
pjEvaluateQuery.setPjTimeEnd(currentDate);
List<PjEvaluateEntity> pjEvaluateEntities = pjEvaluateService.find(pjEvaluateQuery);
log.info("更新站点评价统计数据,站点ID:{},站点名称:{},日期:{},评价数量:{}", entity.getSiteId(), entity.getSiteName(), currentDate, pjEvaluateEntities.size());
updateSitePjCount(entity, pjEvaluateEntities);
updateSiteSectionNamePjCount(currentDate, entity, pjEvaluateEntities);
updateSiteWindowPjCount(currentDate, entity, pjEvaluateEntities);
return Rest.ok();
}
private void updateSitePjCount(PjEvaluateStatEntity entity, List<PjEvaluateEntity> pjEvaluateEntities) {
PjEvaluateStatEntity pjEvaluateStatEntity = this.selectOne(new PjEvaluateStatQuery()
.siteId(entity.getSiteId())
.year(entity.getYear())
.month(entity.getMonth())
.day(entity.getDay()));
if (ObjectUtils.isEmpty(pjEvaluateStatEntity)) {
//统计当前站点新增所有评价数量
pjEvaluateStatEntity = new PjEvaluateStatEntity();
pjEvaluateStatEntity.initAttrValue();
pjEvaluateStatEntity.setSiteId(entity.getSiteId());
pjEvaluateStatEntity.setSiteCode(entity.getSiteCode());
pjEvaluateStatEntity.setSiteName(entity.getSiteName());
pjEvaluateStatEntity.setPjCount(pjEvaluateEntities.size());
pjEvaluateStatEntity.setYear(entity.getYear());
pjEvaluateStatEntity.setMonth(entity.getMonth());
pjEvaluateStatEntity.setDay(entity.getDay());
pjEvaluateStatEntity.setCreateTime(new Date());
pjEvaluateStatEntity.setCreateUserId(1L);
this.save(pjEvaluateStatEntity);
} else {
pjEvaluateStatEntity.setPjCount(pjEvaluateEntities.size());
pjEvaluateStatEntity.setYear(entity.getYear());
pjEvaluateStatEntity.setMonth(entity.getMonth());
pjEvaluateStatEntity.setDay(entity.getDay());
pjEvaluateStatEntity.setUpdateTime(new Date());
pjEvaluateStatEntity.setUpdateUserId(1L);
this.update(pjEvaluateStatEntity);
}
}
private void updateSiteSectionNamePjCount(String currentDate, PjEvaluateStatEntity entity, List<PjEvaluateEntity> pjEvaluateEntities) {
Map<String, Long> collect = pjEvaluateEntities.stream().collect(Collectors.groupingBy(x -> x.getSectionName(), Collectors.counting()));
collect.entrySet().stream().forEach(item -> {
String sectionName = item.getKey();
Long value = item.getValue();
log.info("更新站点评价统计数据,站点名称:{},日期:{},部门:{},评价数量:{}", entity.getSiteName(), currentDate, entity.getSectionName(), pjEvaluateEntities.size());
PjEvaluateStatEntity pjEvaluateStatEntity = this.selectOne(new PjEvaluateStatQuery()
.siteId(entity.getSiteId())
.sectionName(sectionName)
.year(entity.getYear())
.month(entity.getMonth())
.day(entity.getDay()));
if (ObjectUtils.isEmpty(pjEvaluateStatEntity)) {
//统计当前站点新增所有评价数量
pjEvaluateStatEntity = new PjEvaluateStatEntity();
pjEvaluateStatEntity.initAttrValue();
pjEvaluateStatEntity.setSiteId(entity.getSiteId());
pjEvaluateStatEntity.setSiteCode(entity.getSiteCode());
pjEvaluateStatEntity.setSiteName(entity.getSiteName());
pjEvaluateStatEntity.setSectionName(sectionName);
pjEvaluateStatEntity.setPjCount(value.intValue());
pjEvaluateStatEntity.setYear(entity.getYear());
pjEvaluateStatEntity.setMonth(entity.getMonth());
pjEvaluateStatEntity.setDay(entity.getDay());
pjEvaluateStatEntity.setCreateTime(new Date());
pjEvaluateStatEntity.setCreateUserId(1L);
this.save(pjEvaluateStatEntity);
} else {
pjEvaluateStatEntity.setPjCount(value.intValue());
pjEvaluateStatEntity.setYear(entity.getYear());
pjEvaluateStatEntity.setMonth(entity.getMonth());
pjEvaluateStatEntity.setDay(entity.getDay());
pjEvaluateStatEntity.setUpdateTime(new Date());
pjEvaluateStatEntity.setUpdateUserId(1L);
this.update(pjEvaluateStatEntity);
}
});
}
private void updateSiteWindowPjCount(String currentDate, PjEvaluateStatEntity entity, List<PjEvaluateEntity> pjEvaluateEntities) {
Map<String, Long> collect = pjEvaluateEntities.stream().collect(Collectors.groupingBy(x -> x.getWindowFromnum(), Collectors.counting()));
collect.entrySet().stream().forEach(item -> {
String windowFromnum = item.getKey();
Long value = item.getValue();
log.info("更新站点评价统计数据,站点名称:{},日期:{},窗口:{},评价数量:{}", entity.getSiteName(), currentDate, entity.getWindowFromnum(), pjEvaluateEntities.size());
PjEvaluateStatEntity pjEvaluateStatEntity = this.selectOne(new PjEvaluateStatQuery()
.siteId(entity.getSiteId())
.windowFromnum(windowFromnum)
.year(entity.getYear())
.month(entity.getMonth())
.day(entity.getDay()));
if (ObjectUtils.isEmpty(pjEvaluateStatEntity)) {
//统计当前站点新增所有评价数量
pjEvaluateStatEntity = new PjEvaluateStatEntity();
pjEvaluateStatEntity.initAttrValue();
pjEvaluateStatEntity.setSiteId(entity.getSiteId());
pjEvaluateStatEntity.setSiteCode(entity.getSiteCode());
pjEvaluateStatEntity.setSiteName(entity.getSiteName());
pjEvaluateStatEntity.setWindowFromnum(windowFromnum);
pjEvaluateStatEntity.setPjCount(value.intValue());
pjEvaluateStatEntity.setYear(entity.getYear());
pjEvaluateStatEntity.setMonth(entity.getMonth());
pjEvaluateStatEntity.setDay(entity.getDay());
pjEvaluateStatEntity.setCreateTime(new Date());
pjEvaluateStatEntity.setCreateUserId(1L);
this.save(pjEvaluateStatEntity);
} else {
pjEvaluateStatEntity.setPjCount(value.intValue());
pjEvaluateStatEntity.setYear(entity.getYear());
pjEvaluateStatEntity.setMonth(entity.getMonth());
pjEvaluateStatEntity.setDay(entity.getDay());
pjEvaluateStatEntity.setUpdateTime(new Date());
pjEvaluateStatEntity.setUpdateUserId(1L);
this.update(pjEvaluateStatEntity);
}
});
}
}
\ No newline at end of file
...@@ -162,50 +162,40 @@ public class PjEvaluateController extends BaseCRUDJsonBodyMappingController<PjEv ...@@ -162,50 +162,40 @@ public class PjEvaluateController extends BaseCRUDJsonBodyMappingController<PjEv
private void getSite(PjEvaluateEntity entity) { private void getSite(PjEvaluateEntity entity) {
if (!ObjectUtils.isEmpty(entity.getSiteId())) { if (!ObjectUtils.isEmpty(entity.getSiteId())) {
RedisTemplate<String, String> baseRedisTemplate = cacheService.selectDbRedisTemplate(1); RedisTemplate<String, String> baseRedisTemplate = cacheService.selectDbRedisTemplate(1);
//com:mortals:xhx:module:site:model:SiteEntity redis调用 //com:mortals:xhx:module:site:model:SiteEntity redis调用
String siteStr = (String) baseRedisTemplate.opsForHash().get("com:mortals:xhx:module:site:model:SiteEntity", String.valueOf(entity.getSiteId())); String siteStr = (String) baseRedisTemplate.opsForHash().get("com:mortals:xhx:module:site:model:SiteEntity", String.valueOf(entity.getSiteId()));
if (!ObjectUtils.isEmpty(siteStr)) { if (!ObjectUtils.isEmpty(siteStr)) {
SitePdu sitePdu = JSON.parseObject(siteStr, SitePdu.class); SitePdu sitePdu = JSON.parseObject(siteStr, SitePdu.class);
if (!ObjectUtils.isEmpty(sitePdu)) {
entity.setSiteId(sitePdu.getId());
entity.setSiteCode(sitePdu.getSiteCode()); entity.setSiteCode(sitePdu.getSiteCode());
entity.setSiteName(sitePdu.getSiteName()); entity.setSiteName(sitePdu.getSiteName());
} else if (!ObjectUtils.isEmpty(entity.getSiteCode())) {
buildSiteBySideCode(entity);
} else { } else {
log.info("站点信息不存在,siteId={}", entity.getSiteId()); log.info("站点信息不存在,siteId={}", entity.getSiteId());
} }
} else {
if (!ObjectUtils.isEmpty(entity.getSiteCode())) {
buildSiteBySideCode(entity);
}
}
} }
//feign调用 private void buildSiteBySideCode(PjEvaluateEntity entity) {
/* Rest<SitePdu> sitePduRest = siteFeign.info(entity.getSiteId()); RedisTemplate<String, String> baseRedisTemplate = cacheService.selectDbRedisTemplate(1);
if (YesNoEnum.YES.getValue() == sitePduRest.getCode()) { String siteStr = (String) baseRedisTemplate.opsForHash().get("com:mortals:xhx:module:site:model:SiteEntity", entity.getSiteCode());
SitePdu sitePdu = sitePduRest.getData(); if (!ObjectUtils.isEmpty(siteStr)) {
SitePdu sitePdu = JSON.parseObject(siteStr, SitePdu.class);
if (!ObjectUtils.isEmpty(sitePdu)) { if (!ObjectUtils.isEmpty(sitePdu)) {
entity.setSiteId(sitePdu.getId());
entity.setSiteCode(sitePdu.getSiteCode()); entity.setSiteCode(sitePdu.getSiteCode());
entity.setSiteName(sitePdu.getSiteName()); entity.setSiteName(sitePdu.getSiteName());
} else { } else {
log.info("站点信息不存在,siteId={}", entity.getSiteId()); log.info("站点信息不存在,siteId={}", entity.getSiteId());
} }
}*/
} else {
if (!ObjectUtils.isEmpty(entity.getSiteCode())) {
SitePdu pdu = new SitePdu();
pdu.setSiteCode(entity.getSiteCode());
Rest<RespData<List<SitePdu>>> sitePduRest = siteFeign.list(pdu);
if (YesNoEnum.YES.getValue() == sitePduRest.getCode()) {
List<SitePdu> list = sitePduRest.getData().getData();
if (!ObjectUtils.isEmpty(list)) {
entity.setSiteId(list.get(0).getId());
entity.setSiteCode(list.get(0).getSiteCode());
entity.setSiteName(list.get(0).getSiteName());
} else {
log.info("站点信息不存在,siteId={}", entity.getSiteId());
}
}
}
} }
} }
......
package com.mortals.xhx.module.pj.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.pj.model.PjEvaluateStatEntity;
import com.mortals.xhx.module.pj.service.PjEvaluateStatService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import com.mortals.xhx.common.code.*;
/**
*
* 评价汇总统计
*
* @author zxfei
* @date 2024-06-24
*/
@RestController
@RequestMapping("pj/evaluate/stat")
public class PjEvaluateStatController extends BaseCRUDJsonBodyMappingController<PjEvaluateStatService,PjEvaluateStatEntity,Long> {
@Autowired
private ParamService paramService;
public PjEvaluateStatController(){
super.setModuleDesc( "评价汇总统计");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "pjOption", PjOptionEnum.getEnumMap());
super.init(model, context);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.ph.dao.ibatis.PhQueueStatDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="PhQueueStatEntity" id="PhQueueStatEntity-Map">
<id property="id" column="id" />
<result property="siteId" column="site_id" />
<result property="siteCode" column="site_code" />
<result property="siteName" column="site_name" />
<result property="business" column="business" />
<result property="sectionName" column="section_name" />
<result property="hallName" column="hall_name" />
<result property="waitTime" column="wait_time" />
<result property="windowFromnum" column="window_fromnum" />
<result property="phCount" column="ph_count" />
<result property="year" column="year" />
<result property="month" column="month" />
<result property="day" column="day" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
a.site_id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteCode') or colPickMode == 1 and data.containsKey('siteCode')))">
a.site_code,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteName') or colPickMode == 1 and data.containsKey('siteName')))">
a.site_name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('business') or colPickMode == 1 and data.containsKey('business')))">
a.business,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sectionName') or colPickMode == 1 and data.containsKey('sectionName')))">
a.section_name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))">
a.hall_name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('waitTime') or colPickMode == 1 and data.containsKey('waitTime')))">
a.wait_time,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowFromnum') or colPickMode == 1 and data.containsKey('windowFromnum')))">
a.window_fromnum,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('phCount') or colPickMode == 1 and data.containsKey('phCount')))">
a.ph_count,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('year') or colPickMode == 1 and data.containsKey('year')))">
a.year,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('month') or colPickMode == 1 and data.containsKey('month')))">
a.month,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('day') or colPickMode == 1 and data.containsKey('day')))">
a.day,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="PhQueueStatEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_ph_queue_stat
(site_id,site_code,site_name,business,section_name,hall_name,wait_time,window_fromnum,ph_count,year,month,day,createTime,updateUserId,updateTime)
VALUES
(#{siteId},#{siteCode},#{siteName},#{business},#{sectionName},#{hallName},#{waitTime},#{windowFromnum},#{phCount},#{year},#{month},#{day},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_ph_queue_stat
(site_id,site_code,site_name,business,section_name,hall_name,wait_time,window_fromnum,ph_count,year,month,day,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteCode},#{item.siteName},#{item.business},#{item.sectionName},#{item.hallName},#{item.waitTime},#{item.windowFromnum},#{item.phCount},#{item.year},#{item.month},#{item.day},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_ph_queue_stat as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
a.site_id=#{data.siteId},
</if>
<if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))">
a.site_id=ifnull(a.site_id,0) + #{data.siteIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('siteCode')) or (colPickMode==1 and !data.containsKey('siteCode'))">
a.site_code=#{data.siteCode},
</if>
<if test="(colPickMode==0 and data.containsKey('siteName')) or (colPickMode==1 and !data.containsKey('siteName'))">
a.site_name=#{data.siteName},
</if>
<if test="(colPickMode==0 and data.containsKey('business')) or (colPickMode==1 and !data.containsKey('business'))">
a.business=#{data.business},
</if>
<if test="(colPickMode==0 and data.containsKey('sectionName')) or (colPickMode==1 and !data.containsKey('sectionName'))">
a.section_name=#{data.sectionName},
</if>
<if test="(colPickMode==0 and data.containsKey('hallName')) or (colPickMode==1 and !data.containsKey('hallName'))">
a.hall_name=#{data.hallName},
</if>
<if test="(colPickMode==0 and data.containsKey('waitTime')) or (colPickMode==1 and !data.containsKey('waitTime'))">
a.wait_time=#{data.waitTime},
</if>
<if test="(colPickMode==0 and data.containsKey('waitTimeIncrement')) or (colPickMode==1 and !data.containsKey('waitTimeIncrement'))">
a.wait_time=ifnull(a.wait_time,0) + #{data.waitTimeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('windowFromnum')) or (colPickMode==1 and !data.containsKey('windowFromnum'))">
a.window_fromnum=#{data.windowFromnum},
</if>
<if test="(colPickMode==0 and data.containsKey('phCount')) or (colPickMode==1 and !data.containsKey('phCount'))">
a.ph_count=#{data.phCount},
</if>
<if test="(colPickMode==0 and data.containsKey('phCountIncrement')) or (colPickMode==1 and !data.containsKey('phCountIncrement'))">
a.ph_count=ifnull(a.ph_count,0) + #{data.phCountIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('year')) or (colPickMode==1 and !data.containsKey('year'))">
a.year=#{data.year},
</if>
<if test="(colPickMode==0 and data.containsKey('yearIncrement')) or (colPickMode==1 and !data.containsKey('yearIncrement'))">
a.year=ifnull(a.year,0) + #{data.yearIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('month')) or (colPickMode==1 and !data.containsKey('month'))">
a.month=#{data.month},
</if>
<if test="(colPickMode==0 and data.containsKey('monthIncrement')) or (colPickMode==1 and !data.containsKey('monthIncrement'))">
a.month=ifnull(a.month,0) + #{data.monthIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('day')) or (colPickMode==1 and !data.containsKey('day'))">
a.day=#{data.day},
</if>
<if test="(colPickMode==0 and data.containsKey('dayIncrement')) or (colPickMode==1 and !data.containsKey('dayIncrement'))">
a.day=ifnull(a.day,0) + #{data.dayIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_ph_queue_stat as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="site_id=(case" suffix="ELSE site_id end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))">
when a.id=#{item.id} then #{item.siteId}
</when>
<when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))">
when a.id=#{item.id} then ifnull(a.site_id,0) + #{item.siteIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="site_code=(case" suffix="ELSE site_code end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteCode')) or (colPickMode==1 and !item.containsKey('siteCode'))">
when a.id=#{item.id} then #{item.siteCode}
</if>
</foreach>
</trim>
<trim prefix="site_name=(case" suffix="ELSE site_name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteName')) or (colPickMode==1 and !item.containsKey('siteName'))">
when a.id=#{item.id} then #{item.siteName}
</if>
</foreach>
</trim>
<trim prefix="business=(case" suffix="ELSE business end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('business')) or (colPickMode==1 and !item.containsKey('business'))">
when a.id=#{item.id} then #{item.business}
</if>
</foreach>
</trim>
<trim prefix="section_name=(case" suffix="ELSE section_name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('sectionName')) or (colPickMode==1 and !item.containsKey('sectionName'))">
when a.id=#{item.id} then #{item.sectionName}
</if>
</foreach>
</trim>
<trim prefix="hall_name=(case" suffix="ELSE hall_name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('hallName')) or (colPickMode==1 and !item.containsKey('hallName'))">
when a.id=#{item.id} then #{item.hallName}
</if>
</foreach>
</trim>
<trim prefix="wait_time=(case" suffix="ELSE wait_time end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('waitTime')) or (colPickMode==1 and !item.containsKey('waitTime'))">
when a.id=#{item.id} then #{item.waitTime}
</when>
<when test="(colPickMode==0 and item.containsKey('waitTimeIncrement')) or (colPickMode==1 and !item.containsKey('waitTimeIncrement'))">
when a.id=#{item.id} then ifnull(a.wait_time,0) + #{item.waitTimeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="window_fromnum=(case" suffix="ELSE window_fromnum end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('windowFromnum')) or (colPickMode==1 and !item.containsKey('windowFromnum'))">
when a.id=#{item.id} then #{item.windowFromnum}
</if>
</foreach>
</trim>
<trim prefix="ph_count=(case" suffix="ELSE ph_count end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('phCount')) or (colPickMode==1 and !item.containsKey('phCount'))">
when a.id=#{item.id} then #{item.phCount}
</when>
<when test="(colPickMode==0 and item.containsKey('phCountIncrement')) or (colPickMode==1 and !item.containsKey('phCountIncrement'))">
when a.id=#{item.id} then ifnull(a.ph_count,0) + #{item.phCountIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="year=(case" suffix="ELSE year end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('year')) or (colPickMode==1 and !item.containsKey('year'))">
when a.id=#{item.id} then #{item.year}
</when>
<when test="(colPickMode==0 and item.containsKey('yearIncrement')) or (colPickMode==1 and !item.containsKey('yearIncrement'))">
when a.id=#{item.id} then ifnull(a.year,0) + #{item.yearIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="month=(case" suffix="ELSE month end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('month')) or (colPickMode==1 and !item.containsKey('month'))">
when a.id=#{item.id} then #{item.month}
</when>
<when test="(colPickMode==0 and item.containsKey('monthIncrement')) or (colPickMode==1 and !item.containsKey('monthIncrement'))">
when a.id=#{item.id} then ifnull(a.month,0) + #{item.monthIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="day=(case" suffix="ELSE day end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('day')) or (colPickMode==1 and !item.containsKey('day'))">
when a.id=#{item.id} then #{item.day}
</when>
<when test="(colPickMode==0 and item.containsKey('dayIncrement')) or (colPickMode==1 and !item.containsKey('dayIncrement'))">
when a.id=#{item.id} then ifnull(a.day,0) + #{item.dayIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="PhQueueStatEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_ph_queue_stat as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_ph_queue_stat as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_ph_queue_stat where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_ph_queue_stat where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_ph_queue_stat where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_ph_queue_stat as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="PhQueueStatEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_ph_queue_stat as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_ph_queue_stat as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</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">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null ">
${_conditionType_} a.site_id = #{${_conditionParam_}.siteId}
</if>
<if test="conditionParamRef.siteId == null">
${_conditionType_} a.site_id is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.site_id in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.site_id 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">
${_conditionType_} a.site_id <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if>
<if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null">
${_conditionType_} a.site_id <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd}
</if>
<if test="conditionParamRef.containsKey('siteCode')">
<if test="conditionParamRef.siteCode != null and conditionParamRef.siteCode != ''">
${_conditionType_} a.site_code like #{${_conditionParam_}.siteCode}
</if>
<if test="conditionParamRef.siteCode == null">
${_conditionType_} a.site_code is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteCodeList') and conditionParamRef.siteCodeList.size() > 0">
${_conditionType_} a.site_code in
<foreach collection="conditionParamRef.siteCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteCodeNotList') and conditionParamRef.siteCodeNotList.size() > 0">
${_conditionType_} a.site_code not in
<foreach collection="conditionParamRef.siteCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteName')">
<if test="conditionParamRef.siteName != null and conditionParamRef.siteName != ''">
${_conditionType_} a.site_name like #{${_conditionParam_}.siteName}
</if>
<if test="conditionParamRef.siteName == null">
${_conditionType_} a.site_name is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteNameList') and conditionParamRef.siteNameList.size() > 0">
${_conditionType_} a.site_name in
<foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteNameNotList') and conditionParamRef.siteNameNotList.size() > 0">
${_conditionType_} a.site_name not in
<foreach collection="conditionParamRef.siteNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('business')">
<if test="conditionParamRef.business != null and conditionParamRef.business != ''">
${_conditionType_} a.business like #{${_conditionParam_}.business}
</if>
<if test="conditionParamRef.business == null">
${_conditionType_} a.business is null
</if>
</if>
<if test="conditionParamRef.containsKey('businessList') and conditionParamRef.businessList.size() > 0">
${_conditionType_} a.business in
<foreach collection="conditionParamRef.businessList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('businessNotList') and conditionParamRef.businessNotList.size() > 0">
${_conditionType_} a.business not in
<foreach collection="conditionParamRef.businessNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sectionName')">
<if test="conditionParamRef.sectionName != null and conditionParamRef.sectionName != ''">
${_conditionType_} a.section_name like #{${_conditionParam_}.sectionName}
</if>
<if test="conditionParamRef.sectionName == null">
${_conditionType_} a.section_name is null
</if>
</if>
<if test="conditionParamRef.containsKey('sectionNameList') and conditionParamRef.sectionNameList.size() > 0">
${_conditionType_} a.section_name in
<foreach collection="conditionParamRef.sectionNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sectionNameNotList') and conditionParamRef.sectionNameNotList.size() > 0">
${_conditionType_} a.section_name not in
<foreach collection="conditionParamRef.sectionNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hallName')">
<if test="conditionParamRef.hallName != null and conditionParamRef.hallName != ''">
${_conditionType_} a.hall_name like #{${_conditionParam_}.hallName}
</if>
<if test="conditionParamRef.hallName == null">
${_conditionType_} a.hall_name is null
</if>
</if>
<if test="conditionParamRef.containsKey('hallNameList') and conditionParamRef.hallNameList.size() > 0">
${_conditionType_} a.hall_name in
<foreach collection="conditionParamRef.hallNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hallNameNotList') and conditionParamRef.hallNameNotList.size() > 0">
${_conditionType_} a.hall_name not in
<foreach collection="conditionParamRef.hallNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('waitTime')">
<if test="conditionParamRef.waitTime != null ">
${_conditionType_} a.wait_time = #{${_conditionParam_}.waitTime}
</if>
<if test="conditionParamRef.waitTime == null">
${_conditionType_} a.wait_time is null
</if>
</if>
<if test="conditionParamRef.containsKey('waitTimeList') and conditionParamRef.waitTimeList.size() > 0">
${_conditionType_} a.wait_time in
<foreach collection="conditionParamRef.waitTimeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('waitTimeNotList') and conditionParamRef.waitTimeNotList.size() > 0">
${_conditionType_} a.wait_time not in
<foreach collection="conditionParamRef.waitTimeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('waitTimeStart') and conditionParamRef.waitTimeStart != null">
${_conditionType_} a.wait_time <![CDATA[ >= ]]> #{${_conditionParam_}.waitTimeStart}
</if>
<if test="conditionParamRef.containsKey('waitTimeEnd') and conditionParamRef.waitTimeEnd != null">
${_conditionType_} a.wait_time <![CDATA[ <= ]]> #{${_conditionParam_}.waitTimeEnd}
</if>
<if test="conditionParamRef.containsKey('windowFromnum')">
<if test="conditionParamRef.windowFromnum != null and conditionParamRef.windowFromnum != ''">
${_conditionType_} a.window_fromnum like #{${_conditionParam_}.windowFromnum}
</if>
<if test="conditionParamRef.windowFromnum == null">
${_conditionType_} a.window_fromnum is null
</if>
</if>
<if test="conditionParamRef.containsKey('windowFromnumList') and conditionParamRef.windowFromnumList.size() > 0">
${_conditionType_} a.window_fromnum in
<foreach collection="conditionParamRef.windowFromnumList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('windowFromnumNotList') and conditionParamRef.windowFromnumNotList.size() > 0">
${_conditionType_} a.window_fromnum not in
<foreach collection="conditionParamRef.windowFromnumNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('phCount')">
<if test="conditionParamRef.phCount != null ">
${_conditionType_} a.ph_count = #{${_conditionParam_}.phCount}
</if>
<if test="conditionParamRef.phCount == null">
${_conditionType_} a.ph_count is null
</if>
</if>
<if test="conditionParamRef.containsKey('phCountList') and conditionParamRef.phCountList.size() > 0">
${_conditionType_} a.ph_count in
<foreach collection="conditionParamRef.phCountList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('phCountNotList') and conditionParamRef.phCountNotList.size() > 0">
${_conditionType_} a.ph_count not in
<foreach collection="conditionParamRef.phCountNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('phCountStart') and conditionParamRef.phCountStart != null">
${_conditionType_} a.ph_count <![CDATA[ >= ]]> #{${_conditionParam_}.phCountStart}
</if>
<if test="conditionParamRef.containsKey('phCountEnd') and conditionParamRef.phCountEnd != null">
${_conditionType_} a.ph_count <![CDATA[ <= ]]> #{${_conditionParam_}.phCountEnd}
</if>
<if test="conditionParamRef.containsKey('year')">
<if test="conditionParamRef.year != null ">
${_conditionType_} a.year = #{${_conditionParam_}.year}
</if>
<if test="conditionParamRef.year == null">
${_conditionType_} a.year is null
</if>
</if>
<if test="conditionParamRef.containsKey('yearList') and conditionParamRef.yearList.size() > 0">
${_conditionType_} a.year in
<foreach collection="conditionParamRef.yearList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('yearNotList') and conditionParamRef.yearNotList.size() > 0">
${_conditionType_} a.year not in
<foreach collection="conditionParamRef.yearNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('yearStart') and conditionParamRef.yearStart != null">
${_conditionType_} a.year <![CDATA[ >= ]]> #{${_conditionParam_}.yearStart}
</if>
<if test="conditionParamRef.containsKey('yearEnd') and conditionParamRef.yearEnd != null">
${_conditionType_} a.year <![CDATA[ <= ]]> #{${_conditionParam_}.yearEnd}
</if>
<if test="conditionParamRef.containsKey('month')">
<if test="conditionParamRef.month != null ">
${_conditionType_} a.month = #{${_conditionParam_}.month}
</if>
<if test="conditionParamRef.month == null">
${_conditionType_} a.month is null
</if>
</if>
<if test="conditionParamRef.containsKey('monthList') and conditionParamRef.monthList.size() > 0">
${_conditionType_} a.month in
<foreach collection="conditionParamRef.monthList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('monthNotList') and conditionParamRef.monthNotList.size() > 0">
${_conditionType_} a.month not in
<foreach collection="conditionParamRef.monthNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('monthStart') and conditionParamRef.monthStart != null">
${_conditionType_} a.month <![CDATA[ >= ]]> #{${_conditionParam_}.monthStart}
</if>
<if test="conditionParamRef.containsKey('monthEnd') and conditionParamRef.monthEnd != null">
${_conditionType_} a.month <![CDATA[ <= ]]> #{${_conditionParam_}.monthEnd}
</if>
<if test="conditionParamRef.containsKey('day')">
<if test="conditionParamRef.day != null ">
${_conditionType_} a.day = #{${_conditionParam_}.day}
</if>
<if test="conditionParamRef.day == null">
${_conditionType_} a.day is null
</if>
</if>
<if test="conditionParamRef.containsKey('dayList') and conditionParamRef.dayList.size() > 0">
${_conditionType_} a.day in
<foreach collection="conditionParamRef.dayList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dayNotList') and conditionParamRef.dayNotList.size() > 0">
${_conditionType_} a.day not in
<foreach collection="conditionParamRef.dayNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dayStart') and conditionParamRef.dayStart != null">
${_conditionType_} a.day <![CDATA[ >= ]]> #{${_conditionParam_}.dayStart}
</if>
<if test="conditionParamRef.containsKey('dayEnd') and conditionParamRef.dayEnd != null">
${_conditionType_} a.day <![CDATA[ <= ]]> #{${_conditionParam_}.dayEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</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">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<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>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('waitTimeList') and conditionParamRef.waitTimeList.size() > 0">
field(a.waitTime,
<foreach collection="conditionParamRef.waitTimeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('phCountList') and conditionParamRef.phCountList.size() > 0">
field(a.phCount,
<foreach collection="conditionParamRef.phCountList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('yearList') and conditionParamRef.yearList.size() > 0">
field(a.year,
<foreach collection="conditionParamRef.yearList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('monthList') and conditionParamRef.monthList.size() > 0">
field(a.month,
<foreach collection="conditionParamRef.monthList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dayList') and conditionParamRef.dayList.size() > 0">
field(a.day,
<foreach collection="conditionParamRef.dayList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" 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}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('waitTimeList') and conditionParamRef.waitTimeList.size() > 0">
field(a.waitTime,
<foreach collection="conditionParamRef.waitTimeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('phCountList') and conditionParamRef.phCountList.size() > 0">
field(a.phCount,
<foreach collection="conditionParamRef.phCountList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('yearList') and conditionParamRef.yearList.size() > 0">
field(a.year,
<foreach collection="conditionParamRef.yearList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('monthList') and conditionParamRef.monthList.size() > 0">
field(a.month,
<foreach collection="conditionParamRef.monthList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dayList') and conditionParamRef.dayList.size() > 0">
field(a.day,
<foreach collection="conditionParamRef.dayList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteId')">
a.site_id
<if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteCode')">
a.site_code
<if test='orderCol.siteCode != null and "DESC".equalsIgnoreCase(orderCol.siteCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteName')">
a.site_name
<if test='orderCol.siteName != null and "DESC".equalsIgnoreCase(orderCol.siteName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('business')">
a.business
<if test='orderCol.business != null and "DESC".equalsIgnoreCase(orderCol.business)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sectionName')">
a.section_name
<if test='orderCol.sectionName != null and "DESC".equalsIgnoreCase(orderCol.sectionName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('hallName')">
a.hall_name
<if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('waitTime')">
a.wait_time
<if test='orderCol.waitTime != null and "DESC".equalsIgnoreCase(orderCol.waitTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('windowFromnum')">
a.window_fromnum
<if test='orderCol.windowFromnum != null and "DESC".equalsIgnoreCase(orderCol.windowFromnum)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('phCount')">
a.ph_count
<if test='orderCol.phCount != null and "DESC".equalsIgnoreCase(orderCol.phCount)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('year')">
a.year
<if test='orderCol.year != null and "DESC".equalsIgnoreCase(orderCol.year)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('month')">
a.month
<if test='orderCol.month != null and "DESC".equalsIgnoreCase(orderCol.month)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('day')">
a.day
<if test='orderCol.day != null and "DESC".equalsIgnoreCase(orderCol.day)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.pj.dao.ibatis.PjEvaluateStatDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="PjEvaluateStatEntity" id="PjEvaluateStatEntity-Map">
<id property="id" column="id" />
<result property="siteId" column="site_id" />
<result property="siteCode" column="site_code" />
<result property="siteName" column="site_name" />
<result property="sectionName" column="section_name" />
<result property="pjOption" column="pj_option" />
<result property="windowFromnum" column="window_fromnum" />
<result property="hallName" column="hall_name" />
<result property="pjCount" column="pj_count" />
<result property="year" column="year" />
<result property="month" column="month" />
<result property="day" column="day" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
a.site_id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteCode') or colPickMode == 1 and data.containsKey('siteCode')))">
a.site_code,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteName') or colPickMode == 1 and data.containsKey('siteName')))">
a.site_name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sectionName') or colPickMode == 1 and data.containsKey('sectionName')))">
a.section_name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjOption') or colPickMode == 1 and data.containsKey('pjOption')))">
a.pj_option,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowFromnum') or colPickMode == 1 and data.containsKey('windowFromnum')))">
a.window_fromnum,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))">
a.hall_name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjCount') or colPickMode == 1 and data.containsKey('pjCount')))">
a.pj_count,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('year') or colPickMode == 1 and data.containsKey('year')))">
a.year,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('month') or colPickMode == 1 and data.containsKey('month')))">
a.month,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('day') or colPickMode == 1 and data.containsKey('day')))">
a.day,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="PjEvaluateStatEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_pj_evaluate_stat
(site_id,site_code,site_name,section_name,pj_option,window_fromnum,hall_name,pj_count,year,month,day,createTime,updateUserId,updateTime)
VALUES
(#{siteId},#{siteCode},#{siteName},#{sectionName},#{pjOption},#{windowFromnum},#{hallName},#{pjCount},#{year},#{month},#{day},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_pj_evaluate_stat
(site_id,site_code,site_name,section_name,pj_option,window_fromnum,hall_name,pj_count,year,month,day,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteCode},#{item.siteName},#{item.sectionName},#{item.pjOption},#{item.windowFromnum},#{item.hallName},#{item.pjCount},#{item.year},#{item.month},#{item.day},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_pj_evaluate_stat as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
a.site_id=#{data.siteId},
</if>
<if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))">
a.site_id=ifnull(a.site_id,0) + #{data.siteIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('siteCode')) or (colPickMode==1 and !data.containsKey('siteCode'))">
a.site_code=#{data.siteCode},
</if>
<if test="(colPickMode==0 and data.containsKey('siteName')) or (colPickMode==1 and !data.containsKey('siteName'))">
a.site_name=#{data.siteName},
</if>
<if test="(colPickMode==0 and data.containsKey('sectionName')) or (colPickMode==1 and !data.containsKey('sectionName'))">
a.section_name=#{data.sectionName},
</if>
<if test="(colPickMode==0 and data.containsKey('pjOption')) or (colPickMode==1 and !data.containsKey('pjOption'))">
a.pj_option=#{data.pjOption},
</if>
<if test="(colPickMode==0 and data.containsKey('windowFromnum')) or (colPickMode==1 and !data.containsKey('windowFromnum'))">
a.window_fromnum=#{data.windowFromnum},
</if>
<if test="(colPickMode==0 and data.containsKey('hallName')) or (colPickMode==1 and !data.containsKey('hallName'))">
a.hall_name=#{data.hallName},
</if>
<if test="(colPickMode==0 and data.containsKey('pjCount')) or (colPickMode==1 and !data.containsKey('pjCount'))">
a.pj_count=#{data.pjCount},
</if>
<if test="(colPickMode==0 and data.containsKey('pjCountIncrement')) or (colPickMode==1 and !data.containsKey('pjCountIncrement'))">
a.pj_count=ifnull(a.pj_count,0) + #{data.pjCountIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('year')) or (colPickMode==1 and !data.containsKey('year'))">
a.year=#{data.year},
</if>
<if test="(colPickMode==0 and data.containsKey('yearIncrement')) or (colPickMode==1 and !data.containsKey('yearIncrement'))">
a.year=ifnull(a.year,0) + #{data.yearIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('month')) or (colPickMode==1 and !data.containsKey('month'))">
a.month=#{data.month},
</if>
<if test="(colPickMode==0 and data.containsKey('monthIncrement')) or (colPickMode==1 and !data.containsKey('monthIncrement'))">
a.month=ifnull(a.month,0) + #{data.monthIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('day')) or (colPickMode==1 and !data.containsKey('day'))">
a.day=#{data.day},
</if>
<if test="(colPickMode==0 and data.containsKey('dayIncrement')) or (colPickMode==1 and !data.containsKey('dayIncrement'))">
a.day=ifnull(a.day,0) + #{data.dayIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_pj_evaluate_stat as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="site_id=(case" suffix="ELSE site_id end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))">
when a.id=#{item.id} then #{item.siteId}
</when>
<when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))">
when a.id=#{item.id} then ifnull(a.site_id,0) + #{item.siteIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="site_code=(case" suffix="ELSE site_code end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteCode')) or (colPickMode==1 and !item.containsKey('siteCode'))">
when a.id=#{item.id} then #{item.siteCode}
</if>
</foreach>
</trim>
<trim prefix="site_name=(case" suffix="ELSE site_name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteName')) or (colPickMode==1 and !item.containsKey('siteName'))">
when a.id=#{item.id} then #{item.siteName}
</if>
</foreach>
</trim>
<trim prefix="section_name=(case" suffix="ELSE section_name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('sectionName')) or (colPickMode==1 and !item.containsKey('sectionName'))">
when a.id=#{item.id} then #{item.sectionName}
</if>
</foreach>
</trim>
<trim prefix="pj_option=(case" suffix="ELSE pj_option end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('pjOption')) or (colPickMode==1 and !item.containsKey('pjOption'))">
when a.id=#{item.id} then #{item.pjOption}
</if>
</foreach>
</trim>
<trim prefix="window_fromnum=(case" suffix="ELSE window_fromnum end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('windowFromnum')) or (colPickMode==1 and !item.containsKey('windowFromnum'))">
when a.id=#{item.id} then #{item.windowFromnum}
</if>
</foreach>
</trim>
<trim prefix="hall_name=(case" suffix="ELSE hall_name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('hallName')) or (colPickMode==1 and !item.containsKey('hallName'))">
when a.id=#{item.id} then #{item.hallName}
</if>
</foreach>
</trim>
<trim prefix="pj_count=(case" suffix="ELSE pj_count end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('pjCount')) or (colPickMode==1 and !item.containsKey('pjCount'))">
when a.id=#{item.id} then #{item.pjCount}
</when>
<when test="(colPickMode==0 and item.containsKey('pjCountIncrement')) or (colPickMode==1 and !item.containsKey('pjCountIncrement'))">
when a.id=#{item.id} then ifnull(a.pj_count,0) + #{item.pjCountIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="year=(case" suffix="ELSE year end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('year')) or (colPickMode==1 and !item.containsKey('year'))">
when a.id=#{item.id} then #{item.year}
</when>
<when test="(colPickMode==0 and item.containsKey('yearIncrement')) or (colPickMode==1 and !item.containsKey('yearIncrement'))">
when a.id=#{item.id} then ifnull(a.year,0) + #{item.yearIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="month=(case" suffix="ELSE month end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('month')) or (colPickMode==1 and !item.containsKey('month'))">
when a.id=#{item.id} then #{item.month}
</when>
<when test="(colPickMode==0 and item.containsKey('monthIncrement')) or (colPickMode==1 and !item.containsKey('monthIncrement'))">
when a.id=#{item.id} then ifnull(a.month,0) + #{item.monthIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="day=(case" suffix="ELSE day end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('day')) or (colPickMode==1 and !item.containsKey('day'))">
when a.id=#{item.id} then #{item.day}
</when>
<when test="(colPickMode==0 and item.containsKey('dayIncrement')) or (colPickMode==1 and !item.containsKey('dayIncrement'))">
when a.id=#{item.id} then ifnull(a.day,0) + #{item.dayIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="PjEvaluateStatEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_pj_evaluate_stat as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_pj_evaluate_stat as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_pj_evaluate_stat where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_pj_evaluate_stat where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_pj_evaluate_stat where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_pj_evaluate_stat as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="PjEvaluateStatEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_pj_evaluate_stat as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_pj_evaluate_stat as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</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">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null ">
${_conditionType_} a.site_id = #{${_conditionParam_}.siteId}
</if>
<if test="conditionParamRef.siteId == null">
${_conditionType_} a.site_id is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.site_id in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.site_id 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">
${_conditionType_} a.site_id <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if>
<if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null">
${_conditionType_} a.site_id <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd}
</if>
<if test="conditionParamRef.containsKey('siteCode')">
<if test="conditionParamRef.siteCode != null and conditionParamRef.siteCode != ''">
${_conditionType_} a.site_code like #{${_conditionParam_}.siteCode}
</if>
<if test="conditionParamRef.siteCode == null">
${_conditionType_} a.site_code is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteCodeList') and conditionParamRef.siteCodeList.size() > 0">
${_conditionType_} a.site_code in
<foreach collection="conditionParamRef.siteCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteCodeNotList') and conditionParamRef.siteCodeNotList.size() > 0">
${_conditionType_} a.site_code not in
<foreach collection="conditionParamRef.siteCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteName')">
<if test="conditionParamRef.siteName != null and conditionParamRef.siteName != ''">
${_conditionType_} a.site_name like #{${_conditionParam_}.siteName}
</if>
<if test="conditionParamRef.siteName == null">
${_conditionType_} a.site_name is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteNameList') and conditionParamRef.siteNameList.size() > 0">
${_conditionType_} a.site_name in
<foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteNameNotList') and conditionParamRef.siteNameNotList.size() > 0">
${_conditionType_} a.site_name not in
<foreach collection="conditionParamRef.siteNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sectionName')">
<if test="conditionParamRef.sectionName != null and conditionParamRef.sectionName != ''">
${_conditionType_} a.section_name like #{${_conditionParam_}.sectionName}
</if>
<if test="conditionParamRef.sectionName == null">
${_conditionType_} a.section_name is null
</if>
</if>
<if test="conditionParamRef.containsKey('sectionNameList') and conditionParamRef.sectionNameList.size() > 0">
${_conditionType_} a.section_name in
<foreach collection="conditionParamRef.sectionNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sectionNameNotList') and conditionParamRef.sectionNameNotList.size() > 0">
${_conditionType_} a.section_name not in
<foreach collection="conditionParamRef.sectionNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pjOption')">
<if test="conditionParamRef.pjOption != null and conditionParamRef.pjOption != ''">
${_conditionType_} a.pj_option like #{${_conditionParam_}.pjOption}
</if>
<if test="conditionParamRef.pjOption == null">
${_conditionType_} a.pj_option is null
</if>
</if>
<if test="conditionParamRef.containsKey('pjOptionList') and conditionParamRef.pjOptionList.size() > 0">
${_conditionType_} a.pj_option in
<foreach collection="conditionParamRef.pjOptionList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pjOptionNotList') and conditionParamRef.pjOptionNotList.size() > 0">
${_conditionType_} a.pj_option not in
<foreach collection="conditionParamRef.pjOptionNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('windowFromnum')">
<if test="conditionParamRef.windowFromnum != null and conditionParamRef.windowFromnum != ''">
${_conditionType_} a.window_fromnum like #{${_conditionParam_}.windowFromnum}
</if>
<if test="conditionParamRef.windowFromnum == null">
${_conditionType_} a.window_fromnum is null
</if>
</if>
<if test="conditionParamRef.containsKey('windowFromnumList') and conditionParamRef.windowFromnumList.size() > 0">
${_conditionType_} a.window_fromnum in
<foreach collection="conditionParamRef.windowFromnumList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('windowFromnumNotList') and conditionParamRef.windowFromnumNotList.size() > 0">
${_conditionType_} a.window_fromnum not in
<foreach collection="conditionParamRef.windowFromnumNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hallName')">
<if test="conditionParamRef.hallName != null and conditionParamRef.hallName != ''">
${_conditionType_} a.hall_name like #{${_conditionParam_}.hallName}
</if>
<if test="conditionParamRef.hallName == null">
${_conditionType_} a.hall_name is null
</if>
</if>
<if test="conditionParamRef.containsKey('hallNameList') and conditionParamRef.hallNameList.size() > 0">
${_conditionType_} a.hall_name in
<foreach collection="conditionParamRef.hallNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hallNameNotList') and conditionParamRef.hallNameNotList.size() > 0">
${_conditionType_} a.hall_name not in
<foreach collection="conditionParamRef.hallNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pjCount')">
<if test="conditionParamRef.pjCount != null ">
${_conditionType_} a.pj_count = #{${_conditionParam_}.pjCount}
</if>
<if test="conditionParamRef.pjCount == null">
${_conditionType_} a.pj_count is null
</if>
</if>
<if test="conditionParamRef.containsKey('pjCountList') and conditionParamRef.pjCountList.size() > 0">
${_conditionType_} a.pj_count in
<foreach collection="conditionParamRef.pjCountList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pjCountNotList') and conditionParamRef.pjCountNotList.size() > 0">
${_conditionType_} a.pj_count not in
<foreach collection="conditionParamRef.pjCountNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('pjCountStart') and conditionParamRef.pjCountStart != null">
${_conditionType_} a.pj_count <![CDATA[ >= ]]> #{${_conditionParam_}.pjCountStart}
</if>
<if test="conditionParamRef.containsKey('pjCountEnd') and conditionParamRef.pjCountEnd != null">
${_conditionType_} a.pj_count <![CDATA[ <= ]]> #{${_conditionParam_}.pjCountEnd}
</if>
<if test="conditionParamRef.containsKey('year')">
<if test="conditionParamRef.year != null ">
${_conditionType_} a.year = #{${_conditionParam_}.year}
</if>
<if test="conditionParamRef.year == null">
${_conditionType_} a.year is null
</if>
</if>
<if test="conditionParamRef.containsKey('yearList') and conditionParamRef.yearList.size() > 0">
${_conditionType_} a.year in
<foreach collection="conditionParamRef.yearList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('yearNotList') and conditionParamRef.yearNotList.size() > 0">
${_conditionType_} a.year not in
<foreach collection="conditionParamRef.yearNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('yearStart') and conditionParamRef.yearStart != null">
${_conditionType_} a.year <![CDATA[ >= ]]> #{${_conditionParam_}.yearStart}
</if>
<if test="conditionParamRef.containsKey('yearEnd') and conditionParamRef.yearEnd != null">
${_conditionType_} a.year <![CDATA[ <= ]]> #{${_conditionParam_}.yearEnd}
</if>
<if test="conditionParamRef.containsKey('month')">
<if test="conditionParamRef.month != null ">
${_conditionType_} a.month = #{${_conditionParam_}.month}
</if>
<if test="conditionParamRef.month == null">
${_conditionType_} a.month is null
</if>
</if>
<if test="conditionParamRef.containsKey('monthList') and conditionParamRef.monthList.size() > 0">
${_conditionType_} a.month in
<foreach collection="conditionParamRef.monthList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('monthNotList') and conditionParamRef.monthNotList.size() > 0">
${_conditionType_} a.month not in
<foreach collection="conditionParamRef.monthNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('monthStart') and conditionParamRef.monthStart != null">
${_conditionType_} a.month <![CDATA[ >= ]]> #{${_conditionParam_}.monthStart}
</if>
<if test="conditionParamRef.containsKey('monthEnd') and conditionParamRef.monthEnd != null">
${_conditionType_} a.month <![CDATA[ <= ]]> #{${_conditionParam_}.monthEnd}
</if>
<if test="conditionParamRef.containsKey('day')">
<if test="conditionParamRef.day != null ">
${_conditionType_} a.day = #{${_conditionParam_}.day}
</if>
<if test="conditionParamRef.day == null">
${_conditionType_} a.day is null
</if>
</if>
<if test="conditionParamRef.containsKey('dayList') and conditionParamRef.dayList.size() > 0">
${_conditionType_} a.day in
<foreach collection="conditionParamRef.dayList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dayNotList') and conditionParamRef.dayNotList.size() > 0">
${_conditionType_} a.day not in
<foreach collection="conditionParamRef.dayNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dayStart') and conditionParamRef.dayStart != null">
${_conditionType_} a.day <![CDATA[ >= ]]> #{${_conditionParam_}.dayStart}
</if>
<if test="conditionParamRef.containsKey('dayEnd') and conditionParamRef.dayEnd != null">
${_conditionType_} a.day <![CDATA[ <= ]]> #{${_conditionParam_}.dayEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</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">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<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>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('pjCountList') and conditionParamRef.pjCountList.size() > 0">
field(a.pjCount,
<foreach collection="conditionParamRef.pjCountList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('yearList') and conditionParamRef.yearList.size() > 0">
field(a.year,
<foreach collection="conditionParamRef.yearList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('monthList') and conditionParamRef.monthList.size() > 0">
field(a.month,
<foreach collection="conditionParamRef.monthList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dayList') and conditionParamRef.dayList.size() > 0">
field(a.day,
<foreach collection="conditionParamRef.dayList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" 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}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('pjCountList') and conditionParamRef.pjCountList.size() > 0">
field(a.pjCount,
<foreach collection="conditionParamRef.pjCountList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('yearList') and conditionParamRef.yearList.size() > 0">
field(a.year,
<foreach collection="conditionParamRef.yearList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('monthList') and conditionParamRef.monthList.size() > 0">
field(a.month,
<foreach collection="conditionParamRef.monthList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dayList') and conditionParamRef.dayList.size() > 0">
field(a.day,
<foreach collection="conditionParamRef.dayList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteId')">
a.site_id
<if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteCode')">
a.site_code
<if test='orderCol.siteCode != null and "DESC".equalsIgnoreCase(orderCol.siteCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteName')">
a.site_name
<if test='orderCol.siteName != null and "DESC".equalsIgnoreCase(orderCol.siteName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sectionName')">
a.section_name
<if test='orderCol.sectionName != null and "DESC".equalsIgnoreCase(orderCol.sectionName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('pjOption')">
a.pj_option
<if test='orderCol.pjOption != null and "DESC".equalsIgnoreCase(orderCol.pjOption)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('windowFromnum')">
a.window_fromnum
<if test='orderCol.windowFromnum != null and "DESC".equalsIgnoreCase(orderCol.windowFromnum)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('hallName')">
a.hall_name
<if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('pjCount')">
a.pj_count
<if test='orderCol.pjCount != null and "DESC".equalsIgnoreCase(orderCol.pjCount)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('year')">
a.year
<if test='orderCol.year != null and "DESC".equalsIgnoreCase(orderCol.year)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('month')">
a.month
<if test='orderCol.month != null and "DESC".equalsIgnoreCase(orderCol.month)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('day')">
a.day
<if test='orderCol.day != null and "DESC".equalsIgnoreCase(orderCol.day)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###排队叫号汇总统计列表
POST {{baseUrl}}/ph/queue/stat/list
Content-Type: application/json
{
"page":1,
"size":10
}
###排队叫号汇总统计更新与保存
POST {{baseUrl}}/ph/queue/stat/save
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":0,
"siteCode":"k0qhHd",
"siteName":"JkrTyE",
"business":"oghueH",
"sectionName":"TZvj9b",
"windowFromnum":"D2bJnu",
"pjCount":448,
"year":544,
"month":191,
"day":82,
}
> {%
client.global.set("PhQueueStat_id", JSON.parse(response.body).data.id);
%}
###排队叫号汇总统计查看
GET {{baseUrl}}/ph/queue/stat/info?id={{PhQueueStat_id}}
Accept: application/json
###排队叫号汇总统计编辑
GET {{baseUrl}}/ph/queue/stat/edit?id={{PhQueueStat_id}}
Accept: application/json
###排队叫号汇总统计删除
GET {{baseUrl}}/ph/queue/stat/delete?id={{PhQueueStat_id}}
Authorization: {{authToken}}
Accept: application/json
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###评价汇总统计列表
POST {{baseUrl}}/pj/evaluate/stat/list
Content-Type: application/json
{
"page":1,
"size":10
}
###评价汇总统计更新与保存
POST {{baseUrl}}/pj/evaluate/stat/save
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":0,
"siteCode":"Q8lhs4",
"siteName":"vxsdQP",
"sectionName":"PMhvwe",
"pjOption":"eeSBbZ",
"windowFromnum":"t4cnTV",
"pjCount":657,
"year":545,
"month":368,
"day":323,
}
> {%
client.global.set("PjEvaluateStat_id", JSON.parse(response.body).data.id);
%}
###评价汇总统计查看
GET {{baseUrl}}/pj/evaluate/stat/info?id={{PjEvaluateStat_id}}
Accept: application/json
###评价汇总统计编辑
GET {{baseUrl}}/pj/evaluate/stat/edit?id={{PjEvaluateStat_id}}
Accept: application/json
###评价汇总统计删除
GET {{baseUrl}}/pj/evaluate/stat/delete?id={{PjEvaluateStat_id}}
Authorization: {{authToken}}
Accept: application/json
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