Browse Source

latestSubmit

dev
yinzuomei 3 years ago
parent
commit
4f675e4d0b
  1. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java
  2. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java
  3. 1
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java

@ -40,5 +40,5 @@ public interface IcResiCollectDao extends BaseDao<IcResiCollectEntity> {
* @param userId
* @return
*/
String selectLastSubmitId(@Param("customerId") String customerId, @Param("userId") String userId);
List<String> selectLastSubmitId(@Param("customerId") String customerId, @Param("userId") String userId);
}

5
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java

@ -2,6 +2,7 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -25,6 +26,7 @@ import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.IcResiCollectService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -209,7 +211,8 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao,
resDTO.setAgencyId(gridInfoCache.getPid());
resDTO.setPids(null != agencyInfoCache ? agencyInfoCache.getPids() : StrConstant.EPMETY_STR);
resDTO.setAgencyName(gridInfoCache.getAgencyName());
String latestResiCollectId = baseDao.selectLastSubmitId(formDTO.getCustomerId(), formDTO.getUserId());
List<String> resiCoolectIds = baseDao.selectLastSubmitId(formDTO.getCustomerId(), formDTO.getUserId());
String latestResiCollectId = CollectionUtils.isNotEmpty(resiCoolectIds) ? resiCoolectIds.get(NumConstant.ZERO) : StrConstant.EPMETY_STR;
if (StringUtils.isNotBlank(latestResiCollectId)) {
resDTO.setResiCollectId(latestResiCollectId);
//之前提交过

1
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml

@ -84,6 +84,5 @@
AND ( m.CREATED_BY = #{userId} OR m.UPDATED_BY = #{userId} )
ORDER BY
m.UPDATED_TIME DESC
LIMIT 1
</select>
</mapper>
Loading…
Cancel
Save