Merge branch 'master' of http://192.168.0.56:3000/bonus/Bonus-Cloud-Material
This commit is contained in:
commit
5d1aa65e0b
|
|
@ -152,45 +152,30 @@ public class StoreLogAspect {
|
|||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
}
|
||||
//编码类型设备
|
||||
//编码、二维码、标准箱类型设备
|
||||
LeaseOutDetails leaseOutDetails = lod.getLeaseOutDetailsList().get(0);
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(leaseOutDetails.getParentId()));
|
||||
bmStorageLog.setTypeId(leaseOutDetails.getTypeId());
|
||||
bmStorageLog.setTypeName(leaseOutDetails.getTypeName());
|
||||
bmStorageLog.setManageType(String.valueOf(leaseOutDetails.getManageType()));
|
||||
bmStorageLog.setTypeModelName(leaseOutDetails.getTypeModelName());
|
||||
String maCode = lod.getLeaseOutDetailsList().stream()
|
||||
.map(LeaseOutDetails::getMaCode)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.joining(","));
|
||||
bmStorageLog.setMaCode(maCode);
|
||||
bmStorageLog.setPreStoreNum(leaseOutDetails.getPreStoreNum());
|
||||
bmStorageLog.setOutNum(BigDecimal.valueOf(lod.getLeaseOutDetailsList().size()));
|
||||
bmStorageLog.setPostStoreNum(leaseOutDetails.getPreStoreNum().subtract(bmStorageLog.getOutNum()));
|
||||
if (leaseOutDetails.getManageType().equals(MaTypeManageTypeEnum.CODE_DEVICE.getTypeId())) {
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(leaseOutDetails.getParentId()));
|
||||
bmStorageLog.setTypeId(leaseOutDetails.getTypeId());
|
||||
bmStorageLog.setTypeName(leaseOutDetails.getTypeName());
|
||||
bmStorageLog.setManageType(String.valueOf(leaseOutDetails.getManageType()));
|
||||
bmStorageLog.setTypeModelName(leaseOutDetails.getTypeModelName());
|
||||
String maCode = lod.getLeaseOutDetailsList().stream()
|
||||
.map(LeaseOutDetails::getMaCode)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.joining(","));
|
||||
bmStorageLog.setMaCode(maCode);
|
||||
bmStorageLog.setPreStoreNum(leaseOutDetails.getPreStoreNum());
|
||||
bmStorageLog.setOutNum(BigDecimal.valueOf(lod.getLeaseOutDetailsList().size()));
|
||||
bmStorageLog.setPostStoreNum(leaseOutDetails.getPreStoreNum().subtract(bmStorageLog.getOutNum()));
|
||||
bmStorageLog.setOutType(InputOutEnum.CODE_DEVICE.getTypeId());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
//标准箱
|
||||
if (leaseOutDetails.getManageType().equals(InputOutEnum.STANDARD_BOX.getTypeId())) {
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(leaseOutDetails.getParentId()));
|
||||
bmStorageLog.setTypeId(leaseOutDetails.getTypeId());
|
||||
bmStorageLog.setTypeName(leaseOutDetails.getTypeName());
|
||||
bmStorageLog.setManageType(String.valueOf(leaseOutDetails.getManageType()));
|
||||
bmStorageLog.setTypeModelName(leaseOutDetails.getTypeModelName());
|
||||
String maCode = lod.getLeaseOutDetailsList().stream()
|
||||
.map(LeaseOutDetails::getMaCode)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.joining(","));
|
||||
bmStorageLog.setMaCode(maCode);
|
||||
bmStorageLog.setPreStoreNum(leaseOutDetails.getPreStoreNum());
|
||||
bmStorageLog.setOutNum(BigDecimal.valueOf(lod.getLeaseOutDetailsList().size()));
|
||||
bmStorageLog.setPostStoreNum(leaseOutDetails.getPreStoreNum().subtract(bmStorageLog.getOutNum()));
|
||||
} else if (leaseOutDetails.getOutType().equals(InputOutEnum.STANDARD_BOX.getTypeId())) {
|
||||
bmStorageLog.setOutType(InputOutEnum.STANDARD_BOX.getTypeId());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
} else if (leaseOutDetails.getOutType().equals(InputOutEnum.QR_CODE.getTypeId())) {
|
||||
bmStorageLog.setOutType(InputOutEnum.QR_CODE.getTypeId());
|
||||
}
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
// 新购验收任务
|
||||
if (joinPoint.getArgs()[0] instanceof PurchaseDto) {
|
||||
|
|
|
|||
|
|
@ -45,16 +45,20 @@ public class LeaseOutDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "机具code")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "机具状态")
|
||||
private String maStatus;
|
||||
|
||||
@ApiModelProperty(value = "二维码code")
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "出库方式 0数量,1编码,2二维码,3标准箱")
|
||||
private Integer outType;
|
||||
|
||||
/** 预领料数 */
|
||||
@Excel(name = "预领料数")
|
||||
@ApiModelProperty(value = "预领料数")
|
||||
private BigDecimal outNum;
|
||||
|
||||
/** 出库类型 */
|
||||
@Excel(name = "出库类型")
|
||||
@ApiModelProperty(value = "出库类型")
|
||||
private String outType;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@Excel(name = "数据所属组织")
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
|
|
|
|||
|
|
@ -36,4 +36,19 @@ public class MaCodeVo {
|
|||
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
private String rejectReason;
|
||||
|
||||
@ApiModelProperty(value = "单位id")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value="工程id")
|
||||
private Long proId;
|
||||
|
||||
@ApiModelProperty(value="工程名称")
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "协议ID")
|
||||
private Long agreementId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
// 插入 CheckDetails
|
||||
result += backApplyInfoMapper.insertCheckDetails(details);
|
||||
//更新ma_machine表状态为3(退料检修)
|
||||
result += machineMapper.updateStatus(maCodeDto.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
|
||||
//result += machineMapper.updateStatus(maCodeDto.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
|
||||
if (CollectionUtils.isNotEmpty(maCodeDto.getBmFileInfos())) {
|
||||
for (BmFileInfo bmFileInfo : maCodeDto.getBmFileInfos()) {
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
|
|
@ -401,7 +401,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
if (dto == null || dto.getBackApplyInfo() == null || dto.getBackApplyInfo().getId() == null || CollectionUtils.isEmpty(dto.getBackApplyDetailsList())) {
|
||||
return AjaxResult.error("参数为空,请重新选择后上传!");
|
||||
}
|
||||
//对提交的退料详情树木进行校验
|
||||
//对提交的退料详情数量进行校验
|
||||
for (BackApplyDetails backApplyDetails : dto.getBackApplyDetailsList()) {
|
||||
if (backApplyDetails.getNum() != null && backApplyDetails.getPreNum() != null) {
|
||||
if (backApplyDetails.getNum().compareTo(backApplyDetails.getPreNum())<0 ) {
|
||||
|
|
@ -587,6 +587,9 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
// 更新任务表及退料申请表状态
|
||||
result += updateTaskAndBackInfo(backApplyInfo);
|
||||
if (result > 0 && CollectionUtils.isNotEmpty(applyInfoList)) {
|
||||
for (BackApplyInfo applyInfo : applyInfoList) {
|
||||
result += machineMapper.updateStatus(applyInfo.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
|
||||
}
|
||||
// 获取applyInfoList的typeId并生成集合
|
||||
List<String> typeIdList = applyInfoList.stream()
|
||||
.map(BackApplyInfo::getTypeId).distinct()
|
||||
|
|
@ -735,7 +738,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
// 插入 CheckDetails
|
||||
result += backApplyInfoMapper.insertCheckDetails(details);
|
||||
//更新ma_machine表状态为3(退料检修)
|
||||
result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
|
||||
//result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
|
||||
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
|
||||
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
|
|
@ -1119,6 +1122,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
for (BackApplyInfo wx : wxList) {
|
||||
wx.setTaskId(taskId);
|
||||
wx.setStatus("0");
|
||||
wx.setCreateBy(SecurityUtils.getUsername());
|
||||
result = backApplyInfoMapper.insertRad(wx);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -440,7 +440,6 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
|
|||
int num = 0;
|
||||
String msg = "";
|
||||
if (CollectionUtil.isNotEmpty(recordList)) {
|
||||
recordList = recordList.stream().filter(item -> item.getMaStatus().equals(MaMachineStatusEnum.IN_STORE.getStatus().toString())).collect(Collectors.toList());
|
||||
for (BmQrBoxInfo qrBoxInfo : recordList) {
|
||||
if (qrBoxInfo.getMaStatus().equals(MaMachineStatusEnum.IN_STORE.getStatus().toString())) {
|
||||
num ++;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
|
|
@ -143,6 +144,16 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
return success("批量发布完成");
|
||||
}
|
||||
|
||||
/**
|
||||
* 二维码出库:根据qrcode查询在库机具信息
|
||||
* @param bmQrcodeInfo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getInfoByQrcode")
|
||||
public AjaxResult getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo) {
|
||||
return leaseApplyInfoService.getInfoByQrcode(bmQrcodeInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 领料:出库
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.lease.domain.vo;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -31,4 +32,6 @@ public class LeaseApplyRequestVo extends BaseEntity {
|
|||
@ApiModelProperty(value = "领料-机具规格详情列表")
|
||||
private List<LeaseApplyDetails> leaseApplyDetailsList;
|
||||
|
||||
private List<MaCodeVo> maCodeVoList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.bonus.material.lease.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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 org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -78,4 +81,18 @@ public interface LeaseApplyDetailsMapper {
|
|||
LeaseApplyDetails getOutboundNum(LeaseOutDetails record);
|
||||
|
||||
String selectMaTypeNameByParentId(Long parentId);
|
||||
|
||||
/**
|
||||
* 根据qrcode查询在库机具信息
|
||||
* @param bmQrcodeInfo
|
||||
* @return
|
||||
*/
|
||||
List<LeaseOutDetails> getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo);
|
||||
|
||||
/**
|
||||
* 根据领料任务id查询机具信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<MaCodeVo> getCodeList(Long id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.lease.service;
|
|||
import java.util.List;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
|
||||
|
|
@ -86,4 +87,11 @@ public interface ILeaseApplyInfoService {
|
|||
* @return
|
||||
*/
|
||||
List<LeaseApplyDetails> selectLeaseApplyDetailsList(LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 根据qrcode查询在库机具信息
|
||||
* @param bmQrcodeInfo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
package com.bonus.material.lease.service.impl;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.biz.enums.LeaseTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.MaMachineStatusEnum;
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
import com.bonus.material.basic.domain.BmQrBoxInfo;
|
||||
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.LeaseApplyRequestVo;
|
||||
|
|
@ -74,6 +79,11 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
if (!CollectionUtils.isEmpty(details)) {
|
||||
leaseApplyRequestVo.setLeaseApplyDetailsList(details);
|
||||
}
|
||||
// 获取编码详情
|
||||
List<MaCodeVo> maCodeVoList = leaseApplyDetailsMapper.getCodeList(id);
|
||||
if (!CollectionUtils.isEmpty(maCodeVoList)) {
|
||||
leaseApplyRequestVo.setMaCodeVoList(maCodeVoList);
|
||||
}
|
||||
});
|
||||
|
||||
return leaseApplyRequestVo;
|
||||
|
|
@ -298,4 +308,31 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
public List<LeaseApplyDetails> selectLeaseApplyDetailsList(LeaseApplyInfo leaseApplyInfo) {
|
||||
return leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(leaseApplyInfo.getId(), leaseApplyInfo.getKeyWord()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据qrcode查询在库机具信息
|
||||
* @param bmQrcodeInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getInfoByQrcode(BmQrcodeInfo bmQrcodeInfo) {
|
||||
if (bmQrcodeInfo.getQrCode() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "二维码code不能为空");
|
||||
}
|
||||
List<LeaseOutDetails> recordList = leaseApplyDetailsMapper.getInfoByQrcode(bmQrcodeInfo);
|
||||
String msg = "";
|
||||
if (CollectionUtil.isNotEmpty(recordList)) {
|
||||
recordList = recordList.stream().filter(item -> item.getMaStatus().equals(MaMachineStatusEnum.IN_STORE.getStatus().toString())).collect(Collectors.toList());
|
||||
if (recordList.size() > 0) {
|
||||
msg = "监测到" + bmQrcodeInfo.getQrCode() + "符合出库条件,请确认是否出库!";
|
||||
}
|
||||
} else {
|
||||
msg = "监测到" + bmQrcodeInfo.getQrCode() + "编码不符合出库条件,请检查后重新提交!";
|
||||
}
|
||||
// 返回包含设备列表和消息的结果
|
||||
Map<String, Object> result = new HashMap<>(2);
|
||||
result.put("recordList", recordList);
|
||||
result.put("msg", msg);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,12 +167,15 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
if (isEnough) {
|
||||
if ((record.getManageType().equals(MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId())) && record.getInputNum() != null) {
|
||||
record.setOutNum(record.getInputNum());
|
||||
record.setOutType(InputOutEnum.NUMBER_DEVICE.getTypeId().toString());
|
||||
record.setOutType(InputOutEnum.NUMBER_DEVICE.getTypeId());
|
||||
} else if (record.getManageType().equals(MaTypeManageTypeEnum.CODE_DEVICE.getTypeId())) {
|
||||
record.setOutType(InputOutEnum.CODE_DEVICE.getTypeId().toString());
|
||||
record.setOutType(InputOutEnum.CODE_DEVICE.getTypeId());
|
||||
} else if (record.getManageType().equals(InputOutEnum.STANDARD_BOX.getTypeId())) {
|
||||
// 标准箱
|
||||
record.setOutType(InputOutEnum.STANDARD_BOX.getTypeId().toString());
|
||||
record.setOutType(InputOutEnum.STANDARD_BOX.getTypeId());
|
||||
} else if (record.getManageType().equals(InputOutEnum.QR_CODE.getTypeId())) {
|
||||
// 二维码
|
||||
record.setOutType(InputOutEnum.QR_CODE.getTypeId());
|
||||
}
|
||||
|
||||
res = checkStorageNum(record);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and bp.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and bai.create_time BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
<![CDATA[and DATE_FORMAT( bai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and tt.task_status = #{status}
|
||||
|
|
@ -287,7 +288,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt1.type_name AS typeName,
|
||||
mm.type_id AS typeId,
|
||||
mt.type_name AS materialName,
|
||||
mt2.type_name AS materialType
|
||||
mt2.type_name AS materialType,
|
||||
ba.unit_id AS unitId,
|
||||
bu.unit_name AS unitName,
|
||||
ba.project_id AS proId,
|
||||
bp.pro_name AS proName,
|
||||
ba.agreement_id AS agreementId
|
||||
FROM
|
||||
lease_out_details lod
|
||||
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
|
||||
|
|
@ -300,6 +306,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info ba ON tta.agreement_id = ba.agreement_id
|
||||
LEFT JOIN bm_project bp on bp.pro_id = ba.project_id
|
||||
AND bp.del_flag = '0'
|
||||
LEFT JOIN bm_unit bu on bu.unit_id = ba.unit_id
|
||||
AND bu.del_flag = '0'
|
||||
WHERE
|
||||
mm.ma_status = '2' and mm.ma_code = #{maCode}
|
||||
AND ba.unit_id = #{unitId}
|
||||
|
|
|
|||
|
|
@ -234,4 +234,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
) t
|
||||
GROUP BY parent_id
|
||||
</select>
|
||||
|
||||
<select id="getInfoByQrcode" resultType="com.bonus.common.biz.domain.lease.LeaseOutDetails">
|
||||
SELECT
|
||||
mt1.type_name as typeName,
|
||||
mt.type_name as typeModelName,
|
||||
mm.ma_id as maId,
|
||||
mm.ma_code as maCode,
|
||||
mm.type_id as typeId,
|
||||
mm.ma_status as maStatus,
|
||||
mm.qr_code as qrCode
|
||||
FROM ma_machine mm
|
||||
LEFT JOIN ma_type mt ON mm.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'
|
||||
where
|
||||
mm.qr_code = #{qrCode}
|
||||
</select>
|
||||
|
||||
<select id="getCodeList" resultType="com.bonus.material.back.domain.vo.MaCodeVo">
|
||||
SELECT
|
||||
mt.type_id as typeId,
|
||||
mt1.type_name as materialName,
|
||||
mt.type_name as typeName,
|
||||
mm.ma_id as maId,
|
||||
mm.ma_code as maCode
|
||||
FROM
|
||||
lease_out_details lod
|
||||
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
|
||||
LEFT JOIN ma_type mt ON mm.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'
|
||||
WHERE
|
||||
lod.parent_id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue