Merge branch 'master' into 22年七月工作

This commit is contained in:
lijiarao
2022-07-11 13:53:25 +08:00
26 changed files with 609 additions and 535 deletions
@@ -560,13 +560,13 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
} }
ossFileService.updateById(ossFile); ossFileService.updateById(ossFile);
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); //LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (loginUser.getIsCompanyUser()) { //if (loginUser.getIsCompanyUser()) {
Integer integer = ossFileService.searchDownloadTimes(ossFile.getId(), loginUser.getId()); // Integer integer = ossFileService.searchDownloadTimes(ossFile.getId(), loginUser.getId());
if (integer >= 5) { // if (integer >= 5) {
throw new JeroBootException("超出下载次数限制"); // throw new JeroBootException("超出下载次数限制");
} // }
} //}
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1")); response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes("UTF-8"),"iso-8859-1"));
response.setContentType("application/force-download");// 设置强制下载不打开 response.setContentType("application/force-download");// 设置强制下载不打开
if (type == null) { if (type == null) {
@@ -585,25 +585,25 @@ public class PayMeetingController extends JeroController<PayMeeting, IPayMeeting
} }
response.flushBuffer(); response.flushBuffer();
//统计下载和预览次数 //统计下载和预览次数
if ("download".equals(type)) { //if ("download".equals(type)) {
Integer downloadNumber = ossFile.getDownloadNumber(); // Integer downloadNumber = ossFile.getDownloadNumber();
if (downloadNumber == null) { // if (downloadNumber == null) {
ossFile.setDownloadNumber(1); // ossFile.setDownloadNumber(1);
} else { // } else {
ossFile.setDownloadNumber(downloadNumber + 1); // ossFile.setDownloadNumber(downloadNumber + 1);
} // }
ossFileService.updateAndPush(ossFile); // ossFileService.updateAndPush(ossFile);
//增加下载次数 // //增加下载次数
ossFileService.saveDownloadTimes(ossFile.getId(), loginUser.getId()); // ossFileService.saveDownloadTimes(ossFile.getId(), loginUser.getId());
} else { //} else {
Integer viewNumber = ossFile.getViewNumber(); // Integer viewNumber = ossFile.getViewNumber();
if (viewNumber == null) { // if (viewNumber == null) {
ossFile.setViewNumber(1); // ossFile.setViewNumber(1);
} else { // } else {
ossFile.setViewNumber(viewNumber + 1); // ossFile.setViewNumber(viewNumber + 1);
} // }
ossFileService.updateAndPush(ossFile); // ossFileService.updateAndPush(ossFile);
} //}
} catch (IOException e) { } catch (IOException e) {
log.error("预览文件失败" + e.getMessage()); log.error("预览文件失败" + e.getMessage());
response.setStatus(404); response.setStatus(404);
@@ -173,6 +173,9 @@
<if test="pack != null and pack != ''"> <if test="pack != null and pack != ''">
AND c.pack = #{pack} AND c.pack = #{pack}
</if> </if>
<if test="chargeUse != null and chargeUse != ''">
AND c.charge_use = #{chargeUse}
</if>
</where> </where>
<!--工作组项目--> <!--工作组项目-->
UNION ALL UNION ALL
@@ -197,6 +200,9 @@
<if test="pack != null and pack != ''"> <if test="pack != null and pack != ''">
AND gsub.pack = #{pack} AND gsub.pack = #{pack}
</if> </if>
<if test="chargeUse != null and chargeUse != ''">
AND gsub.charge_use = #{chargeUse}
</if>
</where> </where>
<!-- 会议项目--> <!-- 会议项目-->
UNION ALL UNION ALL
@@ -221,6 +227,9 @@
<if test="pack != null and pack != ''"> <if test="pack != null and pack != ''">
AND sit.pack = #{pack} AND sit.pack = #{pack}
</if> </if>
<if test="chargeUse != null and chargeUse != ''">
AND sit.charge_use = #{chargeUse}
</if>
</where> </where>
<!-- 会员项目--> <!-- 会员项目-->
UNION ALL UNION ALL
@@ -244,6 +253,9 @@
<if test="pack != null and pack != ''"> <if test="pack != null and pack != ''">
AND msub.pack = #{pack} AND msub.pack = #{pack}
</if> </if>
<if test="chargeUse != null and chargeUse != ''">
AND msub.charge_use = #{chargeUse}
</if>
</where> </where>
<!-- 标协会员项目--> <!-- 标协会员项目-->
UNION ALL UNION ALL
@@ -267,6 +279,9 @@
<if test="pack != null and pack != ''"> <if test="pack != null and pack != ''">
AND tmsub.pack = #{pack} AND tmsub.pack = #{pack}
</if> </if>
<if test="chargeUse != null and chargeUse != ''">
AND tmsub.charge_use = #{chargeUse}
</if>
</where> </where>
<!-- 证书 tcp.mobile,tcp.email --> <!-- 证书 tcp.mobile,tcp.email -->
<!-- 标协会员项目--> <!-- 标协会员项目-->
@@ -291,6 +306,9 @@
<if test="pack != null and pack != ''"> <if test="pack != null and pack != ''">
AND tcp.pack = #{pack} AND tcp.pack = #{pack}
</if> </if>
<if test="chargeUse != null and chargeUse != ''">
AND tcp.charge_use = #{chargeUse}
</if>
</where> </where>
) project ) project
<if test="packId != null and packId != ''"> <if test="packId != null and packId != ''">
@@ -52,4 +52,10 @@ public class PayPackCompanyProjectInput implements Serializable {
*/ */
@ApiModelProperty(value = "来款年份") @ApiModelProperty(value = "来款年份")
private String paymentDate; private String paymentDate;
/**
* 来款用途 20220708
*/
@ApiModelProperty(value = "来款用途")
private String chargeUse;
} }
@@ -115,18 +115,14 @@ public class PayConfirmPaymentRecordController extends JeroController<PayConfir
} }
/** /**
* 通过id查询 * 更新所有
*/ */
//@AutoLog(value = "-通过id查询") @ApiOperation(value="-更新所有")
//@ApiOperation(value="-通过id查询", notes="-通过id查询") @GetMapping(value = "/editAll")
//@GetMapping(value = "/queryById") public Result<?> editAll() {
//public Result<?> queryById(@RequestParam(name="id") String id) { payConfirmPaymentRecordService.editAll();
// PayConfirmPaymentRecord payConfirmPaymentRecord = payConfirmPaymentRecordService.queryById(id); return Result.OK();
// if(payConfirmPaymentRecord==null) { }
// return Result.error("未找到对应数据");
// }
// return Result.OK(payConfirmPaymentRecord);
//}
/** /**
* 导出excel * 导出excel
@@ -69,7 +69,9 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
case PayIncomeContractCommon.PROJECT_TYPE1: case PayIncomeContractCommon.PROJECT_TYPE1:
PayCommonProject payCommonProject = payCommonProjectMapper.selectById(projectId); PayCommonProject payCommonProject = payCommonProjectMapper.selectById(projectId);
if (payCommonProject == null) {
break;
}
//更新主列表 //更新主列表
payCommonProject.setConfirmAmount(confirmAmount); payCommonProject.setConfirmAmount(confirmAmount);
payCommonProjectMapper.updateById(payCommonProject); payCommonProjectMapper.updateById(payCommonProject);
@@ -78,7 +80,9 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
// 工作组项目 // 工作组项目
case PayIncomeContractCommon.PROJECT_TYPE2: case PayIncomeContractCommon.PROJECT_TYPE2:
PayWorkingGroupSubItem payWorking = payWorkingGroupSubItemMapper.selectById(projectId); PayWorkingGroupSubItem payWorking = payWorkingGroupSubItemMapper.selectById(projectId);
if (payWorking == null) {
break;
}
//更新主列表 //更新主列表
payWorking.setConfirmAmount(confirmAmount); payWorking.setConfirmAmount(confirmAmount);
payWorkingGroupSubItemMapper.updateById(payWorking); payWorkingGroupSubItemMapper.updateById(payWorking);
@@ -88,7 +92,9 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
case PayIncomeContractCommon.PROJECT_TYPE3: case PayIncomeContractCommon.PROJECT_TYPE3:
PayMeetingSituation meeting = payMeetingSituationMapper.selectById(projectId); PayMeetingSituation meeting = payMeetingSituationMapper.selectById(projectId);
if (meeting == null) {
break;
}
//更新主列表 //更新主列表
meeting.setConfirmAmount(confirmAmount); meeting.setConfirmAmount(confirmAmount);
payMeetingSituationMapper.updateById(meeting); payMeetingSituationMapper.updateById(meeting);
@@ -98,7 +104,9 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
case PayIncomeContractCommon.PROJECT_TYPE4: case PayIncomeContractCommon.PROJECT_TYPE4:
PayMemberProjectSubitem member = payMemberProjectSubitemMapper.selectById(projectId); PayMemberProjectSubitem member = payMemberProjectSubitemMapper.selectById(projectId);
if (member == null) {
break;
}
//更新主列表 //更新主列表
member.setConfirmAmount(confirmAmount); member.setConfirmAmount(confirmAmount);
payMemberProjectSubitemMapper.updateById(member); payMemberProjectSubitemMapper.updateById(member);
@@ -108,6 +116,9 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
case PayIncomeContractCommon.PROJECT_TYPE5: case PayIncomeContractCommon.PROJECT_TYPE5:
TbMemberProjectSubitem tbMember = tbMemberProjectSubitemMapper.selectById(projectId); TbMemberProjectSubitem tbMember = tbMemberProjectSubitemMapper.selectById(projectId);
if (tbMember == null) {
break;
}
//更新主列表 //更新主列表
tbMember.setConfirmAmount(confirmAmount); tbMember.setConfirmAmount(confirmAmount);
tbMemberProjectSubitemMapper.updateById(tbMember); tbMemberProjectSubitemMapper.updateById(tbMember);
@@ -116,7 +127,9 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
case PayIncomeContractCommon.PROJECT_TYPE6: case PayIncomeContractCommon.PROJECT_TYPE6:
TbCertificatePayment tbMemberCertificate = certificatePaymentMapper.selectById(projectId); TbCertificatePayment tbMemberCertificate = certificatePaymentMapper.selectById(projectId);
if (tbMemberCertificate == null) {
break;
}
//更新主列表 //更新主列表
tbMemberCertificate.setConfirmAmount(confirmAmount); tbMemberCertificate.setConfirmAmount(confirmAmount);
certificatePaymentMapper.updateById(tbMemberCertificate); certificatePaymentMapper.updateById(tbMemberCertificate);
@@ -132,6 +145,13 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
updateConfirmAmount(payConfirmPaymentRecord); updateConfirmAmount(payConfirmPaymentRecord);
} }
public void editAll(){
List<PayConfirmPaymentRecord> list = list();
for (PayConfirmPaymentRecord payConfirmPaymentRecord : list) {
updateConfirmAmount(payConfirmPaymentRecord);
}
}
public void deleteById(String id) { public void deleteById(String id) {
removeById(id); removeById(id);
} }
@@ -26,21 +26,21 @@ public class PayWorkGroupSubletStatistics {
@Excel(name = "打包", width = 15) @Excel(name = "打包", width = 15)
private String packText; private String packText;
@Excel(name = "应收总金额", width = 15) @Excel(name = "合同金额", width = 15)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "应收总金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@ApiModelProperty(value = "实收总金额") @ApiModelProperty(value = "确认收入金额")
private String comeAllMoney; private String confirmAmount;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @ApiModelProperty(value = "到账金额")
private String confirmAmount; private String comeAllMoney;
@Excel(name = "来款用途", width = 15, dicCode="payment_charge_use") @Excel(name = "来款用途", width = 15, dicCode="payment_charge_use")
@Dict(dicCode = "payment_charge_use") @Dict(dicCode = "payment_charge_use")
@@ -22,6 +22,12 @@ public class PayWorkingGroupSearch {
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "应收总金额")
private String allMoney; private String allMoney;
/**
* 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "应收总金额范围") @ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo; private String allMoneyTwo;
@@ -19,20 +19,20 @@ public class PayWorkingGroupStatistics {
@Excel(name = "工作组", width = 15) @Excel(name = "工作组", width = 15)
@ApiModelProperty(value = "工作组") @ApiModelProperty(value = "工作组")
private String workGroup; private String workGroup;
@Excel(name = "应收总金额", width = 15) @Excel(name = "合同总金额", width = 15)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "合同总金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@ApiModelProperty(value = "实收总金额") @ApiModelProperty(value = "确认收入金额")
private String confirmAmount;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "到账总金额", width = 15)
@ApiModelProperty(value = "到账总金额")
private String comeAllMoney; private String comeAllMoney;
@Excel(name = "实收完成率", width = 15) @Excel(name = "实收完成率", width = 15)
@ApiModelProperty(value = "实收完成率") @ApiModelProperty(value = "实收完成率")
private String moneyRate; private String moneyRate;
@Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额")
private String billMoney;
@Excel(name = "确认到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额")
private String confirmAmount;
} }
@@ -32,8 +32,11 @@ public class PayWorkingGroupSubletSearch {
@ApiModelProperty(value = "来款年份") @ApiModelProperty(value = "来款年份")
private String year; private String year;
@ApiModelProperty(value = "开票年份") /**
private String billYear; * 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "来款用途") @ApiModelProperty(value = "来款用途")
private String chargeUse; private String chargeUse;
@@ -130,10 +130,10 @@
WHERE id NOT IN (SELECT working_group_id FROM pay_working_group_subitem WHERE charge_company_id=#{companyId}) WHERE id NOT IN (SELECT working_group_id FROM pay_working_group_subitem WHERE charge_company_id=#{companyId})
</select> </select>
<!-- 工作组统计--> <!-- 工作组统计-->
<select id="queryPageListForStatistics" resultType="com.jero.project.entity.PayWorkingGroupStatistics"> <select id="queryPageListForStatistics" resultType="com.jero.project.entity.PayWorkingGroupStatistics">
select *, select *,
CONCAT(CAST(ROUND((comeAllMoney/allMoney)*100,2) AS CHAR),'%') AS moneyRate CONCAT(CAST(ROUND((confirmAmount/allMoney)*100,2) AS CHAR),'%') AS moneyRate
from ( from (
select select
superId as id, superId as id,
@@ -146,7 +146,7 @@
v_statistical v v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
type = 2 type = 2
<if test="ids != null and ids != ''"> <if test="ids != null and ids != ''">
@@ -162,9 +162,13 @@
AND year LIKE AND year LIKE
concat(#{payWorkingGroupSearch.year},'%') concat(#{payWorkingGroupSearch.year},'%')
</if> </if>
<if test="payWorkingGroupSearch.paymentYear != null and payWorkingGroupSearch.paymentYear != ''">
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSearch.paymentYear}, '%')
</if>
<choose> <choose>
<when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''"> <when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
AND if(allMoney IS NULL OR allMoney = '', 0, allMoney ) >= #{payWorkingGroupSearch.allMoney} and if(allMoney IS NULL OR allMoney = '', 0, allMoney ) <![CDATA[<]]>= AND if(allMoney IS NULL OR allMoney = '', 0, allMoney ) >= #{payWorkingGroupSearch.allMoney} and
if(allMoney IS NULL OR allMoney = '', 0, allMoney ) <![CDATA[<]]>=
#{payWorkingGroupSearch.allMoneyTwo} #{payWorkingGroupSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -172,7 +176,8 @@
AND if(allMoney IS NULL OR allMoney = '', 0, allMoney ) >= #{payWorkingGroupSearch.allMoney} AND if(allMoney IS NULL OR allMoney = '', 0, allMoney ) >= #{payWorkingGroupSearch.allMoney}
</if> </if>
<if test="payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''"> <if test="payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
AND if(allMoney IS NULL OR allMoney = '', 0, allMoney ) <![CDATA[<]]>= #{payWorkingGroupSearch.allMoneyTwo} AND if(allMoney IS NULL OR allMoney = '', 0, allMoney ) <![CDATA[<]]>=
#{payWorkingGroupSearch.allMoneyTwo}
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
@@ -222,6 +227,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
type = 2 type = 2
<if test="ids != null and ids != ''"> <if test="ids != null and ids != ''">
@@ -237,6 +243,9 @@
AND year LIKE AND year LIKE
concat(#{payWorkingGroupSearch.year}, '%') concat(#{payWorkingGroupSearch.year}, '%')
</if> </if>
<if test="payWorkingGroupSearch.paymentYear != null and payWorkingGroupSearch.paymentYear != ''">
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSearch.paymentYear}, '%')
</if>
<choose> <choose>
<when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''"> <when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
AND if(allMoney IS NULL OR allMoney = '', 0, allMoney) >= #{payWorkingGroupSearch.allMoney} AND if(allMoney IS NULL OR allMoney = '', 0, allMoney) >= #{payWorkingGroupSearch.allMoney}
@@ -268,7 +277,8 @@
pwgs.comeAllMoney, pwgs.comeAllMoney,
pwgs.createTime, pwgs.createTime,
CONCAT(CAST(ROUND((pwgs.comeAllMoney/pwgs.allMoney)*100,2) AS CHAR),'%') AS moneyRate CONCAT(CAST(ROUND((pwgs.comeAllMoney/pwgs.allMoney)*100,2) AS CHAR),'%') AS moneyRate
FROM pay_working_group pwg left join (select pwg1s.id,pwg1s.create_time AS createTime,working_group_id,SUM(receivable_amount) AS FROM pay_working_group pwg left join (select pwg1s.id,pwg1s.create_time AS
createTime,working_group_id,SUM(receivable_amount) AS
allMoney,SUM(paid_amount) AS comeAllMoney allMoney,SUM(paid_amount) AS comeAllMoney
from pay_working_group_subitem pwg1 from pay_working_group_subitem pwg1
) )
@@ -295,22 +305,27 @@
</if> </if>
<choose> <choose>
<when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''"> <when test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != '' and payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
AND if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) >= #{payWorkingGroupSearch.allMoney} and if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) <![CDATA[<]]>= AND if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) >=
#{payWorkingGroupSearch.allMoney} and if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0,
pwgs.allMoney ) <![CDATA[<]]>=
#{payWorkingGroupSearch.allMoneyTwo} #{payWorkingGroupSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
<if test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != ''"> <if test="payWorkingGroupSearch.allMoney != null and payWorkingGroupSearch.allMoney != ''">
AND if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) >= #{payWorkingGroupSearch.allMoney} AND if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) >=
#{payWorkingGroupSearch.allMoney}
</if> </if>
<if test="payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''"> <if test="payWorkingGroupSearch.allMoneyTwo != null and payWorkingGroupSearch.allMoneyTwo != ''">
AND if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) <![CDATA[<]]>= #{payWorkingGroupSearch.allMoneyTwo} AND if(pwgs.allMoney IS NULL OR pwgs.allMoney = '', 0, pwgs.allMoney ) <![CDATA[<]]>=
#{payWorkingGroupSearch.allMoneyTwo}
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
</where>) ppp where ppp.allMoney is not null and ppp.allMoney !=0 </where>
) ppp where ppp.allMoney is not null and ppp.allMoney !=0
</select> </select>
<!--工作组前十--> <!--工作组前十-->
<select id="queryPageListForStatisticsFirstPage" resultType="com.jero.project.entity.PayWorkingGroupStatistics"> <select id="queryPageListForStatisticsFirstPage" resultType="com.jero.project.entity.PayWorkingGroupStatistics">
select ppp.id,ppp.workGroup, ppp.allMoney,ppp.comeAllMoney,ppp.moneyRate from (select pwg1.id, select ppp.id,ppp.workGroup, ppp.allMoney,ppp.comeAllMoney,ppp.moneyRate from (select pwg1.id,
pwg1.workGroup, pwg1.workGroup,
@@ -340,7 +355,7 @@
ppp order by ppp.comeAllMoney desc limit 10 ppp order by ppp.comeAllMoney desc limit 10
</select> </select>
<!-- 全所统计--> <!-- 全所统计-->
<select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics"> <select id="queryPageList3" resultType="com.jero.statistics.entity.AllProjectStatistics">
select * from select * from
(select projectId, (select projectId,
@@ -359,6 +374,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
principalNameId in principalNameId in
@@ -409,8 +425,8 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="allProjectStatisticsSearch.billYear != null and allProjectStatisticsSearch.billYear != ''"> <if test="allProjectStatisticsSearch.paymentYear != null and allProjectStatisticsSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{allProjectStatisticsSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{allProjectStatisticsSearch.paymentYear}, '%')
</if> </if>
<if test="allProjectStatisticsSearch.companyContactName != null and allProjectStatisticsSearch.companyContactName != ''"> <if test="allProjectStatisticsSearch.companyContactName != null and allProjectStatisticsSearch.companyContactName != ''">
and contactsName like concat('%', #{allProjectStatisticsSearch.companyContactName}, '%') and contactsName like concat('%', #{allProjectStatisticsSearch.companyContactName}, '%')
@@ -453,6 +469,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
principalNameId in principalNameId in
@@ -504,8 +521,8 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="allProjectStatisticsSearch.billYear != null and allProjectStatisticsSearch.billYear != ''"> <if test="allProjectStatisticsSearch.paymentYear != null and allProjectStatisticsSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{allProjectStatisticsSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{allProjectStatisticsSearch.paymentYear}, '%')
</if> </if>
<if test="allProjectStatisticsSearch.companyContactName != null and allProjectStatisticsSearch.companyContactName != ''"> <if test="allProjectStatisticsSearch.companyContactName != null and allProjectStatisticsSearch.companyContactName != ''">
and contactsName like concat('%', #{allProjectStatisticsSearch.companyContactName}, '%') and contactsName like concat('%', #{allProjectStatisticsSearch.companyContactName}, '%')
@@ -514,7 +531,8 @@
</select> </select>
<!-- 全所统计导出--> <!-- 全所统计导出-->
<select id="queryPageListExcel" resultType="com.jero.statistics.entity.AllProjectStatistics"> <select id="queryPageListExcel" resultType="com.jero.statistics.entity.AllProjectStatistics">
select pp.id as projectId,pp.projectName, principalName, chargeCompanyTemporaryName, allMoney, comeAllMoney, chargeUse, depart, createTime,pp.id from select pp.id as projectId,pp.projectName, principalName, chargeCompanyTemporaryName, allMoney, comeAllMoney,
chargeUse, depart, createTime,pp.id from
(SELECT (SELECT
pwgs.id, pwgs.id,
pwg.working_group_project AS projectName, pwg.working_group_project AS projectName,
@@ -534,7 +552,10 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="ids!= null and ids != ''"> pwgs.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> <if test="ids!= null and ids != ''">pwgs.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
<if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''"> <if test="allProjectStatisticsSearch.projectName != null and allProjectStatisticsSearch.projectName != ''">
AND pwg.working_group_project LIKE AND pwg.working_group_project LIKE
@@ -566,7 +587,8 @@
</if> </if>
<choose> <choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''"> <when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND pwgs.receivable_amount >= #{allProjectStatisticsSearch.allMoney} and pwgs.receivable_amount <![CDATA[<]]>= AND pwgs.receivable_amount >= #{allProjectStatisticsSearch.allMoney} and pwgs.receivable_amount
<![CDATA[<]]>=
#{allProjectStatisticsSearch.allMoneyTwo} #{allProjectStatisticsSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -593,7 +615,10 @@
FROM pay_common_project pcp left JOIN sys_user su on(pcp.principal_id=su.id) left join sys_depart sd 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) on(su.org_code=sd.org_code)
<where> <where>
<if test="ids!= null and ids != ''"> pcp.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> <if test="ids!= null and ids != ''">pcp.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
pcp.principal_id in pcp.principal_id in
@@ -659,7 +684,10 @@
FROM pay_member_project pmp right join pay_member_project_subitem pmps on(pmp.id=pmps.project_id) FROM pay_member_project pmp right join pay_member_project_subitem 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 sys_user su on(pmp.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
<where> <where>
<if test="ids!= null and ids != ''"> pmps.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> <if test="ids!= null and ids != ''">pmps.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
pmp.director_id in pmp.director_id in
@@ -697,7 +725,8 @@
</if> </if>
<choose> <choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''"> <when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND pmps.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and pmps.amount_receivable <![CDATA[<]]>= AND pmps.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and pmps.amount_receivable
<![CDATA[<]]>=
#{allProjectStatisticsSearch.allMoneyTwo} #{allProjectStatisticsSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -724,7 +753,10 @@
FROM pay_meeting pm right join pay_meeting_situation pms on(pm.id=pms.meeting_id) FROM pay_meeting pm right join pay_meeting_situation 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 sys_user su on(pm.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
<where> <where>
<if test="ids!= null and ids != ''"> pms.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> <if test="ids!= null and ids != ''">pms.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
pm.director_id in pm.director_id in
@@ -762,7 +794,8 @@
</if> </if>
<choose> <choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''"> <when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND pms.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and pms.amount_receivable <![CDATA[<]]>= AND pms.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and pms.amount_receivable
<![CDATA[<]]>=
#{allProjectStatisticsSearch.allMoneyTwo} #{allProjectStatisticsSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -789,7 +822,10 @@
FROM tb_member_project tmp left join tb_member_project_subitem tmps on(tmp.id=tmps.project_id) FROM tb_member_project tmp left join tb_member_project_subitem 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 sys_user su on(tmps.liaison_man_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
<where> <where>
<if test="ids!= null and ids != ''"> tmps.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> <if test="ids!= null and ids != ''">tmps.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
tmp.director_id in tmp.director_id in
<foreach item="item" open="(" separator="," close=")" collection="idList"> <foreach item="item" open="(" separator="," close=")" collection="idList">
@@ -826,7 +862,8 @@
</if> </if>
<choose> <choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''"> <when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND tmps.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and tmps.amount_receivable <![CDATA[<]]>= AND tmps.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and tmps.amount_receivable
<![CDATA[<]]>=
#{allProjectStatisticsSearch.allMoneyTwo} #{allProjectStatisticsSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -854,7 +891,10 @@
FROM tb_member_project tmp left join tb_certificate_payment tcp on(tmp.id=tcp.project_id) FROM tb_member_project tmp left join tb_certificate_payment tcp on(tmp.id=tcp.project_id)
left JOIN sys_user su on(tmp.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code) left JOIN sys_user su on(tmp.director_id=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
<where> <where>
<if test="ids!= null and ids != ''"> tcp.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> <if test="ids!= null and ids != ''">tcp.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
tmp.director_id in tmp.director_id in
<foreach item="item" open="(" separator="," close=")" collection="idList"> <foreach item="item" open="(" separator="," close=")" collection="idList">
@@ -891,7 +931,8 @@
</if> </if>
<choose> <choose>
<when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''"> <when test="allProjectStatisticsSearch.allMoney != null and allProjectStatisticsSearch.allMoney != '' and allProjectStatisticsSearch.allMoneyTwo != null and allProjectStatisticsSearch.allMoneyTwo != ''">
AND tcp.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and tcp.amount_receivable <![CDATA[<]]>= AND tcp.amount_receivable >= #{allProjectStatisticsSearch.allMoney} and tcp.amount_receivable
<![CDATA[<]]>=
#{allProjectStatisticsSearch.allMoneyTwo} #{allProjectStatisticsSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -903,10 +944,11 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
</where>) pp where pp.allMoney is not null and pp.allMoney !=0 </where>
) pp where pp.allMoney is not null and pp.allMoney !=0
</select> </select>
<!-- 统计--> <!-- 统计-->
<select id="queryPageListForDepartFirstPage" resultType="com.jero.statistics.entity.DepartStatistics"> <select id="queryPageListForDepartFirstPage" resultType="com.jero.statistics.entity.DepartStatistics">
select sum(pppp.comeAllMoney) as comeAllMoney,sum(pppp.allMoney) as allMoney,sd.depart_name as departName from (select principalId, principalName,allMoney,comeAllMoney,createTime, select sum(pppp.comeAllMoney) as comeAllMoney,sum(pppp.allMoney) as allMoney,sd.depart_name as departName from (select principalId, principalName,allMoney,comeAllMoney,createTime,
CONCAT(CAST(ROUND((comeAllMoney/allMoney)*100,2) AS CHAR),'%') AS finishRate from CONCAT(CAST(ROUND((comeAllMoney/allMoney)*100,2) AS CHAR),'%') AS finishRate from
@@ -1028,8 +1070,6 @@
</select> </select>
<!--个人来款统计--> <!--个人来款统计-->
<select id="queryPageListForPrincipal" resultType="com.jero.statistics.entity.PrincipalPeopleList"> <select id="queryPageListForPrincipal" resultType="com.jero.statistics.entity.PrincipalPeopleList">
select principalId, select principalId,
@@ -1037,7 +1077,7 @@
allMoney, allMoney,
comeAllMoney, comeAllMoney,
createTime, createTime,
CONCAT(CAST(ROUND((comeAllMoney / allMoney) * 100, 2) AS CHAR), '%') AS finishRate, CONCAT(CAST(ROUND((confirmAmount / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
billMoney, billMoney,
confirmAmount confirmAmount
from from
@@ -1051,6 +1091,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
principalNameId in principalNameId in
@@ -1069,8 +1110,8 @@
AND departCode = #{principalPeopleSearch.departCode} AND departCode = #{principalPeopleSearch.departCode}
</if> </if>
</where> </where>
<if test="principalPeopleSearch.billYear != null and principalPeopleSearch.billYear != ''"> <if test="principalPeopleSearch.paymentYear != null and principalPeopleSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{principalPeopleSearch.paymentYear}, '%')
</if> </if>
group by principalId ) ppp group by principalId ) ppp
<where> <where>
@@ -1133,6 +1174,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
principalNameId in principalNameId in
@@ -1151,8 +1193,8 @@
AND departCode = #{principalPeopleSearch.departCode} AND departCode = #{principalPeopleSearch.departCode}
</if> </if>
</where> </where>
<if test="principalPeopleSearch.billYear != null and principalPeopleSearch.billYear != ''"> <if test="principalPeopleSearch.paymentYear != null and principalPeopleSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{principalPeopleSearch.paymentYear}, '%')
</if> </if>
group by principalId ) ppp group by principalId ) ppp
<where> <where>
@@ -1173,7 +1215,7 @@
</choose> </choose>
</where> </where>
</select> </select>
<!--首页个人前十--> <!--首页个人前十-->
<select id="queryPageListForPrincipalFirstPage" resultType="com.jero.statistics.entity.PrincipalPeopleList"> <select id="queryPageListForPrincipalFirstPage" resultType="com.jero.statistics.entity.PrincipalPeopleList">
select principalId, principalName,allMoney,comeAllMoney,createTime, select principalId, principalName,allMoney,comeAllMoney,createTime,
CONCAT(CAST(ROUND((comeAllMoney/allMoney)*100,2) AS CHAR),'%') AS finishRate from CONCAT(CAST(ROUND((comeAllMoney/allMoney)*100,2) AS CHAR),'%') AS finishRate from
@@ -1290,8 +1332,8 @@
) pp ) pp
group by pp.principalId order by pp.createTime) ppp order by ppp.comeAllMoney desc limit 10 group by pp.principalId order by pp.createTime) ppp order by ppp.comeAllMoney desc limit 10
</select> </select>
<!-- 个人来款详情--> <!-- 个人来款详情-->
<select id="queryPageListForPrincipalDetail" resultType="com.jero.statistics.entity.PrincipalPeopleDetail"> <select id="queryPageListForPrincipalDetail" resultType="com.jero.statistics.entity.PrincipalPeopleDetail">
select projectId as id, select projectId as id,
projectName, projectName,
principalNameId as principalId, principalNameId as principalId,
@@ -1306,6 +1348,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
principalNameId = #{principalPeopleDetailSearch.principalNameId} principalNameId = #{principalPeopleDetailSearch.principalNameId}
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''"> <if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
@@ -1337,11 +1380,11 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="principalPeopleDetailSearch.billYear != null and principalPeopleDetailSearch.billYear != ''"> <if test="principalPeopleDetailSearch.paymentYear != null and principalPeopleDetailSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleDetailSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{principalPeopleDetailSearch.paymentYear}, '%')
</if> </if>
</where> </where>
</select> </select>
<!-- 个人来款详情总金额--> <!-- 个人来款详情总金额-->
<select id="queryPageListForPrincipalDetail33" resultType="com.jero.statistics.entity.AllMoney"> <select id="queryPageListForPrincipalDetail33" resultType="com.jero.statistics.entity.AllMoney">
select sum(allMoney) as allMoney, sum(comeAllMoney) as comeAllMoney, select sum(allMoney) as allMoney, sum(comeAllMoney) as comeAllMoney,
@@ -1362,6 +1405,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
principalNameId = #{principalPeopleDetailSearch.principalNameId} principalNameId = #{principalPeopleDetailSearch.principalNameId}
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''"> <if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
@@ -1393,8 +1437,8 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="principalPeopleDetailSearch.billYear != null and principalPeopleDetailSearch.billYear != ''"> <if test="principalPeopleDetailSearch.paymentYear != null and principalPeopleDetailSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{principalPeopleDetailSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{principalPeopleDetailSearch.paymentYear}, '%')
</if> </if>
</where> </where>
) pp ) pp
@@ -1429,7 +1473,8 @@
</if> </if>
<choose> <choose>
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''"> <when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
AND pwgs.receivable_amount >= #{principalPeopleDetailSearch.allMoney} and pwgs.receivable_amount <![CDATA[<]]>= AND pwgs.receivable_amount >= #{principalPeopleDetailSearch.allMoney} and pwgs.receivable_amount
<![CDATA[<]]>=
#{principalPeopleDetailSearch.allMoneyTwo} #{principalPeopleDetailSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -1470,7 +1515,8 @@
</if> </if>
<choose> <choose>
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''"> <when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
AND pcp.receivable_amount >= #{principalPeopleDetailSearch.allMoney} and pcp.receivable_amount <![CDATA[<]]>= AND pcp.receivable_amount >= #{principalPeopleDetailSearch.allMoney} and pcp.receivable_amount
<![CDATA[<]]>=
#{principalPeopleDetailSearch.allMoneyTwo} #{principalPeopleDetailSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -1511,7 +1557,8 @@
</if> </if>
<choose> <choose>
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''"> <when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
AND pms.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and pms.amount_receivable <![CDATA[<]]>= AND pms.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and pms.amount_receivable
<![CDATA[<]]>=
#{principalPeopleDetailSearch.allMoneyTwo} #{principalPeopleDetailSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -1552,7 +1599,8 @@
</if> </if>
<choose> <choose>
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''"> <when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
AND pmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and pmps.amount_receivable <![CDATA[<]]>= AND pmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and pmps.amount_receivable
<![CDATA[<]]>=
#{principalPeopleDetailSearch.allMoneyTwo} #{principalPeopleDetailSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -1595,7 +1643,8 @@
</if> </if>
<choose> <choose>
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''"> <when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and tmps.amount_receivable <![CDATA[<]]>= AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and tmps.amount_receivable
<![CDATA[<]]>=
#{principalPeopleDetailSearch.allMoneyTwo} #{principalPeopleDetailSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -1638,7 +1687,8 @@
</if> </if>
<choose> <choose>
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''"> <when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and tmps.amount_receivable <![CDATA[<]]>= AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and tmps.amount_receivable
<![CDATA[<]]>=
#{principalPeopleDetailSearch.allMoneyTwo} #{principalPeopleDetailSearch.allMoneyTwo}
</when> </when>
<otherwise> <otherwise>
@@ -1650,12 +1700,15 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
</where>) pp <if test="ids!= null and ids != ''"> where pp.id in <foreach collection="ids" item="item" close=")" open="(" separator=",">#{item}</foreach> </if> </where>
) pp
<if test="ids!= null and ids != ''">where pp.id in <foreach collection="ids" item="item" close=")" open="("
separator=",">#{item}
</foreach>
</if>
</select> </select>
<!--企业来款统计--> <!--企业来款统计-->
<select id="queryPageListForCompany" resultType="com.jero.statistics.entity.CompanyComeMoneyList"> <select id="queryPageListForCompany" resultType="com.jero.statistics.entity.CompanyComeMoneyList">
select * from ( select * from (
@@ -1664,7 +1717,7 @@
allMoney, allMoney,
comeAllMoney, comeAllMoney,
createTime, createTime,
CONCAT(CAST(ROUND((comeAllMoney / allMoney) * 100, 2) AS CHAR), '%') AS finishRate, CONCAT(CAST(ROUND((confirmAmount / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
billMoney, billMoney,
confirmAmount from confirmAmount from
(select chargeCompanyId as chargeCompanyTemporaryId, (select chargeCompanyId as chargeCompanyTemporaryId,
@@ -1677,6 +1730,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
principalNameId in principalNameId in
@@ -1691,8 +1745,8 @@
<if test="companyComeMoneySearch.chargeCompanyId != null and companyComeMoneySearch.chargeCompanyId != ''"> <if test="companyComeMoneySearch.chargeCompanyId != null and companyComeMoneySearch.chargeCompanyId != ''">
AND chargeCompanyId = #{companyComeMoneySearch.chargeCompanyId} AND chargeCompanyId = #{companyComeMoneySearch.chargeCompanyId}
</if> </if>
<if test="companyComeMoneySearch.billYear != null and companyComeMoneySearch.billYear != ''"> <if test="companyComeMoneySearch.paymentYear != null and companyComeMoneySearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{companyComeMoneySearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{companyComeMoneySearch.paymentYear}, '%')
</if> </if>
</where> </where>
group by chargeCompanyId group by chargeCompanyId
@@ -1758,6 +1812,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
principalNameId in principalNameId in
@@ -1772,8 +1827,8 @@
<if test="companyComeMoneySearch.chargeCompanyId != null and companyComeMoneySearch.chargeCompanyId != ''"> <if test="companyComeMoneySearch.chargeCompanyId != null and companyComeMoneySearch.chargeCompanyId != ''">
AND chargeCompanyId = #{companyComeMoneySearch.chargeCompanyId} AND chargeCompanyId = #{companyComeMoneySearch.chargeCompanyId}
</if> </if>
<if test="companyComeMoneySearch.billYear != null and companyComeMoneySearch.billYear != ''"> <if test="companyComeMoneySearch.paymentYear != null and companyComeMoneySearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{companyComeMoneySearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{companyComeMoneySearch.paymentYear}, '%')
</if> </if>
</where> </where>
group by chargeCompanyId group by chargeCompanyId
@@ -1796,7 +1851,7 @@
</choose> </choose>
</where> </where>
</select> </select>
<!--首页前十公司统计--> <!--首页前十公司统计-->
<select id="queryPageListForCompanyFirstPage" resultType="com.jero.statistics.entity.CompanyComeMoneyList"> <select id="queryPageListForCompanyFirstPage" resultType="com.jero.statistics.entity.CompanyComeMoneyList">
select chargeCompanyTemporaryId as chargeCompanyId, chargeCompanyTemporaryName as select chargeCompanyTemporaryId as chargeCompanyId, chargeCompanyTemporaryName as
chargeCompanyName,allMoney,comeAllMoney,createTime, chargeCompanyName,allMoney,comeAllMoney,createTime,
@@ -1908,7 +1963,7 @@
</select> </select>
<!-- 企业来款详情统计--> <!-- 企业来款详情统计-->
<select id="queryPageListForCompanyDetail" resultType="com.jero.statistics.entity.CompanyComeMoneyDetail"> <select id="queryPageListForCompanyDetail" resultType="com.jero.statistics.entity.CompanyComeMoneyDetail">
select * from( select * from(
select projectId,projectName,allMoney,comeAllMoney,chargeUse,packText,pack, select projectId,projectName,allMoney,comeAllMoney,chargeUse,packText,pack,
@@ -1917,6 +1972,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
chargeCompanyId = #{CompanyComeMoneyDetailSearch.chargeCompanyId} chargeCompanyId = #{CompanyComeMoneyDetailSearch.chargeCompanyId}
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
@@ -1956,10 +2012,11 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="CompanyComeMoneyDetailSearch.billYear != null and CompanyComeMoneyDetailSearch.billYear != ''"> <if test="CompanyComeMoneyDetailSearch.paymentYear != null and CompanyComeMoneyDetailSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{CompanyComeMoneyDetailSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{CompanyComeMoneyDetailSearch.paymentYear}, '%')
</if> </if>
</where>) p </where>
) p
<if test="CompanyComeMoneyDetailSearch.column != null and CompanyComeMoneyDetailSearch.column != ''"> <if test="CompanyComeMoneyDetailSearch.column != null and CompanyComeMoneyDetailSearch.column != ''">
<if test="CompanyComeMoneyDetailSearch.column == 'allMoney' and CompanyComeMoneyDetailSearch.order == 'desc'"> <if test="CompanyComeMoneyDetailSearch.column == 'allMoney' and CompanyComeMoneyDetailSearch.order == 'desc'">
order by allMoney desc order by allMoney desc
@@ -2005,6 +2062,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
chargeCompanyId = #{CompanyComeMoneyDetailSearch.chargeCompanyId} chargeCompanyId = #{CompanyComeMoneyDetailSearch.chargeCompanyId}
<if test="idList != null and idList != ''"> <if test="idList != null and idList != ''">
@@ -2045,8 +2103,8 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="CompanyComeMoneyDetailSearch.billYear != null and CompanyComeMoneyDetailSearch.billYear != ''"> <if test="CompanyComeMoneyDetailSearch.paymentYear != null and CompanyComeMoneyDetailSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{CompanyComeMoneyDetailSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{CompanyComeMoneyDetailSearch.paymentYear}, '%')
</if> </if>
</where> </where>
) pp ) pp
@@ -2058,7 +2116,7 @@
comeAllMoney, comeAllMoney,
departName, departName,
billMoney, billMoney,
CONCAT(CAST(ROUND((comeAllMoney / allMoney) * 100, 2) AS CHAR), '%') AS finishRate, CONCAT(CAST(ROUND((confirmAmount / allMoney) * 100, 2) AS CHAR), '%') AS finishRate,
confirmAmount confirmAmount
from from
(select (select
@@ -2070,6 +2128,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<foreach item="item" open="departId in(" separator="," close=")" collection="idList"> <foreach item="item" open="departId in(" separator="," close=")" collection="idList">
#{item} #{item}
@@ -2078,8 +2137,8 @@
AND year LIKE AND year LIKE
concat(#{departStatisticsSearch.year}, '%') concat(#{departStatisticsSearch.year}, '%')
</if> </if>
<if test="departStatisticsSearch.billYear != null and departStatisticsSearch.billYear != ''"> <if test="departStatisticsSearch.paymentYear != null and departStatisticsSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{departStatisticsSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{departStatisticsSearch.paymentYear}, '%')
</if> </if>
</where> </where>
group by v.departId) p group by v.departId) p
@@ -2119,6 +2178,7 @@
from v_statistical v from v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
<foreach item="item" open="departId in(" separator="," close=")" collection="idList"> <foreach item="item" open="departId in(" separator="," close=")" collection="idList">
#{item} #{item}
@@ -2127,8 +2187,8 @@
AND year LIKE AND year LIKE
concat(#{departStatisticsSearch.year}, '%') concat(#{departStatisticsSearch.year}, '%')
</if> </if>
<if test="departStatisticsSearch.billYear != null and departStatisticsSearch.billYear != ''"> <if test="departStatisticsSearch.paymentYear != null and departStatisticsSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{departStatisticsSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{departStatisticsSearch.paymentYear}, '%')
</if> </if>
</where> </where>
</select> </select>
@@ -82,6 +82,7 @@
FROM v_statistical v FROM v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
superId = #{id} superId = #{id}
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''"> <if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
@@ -118,8 +119,8 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="payWorkingGroupSubletSearch.billYear != null and payWorkingGroupSubletSearch.billYear != ''"> <if test="payWorkingGroupSubletSearch.paymentYear != null and payWorkingGroupSubletSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{payWorkingGroupSubletSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSubletSearch.paymentYear}, '%')
</if> </if>
</where> </where>
group by id group by id
@@ -144,6 +145,7 @@
FROM v_statistical v FROM v_statistical v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
left join pay_mail_bill pmb on pmbp.bill_id = pmb.id left join pay_mail_bill pmb on pmbp.bill_id = pmb.id
left join pay_confirm_payment_record pcpr on(pmbp.project_id=pcpr.project_id)
<where> <where>
superId = #{id} superId = #{id}
<if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''"> <if test="payWorkingGroupSubletSearch.projectName != null and payWorkingGroupSubletSearch.projectName != ''">
@@ -180,8 +182,8 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<if test="payWorkingGroupSubletSearch.billYear != null and payWorkingGroupSubletSearch.billYear != ''"> <if test="payWorkingGroupSubletSearch.paymentYear != null and payWorkingGroupSubletSearch.paymentYear != ''">
and DATE_FORMAT (pmb.bill_date,'%Y') like concat(#{payWorkingGroupSubletSearch.billYear}, '%') and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSubletSearch.paymentYear}, '%')
</if> </if>
</where> </where>
group by id) p group by id) p
@@ -178,8 +178,6 @@ public class AllProjectStatisticsController {
@ApiOperation(value = "全所统计导出-导出统计", notes = "全所统计导出-导出统计") @ApiOperation(value = "全所统计导出-导出统计", notes = "全所统计导出-导出统计")
public ModelAndView excel(AllProjectStatisticsSearch allProjectStatisticsSearch, public ModelAndView excel(AllProjectStatisticsSearch allProjectStatisticsSearch,
@RequestParam(name = "selections", required = false) String selections) { @RequestParam(name = "selections", required = false) String selections) {
if (StringUtils.isBlank(selections)) {
allProjectStatisticsSearch.setProjectName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getProjectName())); allProjectStatisticsSearch.setProjectName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getProjectName()));
allProjectStatisticsSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getChargeCompanyTemporaryName())); allProjectStatisticsSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
if (allProjectStatisticsSearch.getYear() == null || allProjectStatisticsSearch.getYear().equals("")) { if (allProjectStatisticsSearch.getYear() == null || allProjectStatisticsSearch.getYear().equals("")) {
@@ -205,34 +203,7 @@ public class AllProjectStatisticsController {
} }
} }
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计"); return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计");
} else {
ArrayList<String> strings = new ArrayList<>(Arrays.asList(selections.split(",")));
allProjectStatisticsSearch.setProjectName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getProjectName()));
allProjectStatisticsSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(allProjectStatisticsSearch.getChargeCompanyTemporaryName()));
if (allProjectStatisticsSearch.getYear() == null || allProjectStatisticsSearch.getYear().equals("")) {
Calendar calendar = Calendar.getInstance();
String year = String.valueOf(calendar.get(Calendar.YEAR));
allProjectStatisticsSearch.setYear(year);
}
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch, null, strings);
if (pageList != null) {
for (AllProjectStatistics s : pageList) {
String key = String.valueOf(s.getChargeUse());
String payment_charge_use = sysBaseAPI.translateDict("payment_charge_use", key);
s.setChargeUse_text(payment_charge_use);
//处理为空数据为0
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
s.setAllMoney("0.00");
}
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
}
}
}
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "所领导统计");
}
} }
/** /**
@@ -265,7 +236,7 @@ public class AllProjectStatisticsController {
idList.addAll(allDepartIds); idList.addAll(allDepartIds);
} else { } else {
ArrayList<AllProjectStatistics> objects = new ArrayList<>(); ArrayList<AllProjectStatistics> objects = new ArrayList<>();
return AmountUtil.exportListXls(objects, AllProjectStatistics.class, "项目来款统计"); return AmountUtil.exportListXls(objects, AllProjectStatistics.class, "科室统计");
} }
List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch, idList); List<AllProjectStatistics> pageList = payWorkingGroupService.queryPageListExcel(allProjectStatisticsSearch, idList);
@@ -283,7 +254,7 @@ public class AllProjectStatisticsController {
} }
} }
} }
return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "项目来款统计"); return AmountUtil.exportListXls(pageList, AllProjectStatistics.class, "科室统计");
} }
@ApiOperation(value = "通过部门id查所有人员", notes = "通过部门id查所有人员") @ApiOperation(value = "通过部门id查所有人员", notes = "通过部门id查所有人员")
@@ -126,6 +126,9 @@ public class CompanyComeMoneyStatisticsController {
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) { if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00"); s.setComeAllMoney("0.00");
} }
if (s.getBillMoney() == null || s.getBillMoney().equals("")) {
s.setBillMoney("0.00");
}
} }
AllMoney allMoney = payWorkingGroupService.queryPageListForCompanyDetail33(companyComeMoneyDetailSearch, null); AllMoney allMoney = payWorkingGroupService.queryPageListForCompanyDetail33(companyComeMoneyDetailSearch, null);
hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney()); hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney());
@@ -185,6 +188,9 @@ public class CompanyComeMoneyStatisticsController {
if (ss.getComeAllMoney() == null || ss.getComeAllMoney().equals("")) { if (ss.getComeAllMoney() == null || ss.getComeAllMoney().equals("")) {
ss.setComeAllMoney("0.00"); ss.setComeAllMoney("0.00");
} }
if (s.getBillMoney() == null || s.getBillMoney().equals("")) {
s.setBillMoney("0.00");
}
} }
} }
return AmountUtil.exportListXls(pageList, CompanyComeMoneyDetail.class, "企业来款详情统计"); return AmountUtil.exportListXls(pageList, CompanyComeMoneyDetail.class, "企业来款详情统计");
@@ -86,7 +86,6 @@ public class PayWorkingGroupStatisticsController {
} }
} }
HashMap<String, Object> hashMap = new HashMap<>(); HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("pageList", pageList.setRecords(records)); hashMap.put("pageList", pageList.setRecords(records));
hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney()); hashMap.put("sumOfMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getAllMoney());
hashMap.put("sumOfReallyMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getComeAllMoney()); hashMap.put("sumOfReallyMoney", ObjectUtils.isEmpty(allMoney) ? 0 : allMoney.getComeAllMoney());
@@ -103,7 +102,6 @@ public class PayWorkingGroupStatisticsController {
@GetMapping(value = "/exportXls2") @GetMapping(value = "/exportXls2")
@ApiOperation(value = "工作组项目统计-统计导出excel", notes = "工作组项目统计-统计导出excel") @ApiOperation(value = "工作组项目统计-统计导出excel", notes = "工作组项目统计-统计导出excel")
public ModelAndView exportXls2(PayWorkingGroupSearch payWorkingGroupSearch, @RequestParam(name = "selections", required = false) String selections) { public ModelAndView exportXls2(PayWorkingGroupSearch payWorkingGroupSearch, @RequestParam(name = "selections", required = false) String selections) {
if (StringUtils.isBlank(selections)) {
payWorkingGroupSearch.setWorkGroup(oConvertUtils.replaceAllPercent(payWorkingGroupSearch.getWorkGroup())); payWorkingGroupSearch.setWorkGroup(oConvertUtils.replaceAllPercent(payWorkingGroupSearch.getWorkGroup()));
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel(payWorkingGroupSearch, null); List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel(payWorkingGroupSearch, null);
@@ -120,25 +118,6 @@ public class PayWorkingGroupStatisticsController {
} }
} }
return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class, "工作组项目统计"); return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class, "工作组项目统计");
} else {
ArrayList<String> strings = new ArrayList<>(Arrays.asList(selections.split(",")));
payWorkingGroupSearch.setWorkGroup(oConvertUtils.replaceAllPercent(payWorkingGroupSearch.getWorkGroup()));
List<PayWorkingGroupStatistics> pageList = payWorkingGroupService.queryPageListForStatisticsExcel(payWorkingGroupSearch, null, strings);
//处理为空数据为0
for (PayWorkingGroupStatistics s : pageList) {
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
s.setAllMoney("0.00");
}
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
}
if (s.getMoneyRate() == null || s.getMoneyRate().equals("")) {
s.setMoneyRate("0.00%");
}
}
return AmountUtil.exportListXls(pageList, PayWorkingGroupStatistics.class, "工作组项目统计");
}
} }
@@ -199,7 +178,7 @@ public class PayWorkingGroupStatisticsController {
PayWorkingGroupSubletSearch payWorkingGroupSubletSearch, PayWorkingGroupSubletSearch payWorkingGroupSubletSearch,
@RequestParam(name = "id", required = true) String id, @RequestParam(name = "id", required = true) String id,
@RequestParam(name = "selections", required = false) String selections) { @RequestParam(name = "selections", required = false) String selections) {
if (ObjectUtils.isEmpty(selections)) {
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName())); payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics(payWorkingGroupSubletSearch, id); List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics(payWorkingGroupSubletSearch, id);
//处理为空数据为0 //处理为空数据为0
@@ -212,22 +191,6 @@ public class PayWorkingGroupStatisticsController {
} }
} }
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计"); return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
} else {
payWorkingGroupSubletSearch.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubletSearch.getChargeCompanyTemporaryName()));
ArrayList<String> selections2 = new ArrayList<>(Arrays.asList(selections.split(",")));
List<PayWorkGroupSubletStatistics> pageList = payWorkingGroupSubItemService.importExcelStatistics2(payWorkingGroupSubletSearch, id, selections2);
//处理为空数据为0
for (PayWorkGroupSubletStatistics s : pageList) {
if (s.getAllMoney() == null || s.getAllMoney().equals("")) {
s.setAllMoney("0.00");
}
if (s.getComeAllMoney() == null || s.getComeAllMoney().equals("")) {
s.setComeAllMoney("0.00");
} }
}
return AmountUtil.exportListXls(pageList, PayWorkGroupSubletStatistics.class, "工作组成员统计");
}
}
} }
@@ -22,21 +22,21 @@ public class AllProjectStatistics {
@ApiModelProperty(value = "来款单位") @ApiModelProperty(value = "来款单位")
private String chargeCompanyTemporaryName; private String chargeCompanyTemporaryName;
@Excel(name = "应收总金额", width = 15) @Excel(name = "合同金额", width = 15)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "合同金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@ApiModelProperty(value = "实收总金额") @ApiModelProperty(value = "确认收入金额")
private String comeAllMoney; private String confirmAmount;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @ApiModelProperty(value = "到账金额")
private String confirmAmount; private String comeAllMoney;
@ApiModelProperty(value = "来款用途编码") @ApiModelProperty(value = "来款用途编码")
private String chargeUse; private String chargeUse;
@@ -44,9 +44,11 @@ public class AllProjectStatisticsSearch {
@ApiModelProperty(value = "部门编码") @ApiModelProperty(value = "部门编码")
private String departCode; private String departCode;
/**
@ApiModelProperty(value = "开票年份") * 2022.7.7 billYear->paymentYear
private String billYear; */
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段") @ApiModelProperty(value = "字段")
private String column; private String column;
@@ -13,26 +13,30 @@ import org.jeecgframework.poi.excel.annotation.Excel;
public class CompanyComeMoneyDetail { public class CompanyComeMoneyDetail {
@ApiModelProperty(value = "项目id") @ApiModelProperty(value = "项目id")
private String projectId; private String projectId;
@Excel(name = "来款项目", width = 15) @Excel(name = "来款项目", width = 15)
@ApiModelProperty(value = "来款项目") @ApiModelProperty(value = "来款项目")
private String projectName; private String projectName;
@Excel(name = "来款企业", width = 15) @Excel(name = "来款企业", width = 15)
@ApiModelProperty(value = "来款企业") @ApiModelProperty(value = "来款企业")
private String chargeCompanyName; private String chargeCompanyName;
@Excel(name = "应收总金额", width = 15)
@ApiModelProperty(value = "应收金额") @Excel(name = "合同金额", width = 15)
@ApiModelProperty(value = "合同金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15)
@ApiModelProperty(value = "实收金额") @Excel(name = "确认收入金额", width = 15)
private String comeAllMoney; @ApiModelProperty(value = "确认收入金额")
private String confirmAmount;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @ApiModelProperty(value = "到账金额")
private String confirmAmount; private String comeAllMoney;
@ApiModelProperty(value = "来款用途编码") @ApiModelProperty(value = "来款用途编码")
private String chargeUse; private String chargeUse;
@@ -38,8 +38,11 @@ public class CompanyComeMoneyDetailSearch {
@ApiModelProperty(value = "应收总金额范围") @ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo; private String allMoneyTwo;
@ApiModelProperty(value = "开票年份") /**
private String billYear; * 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段") @ApiModelProperty(value = "字段")
private String column; private String column;
@@ -18,23 +18,23 @@ public class CompanyComeMoneyList {
@ApiModelProperty(value = "来款企业") @ApiModelProperty(value = "来款企业")
private String chargeCompanyName; private String chargeCompanyName;
@Excel(name = "应收总金额", width = 15) @Excel(name = "合同总金额", width = 15)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "合同总金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@ApiModelProperty(value = "实收总金额") @ApiModelProperty(value = "确认收入金额")
private String comeAllMoney; private String confirmAmount;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账总金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @ApiModelProperty(value = "到账总金额")
private String confirmAmount; private String comeAllMoney;
@Excel(name = "到账率", width = 15) @Excel(name = "确收率", width = 15)
@ApiModelProperty(value = "到账率") @ApiModelProperty(value = "确收率")
private String finishRate; private String finishRate;
} }
@@ -29,8 +29,11 @@ public class CompanyComeMoneySearch {
@ApiModelProperty(value = "应收总金额范围") @ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo; private String allMoneyTwo;
@ApiModelProperty(value = "开票年份") /**
private String billYear; * 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段") @ApiModelProperty(value = "字段")
private String column; private String column;
@@ -14,23 +14,25 @@ public class DepartStatistics {
@ApiModelProperty(value = "部门名称") @ApiModelProperty(value = "部门名称")
private String departName; private String departName;
@Excel(name = "应收总金额", width = 15) @Excel(name = "合同总金额", width = 15)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "合同金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@ApiModelProperty(value = "实收总金额") @ApiModelProperty(value = "确认收入金额")
private String comeAllMoney; private String confirmAmount;
@Excel(name = "到账率", width = 15)
@ApiModelProperty(value = "到账率")
private String finishRate;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账总金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @ApiModelProperty(value = "到账总金额")
private String confirmAmount; private String comeAllMoney;
@Excel(name = "确收率", width = 15)
@ApiModelProperty(value = "确收率")
private String finishRate;
} }
@@ -10,8 +10,11 @@ public class DepartStatisticsSearch {
@ApiModelProperty(value = "来款年份") @ApiModelProperty(value = "来款年份")
private String year; private String year;
@ApiModelProperty(value = "开票年份") /**
private String billYear; * 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段") @ApiModelProperty(value = "字段")
private String column; private String column;
@@ -24,21 +24,21 @@ public class PrincipalPeopleDetail {
@ApiModelProperty(value = "来款项目") @ApiModelProperty(value = "来款项目")
private String projectName; private String projectName;
@Excel(name = "应收总金额", width = 15) @Excel(name = "合同金额", width = 15)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "合同金额")
private String allMoney; private String allMoney;
@Excel(name = "实收总金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@ApiModelProperty(value = "实收总金额") @ApiModelProperty(value = "确认收入金额")
private String comeAllMoney; private String confirmAmount;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @ApiModelProperty(value = "到账金额")
private String confirmAmount; private String comeAllMoney;
@ApiModelProperty(value = "打包") @ApiModelProperty(value = "打包")
private Integer pack; private Integer pack;
@@ -38,8 +38,11 @@ public class PrincipalPeopleDetailSearch {
@ApiModelProperty(value = "应收总金额范围") @ApiModelProperty(value = "应收总金额范围")
private String allMoneyTwo; private String allMoneyTwo;
@ApiModelProperty(value = "开票年份") /**
private String billYear; * 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段") @ApiModelProperty(value = "字段")
private String column; private String column;
@@ -14,25 +14,25 @@ public class PrincipalPeopleList {
@ApiModelProperty(value = "项目负责人id") @ApiModelProperty(value = "项目负责人id")
private String principalId; private String principalId;
@Excel(name = "应收金额", width = 15) @Excel(name = "合同金额", width = 15)
@DecimalMax(value = "9999999999.99",message = "应收总金额(元)格式错误") @DecimalMax(value = "9999999999.99",message = "合同金额(元)格式错误")
@JsonFormat(shape = JsonFormat.Shape.STRING) @JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty(value = "应收总金额") @ApiModelProperty(value = "合同金额")
private String allMoney; private String allMoney;
@Excel(name = "实收金额", width = 15) @Excel(name = "确认收入金额", width = 15)
@DecimalMax(value = "9999999999.99",message = "实收总金额(元)格式错误") @ApiModelProperty(value = "确认收入金额")
@JsonFormat(shape = JsonFormat.Shape.STRING) private String confirmAmount;
@ApiModelProperty(value = "实收总金额")
private String comeAllMoney;
@Excel(name = "开票金额", width = 15) @Excel(name = "开票金额", width = 15)
@ApiModelProperty(value = "开票金额") @ApiModelProperty(value = "开票金额")
private String billMoney; private String billMoney;
@Excel(name = "确认到账金额", width = 15) @Excel(name = "到账金额", width = 15)
@ApiModelProperty(value = "确认到账金额") @DecimalMax(value = "9999999999.99",message = "到账金额(元)格式错误")
private String confirmAmount; @JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty(value = "到账金额")
private String comeAllMoney;
@Excel(name = "个人完成率", width = 15) @Excel(name = "个人完成率", width = 15)
@ApiModelProperty(value = "个人完成率") @ApiModelProperty(value = "个人完成率")
@@ -26,8 +26,11 @@ public class PrincipalPeopleSearch {
@ApiModelProperty(value = "部门编码") @ApiModelProperty(value = "部门编码")
private String departCode; private String departCode;
@ApiModelProperty(value = "开票年份") /**
private String billYear; * 2022.7.7 billYear->paymentYear
*/
@ApiModelProperty(value = "确认年份")
private String paymentYear;
@ApiModelProperty(value = "字段") @ApiModelProperty(value = "字段")
private String column; private String column;