diff --git a/bonus-modules/bonus-bmw/pom.xml b/bonus-modules/bonus-bmw/pom.xml
index b93389f..208c2ad 100644
--- a/bonus-modules/bonus-bmw/pom.xml
+++ b/bonus-modules/bonus-bmw/pom.xml
@@ -30,7 +30,12 @@
commons-beanutils
1.9.4
-
+
+
+ io.minio
+ minio
+ ${minio.version}
+
com.github.ulisesbocchio
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/TbProConfigController.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/TbProConfigController.java
index 792b618..2694a9d 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/TbProConfigController.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/TbProConfigController.java
@@ -1,31 +1,21 @@
package com.bonus.bmw.controller;
-import com.bonus.bmw.domain.dto.WebFileDto;
-import com.bonus.bmw.domain.po.HomePagePo;
-import com.bonus.bmw.domain.po.PmSub;
-import com.bonus.bmw.domain.vo.PmWorker;
+
import com.bonus.bmw.domain.vo.TbProConfigVo;
import com.bonus.bmw.service.TbProConfigService;
-import com.bonus.common.core.utils.encryption.Sm4Utils;
-import com.bonus.common.core.utils.json.FastJsonHelper;
+
import com.bonus.common.core.web.controller.BaseController;
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.common.security.annotation.InnerAuth;
-import com.bonus.common.security.annotation.RequiresPermissions;
-import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
-import lombok.Data;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
-import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 多工程入场 配置
@@ -72,17 +62,24 @@ public class TbProConfigController extends BaseController {
/**
* 多工程入场 默认无数据是 不可以
- * 是否需要离场结算 无数据是需要
+ * 是否需要离场结算 无数据是 不需要
* 0 退场证明 1 是否可以多工程入场
* 必传 分公司id-工程类型 ,工程地区,type=>0 退场证明 1 是否可以多工程入场
* @param params
* @return
*/
@PostMapping("/getConfig")
- @SysLog(title = "工程配置", businessType = OperaType.DELETE, logType = 0, module = "工程配置->工程配置->新增配置", details = "获取配置")
+ @SysLog(title = "工程配置", businessType = OperaType.QUERY, logType = 0, module = "工程配置->工程配置->新增配置", details = "获取配置")
public AjaxResult getConfig(@RequestBody TbProConfigVo params) {
return service.getConfig(params);
}
+ @PostMapping("/getConfigByProId")
+ @SysLog(title = "工程配置", businessType = OperaType.QUERY, logType = 0, module = "工程配置->工程配置->新增配置", details = "获取配置")
+ public AjaxResult getConfigByProId(@RequestBody TbProConfigVo params) {
+ return service.getConfigByProId(params);
+ }
+
+
}
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/TbProConfigVo.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/TbProConfigVo.java
index 4d0fc97..79ae207 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/TbProConfigVo.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/TbProConfigVo.java
@@ -19,7 +19,7 @@ public class TbProConfigVo {
*/
private String proArea;
/**
- * 数据类型0 退场证明 1 是否可以多工程入场
+ * 0 退场证明 1 是否可以多工程入场
*/
private String type;
/**
@@ -39,4 +39,10 @@ public class TbProConfigVo {
* 配置id
*/
private String configId;
+
+
+ /**
+ * 工程id
+ */
+ private String proId;
}
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/TbProConfigMapper.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/TbProConfigMapper.java
index 43c81fb..d70224d 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/TbProConfigMapper.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/mapper/TbProConfigMapper.java
@@ -65,4 +65,11 @@ public interface TbProConfigMapper {
* @return
*/
TbProConfigVo TbProConfigVo(TbProConfigVo params);
+
+ /**
+ * 查询配置信息
+ * @param params
+ * @return
+ */
+ List getConfigByProId(TbProConfigVo params);
}
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/TbProConfigService.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/TbProConfigService.java
index 6ba6d13..9d29235 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/TbProConfigService.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/TbProConfigService.java
@@ -40,4 +40,11 @@ public interface TbProConfigService {
* @return
*/
AjaxResult getConfig(TbProConfigVo params);
+
+ /**
+ * 依据工程id 判断工程是否需要 出入场/是否多工程入场
+ * @param params
+ * @return
+ */
+ AjaxResult getConfigByProId(TbProConfigVo params);
}
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/TbProConfigServiceImpl.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/TbProConfigServiceImpl.java
index 8a30c75..e680396 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/TbProConfigServiceImpl.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/TbProConfigServiceImpl.java
@@ -10,9 +10,7 @@ import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
@Service
@Slf4j
@@ -138,11 +136,8 @@ public class TbProConfigServiceImpl implements TbProConfigService {
if(vo!=null){
return AjaxResult.success(vo);
}else{
- if("0".equals(params.getType())){
- params.setIsNeed("1");
- }else{
- params.setIsNeed("0");
- }
+ //默认不需要-不可以
+ params.setIsNeed("0");
}
return AjaxResult.success(params);
}catch (Exception e){
@@ -150,4 +145,34 @@ public class TbProConfigServiceImpl implements TbProConfigService {
}
return AjaxResult.error("查询失败");
}
+
+ /**
+ * 依据工程id查询
+ * @param params
+ * @return
+ */
+ @Override
+ public AjaxResult getConfigByProId(TbProConfigVo params) {
+ Map map=new HashMap();
+ try{
+ List list=mapper.getConfigByProId(params);
+ if(list!=null&& !list.isEmpty()){
+ for(TbProConfigVo proConfig:list){
+ if("0".equals(proConfig.getIsNeed())){
+ map.put("tczm",proConfig.getIsNeed());
+ } else{
+ map.put("dgc",proConfig.getIsNeed());
+ }
+ }
+ //如果没有数据 就提供默认值
+ map.putIfAbsent("tczm", "0");
+ map.putIfAbsent("dgc", "0");
+ }
+ }catch (Exception e){
+ map.putIfAbsent("tczm", "0");
+ map.putIfAbsent("dgc", "0");
+ log.error(e.toString(),e);
+ }
+ return AjaxResult.success(map);
+ }
}
diff --git a/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/TbProConfigMapper.xml b/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/TbProConfigMapper.xml
index 8418d23..2030b98 100644
--- a/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/TbProConfigMapper.xml
+++ b/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/TbProConfigMapper.xml
@@ -32,11 +32,14 @@
and sub_name like concat('%',#{subName},'%')
-
- and(
- pro_area like concat('%',#{keyWord},'%') OR
- pro_type like concat('%',#{keyWord},'%')
- )
+
+ and type =#{type}
+
+
+ and pro_type =#{proType}
+
+
+ and pro_area =#{proArea}
@@ -53,4 +56,11 @@
from tb_pro_config_real
where pro_type=#{proType} and sub_id=#{subId} and pro_area=#{proArea} and type=#{type}
+