insert 会所收入统计
This commit is contained in:
+2
@@ -217,4 +217,6 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
|||||||
List<DepartStatistics> queryPageListDepartment(@Param("departStatisticsSearch") DepartStatisticsSearch departStatisticsSearch, @Param("idList") List<String> idList);
|
List<DepartStatistics> queryPageListDepartment(@Param("departStatisticsSearch") DepartStatisticsSearch departStatisticsSearch, @Param("idList") List<String> idList);
|
||||||
|
|
||||||
AllMoney queryPageListDepartment33(@Param("departStatisticsSearch") DepartStatisticsSearch departStatisticsSearch, @Param("idList") List<String> idList);
|
AllMoney queryPageListDepartment33(@Param("departStatisticsSearch") DepartStatisticsSearch departStatisticsSearch, @Param("idList") List<String> idList);
|
||||||
|
|
||||||
|
IPage<AllProjectStatistics> queryPageListAllProjectMoney(Page<AllProjectStatistics> page, @Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch, @Param("idList") List<String> idList);
|
||||||
}
|
}
|
||||||
|
|||||||
+17
@@ -2216,4 +2216,21 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 全所收入统计-->
|
||||||
|
<select id="queryPageListAllProjectMoney" resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||||
|
select
|
||||||
|
sum(paidNoTaxAmount) as comeAllMoney,
|
||||||
|
sum(invoiceNoTaxAmount) as billMoney,
|
||||||
|
sum(confirmNoTaxAmount) as confirmAmount,
|
||||||
|
DATE_FORMAT(pcpr.payment_date,'%Y-%m') as paymentDate
|
||||||
|
from v_statistical v
|
||||||
|
left join pay_confirm_payment_record pcpr on(v.projectId=pcpr.project_id)
|
||||||
|
<where>
|
||||||
|
<if test="allProjectStatisticsSearch.paymentYear != null and allProjectStatisticsSearch.paymentYear != ''">
|
||||||
|
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{allProjectStatisticsSearch.paymentYear}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by DATE_FORMAT(pcpr.payment_date,'%Y-%m')
|
||||||
|
order by paymentDate
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+2
@@ -238,4 +238,6 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
|
|||||||
List<DepartStatistics> queryPageListDepartmentExcel(DepartStatisticsSearch departStatisticsSearch, List<String> idList);
|
List<DepartStatistics> queryPageListDepartmentExcel(DepartStatisticsSearch departStatisticsSearch, List<String> idList);
|
||||||
|
|
||||||
AllMoney queryPageListDepartment33(DepartStatisticsSearch departStatisticsSearch, List<String> idList);
|
AllMoney queryPageListDepartment33(DepartStatisticsSearch departStatisticsSearch, List<String> idList);
|
||||||
|
|
||||||
|
IPage<AllProjectStatistics> queryPageListAllProjectMoney(Page<AllProjectStatistics> page, AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList );
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -630,4 +630,9 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<AllProjectStatistics> queryPageListAllProjectMoney(Page<AllProjectStatistics> page, AllProjectStatisticsSearch allProjectStatisticsSearch, List<String> idList) {
|
||||||
|
return payWorkingGroupMapper.queryPageListAllProjectMoney(page,allProjectStatisticsSearch,idList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+78
@@ -0,0 +1,78 @@
|
|||||||
|
package com.jero.statistics.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.api.ISysBaseAPI;
|
||||||
|
import com.jero.common.util.oConvertUtils;
|
||||||
|
import com.jero.modules.system.mapper.SysUserMapper;
|
||||||
|
import com.jero.modules.system.service.ISysDepartService;
|
||||||
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
|
import com.jero.project.service.IPayWorkingGroupService;
|
||||||
|
import com.jero.statistics.entity.AllMoney;
|
||||||
|
import com.jero.statistics.entity.AllProjectStatistics;
|
||||||
|
import com.jero.statistics.entity.AllProjectStatisticsSearch;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: TODO
|
||||||
|
* @author: Kuang Kaixing
|
||||||
|
* @date: 2022/07/28 16:13
|
||||||
|
*/
|
||||||
|
@Api(tags = "全所收入统计")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/statistics/allProjectMoneyStatistics")
|
||||||
|
@Slf4j
|
||||||
|
public class AllProjectMoneyStatisticsController {
|
||||||
|
@Resource
|
||||||
|
private SysUserMapper userMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISysDepartService sysDepartService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
@Autowired
|
||||||
|
private IPayWorkingGroupService payWorkingGroupService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param allProjectStatisticsSearch 全所收入统计搜索
|
||||||
|
* @param pageNo 页数
|
||||||
|
* @param pageSize 条数
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "全所收入统计搜索-分页列表查询", notes = "全所收入统计搜索-详情分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<?> list(AllProjectStatisticsSearch allProjectStatisticsSearch,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
|
||||||
|
Page<AllProjectStatistics> page = new Page<>(pageNo, pageSize);
|
||||||
|
IPage<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListAllProjectMoney(page, allProjectStatisticsSearch, null);
|
||||||
|
HashMap<String, Object> hashMap = new HashMap<>();
|
||||||
|
|
||||||
|
AllMoney allMoney = payWorkingGroupService.queryPageList33(allProjectStatisticsSearch, null);
|
||||||
|
|
||||||
|
hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney());
|
||||||
|
hashMap.put("sumOfReallyMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getComeAllMoney());
|
||||||
|
hashMap.put("sumOfBillMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getBillMoney());
|
||||||
|
hashMap.put("sumOfConfirmAmount", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getConfirmAmount());
|
||||||
|
hashMap.put("pageList", pageList);
|
||||||
|
return Result.OK(hashMap);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -66,5 +66,5 @@ public class AllProjectStatistics {
|
|||||||
|
|
||||||
@Excel(name = "到账时间", width = 15)
|
@Excel(name = "到账时间", width = 15)
|
||||||
@ApiModelProperty(value = "到账时间")
|
@ApiModelProperty(value = "到账时间")
|
||||||
private Date paymentDate;
|
private String paymentDate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user