Browse Source

CQC 报表代码bug

修复
thing_master
xiachao 1 year ago
parent
commit
28a750a2dc
  1. 4
      modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/mapper/CqcCarbonReportMapper.java
  2. 4
      modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/service/impl/CqcCarbonReportServiceImpl.java
  3. 1
      modules/cqc-service/src/main/resources/mapper/CqcCarbonReportMapper.xml

4
modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/mapper/CqcCarbonReportMapper.java

@ -1,13 +1,11 @@
package com.thing.cqc.cqcCarbonReport.mapper;
import com.thing.common.orm.mapper.PowerBaseMapper;
import com.thing.cqc.cqcCarbonReport.dto.CqcCarbonReportCountInfo;
import com.thing.cqc.cqcCarbonReport.dto.CqcCarbonReportCountParam;
import com.thing.cqc.cqcCarbonReport.entity.CqcCarbonReportEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 申请表基础数据
@ -18,5 +16,5 @@ import java.util.Map;
@Mapper
public interface CqcCarbonReportMapper extends PowerBaseMapper<CqcCarbonReportEntity> {
List<CqcCarbonReportCountParam> countByStatus();
List<CqcCarbonReportCountParam> countByStatus(Long tCode);
}

4
modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/service/impl/CqcCarbonReportServiceImpl.java

@ -123,8 +123,10 @@ public class CqcCarbonReportServiceImpl extends BaseServiceImpl<CqcCarbonReportM
public CqcCarbonReportCountInfo countByStatus() {
CqcCarbonReportCountInfo cqcCarbonReportCountInfo = new CqcCarbonReportCountInfo();
Long tCode = UserContext.getTenantCode();
List<CqcCarbonReportCountParam> list = mapper.countByStatus();
List<CqcCarbonReportCountParam> list = mapper.countByStatus(tCode);
list.forEach(temp->{
if(temp.getStatus().equals("1")){

1
modules/cqc-service/src/main/resources/mapper/CqcCarbonReportMapper.xml

@ -11,6 +11,7 @@
status,"count"(status) as count
FROM
cqc_carbon_report
WHERE tenant_code = #{tCode}
GROUP BY status;
</select>
</mapper>
Loading…
Cancel
Save