From f828a53c101cd2d6b7c749d6b1d77fd35696124d Mon Sep 17 00:00:00 2001 From: mashuai Date: Wed, 14 May 2025 18:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/domain/lease/LeaseMaCodeDto.java | 36 ++++ .../biz/domain/lease/LeaseOutDetails.java | 6 + .../material/back/domain/vo/MaCodeVo.java | 20 +- .../controller/LeaseApplyInfoController.java | 97 +++++++++- .../lease/domain/LeaseApplyDetails.java | 1 - .../lease/domain/LeaseOutDetailsInfo.java | 178 ++++++++++++++++++ .../lease/domain/vo/LeaseTotalInfo.java | 92 +++++++++ .../lease/mapper/LeaseApplyDetailsMapper.java | 16 ++ .../lease/mapper/LeaseApplyInfoMapper.java | 10 + .../lease/service/ILeaseApplyInfoService.java | 26 +++ .../impl/LeaseApplyInfoServiceImpl.java | 161 +++++++++++----- .../impl/LeaseOutDetailsServiceImpl.java | 152 ++++++--------- .../ma/controller/MachineController.java | 7 +- .../material/basic/BmAgreementInfoMapper.xml | 9 +- .../lease/LeaseApplyDetailsMapper.xml | 86 ++++++++- .../material/lease/LeaseApplyInfoMapper.xml | 72 ++++++- .../mapper/material/ma/MachineMapper.xml | 2 +- 17 files changed, 800 insertions(+), 171 deletions(-) create mode 100644 bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseMaCodeDto.java create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseOutDetailsInfo.java create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseTotalInfo.java diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseMaCodeDto.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseMaCodeDto.java new file mode 100644 index 00000000..7a0baacc --- /dev/null +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseMaCodeDto.java @@ -0,0 +1,36 @@ +package com.bonus.common.biz.domain.lease; + +import com.bonus.common.biz.domain.BmFileInfo; +import com.bonus.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * 领料出库机具编码集合 + * @Author ma_sh + * @create 2024/11/11 15:57 + */ +@Data +public class LeaseMaCodeDto { + + @ApiModelProperty(value = "主键id") + private Long id; + + @ApiModelProperty(value = "机具id") + private Long maId; + + private Long parentId; + + /** + * 机具编码 + */ + @ApiModelProperty(value = "机具编码") + private String maCode; + + private String typeId; + + private String maStatus; +} diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java index d9af335b..10a53407 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java @@ -7,6 +7,7 @@ import lombok.ToString; import com.bonus.common.core.web.domain.BaseEntity; import java.math.BigDecimal; +import java.util.List; /** * 领料出库详细对象 lease_out_details @@ -105,4 +106,9 @@ public class LeaseOutDetails extends BaseEntity { @ApiModelProperty(value = "协议id") private Long agreementId; + + /** + * 领料出库机具编码集合 + */ + private List maCodeList; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java index 5aaa9fe1..31f7ac79 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java @@ -1,5 +1,6 @@ package com.bonus.material.back.domain.vo; +import com.bonus.common.core.annotation.Excel; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -16,8 +17,6 @@ public class MaCodeVo { private Long maId; - private String maCode; - private String maStatus; private String maStatusName; @@ -29,10 +28,18 @@ public class MaCodeVo { @ApiModelProperty(value = "物资类型") private String materialType; + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") private String materialName; + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") private String typeName; + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + private String typeModelName; @ApiModelProperty(value = "机具外观判断") @@ -78,4 +85,13 @@ public class MaCodeVo { @ApiModelProperty(value = "外观判断合格数量") private BigDecimal goodNum; + + @ApiModelProperty(value = "出库人") + @Excel(name = "出库人") + private String outPerson; + + @ApiModelProperty(value = "出库时间") + @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date outTime; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseApplyInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseApplyInfoController.java index c4ac4845..53db26e2 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseApplyInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseApplyInfoController.java @@ -11,14 +11,17 @@ import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.log.annotation.SysLog; import com.bonus.common.log.enums.OperaType; +import com.bonus.material.back.domain.vo.MaCodeVo; import com.bonus.material.basic.domain.BmQrcodeInfo; import com.bonus.material.basic.domain.RetainedEquipmentInfo; import com.bonus.material.common.annotation.PreventRepeatSubmit; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; import com.bonus.material.lease.domain.LeaseApplyDetails; import com.bonus.material.lease.domain.LeaseApplyDetailsInfo; +import com.bonus.material.lease.domain.LeaseOutDetailsInfo; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; import com.bonus.common.biz.domain.lease.LeaseOutRequestVo; +import com.bonus.material.lease.domain.vo.LeaseTotalInfo; import com.bonus.material.lease.service.ILeaseApplyInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -108,6 +111,25 @@ public class LeaseApplyInfoController extends BaseController { return success(leaseApplyInfoService.selectLeaseApplyInfoById(id, keyWord, publishTask)); } + /** + * 获取工器具领料出库详情 + * @param leaseApplyInfo + * @return + */ + @ApiOperation(value = "获取工器具领料出库详情") + @GetMapping(value = "/outDetailsById") + public AjaxResult outDetailsById(LeaseApplyInfo leaseApplyInfo) { + return success(leaseApplyInfoService.outDetailsById(leaseApplyInfo)); + } + + @ApiOperation(value = "导出工器具领料出库详情") + @PostMapping("/exportOutDetails") + public void exportOutDetails(HttpServletResponse response, LeaseApplyInfo leaseApplyInfo) { + List list = leaseApplyInfoService.exportOutDetails(leaseApplyInfo); + ExcelUtil util = new ExcelUtil<>(LeaseOutDetailsInfo.class); + util.exportExcel(response, list, "工器具领料出库详情数据"); + } + /** * 获取领料出库内部详细信息 * @param leaseApplyDetails @@ -305,7 +327,7 @@ public class LeaseApplyInfoController extends BaseController { @PreventRepeatSubmit //@RequiresPermissions("lease:info:leaseOut") @SysLog(title = "领料出库", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->领料出库") - @StoreLog(title = "领料出库", module = "仓储管理->领料出库") + //@StoreLog(title = "领料出库", module = "仓储管理->领料出库") @PostMapping("/leaseOut") public AjaxResult leaseOut(@NotNull(message = "领料出库信息不能为空") @RequestBody LeaseOutRequestVo leaseOutRequestVo) { try { @@ -357,4 +379,77 @@ public class LeaseApplyInfoController extends BaseController { } return success("审核完成"); } + + /** + * 工器具领料记录 + * @param info + * @return + */ + @ApiOperation(value = "工器具领料记录") + @GetMapping("/getLeaseInfoDetails") + public AjaxResult getLeaseInfoDetails(LeaseTotalInfo info){ + info.setIsExport(1); + startPage(); + List list = leaseApplyInfoService.getLeaseInfoDetails(info); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 工器具领料记录不带分页 + * @param info + * @return + */ + @ApiOperation(value = "工器具领料记录不带分页") + @GetMapping("/getLeaseInfoDetailsNoPageList") + public AjaxResult getLeaseInfoDetailsNoPageList(LeaseTotalInfo info){ + info.setIsExport(0); + LeaseTotalInfo leaseTotalInfo = new LeaseTotalInfo(); + List list = leaseApplyInfoService.getLeaseInfoDetails(info); + if (CollectionUtils.isNotEmpty(list)) { + leaseTotalInfo = list.get(0); + } + return AjaxResult.success(leaseTotalInfo); + } + + /** + * 导出工器具领料记录查询 + * @param response + * @param bean + */ + @ApiOperation("导出工器具领料记录查询") + @PostMapping("/exportLeaseInfoDetails") + public void exportRetainedEquipmentList(HttpServletResponse response, LeaseTotalInfo bean) + { + bean.setIsExport(0); + List list = leaseApplyInfoService.getLeaseInfoDetails(bean); + ExcelUtil util = new ExcelUtil<>(LeaseTotalInfo.class); + util.exportExcel(response, list, "综合查询--工器具领料记录查询"); + } + + /** + * 工器具领料二级页面记录 + * @param info + * @return + */ + @ApiOperation(value = "工器具领料二级页面记录") + @GetMapping("/getSecondLeaseInfo") + public AjaxResult getSecondLeaseInfo(LeaseTotalInfo info){ + startPage(); + List list = leaseApplyInfoService.getSecondLeaseInfo(info); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出工器具领料二级页面查询 + * @param response + * @param bean + */ + @ApiOperation("导出工器具领料二级页面查询") + @PostMapping("/exportSecondLeaseInfo") + public void exportSecondLeaseInfo(HttpServletResponse response, LeaseTotalInfo bean) + { + List list = leaseApplyInfoService.getSecondLeaseInfo(bean); + ExcelUtil util = new ExcelUtil<>(MaCodeVo.class); + util.exportExcel(response, list, "综合查询--工器具领料二级页面查询"); + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java index 6747aa2e..ed301ccd 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java @@ -99,7 +99,6 @@ public class LeaseApplyDetails extends BaseEntity { /** 已领数量 */ @ApiModelProperty(value = "已领数量") - @Excel(name = "出库数量") private BigDecimal alNum; /** diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseOutDetailsInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseOutDetailsInfo.java new file mode 100644 index 00000000..478919ab --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseOutDetailsInfo.java @@ -0,0 +1,178 @@ +package com.bonus.material.lease.domain; + +import com.bonus.common.core.annotation.Excel; +import com.bonus.common.core.web.domain.BaseEntity; +import com.bonus.material.back.domain.vo.MaCodeVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.math.BigDecimal; +import java.util.List; + +/** + * 领料任务详细对象 lease_apply_details + * + * @author xsheng + * @date 2024-10-16 + */ +@Data +@ToString +public class LeaseOutDetailsInfo { + + private static final long serialVersionUID = 1L; + + /** ID */ + private Long id; + + /** 任务ID */ + @ApiModelProperty(value = "任务ID") + private Long parentId; + + @ApiModelProperty(value = "机具ID") + private Long maId; + + /** 物资类型 */ + @ApiModelProperty(value = "物资类型名称") + @Excel(name = "类型名称") + private String maTypeName; + + /** 物资类型ids */ + @ApiModelProperty(value = "物资类型ids") + private int[] maTypeIds; + + private String maTypeIdsStr; + + private int isManual; + + /** 规格型号id */ + @ApiModelProperty(value = "规格型号id") + private Long typeId; + + @ApiModelProperty(value = "规格型号id") + private Long newTypeId; + + @ApiModelProperty(value = "三级id") + private Long thirdTypeId; + + @ApiModelProperty(value = "规格型号id") + private Long taskId; + + /** 规格型号 */ + @ApiModelProperty(value = "规格型号名称") + @Excel(name = "规格型号") + private String typeName; + + @ApiModelProperty(value = "机具编码") + private String maCode; + + /** 计量单位 */ + @ApiModelProperty(value = "计量单位") + @Excel(name = "计量单位") + private String unitName; + + /** 计量单位数值 */ + @ApiModelProperty(value = "计量单位数值") + private String unitValue; + + /** 预领料数 */ + @Excel(name = "预领数量") + @ApiModelProperty(value = "预领料数") + private BigDecimal preNum; + + /** 库存数量 */ + @ApiModelProperty(value = "库存数量") + @Excel(name = "当前库存") + private BigDecimal storageNum; + + @ApiModelProperty(value = "已发布数量") + private BigDecimal publishNum; + + @ApiModelProperty(value = "待发布数量") + private BigDecimal pendingNum; + + @ApiModelProperty(value = "本次发布数量") + private BigDecimal num; + + /** 审批数量 */ + @ApiModelProperty(value = "审批数量") + private BigDecimal auditNum; + + /** 已领数量 */ + @ApiModelProperty(value = "已领数量") + @Excel(name = "出库数量") + private BigDecimal alNum; + + @ApiModelProperty(name = "装备管理方式") + @Excel(name = "管理模式") + private String manageType; + + /** + * 此数量是剩余需要出库的数量(preNum - alNum) + */ + @ApiModelProperty(value = "剩余最大出库数量") + private BigDecimal outNum; + + /** 备注 */ + @ApiModelProperty(value = "备注") + @Excel(name = "备注") + private String remark; + + /** 状态(0待审批,1进行中,2已出库) */ + private String status; + + /** 数据所属组织 */ + @ApiModelProperty(value = "数据所属组织") + private Long companyId; + + private String keyword; + + @ApiModelProperty(value = "用户ID") + private Long userId; + + @ApiModelProperty(value = "编码类型集合") + private List maCodeVoList; + + @ApiModelProperty(value = "往来单位id") + private Long unitId; + + @ApiModelProperty(value = "工程id") + private Long projectId; + + @ApiModelProperty(value = "领料人") + private String leasePerson; + + @ApiModelProperty(value = "联系方式") + private String phone; + + @ApiModelProperty(value = "任务当月序号 例如:1 插入及查询时请携带任务类型") + private Integer monthOrder; + + @ApiModelProperty(value = "发布批次") + private String publishTask; + + @ApiModelProperty(value = "领料单位") + private String leaseUnit; + + @ApiModelProperty(value = "租赁工程") + private String leaseProject; + + public LeaseOutDetailsInfo(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) { + this.id = id; + this.parentId = parentId; + this.typeId = typeId; + this.preNum = preNum; + this.auditNum = auditNum; + this.alNum = alNum; + this.status = status; + this.companyId = companyId; + } + + public LeaseOutDetailsInfo() {} + + public LeaseOutDetailsInfo(Long parentId, String keyword, Long userId) { + this.parentId = parentId; + this.keyword = keyword; + this.userId = userId; + } +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseTotalInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseTotalInfo.java new file mode 100644 index 00000000..d18f9086 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseTotalInfo.java @@ -0,0 +1,92 @@ +package com.bonus.material.lease.domain.vo; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 工器具领料记录详情 + * @Author ma_sh + * @create 2025/5/14 16:41 + */ +@Data +public class LeaseTotalInfo { + + @ApiModelProperty(value = "是否导出 0 是,1 否") + private Integer isExport; + + private Long id; + + private Long typeId; + + private Long parentId; + + @ApiModelProperty(value = "工器具名称") + @Excel(name = "工器具名称") + private String maTypeName; + + @ApiModelProperty(value = "规格型号名称") + @Excel(name = "规格型号") + private String typeName; + + @ApiModelProperty(value = "计量单位") + @Excel(name = "计量单位") + private String unitName; + + @Excel(name = "预领数量") + @ApiModelProperty(value = "预领料数") + private BigDecimal preNum; + + @ApiModelProperty(value = "出库数量") + @Excel(name = "出库数量") + private BigDecimal outNum; + + @ApiModelProperty(value = "待出库数量") + @Excel(name = "待出库数量") + private BigDecimal pendingNum; + + @ApiModelProperty(value = "领料日期") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "领料日期", dateFormat = "yyyy-MM-dd", width = 30) + private String leaseDate; + + @ApiModelProperty(value = "出库日期") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出库日期", dateFormat = "yyyy-MM-dd", width = 30) + private String outDate; + + @ApiModelProperty(value = "领料班组") + @Excel(name = "领料班组") + private String teamName; + + @ApiModelProperty(value = "领料工程") + @Excel(name = "领料工程") + private String projectName; + + @ApiModelProperty(value = "领料人") + @Excel(name = "领料人") + private String leasePerson; + + @ApiModelProperty(value = "出库人") + @Excel(name = "出库人") + private String outPerson; + + @ApiModelProperty(value = "领料单号") + @Excel(name = "领料单号") + private String code; + + @ApiModelProperty(value = "开始时间") + private String startTime; + + @ApiModelProperty(value = "结束时间") + private String endTime; + + @ApiModelProperty(value = "关键字") + private String keyWord; + + @ApiModelProperty(value = "管理模式") + private String manageType; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java index e7c4f6a6..083b5423 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyDetailsMapper.java @@ -2,12 +2,14 @@ package com.bonus.material.lease.mapper; import java.util.List; +import com.bonus.common.biz.domain.lease.LeaseApplyInfo; import com.bonus.material.back.domain.vo.MaCodeVo; import com.bonus.material.basic.domain.BmQrcodeInfo; import com.bonus.material.lease.domain.LeaseApplyDetails; import com.bonus.common.biz.domain.lease.LeaseOutDetails; import com.bonus.material.lease.domain.LeaseApplyDetailsInfo; import com.bonus.material.lease.domain.vo.LeaseOutVo; +import com.bonus.material.lease.domain.vo.LeaseTotalInfo; import org.apache.ibatis.annotations.Param; /** @@ -170,4 +172,18 @@ public interface LeaseApplyDetailsMapper { * @return */ List getLeaseInfo(LeaseApplyDetailsInfo dto); + + /** + * 获取工器具领料出库详情 + * @param dto + * @return + */ + List getOutDetailsById(LeaseApplyInfo dto); + + /** + * 工器具领料二级页面记录 + * @param info + * @return + */ + List getSecondLeaseInfo(LeaseTotalInfo info); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyInfoMapper.java index b7d7417a..dd797bab 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseApplyInfoMapper.java @@ -2,6 +2,7 @@ package com.bonus.material.lease.mapper; import java.util.List; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; +import com.bonus.material.lease.domain.vo.LeaseTotalInfo; /** * 领料任务Mapper接口 @@ -94,4 +95,13 @@ public interface LeaseApplyInfoMapper { * @return */ List getDetailsList(LeaseApplyInfo leaseApplyInfo); + + /** + * 查询站点领料详情数据 + * @param info + * @return + */ + List getLeaseInfoDetails(LeaseTotalInfo info); + + LeaseTotalInfo getTotalInfo(LeaseTotalInfo leaseTotalInfo); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseApplyInfoService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseApplyInfoService.java index c73152a5..28548d05 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseApplyInfoService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseApplyInfoService.java @@ -5,11 +5,14 @@ import java.util.List; import com.bonus.common.biz.domain.lease.LeaseOutDetails; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; +import com.bonus.material.back.domain.vo.MaCodeVo; import com.bonus.material.basic.domain.BmQrcodeInfo; import com.bonus.material.lease.domain.LeaseApplyDetails; import com.bonus.material.lease.domain.LeaseApplyDetailsInfo; +import com.bonus.material.lease.domain.LeaseOutDetailsInfo; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; import com.bonus.common.biz.domain.lease.LeaseOutRequestVo; +import com.bonus.material.lease.domain.vo.LeaseTotalInfo; import javax.servlet.http.HttpServletResponse; @@ -166,4 +169,27 @@ public interface ILeaseApplyInfoService { * @return */ List getDetailsList(LeaseApplyInfo leaseApplyInfo); + + /** + * 获取工器具领料出库详情 + * @param leaseApplyInfo + * @return + */ + LeaseApplyRequestVo outDetailsById(LeaseApplyInfo leaseApplyInfo); + + List exportOutDetails(LeaseApplyInfo leaseApplyInfo); + + /** + * 工器具领料记录 + * @param info + * @return + */ + List getLeaseInfoDetails(LeaseTotalInfo info); + + /** + * 获取二级工器具领料记录 + * @param info + * @return + */ + List getSecondLeaseInfo(LeaseTotalInfo info); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index 403d84e1..fba3346d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -30,9 +30,11 @@ import com.bonus.material.basic.mapper.BmFileInfoMapper; import com.bonus.material.lease.domain.LeaseApplyDetails; import com.bonus.common.biz.domain.lease.LeaseOutDetails; import com.bonus.material.lease.domain.LeaseApplyDetailsInfo; +import com.bonus.material.lease.domain.LeaseOutDetailsInfo; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; import com.bonus.common.biz.domain.lease.LeaseOutRequestVo; import com.bonus.material.lease.domain.vo.LeaseOutVo; +import com.bonus.material.lease.domain.vo.LeaseTotalInfo; import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper; import com.bonus.material.lease.service.ILeaseOutDetailsService; import com.bonus.material.task.domain.TmTask; @@ -94,25 +96,8 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { try { LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo(); leaseApplyInfo.setId(id); - Long userId = SecurityUtils.getUserId(); - leaseApplyInfo.setUserId(userId); Optional optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(leaseApplyInfo)); LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo(); - // 查询领用出库数据 - if (StringUtils.isNotBlank(publishTask)) { - List leaseApplyOutList = leaseApplyInfoMapper.selectPublishList(leaseApplyInfo); - if (!CollectionUtils.isEmpty(leaseApplyOutList)) { - LeaseApplyInfo applyInfo = leaseApplyOutList.get(0); - if (applyInfo.getPreCountNum().compareTo(applyInfo.getAlNum()) == 0) { - applyInfo.setTaskStatus(LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus()); - applyInfo.setTaskStatusName(LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatusName()); - } else { - applyInfo.setTaskStatus(LeaseTaskStatusEnum.LEASE_TASK_IN_PROGRESS.getStatus()); - applyInfo.setTaskStatusName(LeaseTaskStatusEnum.LEASE_TASK_IN_PROGRESS.getStatusName()); - } - optionalInfo = Optional.of(leaseApplyOutList.get(0)); - } - } optionalInfo.ifPresent(info -> { BmFileInfo bmFileInfo = new BmFileInfo(); bmFileInfo.setModelId(id); @@ -122,41 +107,10 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { if (!CollectionUtils.isEmpty(bmFileInfoList)) { info.setBmFileInfos(bmFileInfoList); } - /** 设置审批人签名url 防止代码冲突 **/ - String directAuditUrl = leaseApplyInfoMapper.getDirectAuditUrl(info); - info.setDirectAuditSignUrl(directAuditUrl); - /** 设置审批人签名url 防止代码冲突 **/ - - /** 设置发料单位 防止代码冲突 **/ - if(info.getDirectAuditBy() != null){ - String sendUnit = leaseApplyInfoMapper.getSendUnit(info); - info.setSendUnit(sendUnit); - } - /** 设置发料单位 防止代码冲突 **/ - leaseApplyRequestVo.setLeaseApplyInfo(info); // 获取领料单详情 - List details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getId(), keyword, userId)); - // 走单独的领用详情查询 - if (StringUtils.isNotBlank(publishTask)) { - // 根据领用批次查询领用详情 - details = leaseApplyDetailsMapper.getDetailsPublish(keyword, publishTask); - if (!CollectionUtils.isEmpty(details)) { - for (LeaseApplyDetails detail : details) { - if (detail.getPreNum().compareTo(detail.getAlNum()) == 0) { - detail.setStatus("2"); - } else { - detail.setStatus("1"); - } - } - } - } + List details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getId(), keyword, null)); if (!CollectionUtils.isEmpty(details)) { - /*if (StringUtils.isNotBlank(keyword)) { - details = details.stream() - .filter(item -> containsDetailsKeyword(item, keyword)) - .collect(Collectors.toList()); - }*/ leaseApplyRequestVo.setLeaseApplyDetailsList(details); for (LeaseApplyDetails detail : details) { // 获取编码详情 @@ -185,7 +139,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { */ @Override public List selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) { - leaseApplyInfo.setUserId(SecurityUtils.getUserId()); + //leaseApplyInfo.setUserId(SecurityUtils.getUserId()); List list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo); /*// 如果statusList包含3、4、5,则为领料出库查询,需查询领用出库数据,进行拼接 if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) { @@ -275,6 +229,8 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { BmAgreementInfo bmAgreementInfo = new BmAgreementInfo(); bmAgreementInfo.setProjectId(leaseApplyRequestVo.getLeaseApplyInfo().getProjectId()); bmAgreementInfo.setTeamId(leaseApplyRequestVo.getLeaseApplyInfo().getTeamId()); + bmAgreementInfo.setCreateTime(DateUtils.getNowDate()); + bmAgreementInfo.setCreateBy(SecurityUtils.getUsername()); // 先根据班组和工程id查询,若存在则直接返回,不存在则新增 BmAgreementInfo info = bmAgreementInfoMapper.queryByTeamIdAndProjectId(bmAgreementInfo); if (info != null) { @@ -503,6 +459,111 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { return leaseApplyInfoMapper.getDetailsList(leaseApplyInfo); } + /** + * 获取工器具领料出库详情 + * @param dto + * @return + */ + @Override + public LeaseApplyRequestVo outDetailsById(LeaseApplyInfo dto) { + try { + Optional optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(dto)); + LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo(); + optionalInfo.ifPresent(info -> { + leaseApplyRequestVo.setLeaseApplyInfo(info); + // 获取工器具领料出库详情 + List details = leaseApplyDetailsMapper.getOutDetailsById(dto); + if (!CollectionUtils.isEmpty(details)) { + leaseApplyRequestVo.setLeaseApplyDetailsList(details); + for (LeaseApplyDetails detail : details) { + // 获取编码详情 + List maCodeVoList = leaseApplyDetailsMapper.getCodeList(dto.getId(), detail.getTypeId()); + if (!CollectionUtils.isEmpty(maCodeVoList)) { + detail.setMaCodeVoList(maCodeVoList); + } + } + } + + }); + + return leaseApplyRequestVo; + } catch (Exception e) { + // 记录异常日志 + System.err.println("Error occurred while selecting lease apply info by ID: " + e.getMessage()); + throw new RuntimeException("Failed to select lease apply info", e); + } + } + + /** + * 工器具领料出库详情 + * @param leaseApplyInfo + * @return + */ + @Override + public List exportOutDetails(LeaseApplyInfo leaseApplyInfo) { + List leaseOutDetails = new ArrayList<>(); + List details = leaseApplyDetailsMapper.getOutDetailsById(leaseApplyInfo); + if (!CollectionUtils.isEmpty(details)) { + for (LeaseApplyDetails detail : details) { + LeaseOutDetailsInfo lease = new LeaseOutDetailsInfo(); + lease.setMaTypeName(detail.getMaTypeName() == null ? "" : detail.getMaTypeName()); + lease.setTypeName(detail.getTypeName() == null ? "" : detail.getTypeName()); + lease.setUnitName(detail.getUnitName() == null ? "" : detail.getUnitName()); + lease.setPreNum(detail.getPreNum()); + lease.setStorageNum(detail.getStorageNum()); + lease.setOutNum(detail.getOutNum()); + lease.setManageType(detail.getManageType() == 0 ? "数量管理" : "编码管理"); + lease.setRemark(detail.getRemark() == null ? "" : detail.getRemark()); + leaseOutDetails.add(lease); + } + } + return leaseOutDetails; + } + + /** + * 工器具领料记录 + * @param info + * @return + */ + @Override + public List getLeaseInfoDetails(LeaseTotalInfo info) { + BigDecimal preNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP); + BigDecimal outNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP); + BigDecimal pendingNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP); + List list = leaseApplyInfoMapper.getLeaseInfoDetails(info); + if (!CollectionUtils.isEmpty(list)) { + for (LeaseTotalInfo leaseTotalInfo : list) { + // 根据typeId和parentId查询领料数量 + LeaseTotalInfo totalInfo = leaseApplyInfoMapper.getTotalInfo(leaseTotalInfo); + if (totalInfo != null) { + leaseTotalInfo.setPreNum(totalInfo.getPreNum()); + } + preNum = preNum.add(leaseTotalInfo.getPreNum()); + outNum = outNum.add(leaseTotalInfo.getOutNum()); + pendingNum = pendingNum.add(leaseTotalInfo.getPendingNum()); + } + if (info.getIsExport() == 0) { + LeaseTotalInfo info1 = new LeaseTotalInfo(); + info1.setUnitName("合计"); + info1.setPreNum(preNum); + info1.setOutNum(outNum); + info1.setPendingNum(pendingNum); + list.add(0, info1); + } + } + return list; + } + + /** + * 工器具领料二级页面记录 + * @param info + * @return + */ + @Override + public List getSecondLeaseInfo(LeaseTotalInfo info) { + return leaseApplyDetailsMapper.getSecondLeaseInfo(info); + } + /** * 总站点领料记录数据过滤 * @param item diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java index 8018b99a..e0154259 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Objects; import com.bonus.common.biz.constant.MaterialConstants; import com.bonus.common.biz.domain.lease.LeaseApplyInfo; +import com.bonus.common.biz.domain.lease.LeaseMaCodeDto; import com.bonus.common.biz.enums.InputOutEnum; import com.bonus.common.biz.enums.LeaseTaskStatusEnum; import com.bonus.common.biz.enums.MaMachineStatusEnum; @@ -166,35 +167,29 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { int res = 0; try { // 1、判断库存是否足够 - boolean isEnough = checkStorageIsEnough(record); + //boolean isEnough = checkStorageIsEnough(record); record.setPreStoreNum(getStorageNum(record)); - if (isEnough) { - if ((record.getManageType().equals(MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId())) && record.getInputNum() != null) { - record.setOutNum(record.getInputNum()); - record.setOutType(InputOutEnum.NUMBER_DEVICE.getTypeId()); + res = checkStorageNum(record); + if (res > 0) { + // 3、插入出库记录,修改库存,修改机具状态 + res = insertRecords(record); + if (res == 0) { + throw new RuntimeException("出库失败,更新设备规格库存数量时出错!"); } - res = checkStorageNum(record); - - if (res > 0) { - // 3、插入出库记录,修改库存,修改机具状态 - res = insertRecords(record); - if (res == 0) { - throw new RuntimeException("出库失败,更新设备规格库存数量时出错!"); - } - // 4、修改任务状态(tm_task) - res = updateTaskStatus(record); - if (res == 0) { - throw new RuntimeException("出库失败,修改任务状态失败"); - } - // 5、插入结算记录 - String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId()); - record.setTaskId(taskId); - res = insSltInfo(taskId, record); - if (res == 0) { - throw new RuntimeException("出库失败,插入结算记录失败"); - } - // 6、如果标准箱入库,需要将设备从标准箱移出 - if (record.getMaId() != null) { + // 4、修改任务状态(tm_task) + res = updateTaskStatus(record); + if (res == 0) { + throw new RuntimeException("出库失败,修改任务状态失败"); + } + // 5、插入结算记录 + String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId()); + record.setTaskId(taskId); + res = insSltInfo(taskId, record); + if (res == 0) { + throw new RuntimeException("出库失败,插入结算记录失败"); + } + // 6、如果标准箱入库,需要将设备从标准箱移出 + /*if (record.getMaId() != null) { // 先查询设备是否在标准箱中 List list = bmQrBoxMapper.selectByMaId(record.getMaId()); if (!CollectionUtils.isEmpty(list)) { @@ -203,12 +198,9 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { throw new RuntimeException("出库失败,移出设备失败"); } } - } - } else { - return AjaxResult.error("领料出库失败,机具库存不足"); - } + }*/ } else { - return AjaxResult.error("已领数量大于预领数量或该机具未在库"); + return AjaxResult.error("领料出库失败,机具库存不足"); } } catch (Exception e) { log.error(e.getMessage()); @@ -362,49 +354,14 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { return true; } + /** + * 修改任务状态为出库完成 + * @param record + * @return + */ private int updateTaskStatus(LeaseOutDetails record) { - int res = 0; - // 领用任务单独判断 - if (StringUtils.isNotBlank(record.getPublishTask())) { - // 根据领用批次查询领用详情 - boolean isFinished = true; - List details = leaseApplyDetailsMapper.getDetailsPublish(null, record.getPublishTask()); - if (!CollectionUtils.isEmpty(details)) { - for (LeaseApplyDetails bean : details) { - if (bean.getAlNum().compareTo(bean.getPreNum()) != 0) { - isFinished = false; - break; - } - } - } - if (isFinished) { - String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId()); - // 领用任务状态改为已完成 - res = tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus()); - if (res == 0) { - throw new RuntimeException("领用任务状态修改失败"); - } - } - res = 1; - return res; - } - // 进行状态判断 - List leaseApplyDetailsList = leaseApplyDetailsMapper.getByParentId(record.getParentId()); - int i = 0; - for (LeaseApplyDetails bean : leaseApplyDetailsList) { - if (Objects.equals(bean.getPreNum(), bean.getAlNum())) { - i++; - } - } String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId()); - if (i == leaseApplyDetailsList.size()) { - tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus()); - res = 1; - } else { - tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_IN_PROGRESS.getStatus()); - res = 1; - } - return res; + return tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus()); } private int checkStorageNum(LeaseOutDetails record) { @@ -435,22 +392,28 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { private int insertRecords(LeaseOutDetails record) { int res = 0; - // 首先更新领料任务详情表的领料数及状态(lease_apply_details) + /*// 首先更新领料任务详情表的领料数及状态(lease_apply_details) res = leaseApplyDetailsMapper.updateLeaseApplyDetailsOutNum(record); LeaseApplyDetails leaseApplyDetails = leaseApplyDetailsMapper.getLeaseApplyDetails(record); if (leaseApplyDetails.getPreNum().equals(leaseApplyDetails.getAlNum()) || leaseApplyDetails.getAuditNum().equals(leaseApplyDetails.getAlNum())) { leaseApplyDetailsMapper.updateLeaseApplyDetailsByLeaseOutRecord(record); - } - if (res > 0) { - // 插入领料出库明细表(lease_out_details) - record.setCreateBy(SecurityUtils.getUsername()); - res = leaseOutDetailsMapper.insertLeaseOutDetails(record); - if (res > 0) { - // 普通机具减少 (ma_type 设备规格表)的库存数量 - res = typeMapper.updateMaTypeStockNum(record); + }*/ + // 插入领料出库明细表(lease_out_details) + record.setCreateBy(SecurityUtils.getUsername()); + if (!CollectionUtils.isEmpty(record.getMaCodeList())) { + for (LeaseMaCodeDto leaseMaCodeDto : record.getMaCodeList()) { + record.setMaId(leaseMaCodeDto.getMaId()); + record.setOutNum(BigDecimal.valueOf(1)); + res = leaseOutDetailsMapper.insertLeaseOutDetails(record); // 更新 (ma_machine 设备表)的状态 machineMapper.updateMaMachineStatus(record, MaMachineStatusEnum.IN_USE.getStatus()); } + } else { + res = leaseOutDetailsMapper.insertLeaseOutDetails(record); + } + if (res > 0) { + // 普通机具减少 (ma_type 设备规格表)的库存数量 + res = typeMapper.updateMaTypeStockNum(record); } return res; } @@ -465,25 +428,18 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { res = sltAgreementInfoMapper.updSltInfo(sltAgreementInfo); record.setAgreementId(sltAgreementInfo.getAgreementId()); } else { - String agreementId = " "; - agreementId = tmTaskAgreementMapper.getAgreementId(taskId); - if (StringUtils.isBlank(agreementId)) { - agreementId = tmTaskAgreementMapper.selectAgreementId(record.getPublishTask()); - } - String protocol = bmAgreementInfoMapper.getProtocol(agreementId); + String agreementId = tmTaskAgreementMapper.getAgreementId(taskId); Type maType = typeMapper.getMaType(record.getTypeId()); - if (StringUtils.isEmpty(protocol)) { - maType.setFinalPrice(maType.getLeasePrice()); - } else { - if (MaterialConstants.INNER_PROTOCAL.equals(protocol)) { - maType.setFinalPrice(maType.getLeasePrice()); - } else if (MaterialConstants.OUTER_PROTOCAL.equals(protocol)) { - maType.setFinalPrice(maType.getRentPrice()); - } else { - maType.setFinalPrice(maType.getLeasePrice()); + maType.setFinalPrice(maType.getLeasePrice()); + if (!CollectionUtils.isEmpty(record.getMaCodeList())) { + for (LeaseMaCodeDto leaseMaCodeDto : record.getMaCodeList()) { + record.setMaId(leaseMaCodeDto.getMaId()); + record.setOutNum(BigDecimal.valueOf(1)); + res = sltAgreementInfoMapper.insSltInfo(record, agreementId, maType); } + } else { + res = sltAgreementInfoMapper.insSltInfo(record, agreementId, maType); } - res = sltAgreementInfoMapper.insSltInfo(record, agreementId, maType); record.setAgreementId(Long.valueOf(agreementId)); } return res; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/MachineController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/MachineController.java index fea5e299..7a94226d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/MachineController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/MachineController.java @@ -52,13 +52,10 @@ public class MachineController extends BaseController { @ApiOperation(value = "查询机具设备管理列表1") //@RequiresPermissions("ma:machine:list") @GetMapping("/list") - public TableDataInfo list(Machine machine) + public AjaxResult list(Machine machine) { - if (machine.getPrefix()==null || machine.getPrefix()==null){ - startPage(); - } List list = machineService.selectMachineList(machine); - return getDataTable(list); + return AjaxResult.success(list); } /** diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml index cd0c4d54..32bf96b7 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmAgreementInfoMapper.xml @@ -77,14 +77,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - insert into bm_agreement_info (agreement_code, sign_time, unit_id, + insert into bm_agreement_info (agreement_code, sign_time, unit_id,team_id, project_id, create_by, lease_day, plan_start_time, contract_code, auth_person, phone, create_time, update_by, update_time, remark, company_id, protocol, branch_project ) - values (#{agreementCode,jdbcType=VARCHAR}, #{signTime,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER}, + values (#{agreementCode,jdbcType=VARCHAR}, #{signTime,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER},#{teamId}, #{projectId,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{leaseDay,jdbcType=INTEGER}, #{planStartTime,jdbcType=TIMESTAMP}, #{contractCode,jdbcType=VARCHAR}, #{authPerson,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, @@ -156,7 +156,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index 707ddde9..f5a58175 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bt.team_name as teamName, IFNULL(sum(lad.pre_num),0) as preCountNum, IFNULL(sum(lad.al_num),0) as alNum, - GROUP_CONCAT(mt1.type_name) as maTypeNames, + GROUP_CONCAT(DISTINCT mt1.type_name) as maTypeNames, bp.contract_part as contractPart, sd.dept_name as impUnitName from @@ -65,14 +65,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and sda.dict_type = 'lease_task_status' left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0' left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0' - - JOIN ma_type_keeper mtk ON mtk.type_id = lad.type_id AND mtk.user_id = #{userId} - + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml index a951b18c..8431de3e 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml @@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ma.ma_status as maStatus, ma.qr_code as qrCode, ma.buy_price as buyPrice, - msi.supplier as maVender, + msi.supplier_name as maVender, ma.out_fac_time as outFacTime, ma.out_fac_code as outFacCode, ma.assets_code as assetsCode,