Bläddra i källkod

完成 报表结算,应该以费用开始时间(或者结束时间)为准。(水电抄表一般为下个月才导入系统,应收金额应该结算到上个月)

java110 3 år sedan
förälder
incheckning
4e5c9b2659

+ 3 - 3
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -2317,10 +2317,10 @@
         sum(t.cur_received_amount+t.his_owe_received_amount) oweReceivedAmount
         from report_fee_month_statistics t
         inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
-        inner join building_room br on br.room_id = t.obj_id and t.obj_type = '3333' and br.community_id =
+        left join building_room br on br.room_id = t.obj_id and t.obj_type = '3333' and br.community_id =
         t.community_id and br.status_cd = '0'
-        inner join building_unit bu on bu.unit_id = br.unit_id and bu.status_cd = '0'
-        inner join f_floor f on f.floor_id = bu.floor_id and f.status_cd = '0'
+        left join building_unit bu on bu.unit_id = br.unit_id and bu.status_cd = '0'
+        left join f_floor f on f.floor_id = bu.floor_id and f.status_cd = '0'
         where 1=1
         and t.fee_year= #{feeYear}
         and t.fee_month= #{feeMonth}

+ 2 - 2
service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java

@@ -244,7 +244,7 @@ public class GeneratorFeeMonthStatisticsInnerServiceSMOImpl implements IGenerato
         reportFeeMonthStatisticsDto.setCommunityId(tmpReportCarDto.getCommunityId());
         reportFeeMonthStatisticsDto.setConfigId(tmpReportFeeDto.getConfigId());
         reportFeeMonthStatisticsDto.setObjId(tmpReportFeeDto.getPayerObjId());
-        //reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId());
+        reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId());//这里不能注释 如果一个费用创建多条时会有bug
         reportFeeMonthStatisticsDto.setObjType(tmpReportFeeDto.getPayerObjType());
         reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + "");
         reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + "");
@@ -442,7 +442,7 @@ public class GeneratorFeeMonthStatisticsInnerServiceSMOImpl implements IGenerato
         reportFeeMonthStatisticsDto.setCommunityId(reportRoomDto.getCommunityId());
         reportFeeMonthStatisticsDto.setConfigId(tmpReportFeeDto.getConfigId());
         reportFeeMonthStatisticsDto.setObjId(tmpReportFeeDto.getPayerObjId());
-        //reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId());
+        reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId()); //这里不能注释,因为一个费用多次创建时会存在覆盖 存在bug问题
         reportFeeMonthStatisticsDto.setObjType(tmpReportFeeDto.getPayerObjType());
         reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + "");
         reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + "");

+ 3 - 3
service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeYearStatisticsInnerServiceSMOImpl.java

@@ -385,9 +385,9 @@ public class GeneratorFeeYearStatisticsInnerServiceSMOImpl implements IGenerator
                 = BeanConvertUtil.covertBeanList(reportFeeYearCollectionDetailServiceDaoImpl.getReportFeeYearCollectionDetailInfo(BeanConvertUtil.beanCovertMap(reportFeeYearCollectionDetailDto)),
                 ReportFeeYearCollectionDetailDto.class);
 
-        if (!ListUtil.isNull(reportFeeYearCollectionDetailDtos) && year != curYear) { // 说明已经处理过了 不再处理
-            return;
-        }
+//        if (!ListUtil.isNull(reportFeeYearCollectionDetailDtos) && year != curYear) { // 说明已经处理过了 不再处理
+//            return;
+//        }
 
         double receivableAmount = feeDto.getFeePrice();
 

+ 11 - 40
service-api/src/main/java/com/java110/api/listener/resourceStoreType/ListResourceStoreTypesListener.java

@@ -1,69 +1,41 @@
-package com.java110.api.listener.resourceStoreType;
+package com.java110.store.cmd.resourceStore;
 
 import com.alibaba.fastjson.JSONObject;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
 import com.java110.dto.resourceStoreType.ResourceStoreTypeDto;
-import com.java110.utils.constant.ServiceCodeResourceStoreTypeConstant;
 import com.java110.intf.store.IResourceStoreTypeInnerServiceSMO;
+import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.BeanConvertUtil;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
 import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 
 import java.util.ArrayList;
 import java.util.List;
 
-/**
- * 查询小区侦听类
- */
-@Java110Listener("listResourceStoreTypesListener")
-public class ListResourceStoreTypesListener extends AbstractServiceApiListener {
+@Java110Cmd(serviceCode = "resourceStoreType.listResourceStoreTypes")
+public class ListResourceStoreTypesCmd extends Cmd {
 
     @Autowired
     private IResourceStoreTypeInnerServiceSMO resourceStoreTypeInnerServiceSMOImpl;
 
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeResourceStoreTypeConstant.LIST_RESOURCESTORETYPES;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
 
     @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    public IResourceStoreTypeInnerServiceSMO getResourceStoreTypeInnerServiceSMOImpl() {
-        return resourceStoreTypeInnerServiceSMOImpl;
-    }
-
-    public void setResourceStoreTypeInnerServiceSMOImpl(IResourceStoreTypeInnerServiceSMO resourceStoreTypeInnerServiceSMOImpl) {
-        this.resourceStoreTypeInnerServiceSMOImpl = resourceStoreTypeInnerServiceSMOImpl;
-    }
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         if (!reqJson.containsKey("storeId")) {
-            String storeId = event.getDataFlowContext().getRequestCurrentHeaders().get("store-id");
+            String storeId = context.getReqHeaders().get("store-id");
             reqJson.put("storeId", storeId);
         }
         super.validatePageInfo(reqJson);
     }
 
     @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         if (reqJson.containsKey("flag") && reqJson.getString("flag").equals("0")) {
             reqJson.put("parentId", reqJson.getString("rstId"));
             reqJson.put("rstId", null);
@@ -92,6 +64,5 @@ public class ListResourceStoreTypesListener extends AbstractServiceApiListener {
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 
         context.setResponseEntity(responseEntity);
-
     }
 }