Commit 6738fb42 by 李小惠

更新基础数据通知本地主机(上传到rabbitmq),修改密码接口平台与单警柜融合成一个接口,修改报表数据未显示完整或错误bug

parent 1117d526
......@@ -800,3 +800,4 @@ java.lang.NullPointerException: null
2024-01-24 13:36:09.864 ERROR 24988 --- [main] easy-es : Easy-Es supported elasticsearch and restHighLevelClient jar version is:7.14.0 ,Please resolve the dependency conflict!
2024-01-24 13:40:02.387 ERROR 24988 --- [http-nio-10030-exec-1] c.j.j.b.c.handle.GlobalExceptionHandler : >授权异常>>获取token失败,请检查header和param中是否传递了用户token
2024-01-24 13:44:45.405 ERROR 24988 --- [http-nio-10030-exec-5] c.j.j.b.c.handle.GlobalExceptionHandler : >授权异常>>获取token失败,请检查header和param中是否传递了用户token
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -71,7 +71,7 @@ public class UpdateDeivceConfigReq implements Serializable {
private Integer deviceType;
//是否暂存标记,true暂存,false,不暂存
//是否暂存标记,true暂存,false不暂存直接下发到本地主机
private Boolean flag;
//rabbitmq消息有关参数
......
......@@ -44,6 +44,7 @@ public class UpdatePolicemanReq extends BaseRequest {
private String account;
private String password;
private String newPassword;
private Long fileId;
......
......@@ -76,4 +76,7 @@ public class UpdateWarehouseDevReq {
//rabbitmq消息有关参数
private Integer type;
//是否暂存(true表示暂存不会下发到本地主机,如果为空或者是为false则表示直接下发通知到本地主机)
private Boolean flag;
}
......@@ -19,8 +19,8 @@ import java.util.concurrent.CompletableFuture;
public class TopicRabbitConfig {
private static final String EXCHANGE = "topicExchange";
private static final String ORG_ROUTING_KEY_PREFIX = "org.";
private static final String CABINET_ROUTING_KEY_PREFIX = "cabinet.";
private static final String ORG_ROUTING_KEY_PREFIX = "org";
private static final String CABINET_ROUTING_KEY_PREFIX = "cabinet";
@Resource
private PubOrgService pubOrgService;
......@@ -56,11 +56,11 @@ public class TopicRabbitConfig {
for (PubOrg org : orgList) {
// Create a unique queue for each organization
Queue orgQueue = new Queue(org.getOrgId().toString());
Queue orgQueue = new Queue(org.getOrgId().toString(),true,false,false);
// Bind the queue to the exchange with the routing key specific to the organization
Binding orgBinding = BindingBuilder.bind(orgQueue).to(topicExchange)
.with(ORG_ROUTING_KEY_PREFIX + org.getOrgId());
.with(ORG_ROUTING_KEY_PREFIX);
rabbitAdmin.declareQueue(orgQueue);
rabbitAdmin.declareBinding(orgBinding);
bindings.add(orgBinding);
......@@ -68,11 +68,11 @@ public class TopicRabbitConfig {
for (Cabinet cabinet : cabinetList) {
// Create a unique queue for each cabinet
Queue cabinetQueue = new Queue(cabinet.getCabinetNum().toString());
Queue cabinetQueue = new Queue(cabinet.getCabinetNum().toString(),true,false,false);
// Bind the queue to the exchange with the routing key specific to the cabinet
Binding cabinetBinding = BindingBuilder.bind(cabinetQueue).to(topicExchange)
.with(CABINET_ROUTING_KEY_PREFIX + cabinet.getCabinetNum());
.with(CABINET_ROUTING_KEY_PREFIX);
rabbitAdmin.declareQueue(cabinetQueue);
rabbitAdmin.declareBinding(cabinetBinding);
bindings.add(cabinetBinding);
......
......@@ -35,25 +35,25 @@ public class DeviceConfigController {
@Resource
private WarehouseDevService warehouseDevService;
//新增配置
//新增配置(通道和本地主机配置)
@PostMapping(path="/addDeviceConfig",name="新增配置#logType=30")
@ApiOperation("新增配置")
public ApiRes<Long> addDeviceConfig(@RequestBody UpdateDeivceConfigReq req){
return ApiRes.success(deviceConfigService.addDeviceConfig(req));
}
//修改配置
//修改配置(通道和本地主机配置)
@PostMapping(path="/updateDeviceConfig",name="修改配置#logType=30")
@ApiOperation("修改配置")
public ApiRes<Boolean> updateDeviceConfig(@RequestBody UpdateDeivceConfigReq req){
return ApiRes.success(deviceConfigService.updateDeviceConfig(req));
}
//查询配置Page
//查询配置Page(通道和本地主机配置)
@PostMapping(path="/showDeviceConfigPage",name="查询配置Page#enable")
@ApiOperation("查询配置Page")
public ApiRes<PageResult<DeviceConfig>> showDeviceConfigPage(@RequestBody QueryDeviceConfigReq req){
return ApiRes.success(deviceConfigService.showDeviceConfigPage(req));
}
//查询配置List
//查询配置List(通道和本地主机配置)
@PostMapping(path="/showDeviceConfigList",name="查询配置List#enable")
@ApiOperation("查询配置List")
public ApiRes<List<DeviceConfig>> showDeviceConfigList(@RequestBody QueryDeviceConfigReq req){
......
......@@ -85,11 +85,11 @@ public class PoliceController {
return ApiRes.success(b);
}
//添加人脸和指纹照片或修改
@PostMapping(path="/addFaceAndfinger",name="添加警员人脸照片和指纹照片#logType=30")
@ApiOperation("添加警员人脸照片和指纹照片")
public ApiRes<Boolean> addFaceAndfinger(@RequestBody UpdatePolicemanReq req){
return ApiRes.success(policemanService.addFaceAndfinger(req));
}
// @PostMapping(path="/addFaceAndfinger",name="添加警员人脸照片和指纹照片#logType=30")
// @ApiOperation("添加警员人脸照片和指纹照片")
// public ApiRes<Boolean> addFaceAndfinger(@RequestBody UpdatePolicemanReq req){
// return ApiRes.success(policemanService.addFaceAndfinger(req));
// }
@PostMapping(path="/ChangeUserState",name="修改账号状态#logType=30")
......@@ -138,7 +138,7 @@ public class PoliceController {
//修改密码
@PostMapping(path="/updatePassword",name="修改密码#logType=30")
@ApiOperation("修改密码")
public ApiRes<Boolean> updatePassword(@RequestBody @Validated(SysUserReq.updatePwd.class) SysUserReq req){
public ApiRes<Boolean> updatePassword(@RequestBody UpdatePolicemanReq req){
return ApiRes.success(policemanService.updatePassword(req));
}
......
......@@ -41,14 +41,6 @@ public class TjController {
* ------------------------------------装备统计报表--------------------------------------------
*/
/**
* 根据组织机构统计装备的报表数据(外层数据)
*/
// @PostMapping("/TjOrgEqs")
// @ApiOperation("/装备统计报表")
// public ApiRes<PageResult<TjOrgEqsDto>> TjOrgEqs(@RequestBody TjOrgEqsReq req){
// return ApiRes.success(tjService.TjOrgEqs(req));
// }
/**
* 根据组织机构统计装备的报表数据(外层数据)
......@@ -65,12 +57,6 @@ public class TjController {
return ApiRes.success(tjService.TjOrgDataSum(req));
}
//第二层数据
// @PostMapping("/TjOrgEqsSecondList")
// @ApiOperation("装备统计报表二层数据")
// public ApiRes<List<TjOrgEqsDto>> TjOrgEqsSecondList(@RequestBody TjOrgEqsReq req){
// return ApiRes.success(tjService.TjOrgEqsSecondList(req));
// }
//第二层数据
@PostMapping("/TjOrgEqsDetail")
......@@ -90,12 +76,6 @@ public class TjController {
return ApiRes.success(tjService.TjOrgEqsDetailList(req));
}
@PostMapping("/test1")
@ApiOperation("测试")
public ApiRes<PageResult<TjOrgEqsDto>> test1(@RequestBody TjOrgEqsReq req){
return ApiRes.success(tjService.test1(req));
}
@PostMapping(path="/TjOrgEqsExport",name="装备报表导出#logType=30")
@ApiOperation("装备报表导出")
public void TjOrgEqsExport(@RequestBody TjOrgEqsReq req){
......
......@@ -32,6 +32,7 @@ public interface EquipmentSizeService extends IService<EquipmentSize> {
List<SizeDto> alignSizeInfo(UpdateEquipmentSizeReq req);
//根据typeId拿到装备typeIds
// List<String> selectByTypeIds(List<String> typeIdsList);
}
......@@ -107,7 +107,7 @@ public interface PolicemanService extends IService<Policeman> {
List<Policeman> GetPoliceWithoutOrg();
//添加人脸和指纹照片或修改
boolean addFaceAndfinger(UpdatePolicemanReq req);
// boolean addFaceAndfinger(UpdatePolicemanReq req);
//查询组织机构为null的警员
List<PolicemanDto> getPoliceWithoutOrg();
......@@ -116,7 +116,7 @@ public interface PolicemanService extends IService<Policeman> {
boolean reSetPassword(SysUserReq req);
boolean updatePassword(SysUserReq req);
boolean updatePassword(UpdatePolicemanReq req);
List<PoliceDto> alignPoliceInfo(PolicemanReq req);
......
......@@ -17,8 +17,7 @@ public interface TjService {
FinalTjOrgEqsDto test(TjOrgEqsReq req);
//装备统计报表
// PageResult<TjOrgEqsDto> TjOrgEqs(TjOrgEqsReq req);
//装备统计报表
PageResult<TjOrgEqsDto> GetTjData(TjOrgEqsReq req);
......@@ -53,14 +52,13 @@ public interface TjService {
FinalTjOrgPoliceDto TjOrgPoliceSum(TjOrgPoliceReq req);
// PageResult<TjOrgPoliceDto> TjOrgPoliceDetailPage(TjOrgPoliceReq req);
List<TjOrgPoliceDto> TjOrgPoliceDetailList(TjOrgPoliceReq req);
// List<TjOrgEqsDto> TjOrgEqsSecondList(TjOrgEqsReq req);
List<TjOrgEqsDto> GetTjDataDetail(TjOrgEqsReq req);
PageResult<TjOrgEqsDto> test1(TjOrgEqsReq req);
FinalTjOrgEqsDto TjOrgDataSum(TjOrgEqsReq req);
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.DeviceConfigInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.query.QueryDeviceConfigReq;
import com.junmp.jyzb.api.bean.req.UpdateDeivceConfigReq;
import com.junmp.jyzb.api.bean.req.UpdateWarehouseDevReq;
......@@ -52,13 +53,15 @@ public class DeviceConfigServiceImpl extends ServiceImpl<DeviceConfigMapper, Dev
deviceConfig.setCreateTime(DateTimeUtil.getCurrentDateTime());
deviceConfig.setUpdateTime(DateTimeUtil.getCurrentDateTime());
save(deviceConfig);
String exchangeName="orderExchange";
String exchangeName="warehouseMsg";
//判断是否暂存,将消息下发给本地主机
if(!req.getFlag()){
req.setApi("InfoChange");
req.setType(8);
req.setMsg("DeviceConfigChange");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),req);
MQDto mqDto = new MQDto();
//如果为空或者为false,则将直接发送给本地主机
if(ObjectUtil.isNull(req.getFlag()) ||!req.getFlag()){
mqDto.setApi("InfoChange");
mqDto.setType(8);
mqDto.setMessage("Adding deviceConfigInfo");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),mqDto);
}
return deviceConfig.getId() ;
}
......@@ -68,13 +71,15 @@ public class DeviceConfigServiceImpl extends ServiceImpl<DeviceConfigMapper, Dev
DeviceConfig deviceConfig = new DeviceConfig();
BeanPlusUtil.copyProperties(req,deviceConfig);
deviceConfig.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="orderExchange";
String exchangeName="warehouseMsg";
//判断是否暂存,将消息下发给本地主机
if(!req.getFlag()){
req.setApi("InfoChange");
req.setType(8);
req.setMsg("DeviceConfigChange");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),req);
MQDto mqDto = new MQDto();
//如果为空或者为false,则将直接发送给本地主机
if(ObjectUtil.isNull(req.getFlag()) ||!req.getFlag()){
mqDto.setApi("InfoChange");
mqDto.setType(8);
mqDto.setMessage("Updating deviceConfigInfo");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),mqDto);
}
return updateById(deviceConfig);
}
......
......@@ -139,7 +139,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
//更改类别,1为号型
mqDto.setType(1);
mqDto.setMessage("Adding sizeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
MQ.sendToExchange(exchangeName,"org",mqDto);
return sizeID+"||"+code;
}
......@@ -184,7 +184,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
//更改类别,1为号型
mqDto.setType(1);
mqDto.setMessage("Updating sizeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
MQ.sendToExchange(exchangeName,"org",mqDto);
return this.updateById(size);
}
......@@ -234,6 +234,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
return equipmentSizeMapper.alignSizeInfo(date);
}
public List<String> selectByTypeIds(List<String> typeIdsList){
List<String> list1=new ArrayList<>();
List<String> list2=new ArrayList<>();
......@@ -282,4 +283,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
// wrapper.orderByAsc(EquipmentSize::getCode);
return wrapper;
}
}
\ No newline at end of file
......@@ -143,7 +143,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
//更改类别,1为类型
mqDto.setType(2);
mqDto.setMessage("Adding typeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
MQ.sendToExchange(exchangeName,"org",mqDto);
return String.valueOf(newcode);
} else {
......@@ -248,7 +248,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
//更改类别,1为类型
mqDto.setType(2);
mqDto.setMessage("Updating typeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
MQ.sendToExchange(exchangeName,"org",mqDto);
return this.updateById(type);
} else {
String msg="以下供应商不存在:" +String.join(",", chekResult);
......
......@@ -70,7 +70,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
//更改类别,1为类型
mqDto.setType(3);
mqDto.setMessage("Adding supplierInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
MQ.sendToExchange(exchangeName,"org",mqDto);
this.save(supplier);
return ID;
......@@ -99,7 +99,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
//更改类别,1为类型
mqDto.setType(3);
mqDto.setMessage("Updating supplierInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
MQ.sendToExchange(exchangeName,"org",mqDto);
return this.updateById(supplier);
}
......
......@@ -3,6 +3,7 @@ package com.junmp.jyzb.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseDevInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.req.UpdateWarehouseDevReq;
import com.junmp.jyzb.entity.WarehouseDev;
import com.junmp.jyzb.service.WarehouseDevService;
......@@ -42,13 +43,17 @@ public class WarehouseDevServiceImpl extends ServiceImpl<WarehouseDevMapper, War
warehouseDev.setCreateTime(DateTimeUtil.getCurrentDateTime());
warehouseDev.setUpdateTime(DateTimeUtil.getCurrentDateTime());
warehouseDevService.save(warehouseDev);
String exchangeName="orderExchange";
//判断是否暂存,将消息下发给本地主机
req.setApi("InfoChange");
req.setType(6);
req.setMsg("warehouseDevChange");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),req);
String exchangeName="warehouseMsg";
//判断是否暂存,将消息下发给本地主机
MQDto mqDto = new MQDto();
//如果为空或者为false,则将直接发送给本地主机
if(ObjectUtil.isNull(req.getFlag()) ||!req.getFlag()){
mqDto.setApi("InfoChange");
mqDto.setType(6);
mqDto.setMessage("Adding warehouseDevInfo");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),mqDto);
}
return warehouseDev.getId();
}
......@@ -57,12 +62,16 @@ public class WarehouseDevServiceImpl extends ServiceImpl<WarehouseDevMapper, War
WarehouseDev warehouseDev = new WarehouseDev();
BeanPlusUtil.copyProperties(req,warehouseDev);
warehouseDev.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="orderExchange";
String exchangeName="warehouseMsg";
//判断是否暂存,将消息下发给本地主机
req.setApi("InfoChange");
req.setType(6);
req.setMsg("warehouseDevChange");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),req);
MQDto mqDto = new MQDto();
//如果为空或者为false,则将直接发送给本地主机
if(ObjectUtil.isNull(req.getFlag()) ||!req.getFlag()){
mqDto.setApi("InfoChange");
mqDto.setType(6);
mqDto.setMessage("Updating warehouseDevInfo");
MQ.SendMsg(exchangeName,req.getOrgId().toString(),mqDto);
}
return warehouseDevService.updateById(warehouseDev);
}
......
......@@ -63,13 +63,12 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
warehouse.setCreateTime(DateTimeUtil.getCurrentDateTime());
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
save(warehouse);
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(4);
mqDto.setMessage("Adding warehouseInfo");
MQ.sendToExchange(exchangeName,"org."+warehouse.getOrgId(),mqDto);
MQ.SendMsg("warehouseMsg",req.getOrgId().toString(),mqDto);//推送至仓库主机
return warehouse.getId();
}
......@@ -109,13 +108,12 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
Warehouse warehouse = new Warehouse();
BeanPlusUtil.copyProperties(req,warehouse);
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(4);
mqDto.setMessage("Updating warehouseInfo");
MQ.sendToExchange(exchangeName,"org."+warehouse.getOrgId(),mqDto);
MQ.SendMsg("warehouseMsg",req.getOrgId().toString(),mqDto);//推送至仓库主机
return this.updateById(warehouse);
}
......
......@@ -35,20 +35,22 @@ public class RabbitMQSendMsg {
}
// 发布消息到交换机,根据不同的主题和消息内容
public void publishOrgMessage(String orgId, String message) {
String routingKey = "org." + orgId;
rabbitTemplate.convertAndSend("topicExchange", routingKey, message);
}
public void sendToExchange(String exchangeName,String routingKey,Object msg){
String jsonString = JSON.toJSONString(msg);
rabbitTemplate.convertAndSend(exchangeName,routingKey,jsonString);
}
public void publishCabinetMessage(String cabinetId, String message) {
String routingKey = "cabinet." + cabinetId;
rabbitTemplate.convertAndSend("topicExchange", routingKey, message);
}
public void sendToExchange(String exchangeName,String routingKey,Object msg){
String jsonString = JSON.toJSONString(msg);
rabbitTemplate.convertAndSend(exchangeName,routingKey,jsonString);
}
//推送消息(广播式推送)
public void sendFanoutMsg(String exchangeName, List<String> names,Object msg){
//exchangeName交换机名称,name单警柜或本地仓库,msg发送的消息
......
......@@ -64,9 +64,9 @@
(SELECT `org_name` FROM `pub_org` WHERE org_id=#{orgId}) as org_name,
(SELECT `d_name` FROM `pub_org` WHERE org_id=#{orgId}) as d_name,
MAX(t.`year`) AS `year`,
SUM(t.use_count) AS use_count,
SUM(t.fix_count) AS fix_count,
sum(CASE WHEN t.month = MONTH(CURRENT_DATE()) THEN t.number ELSE 0 END) AS number
COALESCE(SUM(t.use_count),0) AS use_count,
coalesce(SUM(t.fix_count),0 )AS fix_count,
coalesce(sum(CASE WHEN t.month = MONTH(CURRENT_DATE()) THEN t.number ELSE 0 END),0) AS number
FROM (
SELECT
vecs.`year`,
......@@ -496,9 +496,9 @@
</select>
<select id="TjOrgCountTotalNum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgCountDto">
SELECT MAX( t.`year` ) AS `year`,SUM( t.use_count ) AS use_count,SUM( t.fix_count ) AS fix_count,
SELECT MAX( t.`year` ) AS `year`,coalesce(SUM( t.use_count ) ,0)AS use_count,coalesce(SUM( t.fix_count ),0) AS fix_count,
size_id,size_name,type_id,type_name,
sum( CASE WHEN t.MONTH = MONTH ( CURRENT_DATE ()) THEN t.number ELSE 0 END ) AS number
coalesce(sum( CASE WHEN t.MONTH = MONTH ( CURRENT_DATE ()) THEN t.number ELSE 0 END ),0) AS number
FROM
(
SELECT
......@@ -517,7 +517,7 @@
WHERE
YEAR = #{year}
and `po`.`del_flag` = 1
<if test="level =null or level=''" >
<if test="level ==null" >
and (po.org_id =#{orgId} or (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -526,7 +526,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level=1">
<if test="level==1">
and (po.org_id !=#{orgId} and (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -535,7 +535,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level = 0 ">
<if test="level == 0 ">
and po.org_id =#{orgId}
</if>
GROUP BY
......
......@@ -498,7 +498,7 @@
WHERE
`po`.`del_flag` = 1
<if test="level =null or level=''" >
<if test="level ==null" >
and (po.org_id =#{orgId} or (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -507,7 +507,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level=1">
<if test="level==1">
and (po.org_id !=#{orgId} and (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -516,8 +516,8 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level = 0 ">
and po.org_id =#{orgId}
<if test="level == 0 ">
and po.org_id = #{orgId}
</if>
<if test="typeIdsList!=null and typeIdsList.size() > 0">
......
......@@ -415,7 +415,7 @@
WHERE
vpss.MONTH = ( SELECT MIN( MONTH ) FROM vie_price_sum_summary WHERE YEAR = #{year} )
and `po`.`del_flag` = 1
<if test="level =null or level=''" >
<if test="level ==null " >
and (po.org_id =#{orgId} or (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -424,7 +424,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level=1">
<if test="level==1">
and (po.org_id !=#{orgId} and (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -433,7 +433,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level = 0 ">
<if test="level == 0 ">
and po.org_id =#{orgId}
</if>
<if test="typeIdsList!=null and typeIdsList.size() > 0">
......@@ -461,7 +461,7 @@
WHERE
vpss.MONTH = ( SELECT MIN( MONTH ) FROM vie_price_sum_summary WHERE YEAR = #{year} )
and `po`.`del_flag` = 1
<if test="level =null or level=''" >
<if test="level ==null " >
and (po.org_id =#{orgId} or (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -470,7 +470,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level=1">
<if test="level==1">
and (po.org_id !=#{orgId} and (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
......@@ -479,7 +479,7 @@
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{orgId} ))
</if>
<if test="level = 0 ">
<if test="level == 0 ">
and po.org_id =#{orgId}
</if>
<if test="typeIdsList!=null and typeIdsList.size() > 0">
......
......@@ -45,7 +45,6 @@ spring:
indent_output: false
property-naming-strategy: com.fasterxml.jackson.databind.PropertyNamingStrategy$PascalCaseStrategy
flyway:
enable: ture
locations: classpath:db/migration
......@@ -63,6 +62,7 @@ mybatis-plus:
lazy-loading-enabled: true
multiple-result-sets-enabled: true
map-underscore-to-camel-case: true #开启驼峰命名
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #控制台打印sql语句
global-config:
banner: false
enable-sql-runner: true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论