From 83abe82c26fd684f652bee4f3bc246d87e85a2fd Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Fri, 24 Oct 2025 17:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/base/api/domain/LeaseOutDetails.java | 4 + .../base/api/domain/SltAgreementInfo.java | 5 + .../app/mapper/LeaseOutDetailsMapper.java | 2 + .../impl/LeaseOutDetailsServiceImpl.java | 79 ++++++++ .../app/service/impl/TmTaskServiceImpl.java | 6 +- .../sgzb/base/mapper/MaMachineMapper.java | 2 + .../service/impl/MaMachineServiceImpl.java | 5 + .../base/service/impl/RepairServiceImpl.java | 12 +- .../controller/RepairRecordController.java | 25 +++ .../SltAgreementInfoController.java | 14 +- .../sgzb/material/domain/BackRecord.java | 27 ++- .../sgzb/material/domain/InputRecord.java | 9 + .../sgzb/material/domain/LeaseRecord.java | 21 +- .../bonus/sgzb/material/domain/OutRecord.java | 27 ++- .../sgzb/material/domain/ProjUsingRecord.java | 9 + .../sgzb/material/domain/RepairFixRecord.java | 106 ++++++++++ .../sgzb/material/domain/RepairRecord.java | 5 + .../sgzb/material/domain/ScrapRecord.java | 10 + .../sgzb/material/domain/StorageStatus.java | 9 + .../material/mapper/RepairRecordMapper.java | 2 + .../mapper/SltAgreementInfoMapper.java | 4 + .../material/service/RepairRecordService.java | 3 + .../service/SltAgreementInfoService.java | 5 + .../impl/EquipmentToRepairServiceImpl.java | 2 +- .../service/impl/RepairRecordServiceImpl.java | 17 ++ .../impl/SltAgreementInfoServiceImpl.java | 185 +++++++++++++++++- .../vo/RepairAuditDetailsNewQuery.java | 19 +- .../mapper/app/LeaseOutDetailsMapper.xml | 4 + .../resources/mapper/base/MaMachineMapper.xml | 5 + .../resources/mapper/base/RepairMapper.xml | 9 +- .../mapper/material/BackRecordMapper.xml | 6 + .../mapper/material/InputRecordMapper.xml | 13 ++ .../mapper/material/LeaseRecordMapper.xml | 6 + .../mapper/material/ProjUsingRecordMapper.xml | 13 ++ .../mapper/material/RepairRecordMapper.xml | 61 +++++- .../mapper/material/ScrapRecordMapper.xml | 14 +- .../material/SltAgreementInfoMapper.xml | 146 ++++++++++++++ .../mapper/material/StorageStatusMapper.xml | 6 + 38 files changed, 844 insertions(+), 53 deletions(-) create mode 100644 sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairFixRecord.java diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java index 7c72b95..8e46baa 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java @@ -193,4 +193,8 @@ public class LeaseOutDetails implements Serializable { private int postStoreNum; private String token; + + private Integer day; + + private BigDecimal leaseMoney; } 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 c2e29a7..df263d0 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 @@ -237,4 +237,9 @@ public class SltAgreementInfo { private int manageType; + + /** + * 是否根据同类型最大结算时间得来(0:否,1:是) + */ + private Integer isMaxEndTime; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java index 33f71bc..d741bce 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java @@ -88,6 +88,8 @@ public interface LeaseOutDetailsMapper { int insSltInfo(@Param("record") LeaseOutDetails record, @Param("agreementId")String agreementId,@Param("ma") MaType ma); + int insertMonthTempInfo(@Param("record") LeaseOutDetails record, @Param("agreementId")String agreementId,@Param("ma") MaType ma); + SltAgreementInfo getSltAgreementInfo(LeaseOutDetails record); int updSltInfo(SltAgreementInfo sltAgreementInfo); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java index a00526f..52442f7 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java @@ -35,6 +35,7 @@ import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.YearMonth; import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.*; /** @@ -472,6 +473,46 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { throw new RuntimeException("出库失败,插入结算记录失败"); } record.setPostStoreNum(getStorageNum(record)); + + /************************** 判断是否是补做的单子,如果是补做的单子需要往project_temp_cost表插入冲减账数据 **********************/ + // 1. 计算当前时间的业务月份(21日及以后属于下一个业务月) + LocalDate currentLocalDate = LocalDate.now(); + LocalDate currentBusinessMonthDate = currentLocalDate.getDayOfMonth() > 20 + ? currentLocalDate.plusMonths(1) // 21日及以后,业务月为下一月 + : currentLocalDate; // 20日及以前,业务月为当月 + String currentBusinessMonth = currentBusinessMonthDate.format(DateTimeFormatter.ofPattern("yyyyMM")); + + // 2. 计算创建时间的业务月份 + Date createTime = record.getCreateTime(); + if (createTime == null) { + throw new RuntimeException("出库时间不能为空,无法判断是否为补做单子"); + } + LocalDate createLocalDate = createTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate createBusinessMonthDate = createLocalDate.getDayOfMonth() > 20 + ? createLocalDate.plusMonths(1) // 21日及以后,业务月为下一月 + : createLocalDate; // 20日及以前,业务月为当月 + String createBusinessMonth = createBusinessMonthDate.format(DateTimeFormatter.ofPattern("yyyyMM")); + + + + // 3. 判断创建时间业务月份是否早于当前业务月份 + if (createBusinessMonth.compareTo(currentBusinessMonth) < 0) { + // 补做单子逻辑:往project_temp_cost表插入冲减账数据 + // 计算当前时间与创建时间的天数差(包含两端日期,例如:5月12日-5月20日为9天) + Date currentDate = Date.from(currentLocalDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); + Date createDate = Date.from(createLocalDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); + // 使用DateUtil计算天数差(false表示不包含结束日期,+1转为包含两端日期的差) + long dayDifference = DateUtil.betweenDay(createDate, currentDate, false) + 1; + record.setDay((int) dayDifference); + res = insSltInfoTemp(taskId, record); + if (res == 0) { + throw new RuntimeException("插入月结冲减账表失败"); + } + } + + + + /************************** 判断是否是补做的单子,如果是补做的单子需要往project_temp_cost表插入冲减账数据 **********************/ } else { return AjaxResult.error("领料出库失败,机具库存不足"); } @@ -719,6 +760,44 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { return res; } + public int insSltInfoTemp(String taskId, LeaseOutDetails record) { + int res = 0; + String agreementId = leaseOutDetailsMapper.getAgreementId(taskId); + String protocol = leaseOutDetailsMapper.getProtocol(agreementId); + MaType ma = leaseOutDetailsMapper.getMaType(record.getTypeId()); + Integer replaceTypeId = record.getReplaceTypeId(); + if (StringUtils.isEmpty(protocol)) { + + if(replaceTypeId != null){ + ma.setFinalPrice(record.getLeasePrice()); + ma.setTypeName(record.getMaName()); + ma.setModelName(record.getMaModel()); + ma.setReplaceTypeId(record.getReplaceTypeId()); + }else{ + ma.setFinalPrice(ma.getLeasePrice()); + } + + } else { + if (Constants.INNER_PROTOCAL.equals(protocol)) { + + if(replaceTypeId != null){ + ma.setFinalPrice(record.getLeasePrice()); + }else{ + ma.setFinalPrice(ma.getLeasePrice()); + } + + + } else if (Constants.OUTER_PROTOCAL.equals(protocol)) { + ma.setFinalPrice(ma.getRentPrice()); + } else { + ma.setFinalPrice(ma.getLeasePrice()); + } + } + record.setLeaseMoney(ma.getFinalPrice().multiply(BigDecimal.valueOf(record.getOutNum())).multiply(BigDecimal.valueOf(record.getDay()))); + res = leaseOutDetailsMapper.insertMonthTempInfo(record, agreementId, ma); + return res; + } + /** * @param maCode 编码ID * @return 数据 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 3f54e98..2d08ae9 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 @@ -260,7 +260,7 @@ public class TmTaskServiceImpl implements TmTaskService { public List getLeaseAuditListByOne(TmTask record) { Set roles = SecurityUtils.getLoginUser().getRoles(); List leaseDetailByParentId = new ArrayList<>(); - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentIdTwo(record); } else { leaseDetailByParentId = tmTaskMapper.getLeaseDetailByParentId(record); @@ -466,7 +466,7 @@ public class TmTaskServiceImpl implements TmTaskService { public List getLeaseAuditList(TmTask record) { Set roles = SecurityUtils.getLoginUser().getRoles(); List tmTaskList; - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { tmTaskList = tmTaskMapper.getAuditListByLeaseTmTask(record); } else { long username = SecurityUtils.getLoginUser().getUserid(); @@ -712,7 +712,7 @@ public class TmTaskServiceImpl implements TmTaskService { public List getLeaseOutListByUser(TmTask task) { Set roles = SecurityUtils.getLoginUser().getRoles(); List tmTaskList; - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { tmTaskList = tmTaskMapper.getLeaseOutList(task); } else { diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java index cddce61..9301832 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/mapper/MaMachineMapper.java @@ -64,4 +64,6 @@ public interface MaMachineMapper { * @return */ List getMachineList(MaMachine maMachine); + + List selectMaMachineByMaCode(MaMachine maMachine); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java index d9cf10a..a6e4d48 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java @@ -156,6 +156,11 @@ public class MaMachineServiceImpl implements MaMachineService { @Override @Transactional public int updateMaMachine(MaMachine maMachine) { + //判断固定资产编号是否重复 + List maMachine1 = maMachineMapper.selectMaMachineByMaCode(maMachine); + if (maMachine1 != null && maMachine1.size() > 0) { + throw new ServiceException("固定资产编号已存在,请重新输入"); + } // 删除类型和资产属性绑定关系 maPropInfoMapper.deleteMaPropSetByPropIds(maMachine.getTypeId()); // 新增机具和资产属性绑定关系 diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java index 3b346ba..39c7339 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java @@ -62,7 +62,7 @@ public class RepairServiceImpl implements RepairService { public List getRepairTaskListNew(RepairTask bean) { Set roles = SecurityUtils.getLoginUser().getRoles(); List repairTaskList = new ArrayList<>(); - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { repairTaskList = mapper.getRepairTaskListNew(bean); }else{ Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); @@ -91,7 +91,7 @@ public class RepairServiceImpl implements RepairService { Set roles = SecurityUtils.getLoginUser().getRoles(); List repairMaTypeList = new ArrayList<>(); - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { repairMaTypeList = mapper.getRepairMaTypeList(bean); }else{ Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); @@ -118,7 +118,7 @@ public class RepairServiceImpl implements RepairService { Set roles = SecurityUtils.getLoginUser().getRoles(); List repairMaTypeList = new ArrayList<>(); - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { repairMaTypeList = mapper.getRepairMaTypeListNew(bean); }else{ Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); @@ -156,7 +156,7 @@ public class RepairServiceImpl implements RepairService { Set roles = SecurityUtils.getLoginUser().getRoles(); List repairMaTypeList = new ArrayList<>(); - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { repairMaTypeList = mapper.getRepairNew(bean); }else{ Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); @@ -417,6 +417,7 @@ public class RepairServiceImpl implements RepairService { RepairApplyRecord beanTempTwo = new RepairApplyRecord(); beanTempTwo.setTypeId(bean.getTypeId()); + beanTempTwo.setMaId(bean.getMaId()); beanTempTwo.setParentId(Math.toIntExact(beanTemp.getId())); beanTempTwo.setPartId(Math.toIntExact(partDetails.getPartId())); beanTempTwo.setPartPrice(partDetails.getPartCost()); @@ -452,6 +453,7 @@ public class RepairServiceImpl implements RepairService { RepairApplyRecord beanTempTwo = new RepairApplyRecord(); beanTempTwo.setTypeId(bean.getTypeId()); + beanTempTwo.setMaId(bean.getMaId()); beanTempTwo.setParentId(Math.toIntExact(beanTemp.getId())); beanTempTwo.setPartId(null); beanTempTwo.setPartPrice(null); @@ -1039,6 +1041,7 @@ public class RepairServiceImpl implements RepairService { RepairApplyRecord beanTempTwo = new RepairApplyRecord(); beanTempTwo.setTypeId(bean.getTypeId()); + beanTempTwo.setMaId(bean.getMaId()); beanTempTwo.setParentId(Math.toIntExact(beanTemp.getId())); beanTempTwo.setPartId(Math.toIntExact(partDetails.getPartId())); beanTempTwo.setPartPrice(partDetails.getPartCost()); @@ -1074,6 +1077,7 @@ public class RepairServiceImpl implements RepairService { RepairApplyRecord beanTempTwo = new RepairApplyRecord(); beanTempTwo.setTypeId(bean.getTypeId()); + beanTempTwo.setMaId(bean.getMaId()); beanTempTwo.setParentId(Math.toIntExact(beanTemp.getId())); beanTempTwo.setPartId(null); beanTempTwo.setPartPrice(null); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.java index 3561d44..c6a6448 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairRecordController.java @@ -10,6 +10,7 @@ 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 com.bonus.sgzb.material.domain.BackRecord; +import com.bonus.sgzb.material.domain.RepairFixRecord; import com.bonus.sgzb.material.domain.RepairRecord; import com.bonus.sgzb.material.service.BackRecordService; import com.bonus.sgzb.material.service.RepairRecordService; @@ -70,4 +71,28 @@ public class RepairRecordController extends BaseController { util.exportExcel(response, list, "综合查询--维修记录"); } + /** + * 维修记录列表 + */ + @ApiOperation(value = "综合查询--维修损坏记录列表") + @GetMapping("/getRepairFixRecordList") + public AjaxResult getRepairFixRecordList(RepairFixRecord bean) { + List list = repairRecordService.getRepairFixRecordList(bean); + Integer pageIndex = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); + Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); + return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list)); + } + + /** + * 导出综合查询维修损坏记录列表 + */ + @ApiOperation("导出综合查询维修损坏记录列表") + @Log(title = "导出综合查询维修损坏记录列表", businessType = BusinessType.EXPORT) + @PostMapping("/exportFixRecord") + public void exportFixRecord(HttpServletResponse response, RepairFixRecord bean) + { + List list = repairRecordService.getRepairFixRecordList(bean); + ExcelUtil util = new ExcelUtil(RepairFixRecord.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 4561b79..8456263 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 @@ -326,7 +326,7 @@ public class SltAgreementInfoController extends BaseController { projectNames.add(info.getProjectName()); unitNames.add(info.getUnitName()); } - List explist = sltAgreementInfoService.getLeaseListOne(list); + List explist = sltAgreementInfoService.getLeaseListOneFinish(list); String projectName = handleData(projectNames); String unitName = handleData(unitNames); BigDecimal totalCost = BigDecimal.valueOf(0.00); @@ -365,16 +365,16 @@ public class SltAgreementInfoController extends BaseController { List leaseInfoListThree = new ArrayList<>(); if(Objects.equals(info.getCostBearingParty(), "01")){ // 获取导出数据 - explist = sltAgreementInfoService.getLeaseListOne(Collections.singletonList(info)); + explist = sltAgreementInfoService.getLeaseListOneFinish(Collections.singletonList(info)); leaseInfoList = Convert.toList(LeaseInfo.class, explist); }else if(Objects.equals(info.getCostBearingParty(), "03")){ // 获取导出数据 - explistThree = sltAgreementInfoService.getLeaseListThree(Collections.singletonList(info)); + explistThree = sltAgreementInfoService.getLeaseListThreeFinish(Collections.singletonList(info)); leaseInfoListThree = Convert.toList(LeaseInfo.class, explistThree); }else{ // 获取导出数据 - explist = sltAgreementInfoService.getLeaseListOne(Collections.singletonList(info)); - explistThree = sltAgreementInfoService.getLeaseListThree(Collections.singletonList(info)); + explist = sltAgreementInfoService.getLeaseListOneFinish(Collections.singletonList(info)); + explistThree = sltAgreementInfoService.getLeaseListThreeFinish(Collections.singletonList(info)); leaseInfoList = Convert.toList(LeaseInfo.class, explist); leaseInfoListThree = Convert.toList(LeaseInfo.class, explistThree); } @@ -774,7 +774,7 @@ public class SltAgreementInfoController extends BaseController { projectNames.add(info.getProjectName()); unitNames.add(info.getUnitName()); } - List explist = sltAgreementInfoService.getLeaseListThree(list); + List explist = sltAgreementInfoService.getLeaseListThreeFinish(list); String projectName = handleData(projectNames); String unitName = handleData(unitNames); BigDecimal totalCost = BigDecimal.valueOf(0.00); @@ -946,7 +946,7 @@ public class SltAgreementInfoController extends BaseController { // calcMonthlyService.calcMonthInfo(1); // } else { // int calDay = Integer.parseInt(settlementJobDay); - calcMonthlyService.calcMonthInfo(30); + calcMonthlyService.calcMonthInfo(20); // } } catch (Exception e) { diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java index aa07352..230b9b7 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java @@ -43,11 +43,20 @@ public class BackRecord { @Excel(name = "机具规格",sort=2) private String typeModelName; + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性",sort = 3) + private String propName; + /** * 退料单号 */ @ApiModelProperty(value = "退料单号") - @Excel(name = "退料单号",sort=3) + @Excel(name = "退料单号",sort=4) private String code; /** @@ -60,7 +69,7 @@ public class BackRecord { * 设备编码 */ @ApiModelProperty(value = "设备编码") - @Excel(name = "设备编码",sort=4) + @Excel(name = "设备编码",sort=5) private String maCode; /** @@ -73,14 +82,14 @@ public class BackRecord { * 退料数量 */ @ApiModelProperty(value = "退料数量") - @Excel(name = "退料数量",cellType = Excel.ColumnType.NUMERIC,sort=5) + @Excel(name = "退料数量",cellType = Excel.ColumnType.NUMERIC,sort=6) private Integer backNum; /** * 备注 */ - @Excel(name = "损坏情况",sort=6) + @Excel(name = "损坏情况",sort=7) @ApiModelProperty(value = "备注") private String remark; @@ -88,7 +97,7 @@ public class BackRecord { * 退料人 */ @ApiModelProperty(value = "退料人") - @Excel(name = "退料人",sort=7) + @Excel(name = "退料人",sort=8) private String backPerson; @@ -105,7 +114,7 @@ public class BackRecord { @ApiModelProperty(value = "制单日期") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort=8) + @Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort=9) private Date createTime; /** @@ -114,7 +123,7 @@ public class BackRecord { @ApiModelProperty(value = "回库日期") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "回库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort=9) + @Excel(name = "回库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort=10) private Date backTime; /** @@ -141,7 +150,7 @@ public class BackRecord { * 退料单位 */ @ApiModelProperty(value = "退料单位") - @Excel(name = "退料单位",sort=10) + @Excel(name = "退料单位",sort=11) private String unitName; /** @@ -154,7 +163,7 @@ public class BackRecord { * 退料工程 */ @ApiModelProperty(value = "退料工程") - @Excel(name = "退料工程",sort=11,width = 30) + @Excel(name = "退料工程",sort=12,width = 30) private String proName; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java index a00926b..4e0ce5a 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java @@ -64,6 +64,15 @@ public class InputRecord { @Excel(name = "单位") private String unit; + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性") + private String propName; + /** * 入库数量 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseRecord.java index 7c87ba2..7dac668 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseRecord.java @@ -67,18 +67,27 @@ public class LeaseRecord{ @Excel(name = "单位",sort = 5) private String unit; + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性",sort = 6) + private String propName; + /** * 预领料数 */ @ApiModelProperty(value = "预领料数") - @Excel(name = "领料数量",cellType = Excel.ColumnType.NUMERIC,sort = 6) + @Excel(name = "领料数量",cellType = Excel.ColumnType.NUMERIC,sort = 7) private Integer preNum; /** * 领料人 */ @ApiModelProperty(value = "领料人") - @Excel(name = "领料人",sort = 7) + @Excel(name = "领料人",sort = 8) private String leasePerson; /** @@ -100,7 +109,7 @@ public class LeaseRecord{ @ApiModelProperty(value = "申请日期") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 8) + @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 9) private Date leaseTime; /** @@ -109,7 +118,7 @@ public class LeaseRecord{ @ApiModelProperty(value = "出库日期") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 9) + @Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 10) private Date createTime; /** @@ -136,7 +145,7 @@ public class LeaseRecord{ * 领料单位 */ @ApiModelProperty(value = "领料单位") - @Excel(name = "领料单位",sort = 10) + @Excel(name = "领料单位",sort = 11) private String unitName; /** @@ -149,7 +158,7 @@ public class LeaseRecord{ * 领料工程 */ @ApiModelProperty(value = "领料工程") - @Excel(name = "领料工程",sort = 11,width = 30) + @Excel(name = "领料工程",sort = 12,width = 30) private String proName; /** 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 index e1f1ff8..09c251d 100644 --- 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 @@ -21,47 +21,56 @@ public class OutRecord { private static final long serialVersionUID = 2227217051604273598L; @ApiModelProperty(value = "领料单号") - @Excel(name = "领料单号") + @Excel(name = "领料单号",sort = 1) private String code; @ApiModelProperty(value = "工程名称") - @Excel(name = "工程名称") + @Excel(name = "工程名称",sort = 3) private String lotName; @ApiModelProperty(value = "单位id") + @Excel(name = "单位",sort = 6) private String unitId; @ApiModelProperty(value = "工程id") private String lotId; @ApiModelProperty(value = "领料单位") - @Excel(name = "领料单位") + @Excel(name = "领料单位",sort = 2) private String unitName; @ApiModelProperty(value = "规格型号") - @Excel(name = "规格型号") + @Excel(name = "规格型号",sort = 5) private String typeModelName; @ApiModelProperty(value = "机具名称") - @Excel(name = "机具名称") + @Excel(name = "机具名称",sort = 4) private String typeName; + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性",sort = 7) + private String propName; + @ApiModelProperty(value = "设备编码") - @Excel(name = "设备编码") + @Excel(name = "设备编码",sort = 8) private String maCode; @ApiModelProperty(value = "出库时间") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "出库时间") + @Excel(name = "出库时间",sort = 9) private Date createTime; @ApiModelProperty(value = "出库数量") - @Excel(name = "出库数量") + @Excel(name = "本次出库数量",sort = 10) private Integer outNum; @ApiModelProperty(value = "设备状态") - @Excel(name = "设备状态") private String maStauts; @ApiModelProperty(value = "开始时间") 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 623b17c..07bff7a 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 @@ -103,6 +103,15 @@ public class ProjUsingRecord { @Excel(name = "单位") private String unit; + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性") + private String propName; + /** * 租赁数量 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairFixRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairFixRecord.java new file mode 100644 index 0000000..f0de9ca --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairFixRecord.java @@ -0,0 +1,106 @@ +package com.bonus.sgzb.material.domain; + +import com.bonus.sgzb.common.core.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="维修任务详细") +public class RepairFixRecord implements Serializable { + private static final long serialVersionUID = 1L; + private Long id; + + /** + * 机具ID + */ + @ApiModelProperty(value = "机具ID") + private String maId; + + /** + * 机具编号 + */ + @ApiModelProperty(value = "机具编号") + @Excel(name = "机具编号",sort = 4) + private String maCode; + /** + * 规格ID + */ + @ApiModelProperty(value = "规格ID") + private String typeId; + /** + * 维修数量 + */ + @ApiModelProperty(value = "维修数量") + @Excel(name = "维修次数",sort = 5) + private int repairNum; + + /** + * 退料数量 + */ + @ApiModelProperty(value = "退料数量") + @Excel(name = "退料次数",sort = 6) + private int backNum; + + /** + * 损坏比例 + */ + @ApiModelProperty(value = "损坏比例") + @Excel(name = "损坏比例",sort = 8) + private String damageRate; + + /** + * 维修费用 + */ + @ApiModelProperty(value = "维修费用") + @Excel(name = "维修费用",sort = 7) + private BigDecimal cost; + + /** + * 机具类型 + */ + @Excel(name = "机具类型",sort=1) + private String typeName; + + /** + * 规格型号 + */ + @Excel(name = "规格型号",sort=2) + private String typeModelName; + + + /** + * 关键字 + */ + @ApiModelProperty(value = "关键字") + private String keyWord; + + + /** + * 部门id + */ + @ApiModelProperty(value = "部门id") + private Integer deptId; + + /** + * 是否显示 + */ + @ApiModelProperty(value = "是否显示") + private String isView; + + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性",sort = 3) + private String propName; +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java index 1fc745f..d766d24 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairRecord.java @@ -201,4 +201,9 @@ public class RepairRecord implements Serializable { */ @ApiModelProperty(value = "是否显示") private String isView; + + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java index aec5f51..bb17504 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapRecord.java @@ -87,6 +87,16 @@ public class ScrapRecord { @Excel(name = "单位") private String unit; + + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性") + private String propName; + /** * 协议号 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java index d323d8c..81e90fc 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java @@ -58,6 +58,15 @@ public class StorageStatus { @Excel(name = "单位") private String unit; + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性") + private String propName; + /** * 在库数量 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java index 44bdf7b..0df9aa5 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairRecordMapper.java @@ -1,5 +1,6 @@ package com.bonus.sgzb.material.mapper; +import com.bonus.sgzb.material.domain.RepairFixRecord; import com.bonus.sgzb.material.domain.RepairRecord; import com.bonus.sgzb.material.vo.RepairAuditDetailsNew; import com.bonus.sgzb.material.vo.RepairAuditDetailsNewQuery; @@ -22,4 +23,5 @@ public interface RepairRecordMapper { */ List getRepairRecordList(RepairRecord bean); + List getRepairFixRecordList(RepairFixRecord 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 02a84ea..b8c9ca4 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 @@ -24,6 +24,10 @@ public interface SltAgreementInfoMapper { List getLeaseListOne(AgreementInfo bean); List getLeaseListThree(AgreementInfo bean); + List getLeaseListOneFinish(AgreementInfo bean); + + List getLeaseListThreeFinish(AgreementInfo bean); + List getTaskList(@Param("bean") AgreementInfo bean, @Param("taskType")String taskType); List getRepairDetailsList(@Param("taskList") List taskList); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java index 832f230..41112d2 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairRecordService.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.material.service; import com.bonus.sgzb.material.domain.BackRecord; +import com.bonus.sgzb.material.domain.RepairFixRecord; import com.bonus.sgzb.material.domain.RepairRecord; import com.bonus.sgzb.material.vo.RepairAuditDetailsNew; import com.bonus.sgzb.material.vo.RepairAuditDetailsNewQuery; @@ -20,4 +21,6 @@ public interface RepairRecordService { * @return List */ List getRepairRecordList(RepairRecord bean); + + List getRepairFixRecordList(RepairFixRecord bean); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/SltAgreementInfoService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/SltAgreementInfoService.java index 7bdde82..95c5fc6 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/SltAgreementInfoService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/SltAgreementInfoService.java @@ -29,8 +29,13 @@ public interface SltAgreementInfoService { int settlementReview(SltAgreementApply apply); List getLeaseList(List list); List getLeaseListOne(List list); + + List getLeaseListOneFinish(List list); + List getLeaseListThree(List list); + List getLeaseListThreeFinish(List list); + List getLoseList(List list); List getRepairList(List list); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/EquipmentToRepairServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/EquipmentToRepairServiceImpl.java index 3a99eb3..2028ea9 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/EquipmentToRepairServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/EquipmentToRepairServiceImpl.java @@ -50,7 +50,7 @@ public class EquipmentToRepairServiceImpl implements EquipmentToRepairService { public List getEquipmentList(EquipmentTask bean) { Set roles = SecurityUtils.getLoginUser().getRoles(); List equipmentTaskList = new ArrayList<>(); - if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin")) { + if (roles.contains(STRING_ADMIN) || roles.contains("sysadmin") || roles.contains("jjfgs-jhdpzy") || roles.contains("jjfgs-sbbz") || roles.contains("jjfgs-sbfbz")) { equipmentTaskList = mapper.getEquipmentList(bean); }else{ Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.java index 03fb38c..2359fc8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.sgzb.material.service.impl; import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.material.domain.BackRecord; import com.bonus.sgzb.material.domain.DeptVo; +import com.bonus.sgzb.material.domain.RepairFixRecord; import com.bonus.sgzb.material.domain.RepairRecord; import com.bonus.sgzb.material.mapper.BackRecordMapper; import com.bonus.sgzb.material.mapper.LeaseRecordMapper; @@ -43,4 +44,20 @@ public class RepairRecordServiceImpl implements RepairRecordService { } return repairRecordMapper.getRepairRecordList(bean); } + + @Override + public List getRepairFixRecordList(RepairFixRecord bean) { + Long userId = SecurityUtils.getUserId(); + int deptId = leaseRecordMapper.getDeptId(userId); + if (deptId != 1000){ + DeptVo deptVo = leaseRecordMapper.getAnsetors(deptId); + String isView = deptVo.getIsView(); + + bean.setDeptId(deptId); + bean.setIsView(isView); + }else{ + bean.setIsView(null); + } + return repairRecordMapper.getRepairFixRecordList(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 e4e6631..2230bce 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 @@ -66,9 +66,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { public SltInfoVo getSltInfo(List list) { SltInfoVo sltInfoVo = new SltInfoVo(); //租赁费用列表 - List leaseListOne = getLeaseListOne(list); + List leaseListOne = getLeaseListOneFinish(list); //预报废费用列表 - List leaseListThree = getLeaseListThree(list); + List leaseListThree = getLeaseListThreeFinish(list); //维修费用列表暂时不取 //List repairList = getRepairList(list); List repairList = new ArrayList<>(); @@ -269,6 +269,82 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { return leaseList; } + /** + * 完工结算新需求(2.未还的机具完工结算的终止日期计算规则按照同类型最后回库的时间进行计算) + * + * @param list + * @return + */ + @Override + public List getLeaseListThreeFinish(List list) { + List leaseList = new ArrayList<>(); + for (AgreementInfo bean : list) { + List oneOfList = sltAgreementInfoMapper.getLeaseListThreeFinish(bean); + leaseList.addAll(oneOfList); + } + for (SltAgreementInfo bean : leaseList) { + if (bean.getLeasePrice() == null) { + bean.setLeasePrice(new BigDecimal(0)); + } + if (bean.getNum() == null) { + bean.setNum(0); + } + if (StringUtils.isEmpty(bean.getLeaseDays())) { + bean.setLeaseDays("0"); + } + if (Objects.isNull(bean.getTrimDay())) { + bean.setTrimDay(0); + } + BigDecimal leasePrice = bean.getLeasePrice(); + BigDecimal num = new BigDecimal(bean.getNum()); + BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays()); + // 实际结算天数(领料天数 + 调整天数(可以为负整数)) + BigDecimal realDays = leaseDays.add(new BigDecimal(bean.getTrimDay())); + // 实际结算金额 + BigDecimal realCosts = leasePrice.multiply(num).multiply(realDays); + // 应结算金额 + BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays); + bean.setCosts(costs); + //实际结算天数 + bean.setRealDays(realDays); + // 实际结算金额 + bean.setRealCosts(realCosts); + } + Map mergedMap = new HashMap<>(); + for (SltAgreementInfo info : leaseList) { + String key = info.getTypeId(); + if (info.getStartTime() != null && info.getEndTime() != null) { + key += "_" + info.getStartTime() + "_" + info.getEndTime(); + } + if (mergedMap.containsKey(key)) { + SltAgreementInfo mergedInfo = mergedMap.get(key); + // 数量相加 + mergedInfo.setNum(mergedInfo.getNum() + info.getNum()); + // 实际结算金额相加 + mergedInfo.setRealCosts(mergedInfo.getRealCosts().add(info.getRealCosts())); + // 应结算金额相加 + mergedInfo.setCosts(mergedInfo.getCosts().add(info.getCosts())); + // 合并remark、ckRemark、outRemark + if (info.getRemark() != null && !info.getRemark().isEmpty()) { + mergedInfo.setRemark(mergedInfo.getRemark() + "、" + info.getRemark()); + } + if (info.getCkRemark() != null && !info.getCkRemark().isEmpty()) { + mergedInfo.setCkRemark(mergedInfo.getCkRemark() + "、" + info.getCkRemark()); + } + if (info.getOutRemark() != null && !info.getOutRemark().isEmpty()) { + mergedInfo.setOutRemark(mergedInfo.getOutRemark() + "、" + info.getOutRemark()); + } + if(info.getIsMaxEndTime()!=null && info.getIsMaxEndTime()==1){ + mergedInfo.setIsMaxEndTime(1); + } + } else { + mergedMap.put(key, info); + } + } + leaseList = new ArrayList<>(mergedMap.values()); + return leaseList; + } + 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) { @@ -395,6 +471,32 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { @Override public AjaxResult submitFeeOne(SltAgreementInfo apply) { + //查找出 (未还的机具完工结算的终止日期计算规则按照同类型最后回库的时间进行计算) 的数据 + List list = new ArrayList<>() ; + if (apply.getAgreementIds() != null && !apply.getAgreementIds().isEmpty()) { + for (String agreementId : apply.getAgreementIds()) { + AgreementInfo info = new AgreementInfo(); + info.setAgreementId(Long.valueOf(agreementId)); // 假设agreementId为字符串类型,需转换为Long + info.setCostBearingParty(apply.getCostBearingParty()); + list.add(info); + } + } + for (AgreementInfo info : list){ + List oneOfList = new ArrayList<>(); + if(info.getCostBearingParty().equals("01")){ + oneOfList = sltAgreementInfoMapper.getLeaseListOneFinish(info); + }else{ + oneOfList = sltAgreementInfoMapper.getLeaseListThreeFinish(info); + } + oneOfList = oneOfList.stream() + .filter(slt -> slt.getIsMaxEndTime() != null && slt.getIsMaxEndTime() == 1) + .collect(Collectors.toList()); + if(oneOfList.size()>0){ + for (SltAgreementInfo slt : oneOfList){ + sltAgreementInfoMapper.updateTrimDay(slt); + } + } + } int i = sltAgreementInfoMapper.updateInfoOneStatus(apply.getAgreementIds(),apply.getCostBearingParty()); if (i > 0) { @@ -732,6 +834,85 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { return leaseList; } + /** + * 完工结算新需求(2.未还的机具完工结算的终止日期计算规则按照同类型最后回库的时间进行计算) + * + * @param list + * @return + */ + @Override + public List getLeaseListOneFinish(List list) { + List leaseList = new ArrayList<>(); + for (AgreementInfo bean : list) { + List oneOfList = sltAgreementInfoMapper.getLeaseListOneFinish(bean); + leaseList.addAll(oneOfList); + } + for (SltAgreementInfo bean : leaseList) { + if (bean.getLeasePrice() == null) { + bean.setLeasePrice(new BigDecimal(0)); + } + if (bean.getNum() == null) { + bean.setNum(0); + } + if (StringUtils.isEmpty(bean.getLeaseDays())) { + bean.setLeaseDays("0"); + } + if (Objects.isNull(bean.getTrimDay())) { + bean.setTrimDay(0); + } + BigDecimal leasePrice = bean.getLeasePrice(); + BigDecimal num = new BigDecimal(bean.getNum()); + BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays()); + // 实际结算天数(领料天数 + 调整天数(可以为负整数)) + BigDecimal realDays = leaseDays.add(new BigDecimal(bean.getTrimDay())); + // 实际结算金额 + BigDecimal realCosts = leasePrice.multiply(num).multiply(realDays); + // 应结算金额 + BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays); + bean.setCosts(costs); + //实际结算天数 + bean.setRealDays(realDays); + // 实际结算金额 + bean.setRealCosts(realCosts); + } +// // 如果isSlt不为0,则进行合并 +// if (list.get(0).getIsSlt() != null && list.get(0).getIsSlt() != 0) { + Map mergedMap = new HashMap<>(); + for (SltAgreementInfo info : leaseList) { + String key = info.getTypeId(); + if (info.getStartTime() != null || info.getEndTime() != null) { + key += "_" + info.getStartTime() + "_" + info.getEndTime(); + } + if (mergedMap.containsKey(key)) { + SltAgreementInfo mergedInfo = mergedMap.get(key); + // 数量相加 + mergedInfo.setNum(mergedInfo.getNum() + info.getNum()); + // 实际结算金额相加 + mergedInfo.setRealCosts(mergedInfo.getRealCosts().add(info.getRealCosts())); + // 应结算金额相加 + mergedInfo.setCosts(mergedInfo.getCosts().add(info.getCosts())); + // 合并remark、ckRemark、outRemark + if (info.getRemark() != null && !info.getRemark().isEmpty()) { + mergedInfo.setRemark(mergedInfo.getRemark() + "、" + info.getRemark()); + } + if (info.getCkRemark() != null && !info.getCkRemark().isEmpty()) { + mergedInfo.setCkRemark(mergedInfo.getCkRemark() + "、" + info.getCkRemark()); + } + if (info.getOutRemark() != null && !info.getOutRemark().isEmpty()) { + mergedInfo.setOutRemark(mergedInfo.getOutRemark() + "、" + info.getOutRemark()); + } + if(info.getIsMaxEndTime()!=null && info.getIsMaxEndTime()==1){ + mergedInfo.setIsMaxEndTime(1); + } + } else { + mergedMap.put(key, info); + } + } + leaseList = new ArrayList<>(mergedMap.values()); +// } + return leaseList; + } + /** * 结算单号编码生成规则 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/RepairAuditDetailsNewQuery.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/RepairAuditDetailsNewQuery.java index 468fcdc..3528e30 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/RepairAuditDetailsNewQuery.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/RepairAuditDetailsNewQuery.java @@ -24,10 +24,19 @@ public class RepairAuditDetailsNewQuery { */ @Excel(name = "规格型号",sort = 2) private String type; + + /** 资产属性id */ + @ApiModelProperty(value = "资产属性id") + private Integer propId; + + /** 资产属性名称 */ + @ApiModelProperty(value = "资产属性名称") + @Excel(name = "资产属性",sort = 3) + private String propName; /** * 维修时间 */ - @Excel(name = "维修时间",sort = 8) + @Excel(name = "维修时间",sort = 9) private String createTime; /** @@ -48,20 +57,20 @@ public class RepairAuditDetailsNewQuery { @ApiModelProperty(value = "机具编号") - @Excel(name = "机具编号",sort = 3) + @Excel(name = "机具编号",sort = 4) private String maCode; /** 维修总量 */ - @Excel(name = "维修总量",sort = 4) + @Excel(name = "维修总量",sort = 5) private Integer repairNum; /** 维修数量 */ - @Excel(name = "维修合格数量",sort = 5) + @Excel(name = "维修合格数量",sort = 6) private Integer repairedNum; /** 报废数量 */ private Integer scrapNum; - @Excel(name = "维修人",sort = 7) + @Excel(name = "维修人",sort = 8) private String repairer; @Excel(name = "维修类型",sort = 7) private int repairType; diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml index f498501..6c5a2ae 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml @@ -426,6 +426,10 @@ insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,type_name,model_name,replace_type_id,is_slt,company_id,lease_type,create_time,ck_remark) values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},#{record.createTime},0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},#{ma.typeName},#{ma.modelName},#{ma.replaceTypeId},'0',#{record.companyId},#{record.leaseType},now(),#{record.remark}); + + insert into project_temp_cost (agreement_id,type_id,ma_id,lease_id,lease_num,start_time,end_time,day,price,lease_money,cost_type,mark_time) + values (#{agreementId},#{record.typeId},#{record.maId},#{record.parentId},#{record.outNum},#{record.createTime},now(),#{record.day},#{ma.finalPrice},#{record.leaseMoney},0,now()); + + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/base/RepairMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/base/RepairMapper.xml index 843ff96..d2162d5 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/base/RepairMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/base/RepairMapper.xml @@ -17,13 +17,13 @@ - insert into repair_apply_part (parent_id,type_id,create_by,create_time,repair_content,part_id,part_num,part_price,part_name,remark,repair_remark,part_change,part_change_num,scrap_reason,scrap_type,scrap_num) - values (#{parentId},#{typeId},#{createBy},now(),#{repairContent},#{partId},#{partNum},#{partPrice},#{partName},#{remark},#{repairRemark},#{partChange},#{partChangeNum},#{scrapReason},#{scrapType},#{scrapNum}); + insert into repair_apply_part (parent_id,type_id,ma_id,create_by,create_time,repair_content,part_id,part_num,part_price,part_name,remark,repair_remark,part_change,part_change_num,scrap_reason,scrap_type,scrap_num) + values (#{parentId},#{typeId},#{maId},#{createBy},now(),#{repairContent},#{partId},#{partNum},#{partPrice},#{partName},#{remark},#{repairRemark},#{partChange},#{partChangeNum},#{scrapReason},#{scrapType},#{scrapNum}); - insert into repair_apply_part_save (parent_id,type_id,create_by,create_time,repair_content,part_id,part_num,part_price,part_name,remark,repair_remark,part_change,part_change_num,scrap_reason,scrap_type,scrap_num) - values (#{parentId},#{typeId},#{createBy},now(),#{repairContent},#{partId},#{partNum},#{partPrice},#{partName},#{remark},#{repairRemark},#{partChange},#{partChangeNum},#{scrapReason},#{scrapType},#{scrapNum}); + insert into repair_apply_part_save (parent_id,type_id,ma_id,create_by,create_time,repair_content,part_id,part_num,part_price,part_name,remark,repair_remark,part_change,part_change_num,scrap_reason,scrap_type,scrap_num) + values (#{parentId},#{typeId},#{maId},#{createBy},now(),#{repairContent},#{partId},#{partNum},#{partPrice},#{partName},#{remark},#{repairRemark},#{partChange},#{partChangeNum},#{scrapReason},#{scrapType},#{scrapNum}); @@ -521,6 +521,7 @@ SELECT mt2.type_name as typeName, mt.type_name as typeModelName, + mpi.prop_name as propName, mm.qr_code as qrCode, mm.ma_code as maCode, mt.unit_name as unit, @@ -29,6 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM input_apply_details iad LEFT JOIN ma_type mt on mt.type_id = iad.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id LEFT JOIN ma_machine mm on mm.ma_id = iad.ma_id LEFT JOIN sys_user su on su.user_id = iad.create_by where 1 = 1 @@ -46,6 +49,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and mt.type_name like concat('%',#{typeModelName},'%') + + and mpi.prop_id = #{propId} + AND iad.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') @@ -57,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bui.unit_name, mt.type_name as typeModelName, mt2.type_name as typeName, + mpi.prop_name as propName, + mt.unit_name as unitId, mm.ma_code, lod.create_time, lod.out_num, @@ -71,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN bm_unit_info bui ON bui.unit_id = bagi.unit_id LEFT JOIN ma_type mt ON mt.type_id = lod.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id LEFT JOIN sys_dic sd on mm.ma_status = sd.id WHERE @@ -84,6 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bpl.lot_id = #{lotId} + + and mpi.prop_id = #{propId} + AND lod.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml index 2a99bd8..94eb2b9 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml @@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mm.ma_code as maCode, mt.unit_name as unit, mt.manage_type as manageType, + mpi.prop_name as propName, lod.out_num as preNum, lai.lease_person as leasePerson, lai.create_time as leaseTime, @@ -43,6 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt on mt.type_id = lod.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id -- LEFT JOIN sys_user su on su.user_id = lai.lease_person where 1 = 1 @@ -64,6 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bpl.lot_id = #{proId} + + and mpi.prop_id = #{propId} + AND lod.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') 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 9b45903..5393bac 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 @@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT subquery1.agreementCode, subquery1.agreement_id AS agreementId, subquery1.type_id AS typeId, + subquery1.propName, subquery1.unitId, subquery1.proId, subquery1.unitName, @@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" IFNULL(subquery1.outNum, 0) * IFNULL(subquery1.rent_price, 0) as totalPrice FROM (SELECT bai.agreement_id, mt.type_id as type_id, + mpi.prop_name as propName, mt.rent_price, bui.unit_id as unitId, bpl.lot_id as proId, @@ -53,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id LEFT JOIN ma_type mt ON mt.type_id = lod.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id LEFT JOIN sys_user su ON su.user_id = lai.lease_person where 1=1 @@ -71,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bpl.lot_id = #{proId} + + and mpi.prop_id = #{propId} + and mt2.type_name like concat('%',#{typeName},'%') @@ -87,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.type_id) AS subquery1 LEFT JOIN (SELECT bai.agreement_id, mt.type_id, + mpi.prop_name as propName, mt.rent_price, bai.agreement_code AS agreementCode, bui.unit_name AS unitName, @@ -103,6 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id LEFT JOIN sys_user su ON su.user_id = baif.back_person where 1=1 @@ -121,6 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bpl.lot_id = #{proId} + + and mpi.prop_id = #{propId} + and mt2.type_name like concat('%',#{typeName},'%') diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml index 93b8fd6..47eedf3 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairRecordMapper.xml @@ -19,6 +19,7 @@ rad.audit_remark as remark, mt2.type_name as typeName, mt.type_name as type, + mpi.prop_name as propName, su.nick_name as repairer, rar.repair_type as repairType from @@ -28,6 +29,8 @@ left join ma_type mt on rar.type_id = mt.type_id left join sys_user su on rar.create_by = su.user_id LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id where rad.status = 1 and rar.repair_type in (1,2) @@ -36,8 +39,64 @@ mt2.type_name like concat('%',#{keyWord},'%') or mt.type_name like concat('%',#{keyWord},'%')) - + + and mpi.prop_id = #{propId} + group by rad.parent_id,rad.create_time,rad.type_id,rad.status,rad.audit_remark,mm.ma_code order by rar.create_time desc + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml index 0cb6580..efd7704 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapRecordMapper.xml @@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt2.type_name as typeName, mt.type_name as typeModelName, mt.unit_name as unit, + mpi.prop_name as propName, mm.ma_code as maCode, sad.audit_time as scrapTime, sad.scrap_num as scrapNum, @@ -19,6 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN tm_task tt on tt.task_id = sad.task_id LEFT JOIN ma_type mt on mt.type_id = sad.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id LEFT JOIN ma_machine mm on mm.ma_id = sad.ma_id WHERE sad.scrap_source = 3 and tt.task_status = 1 @@ -37,7 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and mt.type_name like concat('%',#{typeModelName},'%') - + + and mpi.prop_id = #{propId} + AND sad.audit_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') @@ -51,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt2.type_name as typeName, mt.type_name as typeModelName, mt.unit_name as unit, + mpi.prop_name as propName, mm.ma_code as maCode, sad.audit_time as scrapTime, sad.scrap_num as scrapNum, @@ -61,6 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN repair_apply_part rap on sad.parent_id = rap.parent_id LEFT JOIN ma_type mt on mt.type_id = sad.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id + left join ma_prop_set mps on mt.type_id = mps.type_id + left join ma_prop_info mpi on mps.prop_id = mpi.prop_id LEFT JOIN ma_machine mm on mm.ma_id = sad.ma_id WHERE sad.scrap_source = 2 and tt.task_status = 1 @@ -78,7 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and mt.type_name like concat('%',#{typeModelName},'%') - + + and mpi.prop_id = #{propId} + AND sad.audit_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') 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 0ce9b8e..38c6249 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 @@ -428,6 +428,152 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where sai.agreement_id = #{agreementId} and sai.lease_type = 0 and lai.cost_bearing_party = '03' + + + + + \ No newline at end of file