全所统计
This commit is contained in:
+1
@@ -128,6 +128,7 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
||||
if (ObjectUtil.isNotEmpty(payMailBillSearch.getProjectName())){
|
||||
queryWrapper.like("project_name",payMailBillSearch.getProjectName());
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<PayMailBill> pageList = payMailBillService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+1
@@ -50,6 +50,7 @@ public class PayMailContractController extends JeroController<PayMailContract, I
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayMailBillList> queryWrapper = QueryGenerator.initQueryWrapper(payMailBillList, req.getParameterMap());
|
||||
Page<PayMailBillList> page = new Page<>(pageNo, pageSize);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<PayMailBillList> pageList = payMailContractService.pageContract(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+1
-7
@@ -18,11 +18,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface PayMeetingSituationMapper extends BaseMapper<PayMeetingSituation> {
|
||||
/**
|
||||
* 全所统计
|
||||
* @param
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageList3(@Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
}
|
||||
|
||||
-50
@@ -51,54 +51,4 @@
|
||||
<result column="mail" property="mail" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||
SELECT
|
||||
pm.meeting_name AS projectName,
|
||||
pm.director_name as principalName,
|
||||
pms.company_name AS chargeCompanyTemporaryName,
|
||||
pms.allMoney,
|
||||
pms.comeAllMoney,
|
||||
pms.charge_use as chargeUse
|
||||
FROM pay_meeting pm left join (select id,meeting_id,company_name,charge_use,in_account,SUM(amount_receivable) AS allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_meeting_situation GROUP BY meeting_id) pms on(pm.id=pms.meeting_id)
|
||||
left join pay_payment_record ppr on(pms.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pm.meeting_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pms.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pms.company_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pms.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 pm.director_id=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pms.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pms.allMoney > #{allProjectStatisticsSearch.allMoney} and pms.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pms.allMoney > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pms.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
-1
@@ -60,5 +60,4 @@ public interface IPayMeetingSituationService extends IService<PayMeetingSituatio
|
||||
|
||||
void mergePayBill(MergePayBillVO mergePayBillVO);
|
||||
|
||||
List<AllProjectStatistics> queryPageList3( AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
-10
@@ -241,16 +241,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
// payMailBillService.addPayBill(payMailBill, projectIds.toString(), PayIncomeContractCommon.PROJECT_TYPE3,allAmount.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 全所统计
|
||||
* @param
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AllProjectStatistics> queryPageList3( AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payMeetingSituationMapper.queryPageList3(allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
|
||||
-8
@@ -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
|
||||
|
||||
-1
@@ -19,5 +19,4 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface TbMemberProjectMapper extends BaseMapper<TbMemberProject> {
|
||||
|
||||
List<AllProjectStatistics> queryPageList3(@Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
-50
@@ -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
|
||||
|
||||
-51
@@ -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>
|
||||
-1
@@ -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 查询与收入合同企业一致的数据
|
||||
|
||||
-7
@@ -65,11 +65,4 @@ public interface ITbMemberProjectService extends IService<TbMemberProject> {
|
||||
*/
|
||||
List<TbMemberProject> queryList();
|
||||
|
||||
/**
|
||||
* 全所统计
|
||||
* @param
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageList3(AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
-10
@@ -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) {
|
||||
|
||||
+1
-12
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-7
@@ -29,11 +29,5 @@ public interface PayCommonProjectMapper extends BaseMapper<PayCommonProject> {
|
||||
IPage<PayCommonProject> queryPageList(Page<PayCommonProject> page, @Param("payCommonProject") PayCommonProject payCommonProject,
|
||||
@Param("paymentDate") String paymentDate);
|
||||
|
||||
/**
|
||||
* 全所统计
|
||||
* @param
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageList3(@Param("allProjectStatisticsSearch")AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -74,14 +74,20 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
||||
|
||||
List<String> getGroupList();
|
||||
|
||||
/**
|
||||
* 全所统计导出
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageListExcel(@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
/**
|
||||
* @Description 全所统计导出
|
||||
* @Description 全所统计
|
||||
* @Author zql
|
||||
* @Date 2021/9/17
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageList3(@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
IPage<AllProjectStatistics> queryPageList3(Page<AllProjectStatistics> page ,@Param(value = "allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
-49
@@ -67,53 +67,4 @@
|
||||
</where>
|
||||
GROUP BY pcp.id ORDER BY pcp.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||
SELECT
|
||||
pcp.charge_project AS projectName,
|
||||
pcp.principal_name as principalName,
|
||||
pcp.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pcp.receivable_amount as allMoney,
|
||||
pcp.paid_amount as comeAllMoney,
|
||||
pcp.charge_use as chargeUse
|
||||
FROM pay_common_project pcp left join pay_payment_record ppr on(pcp.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pcp.charge_project LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pcp.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pcp.charge_company_temporary_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pcp.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 pcp.principal_id=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pcp.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pcp.receivable_amount > #{allProjectStatisticsSearch.allMoney} and pcp.receivable_amount <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pcp.receivable_amount > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pcp.receivable_amount <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
+580
-7
@@ -140,23 +140,35 @@
|
||||
</where>
|
||||
group by pwg.id
|
||||
</select>
|
||||
|
||||
<!-- 全所统计-->
|
||||
<select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||
SELECT
|
||||
pwg.id,
|
||||
select * from
|
||||
(SELECT
|
||||
pwg.working_group_project AS projectName,
|
||||
pwg.principal_name_a as principalName,
|
||||
pwgs.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pwgs.allMoney,
|
||||
pwgs.comeAllMoney,
|
||||
pwgs.charge_use as chargeUse
|
||||
pwgs.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
pwg.create_time as createTime
|
||||
FROM pay_working_group pwg left join (select id,working_group_id,charge_company_temporary_name,charge_use,in_account,SUM(receivable_amount) AS allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_working_group_subitem GROUP BY working_group_id) pwgs on(pwg.id=pwgs.working_group_id)
|
||||
left JOIN sys_user su on(pwg.principal_id_a=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pwg.working_group_project LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pwgs.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pwgs.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
@@ -168,7 +180,8 @@
|
||||
AND pwgs.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},'%'))
|
||||
AND date_format(ppr.payment_date,'%Y-%m-%d') LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.year},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.principalNameId != null and allProjectStatisticsSearch.principalNameId != ''">
|
||||
AND pwg.principal_id_a=#{allProjectStatisticsSearch.principalNameId}
|
||||
@@ -178,20 +191,580 @@
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pwgs.allMoney > #{allProjectStatisticsSearch.allMoney} and pwgs.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
AND pwgs.allMoney > #{allProjectStatisticsSearch.allMoney} and pwgs.allMoney <![CDATA[<]]>
|
||||
#{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pwgs.allMoney > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pwgs.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
AND pwgs.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
group by pwg.id
|
||||
union all
|
||||
SELECT
|
||||
pcp.charge_project AS projectName,
|
||||
pcp.principal_name as principalName,
|
||||
pcp.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pcp.receivable_amount as allMoney,
|
||||
pcp.paid_amount as comeAllMoney,
|
||||
pcp.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
pcp.create_time as createTime
|
||||
FROM pay_common_project pcp left JOIN sys_user su on(pcp.principal_id=su.id) left join sys_depart sd
|
||||
on(su.org_code=sd.org_code) left join pay_payment_record ppr on(pcp.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pcp.charge_project LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pcp.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pcp.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pcp.charge_company_temporary_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pcp.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 pcp.principal_id=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pcp.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pcp.receivable_amount > #{allProjectStatisticsSearch.allMoney} and pcp.receivable_amount
|
||||
<![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pcp.receivable_amount > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pcp.receivable_amount <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
union all
|
||||
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,
|
||||
sd.depart_name as depart,
|
||||
pmp.create_time as createTime
|
||||
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 sys_user su on(pmp.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
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.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pmps.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</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>
|
||||
union all
|
||||
SELECT
|
||||
pm.meeting_name AS projectName,
|
||||
pm.director_name as principalName,
|
||||
pms.company_name AS chargeCompanyTemporaryName,
|
||||
pms.allMoney,
|
||||
pms.comeAllMoney,
|
||||
pms.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
pm.create_time as createTime
|
||||
FROM pay_meeting pm left join (select id,meeting_id,company_name,charge_use,in_account,SUM(amount_receivable) AS
|
||||
allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_meeting_situation GROUP BY meeting_id) pms on(pm.id=pms.meeting_id)
|
||||
left JOIN sys_user su on(pm.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
left join pay_payment_record ppr on(pms.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pm.meeting_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pms.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pms.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pms.company_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pms.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 pm.director_id=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pms.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pms.allMoney > #{allProjectStatisticsSearch.allMoney} and pms.allMoney <![CDATA[<]]>
|
||||
#{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pms.allMoney > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pms.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
union all
|
||||
SELECT
|
||||
tmp.project_name AS projectName,
|
||||
tmps.company_name AS chargeCompanyTemporaryName,
|
||||
tmps.allMoney,
|
||||
tmp.update_by as principalName,
|
||||
tmps.comeAllMoney,
|
||||
tmps.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
tmp.create_time as createTime
|
||||
FROM tb_member_project tmp left join (select
|
||||
id,project_id,company_name,charge_use,in_account,liaison_man_id ,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 sys_user su on(tmps.liaison_man_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
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.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND tmps.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</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>) peoject order by peoject.createTime
|
||||
</select>
|
||||
<!--全所统计导出excel-->
|
||||
<select id="queryPageListExcel" resultType="com.jero.statistics.entity.AllProjectStatistics">
|
||||
select * from
|
||||
(SELECT
|
||||
pwg.working_group_project AS projectName,
|
||||
pwg.principal_name_a as principalName,
|
||||
pwgs.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pwgs.allMoney,
|
||||
pwgs.comeAllMoney,
|
||||
pwgs.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
pwg.create_time as createTime
|
||||
FROM pay_working_group pwg left join (select id,working_group_id,charge_company_temporary_name,charge_use,in_account,SUM(receivable_amount) AS allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_working_group_subitem GROUP BY working_group_id) pwgs on(pwg.id=pwgs.working_group_id)
|
||||
left JOIN sys_user su on(pwg.principal_id_a=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
left join pay_payment_record ppr on(pwgs.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pwg.working_group_project LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pwgs.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pwgs.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pwgs.charge_company_temporary_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pwgs.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 pwg.principal_id_a=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pwgs.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pwgs.allMoney > #{allProjectStatisticsSearch.allMoney} and pwgs.allMoney <![CDATA[<]]>
|
||||
#{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pwgs.allMoney > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pwgs.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
union all
|
||||
SELECT
|
||||
pcp.charge_project AS projectName,
|
||||
pcp.principal_name as principalName,
|
||||
pcp.charge_company_temporary_name AS chargeCompanyTemporaryName,
|
||||
pcp.receivable_amount as allMoney,
|
||||
pcp.paid_amount as comeAllMoney,
|
||||
pcp.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
pcp.create_time as createTime
|
||||
FROM pay_common_project pcp left JOIN sys_user su on(pcp.principal_id=su.id) left join sys_depart sd
|
||||
on(su.org_code=sd.org_code) left join pay_payment_record ppr on(pcp.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pcp.charge_project LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pcp.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pcp.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pcp.charge_company_temporary_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pcp.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 pcp.principal_id=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pcp.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pcp.receivable_amount > #{allProjectStatisticsSearch.allMoney} and pcp.receivable_amount
|
||||
<![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pcp.receivable_amount > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pcp.receivable_amount <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
union all
|
||||
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,
|
||||
sd.depart_name as depart,
|
||||
pmp.create_time as createTime
|
||||
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 sys_user su on(pmp.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
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.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pmps.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</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>
|
||||
union all
|
||||
SELECT
|
||||
pm.meeting_name AS projectName,
|
||||
pm.director_name as principalName,
|
||||
pms.company_name AS chargeCompanyTemporaryName,
|
||||
pms.allMoney,
|
||||
pms.comeAllMoney,
|
||||
pms.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
pm.create_time as createTime
|
||||
FROM pay_meeting pm left join (select id,meeting_id,company_name,charge_use,in_account,SUM(amount_receivable) AS
|
||||
allMoney,SUM(paid_amount) AS comeAllMoney
|
||||
from pay_meeting_situation GROUP BY meeting_id) pms on(pm.id=pms.meeting_id)
|
||||
left JOIN sys_user su on(pm.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
left join pay_payment_record ppr on(pms.id=ppr.project_id)
|
||||
<where>
|
||||
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
|
||||
AND pm.meeting_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.projectName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND pms.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeUse != null and allProjectStatisticsSearch.chargeUse != ''">
|
||||
AND pms.charge_use=#{allProjectStatisticsSearch.chargeUse}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.chargeCompanyTemporaryName != null and allProjectStatisticsSearch.chargeCompanyTemporaryName != ''">
|
||||
AND pms.company_name LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.chargeCompanyTemporaryName},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.inAccountStatue != null and allProjectStatisticsSearch.inAccountStatue != ''">
|
||||
AND pms.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 pm.director_id=#{allProjectStatisticsSearch.principalNameId}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.pack != null and allProjectStatisticsSearch.pack != ''">
|
||||
AND pms.pack=#{allProjectStatisticsSearch.pack}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pms.allMoney > #{allProjectStatisticsSearch.allMoney} and pms.allMoney <![CDATA[<]]>
|
||||
#{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != ''">
|
||||
AND pms.allMoney > #{allProjectStatisticsSearch.allMoney}
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
|
||||
AND pms.allMoney <![CDATA[<]]> #{allProjectStatisticsSearch.allMoneyTwo}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
union all
|
||||
SELECT
|
||||
tmp.project_name AS projectName,
|
||||
tmps.company_name AS chargeCompanyTemporaryName,
|
||||
tmps.allMoney,
|
||||
tmp.update_by as principalName,
|
||||
tmps.comeAllMoney,
|
||||
tmps.charge_use as chargeUse,
|
||||
sd.depart_name as depart,
|
||||
tmp.create_time as createTime
|
||||
FROM tb_member_project tmp left join (select
|
||||
id,project_id,company_name,charge_use,in_account,liaison_man_id ,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 sys_user su on(tmps.liaison_man_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
|
||||
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.payStatue != null and allProjectStatisticsSearch.payStatue != ''">
|
||||
AND tmps.in_account LIKE
|
||||
concat('%',concat(#{allProjectStatisticsSearch.payStatue},'%'))
|
||||
</if>
|
||||
<if test="allProjectStatisticsSearch.departCode != null and allProjectStatisticsSearch.departCode != ''">
|
||||
AND su.org_code =#{allProjectStatisticsSearch.departCode}
|
||||
</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>) peoject order by peoject.createTime
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryPageListForStatisticsExcel" resultType="com.jero.project.entity.PayWorkingGroupStatistics">
|
||||
SELECT
|
||||
pwg.id,
|
||||
|
||||
+1
-7
@@ -64,11 +64,5 @@ public interface IPayCommonProjectService extends IService<PayCommonProject> {
|
||||
*/
|
||||
void deleteBatch(String ids);
|
||||
|
||||
/**
|
||||
* 全所统计
|
||||
* @param
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageList3(AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -105,6 +105,12 @@ public interface IPayWorkingGroupService extends IService<PayWorkingGroup> {
|
||||
* @Exception
|
||||
*/
|
||||
void setPayWorkingGroup(PayWorkingGroup payWorkingGroup);
|
||||
|
||||
List<AllProjectStatistics> queryPageList3( AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
/**
|
||||
* 全所查询
|
||||
*/
|
||||
IPage<AllProjectStatistics> queryPageList3(Page<AllProjectStatistics> page , AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
/**
|
||||
* 全所查询导出
|
||||
*/
|
||||
List<AllProjectStatistics> queryPageListExcel( AllProjectStatisticsSearch allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
-4
@@ -196,10 +196,6 @@ public class PayCommonProjectServiceImpl extends ServiceImpl<PayCommonProjectMap
|
||||
payCommonProjectService.updateById(payCommonProject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AllProjectStatistics> queryPageList3(AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payCommonProjectMapper.queryPageList3(allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
|
||||
+18
-2
@@ -171,9 +171,25 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全所统计
|
||||
* @param page
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AllProjectStatistics> queryPageList3(AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payWorkingGroupMapper.queryPageList3(allProjectStatisticsSearch);
|
||||
public IPage<AllProjectStatistics> queryPageList3(Page<AllProjectStatistics> page ,AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payWorkingGroupMapper.queryPageList3(page,allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* 全所统计ecxel全查
|
||||
* @param allProjectStatisticsSearch
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AllProjectStatistics> queryPageListExcel(AllProjectStatisticsSearch allProjectStatisticsSearch) {
|
||||
return payWorkingGroupMapper.queryPageListExcel(allProjectStatisticsSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+13
-61
@@ -9,6 +9,7 @@ import com.jero.member.service.IPayMemberProjectService;
|
||||
import com.jero.member.service.IPayMemberProjectSubitemService;
|
||||
import com.jero.member.service.ITbMemberProjectService;
|
||||
import com.jero.member.service.ITbMemberProjectSubitemService;
|
||||
import com.jero.project.entity.PayCommonProject;
|
||||
import com.jero.project.entity.PayWorkGroupSubletStatistics;
|
||||
import com.jero.project.entity.PayWorkingGroupSubletSearch;
|
||||
import com.jero.project.service.IPayCommonProjectService;
|
||||
@@ -44,17 +45,8 @@ public class AllProjectStatisticsController {
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
|
||||
@Autowired
|
||||
private IPayWorkingGroupService payWorkingGroupService;
|
||||
@Autowired
|
||||
private IPayCommonProjectService payCommonProjectService;
|
||||
@Autowired
|
||||
private IPayMemberProjectService payMemberProjectService;
|
||||
@Autowired
|
||||
private IPayMeetingSituationService payMeetingSituationService;
|
||||
@Autowired
|
||||
private ITbMemberProjectService tbMemberProjectService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -75,42 +67,14 @@ public class AllProjectStatisticsController {
|
||||
String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
allProjectStatisticsSearch.setYear(year);
|
||||
}
|
||||
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList2 = payCommonProjectService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList3 = payMemberProjectService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList4 = payMeetingSituationService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList5 = tbMemberProjectService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
pageList4.addAll(pageList5);
|
||||
pageList3.addAll(pageList4);
|
||||
pageList2.addAll(pageList3);
|
||||
pageList.addAll(pageList2);
|
||||
int total = pageList.size();
|
||||
int pageTotal =total/pageSize+1;
|
||||
List<AllProjectStatistics> allProjectStatistics=null;
|
||||
|
||||
if(total>=pageSize * pageNo){
|
||||
allProjectStatistics = pageList.subList(pageSize * (pageNo - 1), pageSize * pageNo);
|
||||
}else if((pageNo-1)*pageSize<total && total<pageSize * pageNo) {
|
||||
allProjectStatistics = pageList.subList(pageSize * (pageNo - 1),total);
|
||||
}
|
||||
Page<AllProjectStatistics> page = new Page<>(pageNo, pageSize);
|
||||
IPage<AllProjectStatistics> pageList = payWorkingGroupService.queryPageList3(page,allProjectStatisticsSearch);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("pageNo",pageNo);
|
||||
hashMap.put("pageSize",pageSize);
|
||||
hashMap.put("total",total);
|
||||
hashMap.put("pageTotal",pageTotal);
|
||||
hashMap.put("records",allProjectStatistics);
|
||||
|
||||
double sum = allProjectStatistics != null ? allProjectStatistics.stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null ? "0" : t.getAllMoney())).sum() : 0;
|
||||
|
||||
double sum2 = allProjectStatistics != null ? allProjectStatistics.stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
double sum = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getAllMoney() == null ? "0" : t.getAllMoney())).sum() : 0;
|
||||
double sum2 = pageList.getRecords() != null ? pageList.getRecords().stream().mapToDouble(t -> Double.parseDouble(t.getComeAllMoney() == null ? "0" : t.getComeAllMoney())).sum() : 0;
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
if (allProjectStatistics != null) {
|
||||
for(AllProjectStatistics s: allProjectStatistics){
|
||||
if (pageList.getRecords() != null) {
|
||||
for(AllProjectStatistics s: pageList.getRecords()){
|
||||
String key = String.valueOf(s.getChargeUse());
|
||||
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
|
||||
s.setChargeUse_text(payment_charge_use);
|
||||
@@ -118,34 +82,22 @@ public class AllProjectStatisticsController {
|
||||
}
|
||||
hashMap.put("sumOfMoney", sum==0.0?sum:df.format(sum));
|
||||
hashMap.put("sumOfReallyMoney", sum2==0.0?sum2:df.format(sum2));
|
||||
|
||||
|
||||
hashMap.put("pageList",pageList);
|
||||
return Result.OK(hashMap);
|
||||
}
|
||||
|
||||
/**
|
||||
*所领导统计
|
||||
* @param
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/statistics/excel")
|
||||
@ApiOperation(value = "所领导统计-导出统计", notes = "所领导统计-导出统计")
|
||||
public ModelAndView excel() {
|
||||
AllProjectStatisticsSearch allProjectStatisticsSearch=new AllProjectStatisticsSearch();
|
||||
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList2 = payCommonProjectService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList3 = payMemberProjectService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList4 = payMeetingSituationService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
List<AllProjectStatistics> pageList5 = tbMemberProjectService.queryPageList3(allProjectStatisticsSearch);
|
||||
|
||||
pageList4.addAll(pageList5);
|
||||
pageList3.addAll(pageList4);
|
||||
pageList2.addAll(pageList3);
|
||||
pageList.addAll(pageList2);
|
||||
// Calendar calendar = Calendar.getInstance();
|
||||
// String year = String.valueOf(calendar.get(Calendar.YEAR));
|
||||
// allProjectStatisticsSearch.setYear(year);
|
||||
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch);
|
||||
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计");
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -10,22 +10,19 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
*/
|
||||
@Data
|
||||
public class AllProjectStatistics {
|
||||
@Excel(name = "项目负责人", width = 15)
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String principalName;
|
||||
|
||||
@Excel(name = "科室", width = 15)
|
||||
@ApiModelProperty(value = "科室")
|
||||
private String depart;
|
||||
|
||||
@Excel(name = "来款项目", width = 15)
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String chargeCompanyTemporaryName;
|
||||
|
||||
@Excel(name = "来款项目", width = 15)
|
||||
@ApiModelProperty(value = "来款项目")
|
||||
private String projectName;
|
||||
|
||||
@Excel(name = "项目负责人", width = 15)
|
||||
@ApiModelProperty(value = "项目负责人")
|
||||
private String principalName;
|
||||
|
||||
@Excel(name = "来款单位", width = 15)
|
||||
@ApiModelProperty(value = "来款单位")
|
||||
private String chargeCompanyTemporaryName;
|
||||
|
||||
@Excel(name = "应收总金额", width = 15)
|
||||
@ApiModelProperty(value = "应收总金额")
|
||||
private String allMoney;
|
||||
@@ -38,6 +35,9 @@ public class AllProjectStatistics {
|
||||
@ApiModelProperty(value = "来款用途编码")
|
||||
private String chargeUse;
|
||||
|
||||
@Excel(name = "科室", width = 15)
|
||||
@ApiModelProperty(value = "科室")
|
||||
private String depart;
|
||||
|
||||
@ApiModelProperty(value = "来款用途")
|
||||
private String ChargeUse_text;
|
||||
|
||||
+3
@@ -48,5 +48,8 @@ public class AllProjectStatisticsSearch {
|
||||
@ApiModelProperty(value = "项目负责人id")
|
||||
private String principalNameId;
|
||||
|
||||
@ApiModelProperty(value = "部门编码")
|
||||
private String departCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user