Browse Source

Merge branches 'dev_plugins' and 'dev_temp' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_plugins

dev_shibei_match
wangchao 5 years ago
parent
commit
64ee11e813
  1. 2
      epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-ext/epmet-ext-server/pom.xml
  3. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
  4. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  5. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
  6. 2
      epmet-module/gov-project/gov-project-server/pom.xml
  7. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
  8. 16
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/UpdateCustomerFormDTO.java
  9. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml
  10. 2
      epmet-module/oper-crm/oper-crm-server/pom.xml
  11. 6
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
  12. 2
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java
  13. 57
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  14. 16
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerDomainFormDTO.java
  15. 4
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomizedFormDTO.java
  16. 28
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/WebviewDomainFormDTO.java
  17. 36
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerResultDTO.java
  18. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedListResultDTO.java
  19. 36
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionResultDTO.java
  20. 2
      epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml
  21. 2
      epmet-module/oper-customize/oper-customize-server/pom.xml
  22. 11
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java
  23. 9
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionCustomizedDao.java
  24. 14
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java
  25. 4
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java
  26. 69
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java
  27. 6
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml
  28. 13
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml
  29. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  30. 2
      epmet-user/epmet-user-server/pom.xml

2
epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-ext-server:
container_name: epmet-ext-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.2
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.3
ports:
- "8113:8113"
network_mode: host # 使用现有网络

2
epmet-module/epmet-ext/epmet-ext-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.2</version>
<version>0.0.3</version>
<parent>
<groupId>com.epmet</groupId>

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.84
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.85
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.84</version>
<version>0.3.85</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId>

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-project-server:
container_name: gov-project-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.42
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.43
ports:
- "8102:8102"
network_mode: host # 使用现有网络

2
epmet-module/gov-project/gov-project-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.42</version>
<version>0.3.43</version>
<parent>
<artifactId>gov-project</artifactId>
<groupId>com.epmet</groupId>

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java

@ -232,5 +232,21 @@ public class ProjectTraceController {
ValidatorUtils.validateEntity(formDTO);
return new Result<ProcessorListResultDTO>().ok(projectTraceService.processorList(formDTO));
}
/**
* 处理响应
* @author zhaoqifeng
* @date 2020/8/20 10:16
* @param tokenDTO
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("response")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_TRANSFER)
public Result response(@LoginUser TokenDto tokenDTO, @RequestBody ProjectResponseFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
projectTraceService.response(tokenDTO, formDTO);
return new Result();
}
}

16
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/UpdateCustomerFormDTO.java

@ -27,12 +27,12 @@ public class UpdateCustomerFormDTO implements Serializable {
* logo
*/
private String logo;
/**
* 根管理员姓名
*/
private String rootManageName;
/**
* 根管理员电话
*/
private String rootManagePhone;
// /**
// * 根管理员姓名
// */
// private String rootManageName;
// /**
// * 根管理员电话
// */
// private String rootManagePhone;
}

2
epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-crm-server:
container_name: oper-crm-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.67
image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.69
ports:
- "8090:8090"
network_mode: host # 使用现有网络

2
epmet-module/oper-crm/oper-crm-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.67</version>
<version>0.3.69</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-crm</artifactId>

6
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java

@ -286,9 +286,9 @@ public class CustomerController {
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.CustomerListResultDTO>>
*/
@PostMapping("customerlist")
public Result<List<CustomerListResultDTO>> customerList(@RequestBody PageQueryFormDTO formDTO) {
List<CustomerListResultDTO> result = customerService.customerList(formDTO);
return new Result<List<CustomerListResultDTO>>().ok(result);
public Result<PageData> customerList(@RequestBody PageQueryFormDTO formDTO) {
PageData result = customerService.customerList(formDTO);
return new Result<PageData>().ok(result);
}
/**

2
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java

@ -194,7 +194,7 @@ public interface CustomerService extends BaseService<CustomerEntity> {
* @param formDTO
* @return com.epmet.dto.result.CustomerListResultDTO
*/
List<CustomerListResultDTO> customerList(PageQueryFormDTO formDTO);
PageData customerList(PageQueryFormDTO formDTO);
/**
* 客户基本信息修改

57
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -578,7 +578,7 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
}
@Override
public List<CustomerListResultDTO> customerList(PageQueryFormDTO formDTO) {
public PageData customerList(PageQueryFormDTO formDTO) {
PageInfo<CustomerListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize())
.doSelectPageInfo(() -> baseDao.selectAllCustomerList(formDTO.getCustomerName()));
List<CustomerListResultDTO> list = pageInfo.getList();
@ -592,25 +592,29 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
CustomerAgencyDTO agency = customerRootAgencyRst.getData();
// 管理员
GovStaffRoleResultDTO manager = new GovStaffRoleResultDTO();
if (agency != null) {
StaffRoleFormDTO staffsInRoleForm = new StaffRoleFormDTO();
staffsInRoleForm.setOrgId(agency.getId());
staffsInRoleForm.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER);
Result<List<GovStaffRoleResultDTO>> managersResult = epmetUserFeignClient.getStaffsInRole(staffsInRoleForm);
if (!managersResult.success() || null == managersResult.getData() || managersResult.getData().size() == NumConstant.ZERO) {
if (!managersResult.success()) {
throw new RenException("查询客户详情:查询客户管理员失败:".concat(managersResult.toString()));
}
manager = managersResult.getData().get(NumConstant.ZERO);
dto.setProvince(agency.getProvince());
dto.setCity(agency.getCity());
dto.setCounty(agency.getDistrict());
if (null != managersResult.getData() && managersResult.getData().size() > NumConstant.ZERO) {
GovStaffRoleResultDTO manager = managersResult.getData().get(NumConstant.ZERO);
dto.setRootManageName(manager.getRealName());
dto.setRootManagePhone(manager.getMobile());
}
}
});
}
return list;
pageInfo.setList(list);
return new PageData<>(pageInfo.getList(),pageInfo.getTotal());
}
@Override
@ -618,26 +622,35 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
public void updateCustomer(UpdateCustomerFormDTO formDTO) {
CustomerEntity entity = new CustomerEntity();
entity.setId(formDTO.getCustomerId());
if (StringUtils.isNotBlank(formDTO.getCustomerName())){
entity.setCustomerName(formDTO.getCustomerName());
entity.setLogo(formDTO.getLogo());
baseDao.updateById(entity);
if (StringUtils.isNotBlank(formDTO.getRootManageName()) || StringUtils.isNotBlank(formDTO.getRootManagePhone())) {
// 根级组织
Result<CustomerAgencyDTO> customerRootAgencyRst = govOrgFeignClient.getCustomerRootAgency(formDTO.getCustomerId());
if (!customerRootAgencyRst.success() || null == customerRootAgencyRst.getData()) {
throw new RenException("客户基本信息修改:查询客户根级组织失败:".concat(customerRootAgencyRst.toString()));
}
CustomerAgencyDTO agency = customerRootAgencyRst.getData();
UpdateRootManageFormDTO updateRootManageFormDTO = new UpdateRootManageFormDTO();
updateRootManageFormDTO.setOrgId(agency.getId());
updateRootManageFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER);
updateRootManageFormDTO.setRootManageName(formDTO.getRootManageName());
updateRootManageFormDTO.setRootManagePhone(formDTO.getRootManagePhone());
Result rootManageResult = epmetUserOpenFeignClient.updateRootManage(updateRootManageFormDTO);
if (!rootManageResult.success()) {
throw new RenException("客户基本信息修改:修改根管理员信息失败:".concat(rootManageResult.toString()));
}
if (StringUtils.isNotBlank(formDTO.getLogo())){
entity.setLogo(formDTO.getLogo());
}
entity.setLogo(formDTO.getLogo());
baseDao.updateById(entity);
// if (StringUtils.isNotBlank(formDTO.getRootManageName()) || StringUtils.isNotBlank(formDTO.getRootManagePhone())) {
// // 根级组织
// Result<CustomerAgencyDTO> customerRootAgencyRst = govOrgFeignClient.getCustomerRootAgency(formDTO.getCustomerId());
// if (!customerRootAgencyRst.success() || null == customerRootAgencyRst.getData()) {
// throw new RenException("客户基本信息修改:查询客户根级组织失败:".concat(customerRootAgencyRst.toString()));
// }
// CustomerAgencyDTO agency = customerRootAgencyRst.getData();
// UpdateRootManageFormDTO updateRootManageFormDTO = new UpdateRootManageFormDTO();
// updateRootManageFormDTO.setOrgId(agency.getId());
// updateRootManageFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER);
// if (StringUtils.isNotBlank(formDTO.getRootManageName())){
// updateRootManageFormDTO.setRootManageName(formDTO.getRootManageName());
// }
// if (StringUtils.isNotBlank(formDTO.getRootManageName())){
// updateRootManageFormDTO.setRootManagePhone(formDTO.getRootManagePhone());
// }
// Result rootManageResult = epmetUserOpenFeignClient.updateRootManage(updateRootManageFormDTO);
// if (!rootManageResult.success()) {
// throw new RenException("客户基本信息修改:修改根管理员信息失败:".concat(rootManageResult.toString()));
// }
// }
}
/**

16
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerDomainFormDTO.java

@ -0,0 +1,16 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/19 16:13
*/
@Data
public class CustomerDomainFormDTO implements Serializable {
private static final long serialVersionUID = 6766612197218605922L;
private String customerId;
}

4
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomizedFormDTO.java

@ -36,8 +36,8 @@ public class UpdateCustomizedFormDTO implements Serializable {
/**
* 默认名称
*/
@NotBlank(message = "默认名称不能为空")
private String customizedName;
@NotBlank(message = "功能名称不能为空")
private String functionName;
/**
* 默认大图标

28
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/WebviewDomainFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/19 17:46
*/
@Data
public class WebviewDomainFormDTO implements Serializable {
private static final long serialVersionUID = 8022056850984848597L;
/**
* 客户ID
*/
private String customerId;
/**
* 客户端类型
*/
private String clientType;
/**
* 业务域名
*/
private List<String> webViewDomain;
}

36
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerResultDTO.java

@ -26,10 +26,46 @@ public class CustomerResultDTO implements Serializable {
* 默认功能名称
*/
private String customizedName;
/**
* 自定义功能名称
*/
private String functionName;
/**
* 功能所属端(居民端:resi 工作端:work)
*/
private String fromApp;
/**
* 默认大图标
*/
private String defaultLargeImg;
/**
* 自定义大图标
*/
private String iconLargeImg;
/**
* 默认小图标
*/
private String defaultSmallImg;
/**
* 自定义小图标
*/
private String iconSmallImg;
/**
* 上下架(0下架1上架)
*/
private Integer shoppingStatus;
/**
* 业务域名
*/
private String domainName;
/**
* 外链地址
*/
private String targetLink;
/**
* 排序
*/
private Integer displayOrder;
/**
* 功能说明
*/

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedListResultDTO.java

@ -23,7 +23,7 @@ public class FunctionCustomizedListResultDTO implements Serializable {
/**
* 列表内容
*/
private List<FunctionCustomizedListDTO> listDTOS;
private List<FunctionCustomizedListDTO> list;
}

36
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionResultDTO.java

@ -26,46 +26,10 @@ public class FunctionResultDTO implements Serializable {
* 默认功能名称
*/
private String customizedName;
/**
* 自定义功能名称
*/
private String functionName;
/**
* 功能所属端(居民端:resi 工作端:work)
*/
private String fromApp;
/**
* 默认大图标
*/
private String defaultLargeImg;
/**
* 自定义大图标
*/
private String iconLargeImg;
/**
* 默认小图标
*/
private String defaultSmallImg;
/**
* 自定义小图标
*/
private String iconSmallImg;
/**
* 上下架(0下架1上架)
*/
private Integer shoppingStatus;
/**
* 业务域名
*/
private String domainName;
/**
* 外链地址
*/
private String targetLink;
/**
* 排序
*/
private Integer displayOrder;
/**
* 功能说明
*/

2
epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-customize-server:
container_name: oper-customize-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.28
image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.32
ports:
- "8089:8089"
network_mode: host # 使用现有网络

2
epmet-module/oper-customize/oper-customize-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.28</version>
<version>0.3.32</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-customize</artifactId>

11
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java

@ -26,10 +26,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.FunctionCustomizedDTO;
import com.epmet.dto.form.CommonFunctionIdFormDTO;
import com.epmet.dto.form.FunctionCustomizedListFormDTO;
import com.epmet.dto.form.SaveFunctionCustomizedFormDTO;
import com.epmet.dto.form.UpdateCustomizedFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.FunctionCustomizedDetailResultDTO;
import com.epmet.dto.result.FunctionCustomizedListResultDTO;
import com.epmet.excel.FunctionCustomizedExcel;
@ -174,4 +171,10 @@ public class FunctionCustomizedController {
ValidatorUtils.validateEntity(formDTO);
return functionCustomizedService.functionCustomizedList(formDTO);
}
@PostMapping("customerdomainname")
public Result customerDomain(@RequestBody CustomerDomainFormDTO formDTO) {
functionCustomizedService.customerDomain(formDTO);
return new Result();
}
}

9
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionCustomizedDao.java

@ -116,4 +116,13 @@ public interface FunctionCustomizedDao extends BaseDao<FunctionCustomizedEntity>
* @Description 查询定制功能信息
**/
FunctionCustomizedDTO selectByFunctionId(@Param("functionId") String functionId);
/**
* 获取业务域名
* @author zhaoqifeng
* @date 2020/8/20 9:36
* @param customerId
* @return java.util.List<com.epmet.dto.FunctionCustomizedDTO>
*/
List<FunctionCustomizedDTO> selectDomains(@Param("customerId") String customerId);
}

14
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java

@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.FunctionCustomizedDTO;
import com.epmet.dto.form.CommonFunctionIdFormDTO;
import com.epmet.dto.form.FunctionCustomizedListFormDTO;
import com.epmet.dto.form.SaveFunctionCustomizedFormDTO;
import com.epmet.dto.form.UpdateCustomizedFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.FunctionCustomizedDetailResultDTO;
import com.epmet.dto.result.FunctionCustomizedListResultDTO;
import com.epmet.entity.FunctionCustomizedEntity;
@ -153,4 +150,13 @@ public interface FunctionCustomizedService extends BaseService<FunctionCustomize
* @Date 10:07 2020-08-14
**/
Result<FunctionCustomizedListResultDTO> functionCustomizedList(FunctionCustomizedListFormDTO formDTO);
/**
* 设置业务域名
* @author zhaoqifeng
* @date 2020/8/19 16:15
* @param formDTO
* @return void
*/
void customerDomain(CustomerDomainFormDTO formDTO);
}

4
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java

@ -183,10 +183,10 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF
//2.获取客户未有定制功能列表
List<String> functionIds = customerList.stream().map(CustomerResultDTO::getFunctionId).collect(Collectors.toList());
List<FunctionResultDTO> functionList = functionCustomizedDao.selectFunctionCustomizedList(functionIds);
resultDTO.setFunctionList(functionList);
functionList.forEach(fl->{
fl.setCustomerId(customerId);
});
resultDTO.setFunctionList(functionList);
return resultDTO;
}
@ -232,7 +232,7 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF
CustomerFunctionDetailEntity entity = new CustomerFunctionDetailEntity();
entity.setCustomerId(formDTO.getCustomerId());
entity.setFunctionId(formDTO.getFunctionId());
entity.setFunctionName(functionDTO.getFunctionId());
entity.setFunctionName(functionDTO.getCustomizedName());
entity.setIconLargeImg(functionDTO.getIconLargeImg());
entity.setIconSmallImg(functionDTO.getIconSmallImg());
entity.setDomainName(functionDTO.getDomainName());

69
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java

@ -17,23 +17,24 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
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.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerFunctionDetailDao;
import com.epmet.dao.FunctionCustomizedDao;
import com.epmet.dto.CustomerFunctionDetailDTO;
import com.epmet.dto.CustomizedDTO;
import com.epmet.dto.FunctionCustomizedDTO;
import com.epmet.dto.form.CommonFunctionIdFormDTO;
import com.epmet.dto.form.FunctionCustomizedListFormDTO;
import com.epmet.dto.form.SaveFunctionCustomizedFormDTO;
import com.epmet.dto.form.UpdateCustomizedFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.FunctionCustomizedDetailResultDTO;
import com.epmet.dto.result.FunctionCustomizedListResultDTO;
import com.epmet.entity.CustomerFunctionDetailEntity;
@ -52,6 +53,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 定制功能
@ -194,12 +196,12 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
|| !formDTO.getFromApp().equals(customizedDTO.getFromApp()) ){
// 4.1 如果修改的内容是其他字段,则返回语句
tipCustomizedInfoUserId.append(customizedId.get(i).getId() + ",");
} else if (!formDTO.getCustomizedName().equals(customizedDTO.getCustomizedName())
} else if (!formDTO.getFunctionName().equals(customizedDTO.getCustomizedName())
|| !formDTO.getIconLargeImg().equals(customizedDTO.getIconLargeImg())
|| !formDTO.getIconSmallImg().equals(customizedDTO.getIconSmallImg())){
// 4.2 如果修改的内容只是:功能名称和大小图标,, 需要批量更新客户数据
CustomerFunctionDetailEntity customer = new CustomerFunctionDetailEntity();
customer.setFunctionName(formDTO.getCustomizedName());
customer.setFunctionName(formDTO.getFunctionName());
customer.setIconLargeImg(formDTO.getIconLargeImg());
customer.setIconSmallImg(formDTO.getIconSmallImg());
customer.setId(customizedId.get(i).getId());
@ -231,11 +233,60 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
FunctionCustomizedListResultDTO resultDTO = new FunctionCustomizedListResultDTO();
resultDTO.setListDTOS(baseDao.selectListFunctionCustomizedList(formDTO));
resultDTO.setList(baseDao.selectListFunctionCustomizedList(formDTO));
resultDTO.setTotal(baseDao.countTotalFunctionCustomizedList(formDTO));
return new Result<FunctionCustomizedListResultDTO>().ok(resultDTO);
}
@Override
public void customerDomain(CustomerDomainFormDTO formDTO) {
//获取业务域名
List<FunctionCustomizedDTO> list = baseDao.selectDomains(formDTO.getCustomerId());
List<String> workDomains = new ArrayList<>();
List<String> resiDomains = new ArrayList<>();
if (null != list) {
for(FunctionCustomizedDTO dto : list) {
if (StringUtils.isNotBlank(dto.getDomainName())) {
String[] domainNames = dto.getDomainName().split(";");
if (("resi").equals(dto.getFromApp())) {
resiDomains.addAll(Arrays.asList(domainNames));
} else {
workDomains.addAll(Arrays.asList(domainNames));
}
}
}
}
String domainUrl = "https://epmet-cloud.elinkservice.cn/api/third/setting/setwebviewdomain";
if(resiDomains.size() > NumConstant.ZERO) {
resiDomains = resiDomains.stream().distinct().collect(Collectors.toList());
WebviewDomainFormDTO domainFormDTO = new WebviewDomainFormDTO();
domainFormDTO.setCustomerId(formDTO.getCustomerId());
domainFormDTO.setClientType("resi");
domainFormDTO.setWebViewDomain(resiDomains);
String domainData = HttpClientManager.getInstance().sendPostByJSON(domainUrl, JSON.toJSONString(domainFormDTO)).getData();
JSONObject domainObject = JSON.parseObject(domainData);
Result domainResult = ConvertUtils.mapToEntity(domainObject, Result.class);
if (!domainResult.success()) {
throw new RenException(domainResult.getCode(), domainResult.getInternalMsg());
}
}
if(workDomains.size() > NumConstant.ZERO) {
workDomains = workDomains.stream().distinct().collect(Collectors.toList());
WebviewDomainFormDTO domainFormDTO = new WebviewDomainFormDTO();
domainFormDTO.setCustomerId(formDTO.getCustomerId());
domainFormDTO.setClientType("work");
domainFormDTO.setWebViewDomain(workDomains);
String domainData = HttpClientManager.getInstance().sendPostByJSON(domainUrl, JSON.toJSONString(domainFormDTO)).getData();
JSONObject domainObject = JSON.parseObject(domainData);
Result domainResult = ConvertUtils.mapToEntity(domainObject, Result.class);
if (!domainResult.success()) {
throw new RenException(domainResult.getCode(), domainResult.getInternalMsg());
}
}
}
/**
* 保存数据到 功能表
* @param formDTO
@ -265,7 +316,7 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
private void upFunction(UpdateCustomizedFormDTO formDTO, Integer flag){
FunctionEntity entity = new FunctionEntity();
entity.setId(formDTO.getFunctionId());
entity.setFunctionName(formDTO.getCustomizedName());
entity.setFunctionName(formDTO.getFunctionName());
entity.setFunctionIcon(formDTO.getIconLargeImg());
if (NumConstant.ONE == flag){
entity.setShoppingStatus(Integer.valueOf(formDTO.getShoppingStatus()));
@ -303,7 +354,7 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
// 2.修改 定制功能表, 修改的字段范围,是:功能名称和大小图标
FunctionCustomizedEntity entity = new FunctionCustomizedEntity();
entity.setFunctionId(formDTO.getFunctionId());
entity.setCustomizedName(formDTO.getCustomizedName());
entity.setCustomizedName(formDTO.getFunctionName());
entity.setIconLargeImg(formDTO.getIconLargeImg());
entity.setIconSmallImg(formDTO.getIconSmallImg());
baseDao.updateFunctionCustomized(entity);

6
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml

@ -56,14 +56,14 @@
cfd.function_name AS "functionName",
cfd.icon_large_img AS "iconLargeImg",
cfd.icon_small_img AS "iconSmallImg",
cfd.shopping_status AS "shoppingStatus",
cfd.domain_name AS "domainName",
cfd.target_link AS "targetLink",
cfd.display_order AS "displayOrder",
fc.customized_name AS "customizedName",
fc.from_app AS "fromApp",
fc.icon_large_img AS "defaultLargeImg",
fc.icon_small_img AS "defaultSmallImg ",
fc.domain_name AS "domainName",
fc.target_link AS "targetLink",
f.shopping_status AS "shoppingStatus",
f.function_explain AS "functionExplain"
FROM
customer_function_detail cfd

13
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml

@ -87,6 +87,19 @@
AND cu.FROM_APP = 'gov'
</if>
</select>
<select id="selectDomains" resultType="com.epmet.dto.FunctionCustomizedDTO">
SELECT
cfd.DOMAIN_NAME,
fc.FROM_APP
FROM
customer_function_detail cfd
INNER JOIN function_customized fc ON cfd.FUNCTION_ID = fc.FUNCTION_ID
WHERE
cfd.DEL_FLAG = 0
AND fc.DEL_FLAG = 0
AND cfd.SHOPPING_STATUS = 1
AND cfd.CUSTOMER_ID = #{customerId}
</select>
<select id="selectFunctionCustomizedList" resultType="com.epmet.dto.result.FunctionResultDTO">
SELECT

2
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.118
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.119
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.118</version>
<version>0.3.119</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

Loading…
Cancel
Save