From 70af70a8e8e2f5438872567cc093c8283c46556c Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Fri, 6 Dec 2024 10:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SltAgreementInfoController.java | 22 ++++++++ .../mapper/SltAgreementInfoMapper.java | 8 +++ .../service/ISltAgreementInfoService.java | 6 +++ .../impl/SltAgreementInfoServiceImpl.java | 30 +++++++++++ .../settlement/SltAgreementInfoMapper.xml | 53 +++++++++++++++++++ 5 files changed, 119 insertions(+) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java index 307c932e..d32b590f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; import com.bonus.material.common.annotation.PreventRepeatSubmit; +import com.bonus.material.settlement.domain.SltAgreementApply; import com.bonus.material.settlement.domain.vo.SltInfoVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -68,6 +69,27 @@ public class SltAgreementInfoController extends BaseController { return AjaxResult.success(bean); } + /** + * 获取结算审核列表 + */ + @ApiOperation(value = "获取结算审核列表") + @GetMapping("/getSltExam") + public TableDataInfo getSltExam(SltAgreementInfo bean) { + startPage(); + List list = sltAgreementInfoService.getSltExam(bean); + return getDataTable(list); + } + + /** + * 获取结算审核清单 + */ + @ApiOperation(value = "获取结算审核清单") + @GetMapping("/getSltExamInfo") + public AjaxResult getSltExamInfo(SltAgreementApply apply) { + SltInfoVo bean = sltAgreementInfoService.getSltExamInfo(apply); + return AjaxResult.success(bean); + } + /** * 导出结算信息列表 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java index 8d0a3aef..9c755092 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java @@ -4,7 +4,9 @@ import java.util.List; import com.bonus.material.lease.domain.LeaseOutDetails; import com.bonus.material.ma.domain.Type; +import com.bonus.material.settlement.domain.SltAgreementApply; import com.bonus.material.settlement.domain.SltAgreementInfo; +import com.bonus.material.settlement.domain.SltAgreementRelation; import com.bonus.material.task.domain.TmTask; import org.apache.ibatis.annotations.Param; @@ -67,6 +69,12 @@ public interface SltAgreementInfoMapper { List getSltAgreementInfo4Project(SltAgreementInfo record); + List getSltExam(SltAgreementInfo bean); + + String getCost(SltAgreementApply apply); + + List getRelations(SltAgreementApply apply); + int updSltInfo(SltAgreementInfo sltAgreementInfo); int insSltInfo(@Param("record") LeaseOutDetails record, @Param("agreementId")String agreementId, @Param("ma") Type ma); diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementInfoService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementInfoService.java index f478b56e..f567d857 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementInfoService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/ISltAgreementInfoService.java @@ -1,6 +1,8 @@ package com.bonus.material.settlement.service; import java.util.List; + +import com.bonus.material.settlement.domain.SltAgreementApply; import com.bonus.material.settlement.domain.SltAgreementInfo; import com.bonus.material.settlement.domain.vo.SltInfoVo; @@ -31,6 +33,10 @@ public interface ISltAgreementInfoService { public SltInfoVo getSltInfo(List list); + List getSltExam(SltAgreementInfo bean); + + SltInfoVo getSltExamInfo(SltAgreementApply apply); + /** * 新增结算信息 * diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java index f942c48a..a28fab5c 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java @@ -7,6 +7,7 @@ import java.util.List; import com.bonus.common.biz.enums.TmTaskTypeEnum; import com.bonus.common.core.exception.ServiceException; import com.bonus.common.core.utils.DateUtils; +import com.bonus.material.settlement.domain.SltAgreementApply; import com.bonus.material.settlement.domain.SltAgreementRelation; import com.bonus.material.settlement.domain.vo.SltInfoVo; import com.bonus.material.task.domain.TmTask; @@ -80,6 +81,35 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { return sltInfoVo; } + @Override + public List getSltExam(SltAgreementInfo bean) { + return sltAgreementInfoMapper.getSltExam(bean); + } + + @Override + public SltInfoVo getSltExamInfo(SltAgreementApply apply) { + SltInfoVo sltInfoVo = new SltInfoVo(); + List list = new ArrayList<>(); + String cost = sltAgreementInfoMapper.getCost(apply); + List relations = sltAgreementInfoMapper.getRelations(apply); + sltInfoVo.setRelations(relations); + for (SltAgreementRelation relation : relations) { + SltAgreementInfo info = new SltAgreementInfo(); + info.setAgreementId(Long.valueOf(relation.getAgreementId())); + list.add(info); + } + List leaseList = getLeaseList(list); + List repairList = getRepairList(list); + List scrapList = getScrapList(list); + List loseList = getLoseList(list); + sltInfoVo.setLeaseList(leaseList); + sltInfoVo.setRepairList(repairList); + sltInfoVo.setScrapList(scrapList); + sltInfoVo.setLoseList(loseList); + sltInfoVo.setCost(cost); + return sltInfoVo; + } + /** * 新增结算信息 * diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index 56bc9872..bbeda490 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -199,6 +199,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY sltStatus,bai.agreement_id desc + + update slt_agreement_info set num = #{num}, @@ -320,4 +346,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type mt1 on mt.parent_id = mt1.type_id where sai.agreement_id = #{agreementId} and sai.end_time is null + + + + \ No newline at end of file