全所统计

This commit is contained in:
zhangqinlin
2021-09-18 14:46:12 +08:00
parent f42a15cf6d
commit c6559d4215
25 changed files with 647 additions and 360 deletions
@@ -18,14 +18,6 @@ import java.util.List;
* @Version: V1.0
*/
public interface PayMemberProjectMapper extends BaseMapper<PayMemberProject> {
/**
* 全所统计
* @param
* @param allProjectStatisticsSearch
* @return
*/
List<AllProjectStatistics> queryPageList3( @Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
/**
* @Description 查询与收入合同企业一致的数据
* @Author lqt
@@ -19,5 +19,4 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface TbMemberProjectMapper extends BaseMapper<TbMemberProject> {
List<AllProjectStatistics> queryPageList3(@Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
}
@@ -17,56 +17,6 @@
<result column="remark" property="remark" />
</resultMap>
<select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics">
SELECT
pmp.project_name AS projectName,
pmp.director_name as principalName,
pmps.company_name AS chargeCompanyTemporaryName,
pmps.allMoney,
pmps.comeAllMoney,
pmps.charge_use as chargeUse
FROM pay_member_project pmp left join (select id,project_id,company_name,in_account,pack,charge_use,SUM(amount_receivable) AS allMoney,SUM(paid_amount) AS comeAllMoney
from pay_member_project_subitem GROUP BY project_id) pmps on(pmp.id=pmps.project_id)
left join pay_payment_record ppr on(pmps.id=ppr.project_id)
<where>
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
AND pmp.project_name LIKE
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
</if>
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
AND pmps.charge_use=#{allProjectStatisticsSearch.chargeUse}
</if>
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
AND pmps.company_name LIKE
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
</if>
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
AND pmps.in_account=#{allProjectStatisticsSearch.inAccountStatue}
</if>
<if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">
AND date_format(ppr.payment_date,'%Y-%m-%d') LIKE concat('%',concat(#{allProjectStatisticsSearch.year},'%'))
</if>
<if test="allProjectStatisticsSearch.principalNameId != null and allProjectStatisticsSearch.principalNameId != ''">
AND pmp.director_id=#{allProjectStatisticsSearch.principalNameId}
</if>
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
AND pmps.pack=#{allProjectStatisticsSearch.pack}
</if>
<choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND pmps.allMoney > #{allProjectStatisticsSearch.allMoney} and pmps.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
</when>
<otherwise>
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
AND pmps.allMoney > #{allProjectStatisticsSearch.allMoney}
</if>
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND pmps.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
</if>
</otherwise>
</choose>
</where>
</select>
<select id="queryListByCompany" resultType="com.jero.member.entity.PayMemberProject">
SELECT pmp.*,#{projectType} AS projectType FROM pay_member_project_subitem pmps
LEFT JOIN pay_member_project pmp ON pmp.id = pmps.project_id
@@ -9,55 +9,4 @@
<result column="update_time" property="updateTime" />
<result column="project_name" property="projectName" />
</resultMap>
<select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics">
SELECT
tmp.project_name AS projectName,
-- tmp.principal_name as principalName,
tmps.company_name AS chargeCompanyTemporaryName,
tmps.allMoney,
tmps.comeAllMoney,
tmps.charge_use as chargeUse
FROM tb_member_project tmp left join (select id,project_id,company_name,charge_use,in_account,SUM(amount_receivable) AS allMoney,SUM(paid_amount) AS comeAllMoney
from tb_member_project_subitem GROUP BY project_id) tmps on(tmp.id=tmps.project_id)
left join pay_payment_record ppr on(tmps.id=ppr.project_id)
<where>
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
AND tmp.project_name LIKE
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
</if>
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
AND tmps.charge_use=#{allProjectStatisticsSearch.chargeUse}
</if>
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
AND tmps.company_name LIKE
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
</if>
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
AND tmps.in_account=#{allProjectStatisticsSearch.inAccountStatue}
</if>
<if test="allProjectStatisticsSearch.year != null and allProjectStatisticsSearch.year != ''">
AND date_format(ppr.payment_date,'%Y-%m-%d') LIKE concat('%',concat(#{allProjectStatisticsSearch.year},'%'))
</if>
<!-- <if test="allProjectStatisticsSearch.principalNameId != null and allProjectStatisticsSearch.principalNameId != ''">-->
<!-- AND tmp.principal_id=#{allProjectStatisticsSearch.principalNameId}-->
<!-- </if>-->
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
AND tmps.pack=#{allProjectStatisticsSearch.pack}
</if>
<choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND tmps.allMoney > #{allProjectStatisticsSearch.allMoney} and tmps.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
</when>
<otherwise>
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
AND tmps.allMoney > #{allProjectStatisticsSearch.allMoney}
</if>
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND tmps.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
</if>
</otherwise>
</choose>
</where>
</select>
</mapper>
@@ -76,7 +76,6 @@ public interface IPayMemberProjectService extends IService<PayMemberProject> {
*/
IPage<PayMemberProject> getPage(Page<PayMemberProject> page, QueryWrapper<PayMemberProject> queryWrapper);
List<AllProjectStatistics> queryPageList3(AllProjectStatisticsSearch allProjectStatisticsSearch);
/**
* @Description 查询与收入合同企业一致的数据
@@ -65,11 +65,4 @@ public interface ITbMemberProjectService extends IService<TbMemberProject> {
*/
List<TbMemberProject> queryList();
/**
* 全所统计
* @param
* @param allProjectStatisticsSearch
* @return
*/
List<AllProjectStatistics> queryPageList3(AllProjectStatisticsSearch allProjectStatisticsSearch);
}
@@ -155,16 +155,6 @@ public class PayPayMemberProjectServiceImpl extends ServiceImpl<PayMemberProject
return memberProjectPage;
}
/**
* 全所统计
* @param
* @param allProjectStatisticsSearch
* @return
*/
@Override
public List<AllProjectStatistics> queryPageList3( AllProjectStatisticsSearch allProjectStatisticsSearch) {
return payMemberProjectMapper.queryPageList3(allProjectStatisticsSearch);
}
@Override
public IPage<PayMemberProject> queryListByCompany(Page<PayMemberProject> page,String companyId, String memberName, String projectType,Integer pack,String packYear) {
@@ -37,8 +37,7 @@ public class TbMemberProjectServiceImpl extends ServiceImpl<TbMemberProjectMappe
@Resource
private ITbMemberProjectSubitemService tbMemberProjectSubitemService;
@Resource
private TbMemberProjectMapper tbMemberProjectMapper;
@Autowired
private IPayIncomeContractService payIncomeContractService;
/**
@@ -101,14 +100,4 @@ public class TbMemberProjectServiceImpl extends ServiceImpl<TbMemberProjectMappe
return list();
}
/**
* 全所查询
* @param
* @param allProjectStatisticsSearch
* @return
*/
@Override
public List<AllProjectStatistics> queryPageList3( AllProjectStatisticsSearch allProjectStatisticsSearch) {
return tbMemberProjectMapper.queryPageList3(allProjectStatisticsSearch);
}
}