|
|
@ -43,6 +43,7 @@ import com.epmet.dto.form.PartyUnitFormDTO; |
|
|
|
import com.epmet.dto.form.demand.ServiceQueryFormDTO; |
|
|
|
import com.epmet.dto.form.demand.SubCodeFormDTO; |
|
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
|
import com.epmet.dto.result.demand.ServiceStatDTO; |
|
|
|
import com.epmet.entity.IcPartyUnitEntity; |
|
|
|
import com.epmet.excel.IcPartyUnitImportExcel; |
|
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
@ -61,6 +62,7 @@ import org.springframework.web.multipart.MultipartFile; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.IOException; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@ -108,6 +110,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
} else { |
|
|
|
item.setServiceMatterList(new ArrayList<>()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(item.getSatisfaction())){ |
|
|
|
item.setSatisfaction(StrConstant.HYPHEN); |
|
|
|
} |
|
|
|
}); |
|
|
|
PageInfo<IcPartyUnitDTO> pageInfo = new PageInfo<>(dtoList); |
|
|
|
return new PageData<>(dtoList, pageInfo.getTotal()); |
|
|
@ -374,15 +379,19 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
|
|
|
|
/** |
|
|
|
* 计算区域化党建单位的群众满意度 |
|
|
|
* |
|
|
|
* 总分➗需求个数 |
|
|
|
* @param formDTO |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void calPartyUnitSatisfation(CalPartyUnitSatisfactionFormDTO formDTO) { |
|
|
|
log.info("收到消息内容啦...." + JSON.toJSONString(formDTO)); |
|
|
|
// todo
|
|
|
|
|
|
|
|
|
|
|
|
List<ServiceStatDTO> list = icUserDemandRecService.groupByPartyUnit(formDTO.getCustomerId(), formDTO.getPartyUnitId()); |
|
|
|
for (ServiceStatDTO serviceStatDTO : list) { |
|
|
|
if (0 != serviceStatDTO.getDemandCount()) { |
|
|
|
BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP); |
|
|
|
baseDao.updateSatisfaction(serviceStatDTO.getServerId(),result); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private String getServiceMatter(Map<String, String> map, String matter) { |
|
|
|