forked from luyan/epmet-cloud-lingshan
				
			
				 14 changed files with 913 additions and 0 deletions
			
			
		| @ -0,0 +1,117 @@ | |||
| /** | |||
|  * 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.dto.indexcal; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| import java.math.BigDecimal; | |||
| 
 | |||
| /** | |||
|  * 区/街道相关分数表  | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| @Data | |||
| public class AgencyScoreDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * ID 主键 | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 客户Id | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 组织id(eg:社区或者街道id) | |||
|      */ | |||
| 	private String agencyId; | |||
| 
 | |||
|     /** | |||
|      * 上级组织id | |||
|      */ | |||
| 	private String parentAgencyId; | |||
| 
 | |||
|     /** | |||
|      * 年度ID: yyyy | |||
|      */ | |||
| 	private String yearId; | |||
| 
 | |||
|     /** | |||
|      * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 | |||
|      */ | |||
| 	private String quarterId; | |||
| 
 | |||
|     /** | |||
|      * 月维度Id: yyyyMM | |||
|      */ | |||
| 	private String monthId; | |||
| 
 | |||
|     /** | |||
|      * 1:总分;0不是;默认0 | |||
|      */ | |||
| 	private String isTotal; | |||
| 
 | |||
|     /** | |||
|      * 分值 | |||
|      */ | |||
| 	private BigDecimal score; | |||
| 
 | |||
|     /** | |||
|      * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan | |||
|      */ | |||
| 	private String indexCode; | |||
| 
 | |||
|     /** | |||
|      *  | |||
|      */ | |||
| 	private Integer 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.dto.indexcal; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| import java.math.BigDecimal; | |||
| 
 | |||
| /** | |||
|  * 区直部门分值表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| @Data | |||
| public class DeptScoreDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * ID 主键 | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 客户Id | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 部门id | |||
|      */ | |||
| 	private String deptId; | |||
| 
 | |||
|     /** | |||
|      * 所有上级ID,用英文逗号分开 | |||
|      */ | |||
| 	private String allParentIds; | |||
| 
 | |||
|     /** | |||
|      * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 | |||
|      */ | |||
| 	private String quarterId; | |||
| 
 | |||
|     /** | |||
|      * 年度ID: yyyy | |||
|      */ | |||
| 	private String yearId; | |||
| 
 | |||
|     /** | |||
|      * 月维度Id: yyyyMM | |||
|      */ | |||
| 	private String monthId; | |||
| 
 | |||
|     /** | |||
|      * 1:总分;0不是;默认0 | |||
|      */ | |||
| 	private String isTotal; | |||
| 
 | |||
|     /** | |||
|      * 分值 | |||
|      */ | |||
| 	private BigDecimal score; | |||
| 
 | |||
|     /** | |||
|      * 治理能力:zhilinengli; | |||
|      */ | |||
| 	private String indexCode; | |||
| 
 | |||
|     /** | |||
|      * 乐观锁 | |||
|      */ | |||
| 	private Integer revision; | |||
| 
 | |||
|     /** | |||
|      * 创建人 | |||
|      */ | |||
| 	private String createdBy; | |||
| 
 | |||
|     /** | |||
|      * 创建时间 | |||
|      */ | |||
| 	private Date createdTime; | |||
| 
 | |||
|     /** | |||
|      * 更新人 | |||
|      */ | |||
| 	private String updatedBy; | |||
| 
 | |||
|     /** | |||
|      * 更新时间 | |||
|      */ | |||
| 	private Date updatedTime; | |||
| 
 | |||
| } | |||
| @ -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.dao.indexcoll; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.entity.indexcoll.AgencyScoreEntity; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| 
 | |||
| /** | |||
|  * 区/街道相关分数表  | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| @Mapper | |||
| public interface AgencyScoreDao extends BaseDao<AgencyScoreEntity> { | |||
| 	 | |||
| } | |||
| @ -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.dao.indexcoll; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.entity.indexcoll.DeptScoreEntity; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| 
 | |||
| /** | |||
|  * 区直部门分值表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| @Mapper | |||
| public interface DeptScoreDao extends BaseDao<DeptScoreEntity> { | |||
| 	 | |||
| } | |||
| @ -0,0 +1,87 @@ | |||
| /** | |||
|  * 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.entity.indexcoll; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| 
 | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| 
 | |||
| /** | |||
|  * 区/街道相关分数表  | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("fact_index_agency_score") | |||
| public class AgencyScoreEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 客户Id | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 组织id(eg:社区或者街道id) | |||
|      */ | |||
| 	private String agencyId; | |||
| 
 | |||
|     /** | |||
|      * 上级组织id | |||
|      */ | |||
| 	private String parentAgencyId; | |||
| 
 | |||
|     /** | |||
|      * 年度ID: yyyy | |||
|      */ | |||
| 	private String yearId; | |||
| 
 | |||
|     /** | |||
|      * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 | |||
|      */ | |||
| 	private String quarterId; | |||
| 
 | |||
|     /** | |||
|      * 月维度Id: yyyyMM | |||
|      */ | |||
| 	private String monthId; | |||
| 
 | |||
|     /** | |||
|      * 1:总分;0不是;默认0 | |||
|      */ | |||
| 	private String isTotal; | |||
| 
 | |||
|     /** | |||
|      * 分值 | |||
|      */ | |||
| 	private BigDecimal score; | |||
| 
 | |||
|     /** | |||
|      * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan | |||
|      */ | |||
| 	private String indexCode; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,87 @@ | |||
| /** | |||
|  * 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.entity.indexcoll; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| 
 | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| 
 | |||
| /** | |||
|  * 区直部门分值表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("fact_index_dept_score") | |||
| public class DeptScoreEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 客户Id | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 部门id | |||
|      */ | |||
| 	private String deptId; | |||
| 
 | |||
|     /** | |||
|      * 所有上级ID,用英文逗号分开 | |||
|      */ | |||
| 	private String allParentIds; | |||
| 
 | |||
|     /** | |||
|      * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 | |||
|      */ | |||
| 	private String quarterId; | |||
| 
 | |||
|     /** | |||
|      * 年度ID: yyyy | |||
|      */ | |||
| 	private String yearId; | |||
| 
 | |||
|     /** | |||
|      * 月维度Id: yyyyMM | |||
|      */ | |||
| 	private String monthId; | |||
| 
 | |||
|     /** | |||
|      * 1:总分;0不是;默认0 | |||
|      */ | |||
| 	private String isTotal; | |||
| 
 | |||
|     /** | |||
|      * 分值 | |||
|      */ | |||
| 	private BigDecimal score; | |||
| 
 | |||
|     /** | |||
|      * 治理能力:zhilinengli; | |||
|      */ | |||
| 	private String indexCode; | |||
| 
 | |||
| } | |||
| @ -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.service.indexcal; | |||
| 
 | |||
| import com.epmet.commons.mybatis.service.BaseService; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.dto.indexcal.AgencyScoreDTO; | |||
| import com.epmet.entity.indexcoll.AgencyScoreEntity; | |||
| 
 | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 区/街道相关分数表  | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| public interface AgencyScoreService extends BaseService<AgencyScoreEntity> { | |||
| 
 | |||
|     /** | |||
|      * 默认分页 | |||
|      * | |||
|      * @param params | |||
|      * @return PageData<AgencyScoreDTO> | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     PageData<AgencyScoreDTO> page(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 默认查询 | |||
|      * | |||
|      * @param params | |||
|      * @return java.util.List<AgencyScoreDTO> | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     List<AgencyScoreDTO> list(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 单条查询 | |||
|      * | |||
|      * @param id | |||
|      * @return AgencyScoreDTO | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     AgencyScoreDTO get(String id); | |||
| 
 | |||
|     /** | |||
|      * 默认保存 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     void save(AgencyScoreDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 默认更新 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     void update(AgencyScoreDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 批量删除 | |||
|      * | |||
|      * @param ids | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     void delete(String[] ids); | |||
| } | |||
| @ -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.service.indexcal; | |||
| 
 | |||
| import com.epmet.commons.mybatis.service.BaseService; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.dto.indexcal.DeptScoreDTO; | |||
| import com.epmet.entity.indexcoll.DeptScoreEntity; | |||
| 
 | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 区直部门分值表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2020-09-02 | |||
|  */ | |||
| public interface DeptScoreService extends BaseService<DeptScoreEntity> { | |||
| 
 | |||
|     /** | |||
|      * 默认分页 | |||
|      * | |||
|      * @param params | |||
|      * @return PageData<DeptScoreDTO> | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     PageData<DeptScoreDTO> page(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 默认查询 | |||
|      * | |||
|      * @param params | |||
|      * @return java.util.List<DeptScoreDTO> | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     List<DeptScoreDTO> list(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 单条查询 | |||
|      * | |||
|      * @param id | |||
|      * @return DeptScoreDTO | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     DeptScoreDTO get(String id); | |||
| 
 | |||
|     /** | |||
|      * 默认保存 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     void save(DeptScoreDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 默认更新 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     void update(DeptScoreDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 批量删除 | |||
|      * | |||
|      * @param ids | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2020-09-02 | |||
|      */ | |||
|     void delete(String[] ids); | |||
| } | |||
| @ -0,0 +1,18 @@ | |||
| package com.epmet.service.indexcal; | |||
| 
 | |||
| /** | |||
|  * @Author zxc | |||
|  * @DateTime 2020/9/2 3:11 下午 | |||
|  */ | |||
| public interface IndexCalculateStreetService { | |||
| 
 | |||
|     /** | |||
|      * @Description  计算街道相关总分 | |||
|      * @param customerId | |||
|      * @param monthId | |||
|      * @author zxc | |||
|      * @date 2020/9/2 3:12 下午 | |||
|      */ | |||
|     Boolean calStreetAll(String customerId, String monthId); | |||
| 
 | |||
| } | |||
| @ -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.service.indexcal.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.page.PageData; | |||
| import com.epmet.commons.tools.utils.ConvertUtils; | |||
| import com.epmet.commons.tools.constant.FieldConstant; | |||
| import com.epmet.dao.indexcoll.AgencyScoreDao; | |||
| import com.epmet.dto.indexcal.AgencyScoreDTO; | |||
| import com.epmet.entity.indexcoll.AgencyScoreEntity; | |||
| import com.epmet.service.indexcal.AgencyScoreService; | |||
| 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 2020-09-02 | |||
|  */ | |||
| @Service | |||
| public class AgencyScoreServiceImpl extends BaseServiceImpl<AgencyScoreDao, AgencyScoreEntity> implements AgencyScoreService { | |||
| 
 | |||
|     @Override | |||
|     public PageData<AgencyScoreDTO> page(Map<String, Object> params) { | |||
|         IPage<AgencyScoreEntity> page = baseDao.selectPage( | |||
|                 getPage(params, FieldConstant.CREATED_TIME, false), | |||
|                 getWrapper(params) | |||
|         ); | |||
|         return getPageData(page, AgencyScoreDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public List<AgencyScoreDTO> list(Map<String, Object> params) { | |||
|         List<AgencyScoreEntity> entityList = baseDao.selectList(getWrapper(params)); | |||
| 
 | |||
|         return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); | |||
|     } | |||
| 
 | |||
|     private QueryWrapper<AgencyScoreEntity> getWrapper(Map<String, Object> params){ | |||
|         String id = (String)params.get(FieldConstant.ID_HUMP); | |||
| 
 | |||
|         QueryWrapper<AgencyScoreEntity> wrapper = new QueryWrapper<>(); | |||
|         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | |||
| 
 | |||
|         return wrapper; | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public AgencyScoreDTO get(String id) { | |||
|         AgencyScoreEntity entity = baseDao.selectById(id); | |||
|         return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void save(AgencyScoreDTO dto) { | |||
|         AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); | |||
|         insert(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void update(AgencyScoreDTO dto) { | |||
|         AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); | |||
|         updateById(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void delete(String[] ids) { | |||
|         // 逻辑删除(@TableLogic 注解)
 | |||
|         baseDao.deleteBatchIds(Arrays.asList(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.service.indexcal.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.page.PageData; | |||
| import com.epmet.commons.tools.utils.ConvertUtils; | |||
| import com.epmet.commons.tools.constant.FieldConstant; | |||
| import com.epmet.dao.indexcoll.DeptScoreDao; | |||
| import com.epmet.dto.indexcal.DeptScoreDTO; | |||
| import com.epmet.entity.indexcoll.DeptScoreEntity; | |||
| import com.epmet.service.indexcal.DeptScoreService; | |||
| 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 2020-09-02 | |||
|  */ | |||
| @Service | |||
| public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScoreEntity> implements DeptScoreService { | |||
| 
 | |||
|     @Override | |||
|     public PageData<DeptScoreDTO> page(Map<String, Object> params) { | |||
|         IPage<DeptScoreEntity> page = baseDao.selectPage( | |||
|                 getPage(params, FieldConstant.CREATED_TIME, false), | |||
|                 getWrapper(params) | |||
|         ); | |||
|         return getPageData(page, DeptScoreDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public List<DeptScoreDTO> list(Map<String, Object> params) { | |||
|         List<DeptScoreEntity> entityList = baseDao.selectList(getWrapper(params)); | |||
| 
 | |||
|         return ConvertUtils.sourceToTarget(entityList, DeptScoreDTO.class); | |||
|     } | |||
| 
 | |||
|     private QueryWrapper<DeptScoreEntity> getWrapper(Map<String, Object> params){ | |||
|         String id = (String)params.get(FieldConstant.ID_HUMP); | |||
| 
 | |||
|         QueryWrapper<DeptScoreEntity> wrapper = new QueryWrapper<>(); | |||
|         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | |||
| 
 | |||
|         return wrapper; | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public DeptScoreDTO get(String id) { | |||
|         DeptScoreEntity entity = baseDao.selectById(id); | |||
|         return ConvertUtils.sourceToTarget(entity, DeptScoreDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void save(DeptScoreDTO dto) { | |||
|         DeptScoreEntity entity = ConvertUtils.sourceToTarget(dto, DeptScoreEntity.class); | |||
|         insert(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void update(DeptScoreDTO dto) { | |||
|         DeptScoreEntity entity = ConvertUtils.sourceToTarget(dto, DeptScoreEntity.class); | |||
|         updateById(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void delete(String[] ids) { | |||
|         // 逻辑删除(@TableLogic 注解)
 | |||
|         baseDao.deleteBatchIds(Arrays.asList(ids)); | |||
|     } | |||
| 
 | |||
| } | |||
| @ -0,0 +1,26 @@ | |||
| package com.epmet.service.indexcal.impl; | |||
| 
 | |||
| import com.epmet.service.indexcal.IndexCalculateStreetService; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.springframework.stereotype.Service; | |||
| 
 | |||
| /** | |||
|  * @Author zxc | |||
|  * @DateTime 2020/9/2 3:11 下午 | |||
|  */ | |||
| @Service | |||
| @Slf4j | |||
| public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetService { | |||
| 
 | |||
|     /** | |||
|      * @Description  计算街道相关总分 | |||
|      * @param customerId | |||
|      * @param monthId | |||
|      * @author zxc | |||
|      * @date 2020/9/2 3:12 下午 | |||
|      */ | |||
|     @Override | |||
|     public Boolean calStreetAll(String customerId, String monthId) { | |||
|         return null; | |||
|     } | |||
| } | |||
| @ -0,0 +1,6 @@ | |||
| <?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.dao.indexcoll.AgencyScoreDao"> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,6 @@ | |||
| <?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.dao.indexcoll.DeptScoreDao"> | |||
| 
 | |||
| </mapper> | |||
					Loading…
					
					
				
		Reference in new issue