From cf317042c2aa26c8836de01cd8ab6f7dbd2051ce Mon Sep 17 00:00:00 2001 From: mashuai Date: Mon, 24 Jun 2024 10:13:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2=E5=88=86?= =?UTF-8?q?=E5=BC=80=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/sgzb/common/core/constant/Constants.java | 5 +++++ .../com/bonus/sgzb/material/domain/StorageStatus.java | 5 +++++ .../service/impl/StorageStatusServiceImpl.java | 10 +++++++--- .../resources/mapper/material/StorageStatusMapper.xml | 4 ++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java b/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java index 3c4049b1..203e01a8 100644 --- a/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java +++ b/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java @@ -153,4 +153,9 @@ public class Constants */ public static final String privateKey = "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKNPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gAkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWowcSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99EcvDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthhYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3UP8iWi1Qw0Y="; + /** 机具设备分公司*/ + public static final String JJ = "机具设备分公司"; + /** 调试分公司*/ + public static final String TS = "调试分公司"; + } 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 bae14c0f..d93f15ee 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 @@ -203,4 +203,9 @@ public class StorageStatus { @ApiModelProperty(value = "装备管理方式名称") private String manageTypeName; + /** 1.机具仓储 2.调试仓储 */ + private String maType; + + private String maTypeName; + } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/StorageStatusServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/StorageStatusServiceImpl.java index 5bcb95ce..3b680077 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/StorageStatusServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/StorageStatusServiceImpl.java @@ -1,10 +1,8 @@ package com.bonus.sgzb.material.service.impl; -import com.bonus.sgzb.material.domain.ProjUsingRecord; +import com.bonus.sgzb.common.core.constant.Constants; import com.bonus.sgzb.material.domain.StorageStatus; -import com.bonus.sgzb.material.mapper.ProjUsingRecordMapper; import com.bonus.sgzb.material.mapper.StorageStatusMapper; -import com.bonus.sgzb.material.service.ProjUsingRecordService; import com.bonus.sgzb.material.service.StorageStatusService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,6 +22,12 @@ public class StorageStatusServiceImpl implements StorageStatusService { @Override public List getStorageStatusList(StorageStatus bean) { + if (bean.getMaType() != null && ("1").equals(bean.getMaType())) { + bean.setMaTypeName(Constants.JJ); + } + if (bean.getMaType() != null && ("2").equals(bean.getMaType())) { + bean.setMaTypeName(Constants.TS); + } return storageStatusMapper.getStorageStatusList(bean); } } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml index 214d020f..b2f25103 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml @@ -86,8 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and tt.task_status !=107 and tt.task_status !=106 GROUP BY mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id + LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id WHERE mt.`level` = 4 and mt.del_flag = '0' + + AND sd.dept_name = #{maTypeName} + and mt2.type_name like concat('%',#{typeName},'%')