Browse Source

积分相关修改

master
zhaoqifeng 3 years ago
parent
commit
110aef3278
  1. 27
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java

27
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java

@ -41,6 +41,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -79,6 +80,12 @@ public class PointApplyServiceImpl extends BaseServiceImpl<PointApplyDao, PointA
item.setShowName(userInfo.getShowName()); item.setShowName(userInfo.getShowName());
item.setStatus(ApplyStatusEnum.getName(item.getStatus())); item.setStatus(ApplyStatusEnum.getName(item.getStatus()));
} }
//获取网格信息
//从缓存获取网格信息
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId());
if (null != gridInfo) {
item.setGridName(gridInfo.getGridName());
}
}); });
} }
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal());
@ -208,13 +215,25 @@ public class PointApplyServiceImpl extends BaseServiceImpl<PointApplyDao, PointA
*/ */
@Override @Override
public void audit(TokenDto tokenDto, PointAuditFormDTO formDTO) { public void audit(TokenDto tokenDto, PointAuditFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getId()) && CollectionUtils.isEmpty(formDTO.getIds())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "请选择待审核的申请", "请选择待审核的申请");
}
List<String> ids = new ArrayList<>();
if (CollectionUtils.isEmpty(formDTO.getIds())) {
ids.add(formDTO.getId());
} else {
ids = formDTO.getIds();
}
ids.forEach(id -> {
//获取积分申请信息
PointApplyDTO dto = get(id);
if (NumConstant.ZERO_STR.equals(dto.getStatus())) {
//更新审核状态 //更新审核状态
PointApplyEntity entity = ConvertUtils.sourceToTarget(formDTO, PointApplyEntity.class); PointApplyEntity entity = ConvertUtils.sourceToTarget(formDTO, PointApplyEntity.class);
baseDao.updateById(entity); baseDao.updateById(entity);
String subjectId; String subjectId;
//获取积分申请信息
PointApplyDTO dto = get(formDTO.getId());
if (CommonConstant.MORAL_EDUCATION.equals(dto.getCategoryCode())) { if (CommonConstant.MORAL_EDUCATION.equals(dto.getCategoryCode())) {
subjectId = dto.getHouseId(); subjectId = dto.getHouseId();
} else { } else {
@ -252,5 +271,9 @@ public class PointApplyServiceImpl extends BaseServiceImpl<PointApplyDao, PointA
pointAditiveCalcDao.insert(calc); pointAditiveCalcDao.insert(calc);
} }
} }
});
}
} }
Loading…
Cancel
Save