From d112ee1e81f90703537474b5df211904009e4b56 Mon Sep 17 00:00:00 2001 From: mashuai Date: Wed, 25 Dec 2024 13:53:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/back/domain/BackApplyInfo.java | 3 + .../back/mapper/BackApplyInfoMapper.java | 7 ++ .../impl/BackApplyInfoServiceImpl.java | 7 +- .../material/lease/domain/vo/LeaseOutVo.java | 64 +++++++++++++++++++ .../lease/mapper/LeaseApplyDetailsMapper.java | 8 +++ .../lease/service/ILeaseApplyInfoService.java | 16 +++++ .../impl/LeaseApplyInfoServiceImpl.java | 11 ++++ .../material/back/BackApplyInfoMapper.xml | 34 ++++++++++ .../purchase/PurchaseCheckInfoMapper.xml | 1 + .../repair/RepairInputDetailsMapper.xml | 3 + 10 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseOutVo.java diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/BackApplyInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/BackApplyInfo.java index c9fb17f6..6c58ed4a 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/BackApplyInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/BackApplyInfo.java @@ -159,4 +159,7 @@ public class BackApplyInfo implements Serializable { @ApiModelProperty(value="设备编码") private String maCode; + + @ApiModelProperty(value="二维码") + private String qrCode; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java index 52a6220f..dcf7dd53 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java @@ -282,4 +282,11 @@ public interface BackApplyInfoMapper { * @return */ int updateMaCode(MaCodeDto maCodeDto); + + /** + * 根据二维码查询机具信息 + * @param dto + * @return + */ + List getMachineByQrCode(BackApplyInfo dto); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java index 9da1aabd..9a122a63 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java @@ -963,7 +963,12 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { @Override public AjaxResult getMachine(BackApplyInfo dto) { //判断输入或者编码识别或者二维码识别是否为领料工程和单位对应 - List list = backApplyInfoMapper.getMachine(dto); + List list = new ArrayList<>(); + if (dto.getMaCode() != null) { + list = backApplyInfoMapper.getMachine(dto); + } else if (dto.getQrCode() != null) { + list = backApplyInfoMapper.getMachineByQrCode(dto); + } if (CollectionUtils.isNotEmpty(list)) { for (MaCodeVo maCodeVo : list) { Map maMachineMap = remoteConfig.getDictValue("ma_machine_status"); diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseOutVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseOutVo.java new file mode 100644 index 00000000..6f9d755c --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseOutVo.java @@ -0,0 +1,64 @@ +package com.bonus.material.lease.domain.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author ma_sh + * @create 2024/12/25 13:42 + */ +@Data +public class LeaseOutVo { + + /** + * 主键 + */ + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("任务id") + private Long taskId; + + @ApiModelProperty("机具名称") + private String typeName; + + @ApiModelProperty("规格型号") + private String typeModelName; + + @ApiModelProperty("单位") + private String unit; + + @ApiModelProperty("数量") + private BigDecimal num; + + @ApiModelProperty("设备编码") + private String maCode; + + @ApiModelProperty("额定载荷") + private String ratedLoad; + + @ApiModelProperty("试验载荷") + private String testLoad; + + @ApiModelProperty("持荷时间") + private String holdingTime; + + @ApiModelProperty("试验日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date testTime; + + @ApiModelProperty("下次试验日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date nextTestTime; + + @ApiModelProperty("验收结论") + private String checkResult; + + @ApiModelProperty("备注") + private String remark; +} 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 b45699eb..0c308e5f 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 @@ -6,6 +6,7 @@ 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.vo.LeaseOutVo; import org.apache.ibatis.annotations.Param; /** @@ -96,4 +97,11 @@ public interface LeaseApplyDetailsMapper { * @return */ List getCodeList(@Param("id") Long id, @Param("typeId") Long typeId); + + /** + * 获取领料出库单详情 + * @param id + * @return + */ + List selectLeaseOutDetailsList(Long id); } 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 928894c8..86ef537e 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 @@ -8,6 +8,8 @@ import com.bonus.material.lease.domain.LeaseApplyDetails; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; import com.bonus.common.biz.domain.lease.LeaseOutRequestVo; +import javax.servlet.http.HttpServletResponse; + /** * 领料任务Service接口 * @@ -94,4 +96,18 @@ public interface ILeaseApplyInfoService { * @return */ AjaxResult getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo); + + /** + * 获取领料任务详情 + * @param id + * @return + */ + LeaseApplyRequestVo getInfo(Long id); + + /** + * 导出领料出库详细 + * @param leaseApplyRequestVo + * @param response + */ + void exportInfo(LeaseApplyRequestVo leaseApplyRequestVo, HttpServletResponse response); } 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 c2645a79..8bd83749 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 @@ -35,6 +35,7 @@ import com.bonus.material.lease.service.ILeaseApplyInfoService; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; /** * 领料任务Service业务层处理 @@ -338,4 +339,14 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { result.put("msg", msg); return AjaxResult.success(result); } + + @Override + public LeaseApplyRequestVo getInfo(Long id) { + return null; + } + + @Override + public void exportInfo(LeaseApplyRequestVo leaseApplyRequestVo, HttpServletResponse response) { + + } } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml index 2e6c20c9..64ddad49 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml @@ -370,6 +370,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where bcd.parent_id = #{parentId} and bcd.type_id = #{typeId} + + insert into back_apply_info diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml index 72365ba0..9cf36f4b 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckInfoMapper.xml @@ -132,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"