结算管理
This commit is contained in:
parent
891cfc3dce
commit
38b7f3bea7
|
|
@ -57,6 +57,8 @@ public class ScrapApplyDetailsController extends BaseController {
|
|||
// @RequiresPermissions("scrap:details:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(ScrapApplyDetails scrapApplyDetails) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
scrapApplyDetails.setCompanyId(deptId);
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<ScrapTaskListVo> list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||
|
|
@ -182,6 +184,8 @@ public class ScrapApplyDetailsController extends BaseController {
|
|||
//@RequiresPermissions("scrap:details:export")
|
||||
@PostMapping("/exportScrapList")
|
||||
public void exportScrapList(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
scrapApplyDetails.setCompanyId(deptId);
|
||||
List<ScrapTotalListVo> list = scrapApplyDetailsService.getScrapList(scrapApplyDetails);
|
||||
ExcelUtil<ScrapTotalListVo> util = new ExcelUtil<>(ScrapTotalListVo.class);
|
||||
util.exportExcel(response, list, "报废台账任务数据");
|
||||
|
|
@ -252,6 +256,8 @@ public class ScrapApplyDetailsController extends BaseController {
|
|||
if (scrapApplyDetails.getStartTime() != null && scrapApplyDetails.getEndTime() != null) {
|
||||
fileName = "报废审核列表"+ "(时间" +scrapApplyDetails.getStartTime() + "至" + scrapApplyDetails.getEndTime()+ ")";
|
||||
}
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
scrapApplyDetails.setCompanyId(deptId);
|
||||
List<ScrapTaskListVo> list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||
// 根据list集合数,去填充序号
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
|
|
|||
|
|
@ -1624,6 +1624,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getLostReportList(bean);
|
||||
return getDataTable(list);*/
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getLostReportList(bean);
|
||||
|
|
@ -1640,6 +1642,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
public void exportLostList(HttpServletResponse response, SltAgreementInfoLose bean)
|
||||
{
|
||||
String fileName = "丢失费用报表";
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<SltAgreementInfoLose> list = sltAgreementInfoService.getLostReportListExport(bean);
|
||||
// 根据list集合数,去填充序号
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
|
@ -1657,6 +1661,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@ApiOperation(value = "维修报表list查询")
|
||||
@GetMapping("/getRepairReportList")
|
||||
public TableDataInfo getRepairReportList(SltAgreementInfo bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
startPage();
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getRepairReportList(bean);
|
||||
return getDataTable(list);
|
||||
|
|
@ -1671,6 +1677,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@PostMapping("/exportRepairList")
|
||||
public void exportRepairList(HttpServletResponse response, SltAgreementInfoRepair bean)
|
||||
{
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
String fileName = "维修费用报表";
|
||||
List<SltAgreementInfoRepair> list = sltAgreementInfoService.getRepairReportListExport(bean);
|
||||
// 根据list集合数,去填充序号
|
||||
|
|
@ -1689,6 +1697,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@ApiOperation(value = "报废报表list查询")
|
||||
@GetMapping("/getScrapReportList")
|
||||
public TableDataInfo getScrapReportList(SltAgreementInfo bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
startPage();
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getScrapReportList(bean);
|
||||
return getDataTable(list);
|
||||
|
|
@ -1703,6 +1713,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@PostMapping("/exportScrapList")
|
||||
public void exportScrapList(HttpServletResponse response, SltAgreementInfoScrap bean)
|
||||
{
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
String fileName = "报废费用报表";
|
||||
List<SltAgreementInfoScrap> list = sltAgreementInfoService.getScrapReportListExport(bean);
|
||||
// 根据list集合数,去填充序号
|
||||
|
|
@ -1721,6 +1733,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@ApiOperation(value = "已结算报表list查询")
|
||||
@GetMapping("/getSltReportedList")
|
||||
public TableDataInfo getSltReportedList(SltAgreementInfo bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
startPage();
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportedList(bean);
|
||||
return getDataTable(list);
|
||||
|
|
@ -1737,6 +1751,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
if (query == null) {
|
||||
query = new SltAgreementInfo();
|
||||
}
|
||||
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
query.setCompanyId(deptId);
|
||||
startPage();
|
||||
|
||||
// ----------- 查询未结算的全部协议 ---------------
|
||||
|
|
@ -1820,6 +1837,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@PostMapping("/exportUnreported")
|
||||
public void exportUnreported(HttpServletResponse response, SltAgreementInfo query)
|
||||
{
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
query.setCompanyId(deptId);
|
||||
// ----------- 查询未结算的全部协议 ---------------
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportList(query);
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
|
|
@ -1894,6 +1913,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
|
||||
// 设置查询条件
|
||||
SltHistoryReport query = new SltHistoryReport();
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
query.setCompanyId(deptId);
|
||||
query.setSettlementType(settlementType);
|
||||
query.setYearMonth(yearMonth.replace("-", ""));
|
||||
List<SltHistoryReport> list = sltHistoryReportService.selectHistoryReportList(query);
|
||||
|
|
|
|||
|
|
@ -28,5 +28,6 @@ public class SltHistoryReport {
|
|||
private BigDecimal reductionCost;
|
||||
private String yearMonth;
|
||||
private LocalDateTime createTime;
|
||||
private Long companyId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
where
|
||||
sad.scrap_source = '2'
|
||||
<if test="companyId !=null"> and bpi.company_id=#{companyId}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="appTaskStatus != null and appTaskStatus == 0">
|
||||
and tt.task_status = #{appTaskStatus}
|
||||
|
|
@ -518,7 +519,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN tm_task tt on tt.task_id =sad.task_id
|
||||
WHERE sad.`status` = '1' and sad.ledger_status = '1'
|
||||
<if test="companyId != null"> and tt.company_id =#{companyId}</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[
|
||||
AND DATE_FORMAT( sad.create_time, '%Y-%m' ) BETWEEN DATE_FORMAT(#{startTime}, '%Y-%m') AND DATE_FORMAT(#{endTime}, '%Y-%m')
|
||||
|
|
|
|||
|
|
@ -939,6 +939,7 @@
|
|||
LEFT JOIN sys_user su ON saa.auditor = su.user_id and su.del_flag = 0
|
||||
where
|
||||
bai.status = '1' and saa.status in ('1','2','3')
|
||||
<if test="companyId !=null"> and bai.company_id = #{companyId}</if>
|
||||
<if test="unitId != null and unitId != ''">
|
||||
and bui.unit_id = #{unitId}
|
||||
</if>
|
||||
|
|
@ -1014,7 +1015,7 @@
|
|||
LEFT JOIN slt_agreement_info sai on bai.agreement_id = sai.agreement_id
|
||||
WHERE bai.status = '1'
|
||||
AND sai.is_slt = 0
|
||||
|
||||
<if test="companyId != null"> and bai.company_id =#{companyId}</if>
|
||||
<if test="unitIds != null and unitIds.size() > 0">
|
||||
AND bai.unit_id IN
|
||||
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
||||
|
|
@ -1185,6 +1186,9 @@
|
|||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where rc.status in ('0','1')
|
||||
and rc.repair_type in ('1','2')
|
||||
<if test="info.companyId != null">
|
||||
and bai.company_id = #{info.companyId}
|
||||
</if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
|
|
@ -1252,6 +1256,7 @@
|
|||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
where rc.status in ('0','1')
|
||||
and rc.repair_type in ('1','2')
|
||||
<if test="info.companyId != null"> and bai.company_id = #{info.companyId}</if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
|
|
@ -1314,6 +1319,7 @@
|
|||
LEFT JOIN ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where rc.status in ('0','1')
|
||||
and rc.repair_type = '3'
|
||||
<if test="info.companyId != null"> and bai.company_id =#{info.companyId} </if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
|
|
@ -1381,6 +1387,7 @@
|
|||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
where rc.status in ('0','1')
|
||||
and rc.repair_type = '3'
|
||||
<if test="info.companyId != null"> and bai.company_id = #{info.companyId}</if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
|
|
@ -1497,7 +1504,9 @@
|
|||
left join ma_type mt on sad.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
<where>
|
||||
|
||||
<if test="companyId != null ">
|
||||
and bai.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="settlementType != null and settlementType != 0">
|
||||
and mt.jiju_type = #{settlementType}
|
||||
</if>
|
||||
|
|
@ -1629,6 +1638,9 @@
|
|||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
<where>
|
||||
|
||||
<if test="companyId != null ">
|
||||
and bai.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="settlementType != null and settlementType != 0">
|
||||
and mt.jiju_type = #{settlementType}
|
||||
</if>
|
||||
|
|
@ -2157,26 +2169,28 @@
|
|||
|
||||
<select id="selectSltHistoryReportList" resultType="com.bonus.material.settlement.domain.SltHistoryReport">
|
||||
SELECT
|
||||
id,
|
||||
agreement_id as agreementId,
|
||||
agreement_code as agreementCode,
|
||||
unit_id as unitId,
|
||||
unit_name as unitName,
|
||||
project_id as projectId,
|
||||
project_name as projectName,
|
||||
settlement_type as settlementType,
|
||||
lease_cost as leaseCost,
|
||||
repair_cost as repairCost,
|
||||
lose_cost as loseCost,
|
||||
scrap_cost as scrapCost,
|
||||
reduction_cost as reductionCost,
|
||||
`year_month` as yearMonth,
|
||||
create_time as createTime
|
||||
FROM slt_history_report
|
||||
shr.id,
|
||||
shr.agreement_id as agreementId,
|
||||
shr.agreement_code as agreementCode,
|
||||
shr.unit_id as unitId,
|
||||
shr.unit_name as unitName,
|
||||
shr.project_id as projectId,
|
||||
shr.project_name as projectName,
|
||||
shr.settlement_type as settlementType,
|
||||
shr.lease_cost as leaseCost,
|
||||
shr.repair_cost as repairCost,
|
||||
shr.lose_cost as loseCost,
|
||||
shr.scrap_cost as scrapCost,
|
||||
shr.reduction_cost as reductionCost,
|
||||
shr.`year_month` as yearMonth,
|
||||
shr.create_time as createTime
|
||||
FROM slt_history_report shr
|
||||
left join bm_agreement_info bai on shr.agreement_id =bai.agreement_id
|
||||
WHERE
|
||||
`year_month` = #{yearMonth}
|
||||
and settlement_type = #{settlementType}
|
||||
ORDER BY create_time DESC
|
||||
shr.`year_month` = #{yearMonth}
|
||||
and shr.settlement_type = #{settlementType}
|
||||
<if test="companyId !=null"> and bai.company_id =#{companyId}</if>
|
||||
ORDER BY shr.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getAgreementInfo" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue