82 changed files with 1217 additions and 265 deletions
@ -0,0 +1,24 @@ |
|||
package com.epmet.screen.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/8/19 3:10 下午 |
|||
*/ |
|||
@Data |
|||
public class MonthPieChartFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3163410637094615814L; |
|||
|
|||
public interface MonthPieChart{} |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
@NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class}) |
|||
private String agencyId; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.screen.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/8/19 2:40 下午 |
|||
*/ |
|||
@Data |
|||
public class YearAverageIndexFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2389432085360116229L; |
|||
|
|||
public interface YearAverageIndex{} |
|||
|
|||
/** |
|||
* 机关Id |
|||
*/ |
|||
@NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class}) |
|||
private String agencyId; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/8/19 3:12 下午 |
|||
*/ |
|||
@Data |
|||
public class MonthPieChartResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8399158251970739021L; |
|||
|
|||
/** |
|||
* 服务能力 |
|||
*/ |
|||
private Double serviceAbility = 0.0; |
|||
|
|||
/** |
|||
* 党建能力 |
|||
*/ |
|||
private Double partyDevAbility = 0.0; |
|||
|
|||
/** |
|||
* 治理能力 |
|||
*/ |
|||
private Double governAbility = 0.0; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/8/19 2:45 下午 |
|||
*/ |
|||
@Data |
|||
public class YearAverageIndexResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6453379153616899440L; |
|||
|
|||
/** |
|||
* 年度平均指数 |
|||
*/ |
|||
private Double yearAverageIndex = 0.0; |
|||
|
|||
/** |
|||
* 服务能力 |
|||
*/ |
|||
private Double serviceAbility = 0.0; |
|||
|
|||
/** |
|||
* 党建能力 |
|||
*/ |
|||
private Double partyDevAbility = 0.0; |
|||
|
|||
/** |
|||
* 治理能力 |
|||
*/ |
|||
private Double governAbility = 0.0; |
|||
} |
@ -0,0 +1,41 @@ |
|||
/** |
|||
* 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.screen; |
|||
|
|||
import com.epmet.screen.dto.result.YearAverageIndexResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 指数-指数数据(按年统计) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenIndexDataYearlyDao{ |
|||
|
|||
/** |
|||
* @Description 1、年度平均指数 |
|||
* @param agencyId |
|||
* @author zxc |
|||
* @date 2020/8/19 3:43 下午 |
|||
*/ |
|||
YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId); |
|||
|
|||
} |
@ -1,8 +0,0 @@ |
|||
<?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.screen.ScreenIndexDataDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,20 @@ |
|||
<?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.screen.ScreenIndexDataMonthlyDao"> |
|||
|
|||
<!-- 2、月度指数分析-饼状图 --> |
|||
<select id="selectMonthPieChart" resultType="com.epmet.screen.dto.result.MonthPieChartResultDTO"> |
|||
SELECT |
|||
service_ablity AS serviceAbility, |
|||
party_dev_ablity AS partyDevAbility, |
|||
govern_ablity AS governAbility |
|||
FROM |
|||
screen_index_data_monthly |
|||
WHERE |
|||
del_flag = '0' |
|||
AND org_type = 'agency' |
|||
AND org_id = #{agencyId} |
|||
AND month_id = DATE_FORMAT(NOW(),'%Y%m') |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,21 @@ |
|||
<?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.screen.ScreenIndexDataYearlyDao"> |
|||
|
|||
<!-- 1、年度平均指数 --> |
|||
<select id="selectYearAverageIndex" resultType="com.epmet.screen.dto.result.YearAverageIndexResultDTO"> |
|||
SELECT |
|||
index_total AS yearAverageIndex, |
|||
service_ablity AS serviceAbility, |
|||
party_dev_ablity AS partyDevAbility, |
|||
govern_ablity AS governAbility |
|||
FROM |
|||
screen_index_data_yearly |
|||
WHERE |
|||
del_flag = '0' |
|||
AND org_type = 'agency' |
|||
AND org_id = #{agencyId} |
|||
AND year_id = DATE_FORMAT(NOW(),'%Y') |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
package com.epmet.dto.screencoll.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 17、指数_按年统计 入参 |
|||
* @Auther: zhangyong |
|||
* @Date: 2020-08-18 09:59 |
|||
*/ |
|||
@Data |
|||
public class IndexDataYearlyFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* yyyy |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 组织类别 agency:组织;部门:department;网格:grid |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 组织Id 可以为网格,机关id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 上级组织Id |
|||
*/ |
|||
private String parentId; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 总指数 |
|||
*/ |
|||
private Integer indexTotal; |
|||
|
|||
/** |
|||
* 党建能力指数 |
|||
*/ |
|||
private Integer partyDevAblity; |
|||
|
|||
/** |
|||
* 服务能力指数 |
|||
*/ |
|||
private Integer serviceAblity; |
|||
|
|||
/** |
|||
* 治理能力指数 |
|||
*/ |
|||
private Integer governAblity; |
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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.screen; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; |
|||
import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; |
|||
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 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenIndexDataYearlyDao extends BaseDao<ScreenIndexDataYearlyEntity> { |
|||
|
|||
/** |
|||
* 17、指数_按年统计 |
|||
* 1) 根据CUSTOMER_ID、YEAR_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 |
|||
* |
|||
* @param customerId |
|||
* @param yearId |
|||
* @param orgIds 组织Id集合 |
|||
* @Author zhangyong |
|||
* @Date 10:52 2020-08-18 |
|||
**/ |
|||
void deleteIndexDataYearly(@Param("customerId") String customerId, |
|||
@Param("yearId") String yearId, |
|||
@Param("orgIds") String[] orgIds); |
|||
|
|||
/** |
|||
* 17、指数_按年统计 |
|||
* 2) 在批量新增 |
|||
* |
|||
* @param list |
|||
* @param customerId |
|||
* @Author zhangyong |
|||
* @Date 10:52 2020-08-18 |
|||
**/ |
|||
void batchInsertIndexDataYearly(@Param("list") List<IndexDataYearlyFormDTO> list, @Param("customerId")String customerId); |
|||
} |
@ -0,0 +1,92 @@ |
|||
/** |
|||
* 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.screen; |
|||
|
|||
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-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("screen_index_data_yearly") |
|||
public class ScreenIndexDataYearlyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 年Id: yyyy |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 组织类别 agency:组织;部门:department;网格:grid |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 组织Id 可以为网格,机关id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 上级组织Id |
|||
*/ |
|||
private String parentId; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 总指数 |
|||
*/ |
|||
private BigDecimal indexTotal; |
|||
|
|||
/** |
|||
* 党建能力指数 |
|||
*/ |
|||
private BigDecimal partyDevAblity; |
|||
|
|||
/** |
|||
* 服务能力指数 |
|||
*/ |
|||
private BigDecimal serviceAblity; |
|||
|
|||
/** |
|||
* 治理能力指数 |
|||
*/ |
|||
private BigDecimal governAblity; |
|||
|
|||
} |
@ -0,0 +1,60 @@ |
|||
<?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.screen.ScreenIndexDataYearlyDao"> |
|||
|
|||
<delete id="deleteIndexDataYearly"> |
|||
delete from screen_index_data_yearly |
|||
where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} |
|||
AND ORG_ID IN |
|||
<foreach item="item" collection="orgIds" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<insert id="batchInsertIndexDataYearly" parameterType="map"> |
|||
insert into screen_index_data_yearly |
|||
( |
|||
ID, |
|||
CUSTOMER_ID, |
|||
YEAR_ID, |
|||
ORG_TYPE, |
|||
ORG_ID, |
|||
PARENT_ID, |
|||
ORG_NAME, |
|||
INDEX_TOTAL, |
|||
PARTY_DEV_ABLITY, |
|||
SERVICE_ABLITY, |
|||
GOVERN_ABLITY, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME |
|||
) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
(SELECT REPLACE(UUID(), '-', '') AS id), |
|||
#{customerId}, |
|||
#{item.yearId}, |
|||
#{item.orgType}, |
|||
#{item.orgId}, |
|||
#{item.parentId}, |
|||
#{item.orgName}, |
|||
|
|||
#{item.indexTotal}, |
|||
#{item.partyDevAblity}, |
|||
#{item.serviceAblity}, |
|||
#{item.governAblity}, |
|||
0, |
|||
0, |
|||
'APP_USER', |
|||
now(), |
|||
'APP_USER', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
</mapper> |
@ -0,0 +1,15 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
|
|||
@Data |
|||
public class ExternalCustomerFormDTO { |
|||
|
|||
@Min(0) |
|||
private Integer pageNo; |
|||
|
|||
@Min(0) |
|||
private Integer pageSize; |
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* 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.result; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class ExternalCustomerResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.ExternalAppAuthFormDTO; |
|||
import com.epmet.dto.form.ExternalCustomerFormDTO; |
|||
import com.epmet.dto.result.ExternalAppAuthResultDTO; |
|||
import com.epmet.service.ExternalAppAuthService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
|
|||
/** |
|||
* 外部客户管理 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/externalcustomer") |
|||
public class ExternalCustomerController { |
|||
|
|||
private static Logger logger = LoggerFactory.getLogger(ExternalCustomerController.class); |
|||
|
|||
@Autowired |
|||
private ExternalAppAuthService externalAppAuthService; |
|||
|
|||
/** |
|||
* 外部客户管理 |
|||
* @return |
|||
*/ |
|||
@PostMapping("/list") |
|||
public Result<ExternalAppAuthResultDTO> list(@RequestBody ExternalCustomerFormDTO form) { |
|||
ValidatorUtils.validateEntity(form); |
|||
Integer pageNo = form.getPageNo(); |
|||
Integer pageSize = form.getPageSize(); |
|||
|
|||
|
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.result.ExternalCustomerResultDTO; |
|||
import com.epmet.entity.ExternalCustomerEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface ExternalCustomerDao extends BaseDao<ExternalCustomerEntity> { |
|||
|
|||
/** |
|||
* 列出客户基本信息 |
|||
* @return |
|||
*/ |
|||
List<ExternalCustomerResultDTO> listBaseInfo(); |
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("external_customer") |
|||
public class ExternalCustomerEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.result.ExternalCustomerResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface ExternalCustomerService { |
|||
|
|||
public List<ExternalCustomerResultDTO> list(Integer pageNo, Integer pageSize); |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.dao.ExternalCustomerDao; |
|||
import com.epmet.dto.result.ExternalCustomerResultDTO; |
|||
import com.epmet.service.ExternalCustomerService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class ExternalCustomerServiceImpl implements ExternalCustomerService { |
|||
|
|||
@Autowired |
|||
private ExternalCustomerDao externalCustomerDao; |
|||
|
|||
@Override |
|||
public List<ExternalCustomerResultDTO> list(Integer pageNo, Integer pageSize) { |
|||
PageHelper.startPage(pageNo, pageSize); |
|||
List<ExternalCustomerResultDTO> customers = externalCustomerDao.listBaseInfo(); |
|||
PageInfo<ExternalCustomerResultDTO> pageInfo = new PageInfo<>(customers); |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?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.ExternalCustomerDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.ExternalCustomerEntity" id="externalCustomerMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerName" column="CUSTOMER_NAME"/> |
|||
<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> |
|||
|
|||
<!-- 列出客户基本信息--> |
|||
<select id="listBaseInfo" resultType="com.epmet.dto.result.ExternalCustomerResultDTO"> |
|||
SELECT |
|||
id, |
|||
CUSTOMER_NAME |
|||
FROM |
|||
external_customer |
|||
WHERE |
|||
DEL_FLAG = 0 |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue