diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/ApplyRelation.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/ApplyRelation.java new file mode 100644 index 0000000..3d23d9c --- /dev/null +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/ApplyRelation.java @@ -0,0 +1,27 @@ +package com.bonus.sgzb.base.api.domain; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author:liang.chao + * @Date:2024/9/27 - 9:44 + */ +@Data +public class ApplyRelation { + /** + * 费用描述 + */ + private String costRemark; + /** + * 费用价格 + */ + private BigDecimal addCost; + + /** + * 协议id + */ + private String agreementId; + +} diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java index 8eabb3b..aecdae2 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java @@ -65,7 +65,7 @@ public class SltAgreementInfo { @ExcelProperty(index = 6, value = "开始日期") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date startTime; + private String startTime; /** * 退料时间 */ @@ -73,7 +73,7 @@ public class SltAgreementInfo { @ExcelProperty(index = 7, value = "结算日期") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date endTime; + private String endTime; /** * 0在用1退回 */ diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementRelation.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementRelation.java index a0e0e78..4dc446b 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementRelation.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementRelation.java @@ -65,4 +65,5 @@ public class SltAgreementRelation { *数据所属 */ private String companyId; + private List applyRelation; } diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltInfoVo.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltInfoVo.java index 8898b87..ea88ea4 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltInfoVo.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltInfoVo.java @@ -32,6 +32,10 @@ public class SltInfoVo { * 丢失费用列表 */ List loseList; + /** + * 额外增加费用明细 + */ + List addCostList; List relations; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java index 927cf5e..5152ba0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java @@ -477,7 +477,7 @@ public class TmTaskController extends BaseController { * @return 列表 */ @Log(title = "查询单个领料出库详情- app/web", businessType = BusinessType.QUERY) - @GetMapping(value = "getLeaseAuditListDetail") + @GetMapping(value = "/getLeaseAuditListDetail") public AjaxResult getLeaseAuditListDetail(TmTask task) { if (StringUtils.isNull(task)) { return AjaxResult.error("参数错误"); @@ -497,13 +497,33 @@ public class TmTaskController extends BaseController { } } + + @Log(title = "领料出库详情记录", businessType = BusinessType.QUERY) + @GetMapping(value = "/getLeaseOutDetailRecord") + public AjaxResult getLeaseOutDetailRecord(TmTask task) { + if (StringUtils.isNull(task)) { + return AjaxResult.error("参数错误"); + } + List leaseAuditList = tmTaskService.getLeaseOutDetailRecord(task); + return AjaxResult.success(leaseAuditList); + } + + @Log(title = "导出领料出库详情明细记录", businessType = BusinessType.EXPORT) + @PostMapping(value = "/exportLeaseOutDetailRecord") + public void exportLeaseOutDetailRecord(HttpServletResponse response, TmTask task) { + List leaseAuditList = tmTaskService.getLeaseOutDetailRecord(task); + List tmTaskDtos = Convert.toList(LeaseOutDetailRecord.class, leaseAuditList); + ExcelUtil util = new ExcelUtil(LeaseOutDetailRecord.class); + util.exportExcel(response, tmTaskDtos, "领料出库明细记录"); + } + /** * 导出领料出库列表 * * @param task 筛选条件 * @return 列表 */ - @Log(title = "导出领料出库列表", businessType = BusinessType.QUERY) + @Log(title = "导出领料出库列表", businessType = BusinessType.EXPORT) @PostMapping(value = "export") public void export(HttpServletResponse response, TmTask task) { diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java new file mode 100644 index 0000000..269e787 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java @@ -0,0 +1,30 @@ +package com.bonus.sgzb.app.domain; + +import com.bonus.sgzb.common.core.annotation.Excel; +import lombok.Data; + +/** + * @Author:liang.chao + * @Date:2024/9/26 - 18:01 + */ + +@Data +public class LeaseOutDetailRecord { + @Excel(name = "规格型号") + private String typeModelName; + + @Excel(name = "类型名称") + private String typeName; + + private String maCode; + + @Excel(name = "出库时间") + private String createTime; + + @Excel(name = "出库数量") + private String outNum; + + @Excel(name = "出库人") + private String userName; + +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java index 68cc2ed..9641055 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java @@ -147,4 +147,6 @@ public interface TmTaskMapper { int updateLeaseApplyInfoRejectInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo); int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo); + + List getLeaseOutDetailRecord(TmTask record); } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/TmTaskService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/TmTaskService.java index d8243cd..5eef3c8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/TmTaskService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/TmTaskService.java @@ -27,6 +27,7 @@ public interface TmTaskService{ List getLeaseAuditList(TmTask record); List getLeaseAuditListByOne(TmTask record); + List getLeaseOutDetailRecord(TmTask record); List getLeaseAuditListByAdmin(TmTask record); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 0da6bf4..1cf0938 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -270,6 +270,11 @@ public class TmTaskServiceImpl implements TmTaskService { return leaseDetailByParentId; } + @Override + public List getLeaseOutDetailRecord(TmTask record) { + return tmTaskMapper.getLeaseOutDetailRecord(record); + } + /** * 创建审批流领料申请 * diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java index 0bb7459..4d64853 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/controller/SysDicController.java @@ -8,6 +8,7 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.page.TableDataInfo; import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.enums.BusinessType; +import com.bonus.sgzb.common.security.annotation.RequiresPermissions; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.CollectionUtils; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java index fb5afc4..5e0d5fc 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java @@ -6,6 +6,7 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.enums.BusinessType; import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.OutRecord; import com.bonus.sgzb.material.domain.ScrapRecord; import com.bonus.sgzb.material.service.InputRecordService; import com.bonus.sgzb.material.service.ScrapRecordService; @@ -21,10 +22,10 @@ import javax.servlet.http.HttpServletResponse; import java.util.List; /** -* @description 综合查询--机具入库查询 -* @author hay -* @date 2024/2/26 14:15 -*/ + * @author hay + * @description 综合查询--机具入库查询 + * @date 2024/2/26 14:15 + */ @Api(tags = "综合查询--机具入库查询") @RestController @RequestMapping("/inputRecord") @@ -43,17 +44,33 @@ public class InputRecordController extends BaseController { return AjaxResult.success(getDataTable(list)); } + @ApiOperation(value = "综合查询--机具出库查询列表") + @GetMapping("/getOutputRecordList") + public AjaxResult getOutputRecordList(OutRecord bean) { + startPage(); + List list = inputRecordService.getOutputRecordList(bean); + return AjaxResult.success(getDataTable(list)); + } + /** * 导出综合查询机具入库查询列表 */ @ApiOperation("导出综合查询机具入库查询列表") @Log(title = "导出综合查询机具入库查询列表", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, InputRecord bean) - { + public void exInputport(HttpServletResponse response, InputRecord bean) { List list = inputRecordService.getInputRecordList(bean); ExcelUtil util = new ExcelUtil(InputRecord.class); util.exportExcel(response, list, "综合查询--入库记录"); } + @ApiOperation("导出综合查询机具出库查询列表") + @Log(title = "导出综合查询机具出库查询列表", businessType = BusinessType.EXPORT) + @PostMapping("/exOutputport") + public void exOutputport(HttpServletResponse response, OutRecord bean) { + List list = inputRecordService.getOutputRecordList(bean); + ExcelUtil util = new ExcelUtil(OutRecord.class); + util.exportExcel(response, list, "综合查询--出库记录"); + } + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java index 6790b9f..4799a7f 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java @@ -212,6 +212,15 @@ public class SltAgreementInfoController extends BaseController { util.exportExcel(response, leaseInfoList, "维修明细导出"); } + + /** + * 校验该类型是否有归还记录,有的话该类型都按最后一次提交时间规划, + */ + /* @ApiOperation(value = "费用结算提交") + @PostMapping("/checkSltEndTime") + public AjaxResult checkSltEndTime(@RequestBody SltAgreementApply apply) { + return sltAgreementInfoService.submitFee(apply); + }*/ /** * 费用结算提交 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/OutRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/OutRecord.java new file mode 100644 index 0000000..8416385 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/OutRecord.java @@ -0,0 +1,80 @@ +package com.bonus.sgzb.material.domain; + +import com.bonus.sgzb.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @author hay + * @description 综合查询--机具入库查询 + * @date 2024/2/26 14:51 + */ +@ApiModel(description = "机具出库查询") +@Data +public class OutRecord { + + private static final long serialVersionUID = 2227217051604273598L; + + @ApiModelProperty(value = "领料单号") + @Excel(name = "领料单号") + private String code; + + @ApiModelProperty(value = "工程名称") + @Excel(name = "工程名称") + private String lotName; + + @ApiModelProperty(value = "单位id") + private String unitId; + + @ApiModelProperty(value = "工程id") + private String lotId; + + @ApiModelProperty(value = "领料单位") + @Excel(name = "领料单位") + private String unitName; + + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + @ApiModelProperty(value = "出库时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "出库时间") + private Date createTime; + + @ApiModelProperty(value = "出库数量") + @Excel(name = "出库数量") + private Integer outNum; + + @ApiModelProperty(value = "设备状态") + @Excel(name = "设备状态") + private String maStauts; + + @ApiModelProperty(value = "开始时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String startTime; + + @ApiModelProperty(value = "结束时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String endTime; + + @ApiModelProperty(value = "关键字") + private String keyWord; + +} \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java index 156a728..e6e790c 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java @@ -210,4 +210,10 @@ public class ProjUsingRecord { @ApiModelProperty(value = "实时库存") private Integer num; + /** + * 在用标识 + */ + @ApiModelProperty(value = "在用标识") + private Integer useFlag; + } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjectMonthDetail.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjectMonthDetail.java index 27e131f..0542f57 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjectMonthDetail.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjectMonthDetail.java @@ -34,13 +34,13 @@ public class ProjectMonthDetail { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date startTime; + private String startTime; /** * 结束日期 */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date endTime; + private String endTime; /** * 结算天数 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java index 2eaa6df..8e0e330 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.material.mapper; import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.OutRecord; import com.bonus.sgzb.material.domain.ScrapRecord; import org.apache.ibatis.annotations.Mapper; @@ -20,4 +21,6 @@ public interface InputRecordMapper { * @return List */ List getInputRecordList(InputRecord bean); + + List getOutputRecordList(OutRecord bean); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java index bc1700d..db74bd3 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java @@ -1,5 +1,6 @@ package com.bonus.sgzb.material.mapper; +import com.bonus.sgzb.base.api.domain.ApplyRelation; import com.bonus.sgzb.base.api.domain.SltAgreementApply; import com.bonus.sgzb.base.api.domain.SltAgreementInfo; import com.bonus.sgzb.base.api.domain.SltAgreementRelation; @@ -72,4 +73,10 @@ public interface SltAgreementInfoMapper { int updateBmAgreementInfo(@Param("agreementId") String agreementId); int updateRecodeIsSlt(String id); + + int insertApplyRelation(ApplyRelation applyRelation1); + + List getAddLoseList(AgreementInfo bean); + + List checkEndTime(SltAgreementApply apply); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java index 676a831..ff356e9 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.material.service; import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.OutRecord; import com.bonus.sgzb.material.domain.ScrapRecord; import java.util.List; @@ -18,4 +19,5 @@ public interface InputRecordService { * @return List */ List getInputRecordList(InputRecord bean); + List getOutputRecordList(OutRecord bean); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java index ffc9c8b..54b7397 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.material.service.impl; import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.OutRecord; import com.bonus.sgzb.material.domain.ScrapRecord; import com.bonus.sgzb.material.mapper.InputRecordMapper; import com.bonus.sgzb.material.mapper.ScrapRecordMapper; @@ -26,4 +27,9 @@ public class InputRecordServiceImpl implements InputRecordService { public List getInputRecordList(InputRecord bean) { return inputRecordMapper.getInputRecordList(bean); } + + @Override + public List getOutputRecordList(OutRecord bean) { + return inputRecordMapper.getOutputRecordList(bean); + } } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java index 9dc6c3e..d796b0a 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java @@ -2,10 +2,7 @@ package com.bonus.sgzb.material.service.impl; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.write.metadata.WriteSheet; -import com.bonus.sgzb.base.api.domain.SltAgreementApply; -import com.bonus.sgzb.base.api.domain.SltAgreementInfo; -import com.bonus.sgzb.base.api.domain.SltAgreementRelation; -import com.bonus.sgzb.base.api.domain.SltInfoVo; +import com.bonus.sgzb.base.api.domain.*; import com.bonus.sgzb.common.core.exception.ServiceException; import com.bonus.sgzb.common.core.utils.DateTimeHelper; @@ -64,17 +61,29 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { List preScrapList = getPreScrapList(list); //丢失费用列表 List loseList = getLoseList(list); + //额外增加费用 + List addCostList = getAddLoseList(list); sltInfoVo.setLeaseListOne(leaseListOne); sltInfoVo.setLeaseListThree(leaseListThree); sltInfoVo.setRepairList(repairList); sltInfoVo.setScrapList(scrapList); sltInfoVo.setPreScrapList(preScrapList); sltInfoVo.setLoseList(loseList); - List relations = getRelations(leaseListOne, leaseListThree, repairList, scrapList, preScrapList, loseList, list); + sltInfoVo.setAddCostList(addCostList); + List relations = getRelations(leaseListOne, leaseListThree, repairList, scrapList, preScrapList, loseList, addCostList, list); sltInfoVo.setRelations(relations); return sltInfoVo; } + private List getAddLoseList(List list) { + List applyRelations = new ArrayList<>(); + for (AgreementInfo bean : list) { + List addLoseList = sltAgreementInfoMapper.getAddLoseList(bean); + applyRelations.addAll(addLoseList); + } + return applyRelations; + } + @Override public List getPreScrapList(List list) { List scrapList = new ArrayList<>(); @@ -214,7 +223,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { return leaseList; } - private List getRelations(List leaseListOne, List leaseListThree, List repairList, List scrapList, List preScrapList, List loseList, List list) { + private List getRelations(List leaseListOne, List leaseListThree, List repairList, List scrapList, List preScrapList, List loseList, List addCostList, List list) { List relations = new ArrayList<>(); for (AgreementInfo info : list) { SltAgreementRelation relation = new SltAgreementRelation(); @@ -224,6 +233,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { BigDecimal scrapCost = BigDecimal.ZERO; BigDecimal preScrapCost = BigDecimal.ZERO; BigDecimal repairCost = BigDecimal.ZERO; + BigDecimal addCost = BigDecimal.ZERO; for (SltAgreementInfo lease : leaseListOne) { if (lease.getAgreementId().equals(info.getAgreementId().toString())) { relation.setAgreementId(lease.getAgreementId()); @@ -274,6 +284,13 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { loseCost = loseCost.add(cost); } } + + for (ApplyRelation applyRelation : addCostList) { + if (applyRelation.getAgreementId().equals(info.getAgreementId().toString())) { + BigDecimal cost = applyRelation.getAddCost(); + addCost = addCost.add(cost); + } + } // 判断是否已经结算(01承担方) boolean b = leaseListOne.stream().allMatch(t -> "1".equals(t.getIsSlt())); if (b) { @@ -294,6 +311,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { relation.setScrapCost(scrapCost); relation.setPreScrapCost(preScrapCost); relation.setLoseCost(loseCost); + relation.setAddCost(addCost); relations.add(relation); } return relations; @@ -303,6 +321,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { @Transactional public AjaxResult submitFee(SltAgreementApply apply) { SltAgreementRelation relation = apply.getRelation(); + BigDecimal addPrice = new BigDecimal(0); if (StringUtils.isNotBlank(apply.getRepairIds())) { for (String id : apply.getRepairIds().split(",")) { sltAgreementInfoMapper.updateRecodeIsSlt(id); @@ -311,6 +330,15 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { sltAgreementInfoMapper.updateInfoStatus(apply.getAgreementId()); sltAgreementInfoMapper.updateBmAgreementInfo(apply.getAgreementId()); relation.setAgreementId(apply.getAgreementId()); + List applyRelation = relation.getApplyRelation(); + if (applyRelation != null && applyRelation.size() > 0) { + for (ApplyRelation applyRelation1 : applyRelation) { + addPrice = addPrice.add(applyRelation1.getAddCost()); + applyRelation1.setAgreementId(apply.getAgreementId()); + sltAgreementInfoMapper.insertApplyRelation(applyRelation1); + } + } + relation.setAddCost(addPrice); int i = sltAgreementInfoMapper.insRelation(relation); if (i > 0) { return AjaxResult.success("结算成功"); diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml index 887ac88..7c7d1c5 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml @@ -5,4 +5,11 @@ spring: name: sgzb-material profiles: # 环境配置 - active: sgzb_cq_local + active: sgzb_nw_local + + +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml index 6dda43f..4205c7c 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml @@ -1193,4 +1193,25 @@ left join ma_type mt3 on mt2.parent_id = mt3.type_id where lod.id = #{id} + diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml index 29b08b8..9f11484 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml @@ -50,4 +50,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND iad.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml index f076899..7c413eb 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ProjUsingRecordMapper.xml @@ -122,5 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY bai.agreement_id, mt.type_id) AS subquery2 ON subquery1.type_id = subquery2.type_id AND subquery1.agreement_id = subquery2.agreement_id + + WHERE IFNULL(subquery1.outNum, 0) - IFNULL(subquery2.backNum, 0) > 0 + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml index 5b2accf..60ac291 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml @@ -61,11 +61,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{partType}, + + insert into slt_agreement_add_cost (cost_remark,add_cost,agreement_id) + values (#{costRemark},#{addCost},#{agreementId}) + update slt_agreement_info set is_slt = '1', slt_time = now(), - update_time = now(), + update_time = now() where agreement_id = #{agreementId} @@ -591,4 +595,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" group by sad.type_id,sad.ma_id,sad.scrap_type + + \ No newline at end of file