工程结算

This commit is contained in:
sxu 2024-12-05 16:52:27 +08:00
parent 31b04c5e6a
commit 6a0a5289e6
5 changed files with 54 additions and 0 deletions

View File

@ -50,6 +50,17 @@ public class SltAgreementInfoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 根据条件获取协议结算列表
*/
@ApiOperation(value = "根据条件获取协议结算列表")
@GetMapping("/getSltAgreementInfo")
public TableDataInfo getSltAgreementInfo(SltAgreementInfo bean) {
startPage();
List<SltAgreementInfo> list = sltAgreementInfoService.getSltAgreementInfo(bean);
return getDataTable(list);
}
@ApiOperation(value = "根据协议获取结算清单") @ApiOperation(value = "根据协议获取结算清单")
@PostMapping("/getSltInfo") @PostMapping("/getSltInfo")
public AjaxResult getSltInfo(@RequestBody List<SltAgreementInfo> list) { public AjaxResult getSltInfo(@RequestBody List<SltAgreementInfo> list) {

View File

@ -65,6 +65,8 @@ public interface SltAgreementInfoMapper {
SltAgreementInfo getSltAgreementInfo(LeaseOutDetails record); SltAgreementInfo getSltAgreementInfo(LeaseOutDetails record);
List<SltAgreementInfo> getSltAgreementInfo4Project(SltAgreementInfo record);
int updSltInfo(SltAgreementInfo sltAgreementInfo); int updSltInfo(SltAgreementInfo sltAgreementInfo);
int insSltInfo(@Param("record") LeaseOutDetails record, @Param("agreementId")String agreementId, @Param("ma") Type ma); int insSltInfo(@Param("record") LeaseOutDetails record, @Param("agreementId")String agreementId, @Param("ma") Type ma);

View File

@ -27,6 +27,8 @@ public interface ISltAgreementInfoService {
*/ */
public List<SltAgreementInfo> selectSltAgreementInfoList(SltAgreementInfo sltAgreementInfo); public List<SltAgreementInfo> selectSltAgreementInfoList(SltAgreementInfo sltAgreementInfo);
public List<SltAgreementInfo> getSltAgreementInfo(SltAgreementInfo bean);
public SltInfoVo getSltInfo(List<SltAgreementInfo> list); public SltInfoVo getSltInfo(List<SltAgreementInfo> list);
/** /**

View File

@ -55,6 +55,11 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
return sltAgreementInfoMapper.selectSltAgreementInfoList(sltAgreementInfo); return sltAgreementInfoMapper.selectSltAgreementInfoList(sltAgreementInfo);
} }
@Override
public List<SltAgreementInfo> getSltAgreementInfo(SltAgreementInfo bean) {
return sltAgreementInfoMapper.getSltAgreementInfo4Project(bean);
}
@Override @Override
public SltInfoVo getSltInfo(List<SltAgreementInfo> list) { public SltInfoVo getSltInfo(List<SltAgreementInfo> list) {
SltInfoVo sltInfoVo = new SltInfoVo(); SltInfoVo sltInfoVo = new SltInfoVo();

View File

@ -165,6 +165,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DATE(start_time) = CURDATE(); DATE(start_time) = CURDATE();
</select> </select>
<select id="getSltAgreementInfo4Project" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
SELECT bai.agreement_id, bai.agreement_code, contract_code,file_url ,file_name,sign_time,
bui.unit_id,bui.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
plan_start_time,lease_day,auth_person,phone,saa.remark,bai.protocol,sar.cost as cost,sar.is_commit as isCommit,
case when sar.id is null then '1' when sar.status = '0' then '2' when sar.status = '1' then '3' when sar.status = '2' then '4' end as sltStatus
FROM bm_agreement_info bai
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
LEFT JOIN slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
LEFT JOIN slt_agreement_apply saa on saa.id = sar.apply_id
where bai.status = '1'
<if test="unitId != null and unitId != ''">
and bui.unit_id = #{unitId}
</if>
<if test="projectId != null and projectId != ''">
and bp.pro_id = #{projectId}
</if>
<choose>
<when test="sltStatus == '1'.toString()">
and sar.id is null
</when>
<when test="sltStatus == '2'.toString()">
and sar.status = '0'
</when>
<when test="sltStatus == '3'.toString()">
and sar.status = '1'
</when>
<when test="sltStatus == '4'.toString()">
and sar.status = '2'
</when>
</choose>
ORDER BY sltStatus,bai.agreement_id desc
</select>
<update id="updSltInfo"> <update id="updSltInfo">
update slt_agreement_info update slt_agreement_info
set num = #{num}, set num = #{num},