Browse Source

联建活动列表

master
yinzuomei 3 years ago
parent
commit
599109db1c
  1. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  2. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java
  3. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  4. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java
  5. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  6. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  7. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java
  8. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  9. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  10. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java

@ -124,4 +124,6 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
* @return
*/
List<IcPartyUnitEntity> pageList(PartyUnitFormDTO formDTO);
List<String> getUnitNames(@Param("unitIds") List<String> unitIds);
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.demand.ServiceItemResultDTO;
import com.epmet.entity.IcServiceItemDictEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -36,4 +37,6 @@ public interface IcServiceItemDictDao extends BaseDao<IcServiceItemDictEntity> {
List<ServiceItemResultDTO> pageList(String customerId);
IcServiceItemDictEntity selectMax(String customerId);
String selectName(@Param("customerId") String customerId, @Param("categoryCode") String categoryCode);
}

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -6,13 +6,12 @@ import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyTypepercentFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.PartyUnitListbriefFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.CheckStaffInfoResultDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.springframework.web.multipart.MultipartFile;
@ -20,7 +19,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* 联建单位
@ -181,4 +179,12 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
List<PartyTypepercentResultDTO> getTypepercent(PartyTypepercentFormDTO form);
void editPartyOrCommunity(CheckStaffInfoResultDTO formDTO);
/**
* 查询联建单位名称
* 不限制del_flag='0'
* @param unitIds
* @return
*/
List<String> getUnitNames(List<String> unitIds);
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java

@ -79,4 +79,6 @@ public interface IcServiceItemDictService extends BaseService<IcServiceItemDictE
* @Date 2022/4/14 14:31
*/
void customerInit(String customerId);
String getCategoryName(String customerId, String id);
}

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -124,6 +124,9 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
//联建单位ID与单位名匹配
List<String> unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA));
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
if(CollectionUtils.isEmpty(unitNames)){
unitNames=icPartyUnitService.getUnitNames(unitIds);
}
dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA));
if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
@ -132,6 +135,20 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
dto.setAgencyName(gridInfo.getAgencyName());
}
}
//服务事项
if(StringUtils.isNotBlank(dto.getServiceMatter())){
List<String> serviceMatterid = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA));
List<String> serviceMatterNameList=new ArrayList<>();
for(String id:serviceMatterid){
String categoryName=icServiceItemDictService.getCategoryName(dto.getCustomerId(),id);
if(StringUtils.isNotBlank(categoryName)){
serviceMatterNameList.add(categoryName);
}
}
dto.setServiceMatterList(serviceMatterid);
dto.setServiceMatterNameList(serviceMatterNameList);
dto.setServiceMatterName(StringUtils.join(serviceMatterNameList, StrConstant.COMMA));
}
});
}

14
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -778,4 +778,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
}
}
/**
* 查询联建单位名称
* 不限制del_flag='0'
*
* @param unitIds
* @return
*/
@Override
public List<String> getUnitNames(List<String> unitIds) {
if(CollectionUtils.isEmpty(unitIds)){
return new ArrayList<>();
}
return baseDao.getUnitNames(unitIds);
}
}

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java

@ -201,5 +201,8 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl<IcServiceItemD
}
}
@Override
public String getCategoryName(String customerId, String categoryCode) {
return baseDao.selectName(customerId,categoryCode);
}
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml

@ -62,7 +62,8 @@
LONGITUDE,
LATITUDE,
RESULT,
a.AGENCY_ID
a.AGENCY_ID,
a.CUSTOMER_ID
FROM
ic_party_activity a
INNER JOIN (

13
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

@ -224,4 +224,17 @@
</if>
order by u.CREATED_TIME desc
</select>
<select id="getUnitNames" parameterType="map" resultType="java.lang.String">
SELECT
u.UNIT_NAME
FROM
ic_party_unit u
where 1=1
<trim prefix="AND ( " suffix=" )">
<foreach collection="unitIds" separator="or" item="i" index="index" >
ID = #{i.id}
</foreach>
</trim>
</select>
</mapper>

10
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml

@ -31,4 +31,14 @@
order by CATEGORY_CODE desc
limit 1
</select>
<select id="selectName" parameterType="map" resultType="java.lang.String">
SELECT
d.CATEGORY_NAME
FROM
ic_service_item_dict d
WHERE
d.CUSTOMER_ID = #{customerId}
AND d.CATEGORY_CODE = #{categoryCode}
</select>
</mapper>
Loading…
Cancel
Save