25 changed files with 1528 additions and 4 deletions
@ -0,0 +1,127 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.plugins; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 工作日志资源字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Data |
|||
public class ScreenCustomerWorkRecordDictDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键(客户每次上传,直接根据customerId全删全增) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 数据更新至日期eg:20200101 |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 资源id |
|||
*/ |
|||
private String dictId; |
|||
|
|||
/** |
|||
* 父资源ID;如果是一级分类pid=0 |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 资源类型 |
|||
*/ |
|||
private String resourceType; |
|||
|
|||
/** |
|||
* 资源编码 |
|||
*/ |
|||
private String resourceCode; |
|||
|
|||
/** |
|||
* 资源标签名 |
|||
*/ |
|||
private String resourceLabel; |
|||
|
|||
/** |
|||
* 显示标识:0否,1是 |
|||
*/ |
|||
private String showFlag; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中 |
|||
*/ |
|||
private String dataType; |
|||
|
|||
/** |
|||
* 当前资源属于几级,例如:1、2、3、4.... |
|||
*/ |
|||
private Integer level; |
|||
|
|||
/** |
|||
* 逻辑删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.plugins; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 工作日志-组织按日统计(累计值) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Data |
|||
public class ScreenWorkRecordOrgDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 日期Id:yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 组织Idor网格id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 会议类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String meetingCode; |
|||
|
|||
/** |
|||
* 随手记类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String typeCode; |
|||
|
|||
/** |
|||
* 组织次数 |
|||
*/ |
|||
private Integer organizeTotal; |
|||
|
|||
/** |
|||
* 参与人数 |
|||
*/ |
|||
private Integer participateUserTotal; |
|||
|
|||
/** |
|||
* 平均参与人数 |
|||
*/ |
|||
private Integer avgParticipateUserTotal; |
|||
|
|||
/** |
|||
* 删除标识 0未删除;1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.plugins; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 工作日志-组织按月统计(增量) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Data |
|||
public class ScreenWorkRecordOrgMonthlyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 月份Id:yyyyMM |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 组织Idor网格id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 会议类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String meetingCode; |
|||
|
|||
/** |
|||
* 随手记类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String typeCode; |
|||
|
|||
/** |
|||
* 组织次数 |
|||
*/ |
|||
private Integer organizeTotal; |
|||
|
|||
/** |
|||
* 参与人数 |
|||
*/ |
|||
private Integer participateUserTotal; |
|||
|
|||
/** |
|||
* 平均参与人数 |
|||
*/ |
|||
private Integer avgParticipateUserTotal; |
|||
|
|||
/** |
|||
* 删除标识 0未删除;1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.epmet.plugins.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 5、【工作日志】本机及下级排名 通用入参 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/2/23 23:08 |
|||
*/ |
|||
@Data |
|||
public class WorkRecordRankFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2934835714413031036L; |
|||
/** |
|||
* party:支部建设; union:联建共建;党员志愿服务:voluntaryservice |
|||
*/ |
|||
@NotBlank(message = "dataType不能为空;可选值:party:支部建设; union:联建共建;党员志愿服务:voluntaryservice") |
|||
private String dataType; |
|||
|
|||
/** |
|||
* 当前组织id |
|||
*/ |
|||
@NotBlank(message = "agencyId不能为空") |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 默认显示前3 |
|||
*/ |
|||
@NotNull(message = "topRow不能为空") |
|||
private Integer topRow; |
|||
|
|||
@NotBlank(message = "customerId不能为空") |
|||
private String customerId; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.plugins.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 5、【工作日志】本机及下级排名 返参 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/2/23 23:11 |
|||
*/ |
|||
@Data |
|||
public class WorkRecordRankResultDTO implements Serializable { |
|||
/** |
|||
* 总参与人数 |
|||
*/ |
|||
private Integer participateUserTotal; |
|||
|
|||
/** |
|||
*组织次数 |
|||
*/ |
|||
private Integer participateTotal; |
|||
|
|||
/** |
|||
*下级排行列表 |
|||
*/ |
|||
private List<WorkRecordSubRank> subRankList; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.plugins.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 下级排行列表 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/2/23 23:21 |
|||
*/ |
|||
@Data |
|||
public class WorkRecordSubRank implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2450978606865910110L; |
|||
|
|||
private String orgId; |
|||
|
|||
/** |
|||
* 组织名称或者是网格名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 总参与人数 |
|||
*/ |
|||
private Integer participateUserTotal; |
|||
|
|||
/** |
|||
* 组织次数 |
|||
*/ |
|||
private Integer participateTotal; |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.plugins; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 工作日志资源字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenCustomerWorkRecordDictDao extends BaseDao<ScreenCustomerWorkRecordDictEntity> { |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.plugins; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; |
|||
import com.epmet.plugins.result.WorkRecordSubRank; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 工作日志-组织按日统计(累计值) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenWorkRecordOrgDailyDao extends BaseDao<ScreenWorkRecordOrgDailyEntity> { |
|||
/** |
|||
* @param areaCode 当前组织对应的areaCode; |
|||
* @param dataType |
|||
* @param topRow |
|||
* @return com.epmet.plugins.result.WorkRecordRankResultDTO |
|||
* @author yinzuomei |
|||
* @description 5、【工作日志】本机及下级排名 |
|||
* @Date 2021/2/23 23:37 |
|||
**/ |
|||
List<WorkRecordSubRank> selectSubList(@Param("areaCode") String areaCode, |
|||
@Param("dataType") String dataType, |
|||
@Param("topRow") Integer topRow, |
|||
@Param("dateId")String dateId); |
|||
|
|||
String selectLatestDateId(String customerId); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.plugins; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 工作日志-组织按月统计(增量) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenWorkRecordOrgMonthlyDao extends BaseDao<ScreenWorkRecordOrgMonthlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,93 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.entity.plugins; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 工作日志资源字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("screen_customer_work_record_dict") |
|||
public class ScreenCustomerWorkRecordDictEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 数据更新至日期eg:20200101 |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 资源id |
|||
*/ |
|||
private String dictId; |
|||
|
|||
/** |
|||
* 父资源ID;如果是一级分类pid=0 |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 资源类型 |
|||
*/ |
|||
private String resourceType; |
|||
|
|||
/** |
|||
* 资源编码 |
|||
*/ |
|||
private String resourceCode; |
|||
|
|||
/** |
|||
* 资源标签名 |
|||
*/ |
|||
private String resourceLabel; |
|||
|
|||
/** |
|||
* 显示标识:0否,1是 |
|||
*/ |
|||
private String showFlag; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice;所有的一级分类需要对应到这三个key中 |
|||
*/ |
|||
private String dataType; |
|||
|
|||
/** |
|||
* 当前资源属于几级,例如:1、2、3、4.... |
|||
*/ |
|||
private Integer level; |
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.entity.plugins; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 工作日志-组织按日统计(累计值) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("screen_work_record_org_daily") |
|||
public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 日期Id:yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 组织Idor网格id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 会议类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String meetingCode; |
|||
|
|||
/** |
|||
* 随手记类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String typeCode; |
|||
|
|||
/** |
|||
* 组织次数 |
|||
*/ |
|||
private Integer organizeTotal; |
|||
|
|||
/** |
|||
* 参与人数 |
|||
*/ |
|||
private Integer participateUserTotal; |
|||
|
|||
/** |
|||
* 平均参与人数 |
|||
*/ |
|||
private Integer avgParticipateUserTotal; |
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.entity.plugins; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 工作日志-组织按月统计(增量) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("screen_work_record_org_monthly") |
|||
public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 月份Id:yyyyMM |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 组织Idor网格id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 会议类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String meetingCode; |
|||
|
|||
/** |
|||
* 随手记类型编码;对应screen_customer_work_record_dict的资源编码 |
|||
*/ |
|||
private String typeCode; |
|||
|
|||
/** |
|||
* 组织次数 |
|||
*/ |
|||
private Integer organizeTotal; |
|||
|
|||
/** |
|||
* 参与人数 |
|||
*/ |
|||
private Integer participateUserTotal; |
|||
|
|||
/** |
|||
* 平均参与人数 |
|||
*/ |
|||
private Integer avgParticipateUserTotal; |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.service.plugins; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; |
|||
import com.epmet.plugins.ScreenCustomerWorkRecordDictDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 工作日志资源字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
public interface ScreenCustomerWorkRecordDictService extends BaseService<ScreenCustomerWorkRecordDictEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ScreenCustomerWorkRecordDictDTO> |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
PageData<ScreenCustomerWorkRecordDictDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ScreenCustomerWorkRecordDictDTO> |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
List<ScreenCustomerWorkRecordDictDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ScreenCustomerWorkRecordDictDTO |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
ScreenCustomerWorkRecordDictDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void save(ScreenCustomerWorkRecordDictDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void update(ScreenCustomerWorkRecordDictDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,99 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.service.plugins; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; |
|||
import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO; |
|||
import com.epmet.plugins.form.WorkRecordRankFormDTO; |
|||
import com.epmet.plugins.result.WorkRecordRankResultDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 工作日志-组织按日统计(累计值) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
public interface ScreenWorkRecordOrgDailyService extends BaseService<ScreenWorkRecordOrgDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ScreenWorkRecordOrgDailyDTO> |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
PageData<ScreenWorkRecordOrgDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ScreenWorkRecordOrgDailyDTO> |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
List<ScreenWorkRecordOrgDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ScreenWorkRecordOrgDailyDTO |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
ScreenWorkRecordOrgDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void save(ScreenWorkRecordOrgDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void update(ScreenWorkRecordOrgDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO); |
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
package com.epmet.datareport.service.plugins; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; |
|||
import com.epmet.plugins.ScreenWorkRecordOrgMonthlyDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 工作日志-组织按月统计(增量) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
public interface ScreenWorkRecordOrgMonthlyService extends BaseService<ScreenWorkRecordOrgMonthlyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ScreenWorkRecordOrgMonthlyDTO> |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
PageData<ScreenWorkRecordOrgMonthlyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ScreenWorkRecordOrgMonthlyDTO> |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
List<ScreenWorkRecordOrgMonthlyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ScreenWorkRecordOrgMonthlyDTO |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
ScreenWorkRecordOrgMonthlyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void save(ScreenWorkRecordOrgMonthlyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void update(ScreenWorkRecordOrgMonthlyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-02-23 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.service.plugins.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao; |
|||
import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; |
|||
import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService; |
|||
import com.epmet.plugins.ScreenCustomerWorkRecordDictDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 工作日志资源字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl<ScreenCustomerWorkRecordDictDao, ScreenCustomerWorkRecordDictEntity> implements ScreenCustomerWorkRecordDictService { |
|||
|
|||
@Override |
|||
public PageData<ScreenCustomerWorkRecordDictDTO> page(Map<String, Object> params) { |
|||
IPage<ScreenCustomerWorkRecordDictEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ScreenCustomerWorkRecordDictDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ScreenCustomerWorkRecordDictDTO> list(Map<String, Object> params) { |
|||
List<ScreenCustomerWorkRecordDictEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ScreenCustomerWorkRecordDictDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ScreenCustomerWorkRecordDictEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ScreenCustomerWorkRecordDictEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ScreenCustomerWorkRecordDictDTO get(String id) { |
|||
ScreenCustomerWorkRecordDictEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ScreenCustomerWorkRecordDictDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ScreenCustomerWorkRecordDictDTO dto) { |
|||
ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ScreenCustomerWorkRecordDictDTO dto) { |
|||
ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,122 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.service.plugins.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgDailyDao; |
|||
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; |
|||
import com.epmet.datareport.service.evaluationindex.screen.AgencyService; |
|||
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService; |
|||
import com.epmet.dto.result.ScreenCustomerAgencyDTO; |
|||
import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO; |
|||
import com.epmet.plugins.form.WorkRecordRankFormDTO; |
|||
import com.epmet.plugins.result.WorkRecordRankResultDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 工作日志-组织按日统计(累计值) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgDailyDao, ScreenWorkRecordOrgDailyEntity> implements ScreenWorkRecordOrgDailyService { |
|||
@Autowired |
|||
private AgencyService agencyService; |
|||
|
|||
@Override |
|||
public PageData<ScreenWorkRecordOrgDailyDTO> page(Map<String, Object> params) { |
|||
IPage<ScreenWorkRecordOrgDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ScreenWorkRecordOrgDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ScreenWorkRecordOrgDailyDTO> list(Map<String, Object> params) { |
|||
List<ScreenWorkRecordOrgDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ScreenWorkRecordOrgDailyEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ScreenWorkRecordOrgDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ScreenWorkRecordOrgDailyDTO get(String id) { |
|||
ScreenWorkRecordOrgDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ScreenWorkRecordOrgDailyDTO dto) { |
|||
ScreenWorkRecordOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ScreenWorkRecordOrgDailyDTO dto) { |
|||
ScreenWorkRecordOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO) { |
|||
ScreenCustomerAgencyDTO agencyDTO=agencyService.queryAgencyInfo(formDTO.getAgencyId()); |
|||
if(null==agencyDTO){ |
|||
throw new RenException(String.format("获取组织信息异常,agencyId:%s",formDTO.getAgencyId())); |
|||
} |
|||
WorkRecordRankResultDTO resultDTO=new WorkRecordRankResultDTO(); |
|||
String dateId=baseDao.selectLatestDateId(formDTO.getCustomerId()); |
|||
resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(),formDTO.getDataType(),formDTO.getTopRow(),dateId)); |
|||
//todo 待完善
|
|||
return resultDTO; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.service.plugins.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao; |
|||
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; |
|||
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgMonthlyService; |
|||
import com.epmet.plugins.ScreenWorkRecordOrgMonthlyDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 工作日志-组织按月统计(增量) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-02-23 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgMonthlyDao, ScreenWorkRecordOrgMonthlyEntity> implements ScreenWorkRecordOrgMonthlyService { |
|||
|
|||
@Override |
|||
public PageData<ScreenWorkRecordOrgMonthlyDTO> page(Map<String, Object> params) { |
|||
IPage<ScreenWorkRecordOrgMonthlyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ScreenWorkRecordOrgMonthlyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ScreenWorkRecordOrgMonthlyDTO> list(Map<String, Object> params) { |
|||
List<ScreenWorkRecordOrgMonthlyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgMonthlyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ScreenWorkRecordOrgMonthlyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ScreenWorkRecordOrgMonthlyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ScreenWorkRecordOrgMonthlyDTO get(String id) { |
|||
ScreenWorkRecordOrgMonthlyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgMonthlyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ScreenWorkRecordOrgMonthlyDTO dto) { |
|||
ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ScreenWorkRecordOrgMonthlyDTO dto) { |
|||
ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao"> |
|||
|
|||
<resultMap type="com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity" id="screenCustomerWorkRecordDictMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="dictId" column="DICT_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="resourceType" column="RESOURCE_TYPE"/> |
|||
<result property="resourceCode" column="RESOURCE_CODE"/> |
|||
<result property="resourceLabel" column="RESOURCE_LABEL"/> |
|||
<result property="showFlag" column="SHOW_FLAG"/> |
|||
<result property="sort" column="SORT"/> |
|||
<result property="dataType" column="DATA_TYPE"/> |
|||
<result property="level" column="LEVEL"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,32 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgDailyDao"> |
|||
|
|||
<select id="selectLatestDateId" resultType="java.lang.String" parameterType="java.lang.String"> |
|||
SELECT |
|||
max( m.DATE_ID ) AS maxDateId |
|||
FROM |
|||
screen_work_record_org_daily m |
|||
WHERE |
|||
m.DEL_FLAG = '0' |
|||
AND m.CUSTOMER_ID = #{customerId} |
|||
</select> |
|||
<select id="selectSubList" parameterType="map" resultType="com.epmet.plugins.result.WorkRecordSubRank"> |
|||
SELECT |
|||
sca.AGENCY_ID as orgId, |
|||
sca.AGENCY_NAME as `NAME`, |
|||
IFNULL(sum(m.PARTICIPATE_USER_TOTAL),0) as participateUserTotal, |
|||
IFNULL(sum(m.ORGANIZE_TOTAL) ,0)as participateTotal |
|||
FROM |
|||
screen_customer_agency sca |
|||
LEFT JOIN screen_work_record_org_daily m ON ( sca.AGENCY_ID = m.ORG_ID AND m.DEL_FLAG = '0' and m.DATE_ID=#{dateId}) |
|||
left join screen_customer_work_record_dict dict on(m.TYPE_CODE=dict.RESOURCE_CODE and dict.DEL_FLAG='0') |
|||
WHERE |
|||
sca.DEL_FLAG = '0' |
|||
AND sca.PARENT_AREA_CODE = #{areaCode} |
|||
and dict.DATA_TYPE=#{dataType} |
|||
group by sca.AGENCY_ID,sca.AGENCY_NAME |
|||
order by participateUserTotal desc,participateTotal desc limit #{topRow} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue