Browse Source

Merge remote-tracking branch 'origin/dev_resi_export' into dev_resi_export

master
sunyuchao 4 years ago
parent
commit
b69bcdccbf
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  2. 1
      epmet-gateway/pom.xml
  3. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcExportItemListFormDTO.java
  4. 6
      epmet-module/oper-customize/oper-customize-server/pom.xml
  5. 3
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java
  6. 23
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java
  7. 8
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcExportTemplateDao.xml
  8. 11
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java

@ -22,6 +22,7 @@ public enum DictTypeEnum {
AGE_GROUP("age_group", "年龄范围", 11),
PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13),
GRID_TYPE("grid_type", "网格类型", 12),
ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14),
;
private final String code;

1
epmet-gateway/pom.xml

@ -287,6 +287,7 @@
<gateway.routes.epmet-demo-server.uri>lb://epmet-demo-server</gateway.routes.epmet-demo-server.uri>
<!-- 10、运营端客户定制化服务 -->
<gateway.routes.oper-customize-server.uri>lb://oper-customize-server</gateway.routes.oper-customize-server.uri>
<!-- <gateway.routes.oper-customize-server.uri>http://localhost:8089</gateway.routes.oper-customize-server.uri>-->
<!-- 11、运营端客户定制化服务 -->
<gateway.routes.oper-crm-server.uri>lb://oper-crm-server</gateway.routes.oper-crm-server.uri>
<!--<gateway.routes.oper-crm-server.uri>http://localhost:8090</gateway.routes.oper-crm-server.uri>-->

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcExportItemListFormDTO.java

@ -21,7 +21,7 @@ public class IcExportItemListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
@NotEmpty(message = "请至少添加一个导出项")
private List<IcExportItemListFormDTO> subItemList;
private List<IcExportItemListFormDTO> children;
/**
* 父id

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

@ -89,6 +89,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-admin-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

3
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java

@ -129,9 +129,6 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat
}
private void digui(Map<String, List<IcExportTemplateForExportResultDTO>> resultTemp, IcExportTemplateForExportResultDTO root, List<List<String>> headerList, List<IcCustomExportResultDTO.SqlColumn> showSqlColumns, List<IcCustomExportResultDTO.SqlColumn> hiddenSqlColumns, Set<String> hasExistColumnSet) {
if (StringUtils.isNotBlank(root.getColumnName())) {
showSqlColumns.add(new IcCustomExportResultDTO.SqlColumn(root.getTableName(), root.getColumnName()));
if (StringUtils.isNotBlank(root.getOptionSourceValue())) {

23
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java

@ -22,6 +22,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcFormItemDao;
import com.epmet.dao.IcFormItemOptionsDao;
import com.epmet.dao.IcFormQueryBuilderDao;
@ -31,8 +33,10 @@ import com.epmet.dto.result.*;
import com.epmet.entity.IcFormItemEntity;
import com.epmet.entity.IcFormItemOptionsEntity;
import com.epmet.entity.IcFormQueryBuilderEntity;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.service.IcFormItemService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -40,6 +44,7 @@ import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@ -56,6 +61,9 @@ public class IcFormItemServiceImpl extends BaseServiceImpl<IcFormItemDao, IcForm
private IcFormItemOptionsDao icFormItemOptionsDao;
@Autowired
private IcFormQueryBuilderDao icFormQueryBuilderDao;
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
/**
* 获取居民信息的查询条件组件列表
*
@ -250,9 +258,9 @@ public class IcFormItemServiceImpl extends BaseServiceImpl<IcFormItemDao, IcForm
builderEntity.setUpdatedBy("init");
//item默认的查询组件已经有了,就不插入了
IcFormQueryBuilderEntity entity = icFormQueryBuilderDao.selectDefaultQueryItem(item.getId(), item.getItemType(), builderEntity.getQueryType());
if (null == entity) {
/*if (null == entity) {
icFormQueryBuilderDao.insert(builderEntity);
}
}*/
}
}
@ -263,8 +271,7 @@ public class IcFormItemServiceImpl extends BaseServiceImpl<IcFormItemDao, IcForm
private String queryType(String itemType) {
String queryType;
switch (itemType) {
/*switch (itemType) {
case "select":
queryType = "equal";
break;
@ -280,7 +287,7 @@ public class IcFormItemServiceImpl extends BaseServiceImpl<IcFormItemDao, IcForm
case "radio":
queryType = "equal";
break;
//多选的,查询时应该是 and (columnname='' or columnname='')
//多选的,查询时应该是 and (columnname like '%XXX%' or columnname like '%XXX%')
case "checkbox":
queryType = "list_equal";
break;
@ -292,7 +299,13 @@ public class IcFormItemServiceImpl extends BaseServiceImpl<IcFormItemDao, IcForm
break;
default:
queryType = "like";
}*/
String queryType = "like";
Result<Map<String, String>> queryTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.ITEM_TYPE_QUERY.getCode());
if (queryTypeMap.success() && MapUtils.isNotEmpty(queryTypeMap.getData())) {
queryType = queryTypeMap.getData().get(itemType);
}
log.warn("itemType="+itemType+";queryType="+queryType);
return queryType;
}

8
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcExportTemplateDao.xml

@ -20,7 +20,13 @@
</resultMap>
<select id="getTemplateConfigForExport" resultType="com.epmet.dto.result.IcExportTemplateForExportResultDTO">
SELECT
c.ID,c.TEMP_ID,c.LABEL,c.PID,c.sort,ifi.ID AS itemId,ifig.TABLE_NAME,concat(ifi.COLUMN_NAME,if(ifi.COLUMN_NUM = 0,'',ifi.COLUMN_NUM)) columnName,
c.ID,c.TEMP_ID,
c.LABEL,
c.PID,
c.sort,
ifi.ID AS itemId,
ifig.TABLE_NAME,
concat(ifi.COLUMN_NAME,if(ifi.COLUMN_NUM = 0,'',ifi.COLUMN_NUM)) columnName,
ifi2.OPTION_SOURCE_VALUE
FROM ic_export_template_config c
LEFT JOIN ic_form_item ifi ON c.FORM_ITEM_ID = ifi.ID

11
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml

@ -258,8 +258,15 @@
ifi.CUSTOMER_ID,
ifi.ITEM_GROUP_ID,
ifi.LABEL,
ifi.SORT
FROM ic_form_item ifi WHERE ITEM_GROUP_ID = #{groupId} and ifi.CUSTOMER_ID = #{customerId}
ifi.SORT,
ifi.OPTION_SOURCE_VALUE,
ifig.TABLE_NAME,
CONCAT(ifi.COLUMN_NAME, if(ifi.COLUMN_NUM = 0, '', ifi.COLUMN_NUM)) columnName
FROM
ic_form_item ifi
LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID
WHERE
ITEM_GROUP_ID = #{groupId} and ifi.CUSTOMER_ID = #{customerId}
AND LENGTH(ifi.COLUMN_NAME)>0
</select>

Loading…
Cancel
Save