Browse Source

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

master
sunyuchao 4 years ago
parent
commit
90aef5edcf
  1. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java
  2. 10
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java
  3. 2
      epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml
  4. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java
  5. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java
  6. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
  7. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
  8. 39
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiDemandDictDao.xml

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java

@ -46,7 +46,7 @@ public interface OperCustomizeOpenFeignClient {
Result<CheckFloatFootBarResultDTO> checkFloatFootBar(@RequestBody CheckFloatFootBarFormDTO checkFloatFootBarFormDTO);
/**
* desc: 获取表单填写项
* desc: 获取表单填写项 dynamic=null查询全部否则查询对应的item
* @param formDto
* @return
*/

10
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java

@ -102,7 +102,7 @@ public class IcFormController {
/**
* 获取居民信息表单
* 获取居民信息表单 dynamic=null查询全部否则查询对应的item
*
* @param formDto
* @return com.epmet.commons.tools.utils.Result<CustomerFormResultDTO>
@ -114,16 +114,13 @@ public class IcFormController {
if (StringUtils.isBlank(formDto.getCustomerId())){
formDto.setCustomerId(customerId);
}
if (formDto.getDynamic() == null){
formDto.setDynamic(true);
}
ValidatorUtils.validateEntity(formDto,CustomerFormQueryDTO.AddUserInternalGroup.class);
return new Result<CustomerFormResultDTO>().ok(icFormService.getCustomerForm(formDto));
}
/**
* 获取居民信息的查询条件组件列表
* 获取居民信息的查询条件组件列表 dynamic=null查询全部否则查询对应的item
*
* @param tokenDto
* @param formDto
@ -134,9 +131,6 @@ public class IcFormController {
@PostMapping("conditionlist")
public Result<List<ConditionResultDTO>> queryConditionList(@LoginUser TokenDto tokenDto, @RequestBody CustomerFormQueryDTO formDto){
formDto.setCustomerId(tokenDto.getCustomerId());
if (formDto.getDynamic() == null){
formDto.setDynamic(true);
}
ValidatorUtils.validateEntity(formDto,CustomerFormQueryDTO.AddUserInternalGroup.class);
return new Result<List<ConditionResultDTO>>().ok(icFormItemService.queryConditionList(formDto));
}

2
epmet-module/oper-customize/oper-customize-server/src/main/resources/logback-spring.xml

@ -139,7 +139,7 @@
</appender>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<springProfile name="local,dev,test">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.epmet.dao" level="INFO"/>

9
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java

@ -17,7 +17,10 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -29,6 +32,7 @@ import com.epmet.service.IcResiDemandDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@ -81,4 +85,9 @@ public class IcResiDemandDictController {
return new Result();
}
@PostMapping("demandoption")
public Result<List<OptionResultDTO>> getDemandOptions(@LoginUser TokenDto tokenDto) {
return new Result<List<OptionResultDTO>>().ok(icResiDemandDictService.getDemandOptions(tokenDto.getCustomerId()));
}
}

5
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.entity.IcResiDemandDictEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -32,6 +33,6 @@ import java.util.List;
*/
@Mapper
public interface IcResiDemandDictDao extends BaseDao<IcResiDemandDictEntity> {
List<OptionResultDTO> selectDemandOptions(String customerId);
List<OptionResultDTO> selectChildDemands(String parentCode);
List<OptionResultDTO> selectDemandOptions(@Param("customerId") String customerId);
List<OptionResultDTO> selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode);
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiDemandDictService.java

@ -18,6 +18,7 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcResiDemandDictDTO;
import com.epmet.entity.IcResiDemandDictEntity;
@ -93,4 +94,13 @@ public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEnt
*/
void delete(String[] ids);
/**
* @Description 获取居民需求
* @Param customerId
* @Return {@link List< OptionResultDTO>}
* @Author zhaoqifeng
* @Date 2021/10/27 17:57
*/
List<OptionResultDTO> getDemandOptions(String customerId);
}

14
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java

@ -21,6 +21,7 @@ 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.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcResiDemandDictDao;
@ -96,4 +97,17 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param customerId
* @Description 获取居民需求
* @Param customerId
* @Return {@link List< OptionResultDTO >}
* @Author zhaoqifeng
* @Date 2021/10/27 17:57
*/
@Override
public List<OptionResultDTO> getDemandOptions(String customerId) {
return baseDao.selectDemandOptions(customerId);
}
}

39
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiDemandDictDao.xml

@ -19,8 +19,43 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="selectDemandOptions" resultType="com.epmet.commons.tools.dto.result.OptionResultDTO"> </select>
<select id="selectChildDemands" resultType="com.epmet.commons.tools.dto.result.OptionResultDTO"> </select>
<resultMap id="DemandResult" type="com.epmet.commons.tools.dto.result.OptionResultDTO">
<result column="customerId"/>
<result column="value" property="value"/>
<result column="label" property="label"/>
<collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO"
select="selectChildDemands" column="customerId=customerId,parentCode=value">
</collection>
</resultMap>
<select id="selectDemandOptions" resultMap="DemandResult">
SELECT
CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label"
FROM
ic_resi_demand_dict
WHERE
DEL_FLAG = 0
AND LEVEL = 1
AND CUSTOMER_ID = #{customerId}
ORDER BY
SORT ASC
</select>
<select id="selectChildDemands" resultMap="DemandResult">
SELECT
CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label"
FROM
ic_resi_demand_dict
WHERE
DEL_FLAG = 0
AND LEVEL = 2
AND CUSTOMER_ID = #{customerId}
AND PARENT_CODE = #{parentCode}
ORDER BY
SORT ASC
</select>
</mapper>
Loading…
Cancel
Save