Commit adfd12ea by 赵剑炜

Merge branch 'develop' of http://gitlab.sothing.top/843502640/jyzb_platformV2 into develop-zhaojw

parents 865283a6 e9aef5b1
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -75,4 +75,6 @@ public class TjOrgCountDto implements Serializable {
private Integer level;
private Integer levelNum;
}
\ No newline at end of file
......@@ -10,10 +10,9 @@ public class TjOrgEqsDto {
@ExcelProperty("序号")
private Integer numId;
/**
* 组织机构id
*/
private Integer level;
private Integer levelNum;
/**
* 组织机构id
*/
......@@ -70,5 +69,5 @@ public class TjOrgEqsDto {
private Integer destructionNumber;
private List<TjOrgEqsDto> list;
}
......@@ -27,25 +27,34 @@ public class TjOrgPriceDto {
private Long parentId;
// 年初数量
private Integer startNum;
// 年初金额
private BigDecimal startPrice;
// 年末数量
private Integer endNum;
// 年末金额
private BigDecimal endPrice;
// 本年度新增数量
private Integer addNum;
private BigDecimal addPrice;
// 本年度销毁数量
private Integer destoryNum;
private BigDecimal destoryPrice;
private String sizeId;
private String sizeName;
private String typeId;
private String typeName;
//0表示本级数据,1表示直属下级不包含下一级的组织机构
private Integer level;
private Integer levelNum;
}
......@@ -16,6 +16,8 @@ public class TjOrgEqsReq extends BaseRequest {
private Integer level;
private String order;
private String column;
// 添加一个用逗号分隔typeIdsList的方法
public String getTypeIdsAsString() {
return String.join(",", typeIdsList);
......@@ -23,4 +25,6 @@ public class TjOrgEqsReq extends BaseRequest {
public String getSizesAsString() {
return String.join(",", sizeNameList);
}
}
......@@ -21,5 +21,7 @@ public class TjOrgPriceReq extends BaseRequest {
private Integer levelNum;
private Integer level;
private String order;
private String column;
}
......@@ -49,6 +49,7 @@ public class WarehouseReq extends BaseRequest {
private Long orderId;
private String IncludeLowerLevel;
private Date startTime;
private Date endTime;
}
\ No newline at end of file
......@@ -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;
......
......@@ -24,6 +24,7 @@ public class UpdateReassignmentReq extends BaseRequest {
* 申请人id
*/
private String userId;
private String agentId;
private String orderCode;
......
......@@ -76,4 +76,7 @@ public class UpdateWarehouseDevReq {
//rabbitmq消息有关参数
private Integer type;
//是否暂存(true表示暂存不会下发到本地主机,如果为空或者是为false则表示直接下发通知到本地主机)
private Boolean flag;
}
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.converters.bigdecimal.BigDecimalNumberConverter;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class InOrderInfo {
public class InOrderInfoVo {
@ExcelProperty("序号")
private Integer numId;
......
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import static com.alibaba.excel.enums.poi.HorizontalAlignmentEnum.CENTER;
@Data
public class TjOrgCountExportVo {
/**
* 类型名称
*/
@ExcelProperty("类型名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String typeName;
/**
* 号型名称
*/
@ExcelProperty("号型名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String sizeName;
/**
* 装备总数
*/
@ExcelProperty("装备总数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer number;
/**
* 使用次数
*/
@ExcelProperty("使用次数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer useCount;
/**
* 维修次数
*/
@ExcelProperty("维修次数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer fixCount;
}
package com.junmp.jyzb.api.bean.vo;
import lombok.Data;
@Data
public class TjOrgEqsExportVo {
}
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import static com.alibaba.excel.enums.poi.HorizontalAlignmentEnum.CENTER;
@Data
public class TjOrgPoliceExportVo {
@ExcelProperty("装备名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String typeName;
@ExcelProperty("号型")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String sizeName;
@ExcelProperty("装备总数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer num;
@ExcelProperty("在库数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer inNum;
@ExcelProperty("出库数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer outNum;
}
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import java.math.BigDecimal;
import static com.alibaba.excel.enums.poi.HorizontalAlignmentEnum.CENTER;
@Data
public class TjOrgPriceExportVo {
@ExcelProperty("装备名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String typeName;
// 年初数量
@ExcelProperty("年初数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer startNum;
// 年初金额
@ExcelProperty("年初金额")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private BigDecimal startPrice;
// 年末数量
@ExcelProperty("年末数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer endNum;
// 年末金额
@ExcelProperty("年末金额")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private BigDecimal endPrice;
// 本年度新增数量
@ExcelProperty("本年度新增数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer addNum;
// 本年度销毁数量
@ExcelProperty("本年度销毁数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer destoryNum;
}
......@@ -18,56 +18,11 @@ public enum SupplierExceptionEnum implements IExceptionEnum {
PRODUCT_SKU_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "号型不存在"),
/**
* 批次信息不存在
* 厂商名称已存在
*/
BATCH_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 14, "批次不存在"),
SUPPLIER_NAME_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "厂商名称已存在"),
/**
* 批次信息不存在
*/
BATCH_PROCESSED(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 15, "批次已生产"),
/**
* 批次生产已完成
*/
BATCH_PROCESSED_DONE(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 16, "批次生产已完成"),
/**
* 批次生产已完成
*/
MODIFY_NUM_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 17, "批次生产已完成,数量不能小于原数量"),
/**
* 标签信息不存在
*/
TAG_INFO_NOT_EXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 19, "标签信息不存在"),
/**
* 标签信息初始化完成
*/
TAG_INFO_INIT_DONE(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 20, "检查标签信息是否绑定完成"),
/**
* 标签已绑定
*/
TAG_INFO_HAD_BINDING(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 21, "标签已绑定"),
/**
* 确认绑定是否已完成
*/
TAG_UID_BINDING_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 22, "确认绑定是否已完成"),
/**
* 标签重复
*/
TAG_INFO_REPEAT_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 23, "标签重复"),
/**
* 供应商信息不存在
*/
SUPPLIER_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "供应商已存在"),
SUPPLIER_CODE_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "厂商编码已存在"),
;
......
......@@ -12,6 +12,7 @@ public enum WarehouseExceptionEnum implements IExceptionEnum {
*/
WAREHOUSE_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库信息不存在"),
WAREHOUSE_IS_LOCKED(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库锁库中,记账失败"),
WAREHOUSE_NAME_IS_EXIET(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库名称已存在,请勿提交重复名称"),
;
......
......@@ -6,6 +6,7 @@ import com.junmp.jyzb.entity.PubOrg;
import com.junmp.jyzb.service.CabinetService;
import com.junmp.jyzb.service.PubOrgService;
import org.springframework.amqp.core.*;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -18,14 +19,17 @@ 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;
@Resource
private CabinetService cabinetService;
@Resource
private RabbitAdmin rabbitAdmin;
// Inject the services using constructor injection
public TopicRabbitConfig() {
......@@ -52,23 +56,25 @@ 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);
}
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,18 +76,13 @@ 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){
tjService.TjOrgEqsExport(req);
}
/**
*-------------------------------------财务统计报表------------------------------------------
*/
......@@ -136,6 +117,13 @@ public class TjController {
return ApiRes.success(tjService.TjOrgPriceDetailList(req));
}
@PostMapping(path="/TjOrgPriceExport",name="财务报表导出#logType=30")
@ApiOperation("财务报表导出")
public void TjOrgPriceExport(@RequestBody TjOrgPriceReq req){
tjService.TjOrgPriceExport(req);
}
/**
* --------------------------------------使用统计报表-------------------------------------------
*/
......@@ -190,6 +178,12 @@ public class TjController {
return ApiRes.success(tjService.TjOutAndInCount(req));
}
@PostMapping(path="/TjOrgCountExport",name="使用报表导出#logType=30")
@ApiOperation("使用报表导出")
public void TjOrgCountExport(@RequestBody TjOrgCountReq req){
tjService.TjOrgCountExport(req);
}
/**
* --------------------------------------人员统计报表-------------------------------------------
*/
......@@ -216,18 +210,28 @@ public class TjController {
return ApiRes.success(tjService.TjOrgPoliceDetailList(req));
}
@PostMapping(path="/TjOrgPoliceExport",name="人员报表导出#logType=30")
@ApiOperation("人员报表导出")
public void TjOrgPoliceExport(@RequestBody TjOrgPoliceReq req){
tjService.TjOrgPoliceExport(req);
}
/**
* --------------------------------------温湿度记录-------------------------------------------
*/
@PostMapping("showHumidityAndtemperature")
@PostMapping("/showHumidityAndtemperature")
@ApiOperation("展示温湿度记录")
public ApiRes<List<HumidityAndtemperature>> showHumidityAndtemperature(@RequestBody WarehouseReq req){
return ApiRes.success(warehouseService.showHumidityAndtemperature(req));
}
@PostMapping(path="/HumidityAndtemperatureExport",name="温湿度报表导出#logType=30")
@ApiOperation("温湿度报表导出")
public void HumidityAndtemperatureExport(@RequestBody WarehouseReq req){
warehouseService.HumidityAndtemperatureExport(req);
}
......
......@@ -28,7 +28,7 @@ public interface DeviceConfigMapper extends BaseMapper<DeviceConfig> {
@Param("pageSize") Long pageSize);
List<String> alignDeviceConfigInfo(@Param("orgId") Long orgId,
@Param("deviceCode") String deviceCode,
@Param("deviceType") Integer deviceType,
@Param("date") String date);
}
......
......@@ -53,7 +53,7 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList,
@Param("levelNum")Integer levelNum,
@Param("level")Integer level);
@Param("level")Integer level,@Param("column")String column,@Param("order")String order);
FinalTjOrgCountDto TjOrgCountSum(@Param("orgId") Long orgId,
......
......@@ -62,7 +62,7 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
// @Param("sizeNameList") List<String> sizeNameList, @Param("levelNum") Integer levelNum);
List<TjOrgEqsDto> getTotalDataDetail(@Param("orgId") String orgId, @Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList, @Param("levelNum") Integer levelNum,
@Param("level")Integer level);
@Param("level")Integer level,@Param("column")String column,@Param("order")String order);
void useViewOrgeqs(@Param("sql") String sql,@Param("orgId") Long orgId,@Param("sql1") String sql1);
......
......@@ -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);
......
......@@ -13,12 +13,10 @@ import java.util.List;
public interface TjService {
List<TjOrgEqsDto> showOrgEqsList(InventoryReq req);
FinalTjOrgEqsDto test(TjOrgEqsReq req);
//装备统计报表
// PageResult<TjOrgEqsDto> TjOrgEqs(TjOrgEqsReq req);
//装备统计报表
PageResult<TjOrgEqsDto> GetTjData(TjOrgEqsReq req);
......@@ -53,14 +51,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);
......@@ -68,4 +65,10 @@ public interface TjService {
void TjOrgEqsExport(TjOrgEqsReq req);
void TjOrgPriceExport(TjOrgPriceReq req);
void TjOrgCountExport(TjOrgCountReq req);
void TjOrgPoliceExport(TjOrgPoliceReq req);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto;
import com.junmp.jyzb.api.bean.dto.WarehouseDto;
import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.query.TjReq.TjOrgPriceReq;
import com.junmp.jyzb.api.bean.query.WarehouseReq;
import com.junmp.jyzb.api.bean.req.UpdateWarehouseReq;
import com.junmp.jyzb.entity.Temp.HumidityAndtemperature;
......@@ -56,4 +57,6 @@ public interface WarehouseService extends IService<Warehouse> {
boolean updateHumidityAndtemperature(HumidityAndtemperature req);
List<HumidityAndtemperature> showHumidityAndtemperature(WarehouseReq req);
void HumidityAndtemperatureExport(WarehouseReq req);
}
package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
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;
......@@ -26,6 +28,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -52,13 +55,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 +73,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);
}
......@@ -105,7 +112,16 @@ public class DeviceConfigServiceImpl extends ServiceImpl<DeviceConfigMapper, Dev
@Override
public List<String> alignDeviceConfigInfo(UpdateDeivceConfigReq req) {
String date = DateTimeUtil.TimeLongToString(req.getUpdateTime());
return deviceConfigMapper.alignDeviceConfigInfo(req.getOrgId(), req.getDeviceCode(), date);
String deviceConfigString="";
List<String> deviceConfigList = deviceConfigMapper.alignDeviceConfigInfo(req.getOrgId(), req.getDeviceType(), date);
if (CollectionUtil.isNotEmpty(deviceConfigList) && deviceConfigList.size()>1 && req.getDeviceType()==1){
deviceConfigString = deviceConfigList.get(0);
deviceConfigList.clear();
deviceConfigList.add(deviceConfigString);
}
return deviceConfigList;
}
......
......@@ -126,44 +126,20 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
this.save(size);
sizeRepository.save(size);
//新增信息之后,将消息推送给所有本地主机
LambdaQueryWrapper<WarehouseDev> queryWrapper = new LambdaQueryWrapper<WarehouseDev>()
.select(WarehouseDev::getOrgId)
.groupBy(WarehouseDev::getOrgId);
List<WarehouseDev> list1 = warehouseDevService.list(queryWrapper);
List<String> orgIdsList = list1.stream()
.map(WarehouseDev::getOrgId)
.collect(Collectors.toList());
String exchangeName="baseInfoChangeExchange";
// LambdaQueryWrapper<WarehouseDev> queryWrapper = new LambdaQueryWrapper<WarehouseDev>()
// .select(WarehouseDev::getOrgId)
// .groupBy(WarehouseDev::getOrgId);
// List<WarehouseDev> list1 = warehouseDevService.list(queryWrapper);
// List<String> orgIdsList = list1.stream()
// .map(WarehouseDev::getOrgId)
// .collect(Collectors.toList());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为号型
mqDto.setType(1);
mqDto.setMessage("Adding sizeInfo");
List<String> MQList=new ArrayList<>();
for (String orgId:orgIdsList) {
String queueName=orgId+"InfoChange";
int messageCount = rabbitTemplate.execute(channel -> {
AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queueName);
return declareOk.getMessageCount();
});
if (messageCount==0){
MQList.add(queueName);
}
}
//将需要发送消息的队列通过add出来之后,将通过异步的方式分别将消息推送到指定的队列中去
List<CompletableFuture<Void>> futures = MQList.stream()
.map(queueName -> CompletableFuture.runAsync(() -> {
// 执行推送消息的逻辑
// pushMessage(orgId);
MQ.SendMsg(exchangeName,queueName,mqDto);
}))
.collect(Collectors.toList());
// 等待所有 CompletableFuture 完成
CompletableFuture<Void> allOf = CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));
allOf.join();
MQ.sendToExchange(exchangeName,"org",mqDto);
return sizeID+"||"+code;
}
......@@ -201,8 +177,14 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
BeanPlusUtil.copyProperties(req, size);
size.setUpdateTime(DateTimeUtil.getCurrentDateTime());
sizeRepository.save(size);
//推送消息通知
// MQ.SendMsg();
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为号型
mqDto.setType(1);
mqDto.setMessage("Updating sizeInfo");
MQ.sendToExchange(exchangeName,"org",mqDto);
return this.updateById(size);
}
......@@ -220,16 +202,13 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
LambdaQueryWrapper<EquipmentSize> wrapper = createWrapper(req);
List<EquipmentSize> es = this.list(wrapper);
List<EquipmentSizeDto> dtoList = new ArrayList<>();
// 将 EquipmentSize 对象转换为 EquipmentSizeDto 对象并添加到 dtoList 中
for (EquipmentSize equipmentSize : es) {
EquipmentSizeDto dto = new EquipmentSizeDto();
BeanPlusUtil.copyProperties(equipmentSize, dto);
dtoList.add(dto);
}
return dtoList;
List<EquipmentSizeDto> collect = es.stream().map(equipmentSize -> {
EquipmentSizeDto dto = new EquipmentSizeDto();
BeanPlusUtil.copyProperties(equipmentSize, dto);
return dto;}
).sorted(Comparator.comparing(dto -> Integer.parseInt(dto.getCode())))
.collect(Collectors.toList());
return collect;
}
@Override
public PageResult<EquipmentSizeDto> getSizePages(QueryEquipmentSizeReq req) {
......@@ -255,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<>();
......@@ -300,7 +280,10 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
//根据名称模糊查询
wrapper.like(ObjectUtil.isNotEmpty(req.getName()), EquipmentSize::getName, req.getName());
wrapper.orderByDesc(EquipmentSize::getCreateTime);
// wrapper.orderByAsc(EquipmentSize::getCode);
return wrapper;
}
}
\ No newline at end of file
......@@ -7,12 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.Repository.TypeRepository;
import com.junmp.jyzb.api.bean.dto.ESTypeDto;
import com.junmp.jyzb.api.bean.dto.EquipmentTypeDto;
import com.junmp.jyzb.api.bean.dto.EquipmentTreeDto;
import com.junmp.jyzb.api.bean.dto.*;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.SizeDto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.TypeDto;
import com.junmp.jyzb.api.bean.dto.SizeAndTypeDto;
import com.junmp.jyzb.api.bean.query.QueryEquipmentTypeReq;
import com.junmp.jyzb.api.bean.req.UpdateEquipmentTypeReq;
import com.junmp.jyzb.api.exception.JYZBAppException;
......@@ -65,6 +62,9 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
@Resource
private EquipmentCountSummaryMapper equipmentCountSummaryMapper;
@Autowired
private RabbitMQSendMsg MQ;
@Resource
private EquipmentSizeService equipmentSizeService;
private static final String REDIS_TYPE = "Type_";
......@@ -136,6 +136,15 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
this.save(type);
//更新parent_ids字段
equipmentTypeMapper.setTypeParentIds();
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(2);
mqDto.setMessage("Adding typeInfo");
MQ.sendToExchange(exchangeName,"org",mqDto);
return String.valueOf(newcode);
} else {
String msg="以下供应商不存在:" +String.join(",", chekResult);
......@@ -166,7 +175,11 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
.set(EquipmentSize::getEpcType,req.getEpcType())
.eq(EquipmentSize::getTypeId,req.getId()));
}
EquipmentType type = this.queryEqType(req);
EquipmentType type = this.getById(req.getId());
if (ObjectUtil.isNull(type)) {
throw new ServiceException(EquipmentExceptionEnum.EQUIPMENT_TYPE_NOT_EXIST);
}
req.setCode(type.getCode());//为了以防typeCode不一致的问题
List<String> chekResult = supplierService.CheckSupplierList(req.getSupplierList());
if (chekResult.size() == 0) {
// 先增加code码
......@@ -228,6 +241,14 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
}
// 保存type
type.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(2);
mqDto.setMessage("Updating typeInfo");
MQ.sendToExchange(exchangeName,"org",mqDto);
return this.updateById(type);
} else {
String msg="以下供应商不存在:" +String.join(",", chekResult);
......@@ -235,14 +256,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
}
}
private EquipmentType queryEqType(UpdateEquipmentTypeReq req) {
EquipmentType type = this.getById(req.getId());
if (ObjectUtil.isNull(type)) {
throw new ServiceException(EquipmentExceptionEnum.EQUIPMENT_TYPE_NOT_EXIST);
}
return type;
}
@Override
......
......@@ -17,7 +17,7 @@ import com.junmp.jyzb.api.bean.query.*;
import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.DetailJsonReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderReq;
import com.junmp.jyzb.api.bean.vo.InOrderInfo;
import com.junmp.jyzb.api.bean.vo.InOrderInfoVo;
import com.junmp.jyzb.api.exception.JYZBAppException;
import com.junmp.jyzb.api.exception.enums.InventoryExceptionEnum;
import com.junmp.jyzb.api.exception.enums.OrderExceptionEnum;
......@@ -1509,9 +1509,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
@Override
public void InOrderExport(OrderMainReq req) {
LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req);
List<InOrderInfo> collect = list(wrapper).stream().map(orderMain -> {
InOrderInfo inOrderInfo = new InOrderInfo();
BeanPlusUtil.copyProperties(orderMain, inOrderInfo);
List<InOrderInfoVo> collect = list(wrapper).stream().map(orderMain -> {
InOrderInfoVo inOrderInfoVo = new InOrderInfoVo();
BeanPlusUtil.copyProperties(orderMain, inOrderInfoVo);
//装备名称
String inventoryName = "";
List<OrderDetail> orderDetailList = orderDetailService.QueryList(orderMain.getId());
......@@ -1519,13 +1519,13 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
inventoryName = inventoryName + orderDetail.getTypeName() + "/";
}
String substring = inventoryName.substring(0, inventoryName.length() - 1);
inOrderInfo.setInventoryName(substring);
inOrderInfoVo.setInventoryName(substring);
//查询字典表设置入库类型
// List<SysDictItem> list = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
// .eq(SysDictItem::getItemValue, orderMain.getBussinessType()));
//// inOrderInfo.setOrderType(itemText);
// System.out.println("list = " + list);
return inOrderInfo;
return inOrderInfoVo;
}).collect(Collectors.toList());
//设置导出的单据序号
......@@ -1535,7 +1535,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
HttpServletResponse response = HttpServletUtil.getResponse();
ExcelExportParam param = new ExcelExportParam();
param.setDataList(collect);
param.setClazz(InOrderInfo.class);
param.setClazz(InOrderInfoVo.class);
param.setResponse(response);
param.setFileName("入库单据列表.xls");
//对数据进行导出
......@@ -1546,9 +1546,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
@Override
public void OutOrderExport(OrderMainReq req) {
LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req);
List<InOrderInfo> collect = list(wrapper).stream().map(orderMain -> {
InOrderInfo inOrderInfo = new InOrderInfo();
BeanPlusUtil.copyProperties(orderMain, inOrderInfo);
List<InOrderInfoVo> collect = list(wrapper).stream().map(orderMain -> {
InOrderInfoVo inOrderInfoVo = new InOrderInfoVo();
BeanPlusUtil.copyProperties(orderMain, inOrderInfoVo);
//装备名称
String inventoryName = "";
List<OrderDetail> orderDetailList = orderDetailService.QueryList(orderMain.getId());
......@@ -1556,13 +1556,13 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
inventoryName = inventoryName + orderDetail.getTypeName() + "/";
}
String substring = inventoryName.substring(0, inventoryName.length() - 1);
inOrderInfo.setInventoryName(substring);
inOrderInfoVo.setInventoryName(substring);
//查询字典表设置出库类型
// List<SysDictItem> list = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
// .eq(SysDictItem::getItemValue, orderMain.getBussinessType()));
//// inOrderInfo.setOrderType(itemText);
// System.out.println("list = " + list);
return inOrderInfo;
return inOrderInfoVo;
}).collect(Collectors.toList());
//设置导出的单据序号
......@@ -1572,7 +1572,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
HttpServletResponse response = HttpServletUtil.getResponse();
ExcelExportParam param = new ExcelExportParam();
param.setDataList(collect);
param.setClazz(InOrderInfo.class);
param.setClazz(InOrderInfoVo.class);
param.setResponse(response);
param.setFileName("出库单据列表.xls");
//对数据进行导出
......
package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
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.SupplierInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.dto.SupplierDto;
import com.junmp.jyzb.api.bean.query.QuerySupplierReq;
import com.junmp.jyzb.api.bean.req.UpdateSupplierReq;
......@@ -13,11 +15,13 @@ import com.junmp.jyzb.entity.Supplier;
import com.junmp.jyzb.service.OrderMainService;
import com.junmp.jyzb.service.SupplierService;
import com.junmp.jyzb.utils.DateTimeUtil;
import com.junmp.jyzb.utils.RabbitMQSendMsg;
import com.junmp.v2.common.exception.base.ServiceException;
import com.junmp.v2.common.util.BeanPlusUtil;
import com.junmp.v2.db.api.factory.PageFactory;
import com.junmp.v2.db.api.factory.PageResultFactory;
import com.junmp.v2.db.api.page.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.junmp.jyzb.mapper.SupplierMapper;
......@@ -33,14 +37,25 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Resource
OrderMainService orderMainService;
@Autowired
private RabbitMQSendMsg MQ;
@Resource
private SupplierMapper supplierMapper;
@Override
public String AddSupplier(UpdateSupplierReq req) {
Supplier one = getOne(new LambdaQueryWrapper<Supplier>().eq(Supplier::getName, req.getName()));
if (one != null){
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_IS_EXIST);
List<Supplier> list = list(new LambdaQueryWrapper<Supplier>()
.eq(Supplier::getName, req.getName()).or().eq(Supplier::getCode, req.getCode()));
if (CollectionUtil.isNotEmpty(list)){
for (Supplier supplier:list) {
if (supplier.getName().equals(req.getName())){
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NAME_IS_EXIST);
}
if (supplier.getCode().equals(req.getCode())){
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_CODE_IS_EXIST);
}
}
}
Supplier supplier = new Supplier();
String ID=UUID.randomUUID().toString();
......@@ -48,7 +63,16 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
BeanPlusUtil.copyProperties(req, supplier);
supplier.setCreateTime(DateTimeUtil.getCurrentDateTime());
supplier.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(3);
mqDto.setMessage("Adding supplierInfo");
MQ.sendToExchange(exchangeName,"org",mqDto);
this.save(supplier);
return ID;
}
......@@ -62,19 +86,23 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Override
public boolean UpdateSupplier(UpdateSupplierReq req) {
Supplier supplier = this.QuerySupplier(req);
Supplier supplier = this.getById(req.getId());
if (ObjectUtil.isNull(supplier)) {
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NOT_EXIST);
}
req.setCode(supplier.getCode());//为了控制code不一致的情况
BeanPlusUtil.copyProperties(req, supplier);
supplier.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(3);
mqDto.setMessage("Updating supplierInfo");
MQ.sendToExchange(exchangeName,"org",mqDto);
return this.updateById(supplier);
}
private Supplier QuerySupplier(UpdateSupplierReq req) {
Supplier app = this.getById(req.getId());
if (ObjectUtil.isNull(app)) {
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NOT_EXIST);
}
return app;
}
public List<String> CheckSupplierList(List<String> req){
......@@ -145,7 +173,10 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Override
public Boolean ChangeSupplierState(UpdateSupplierReq req) {
Supplier supplier = this.QuerySupplier(req);
Supplier supplier = this.getById(req.getId());
if (ObjectUtil.isNull(supplier)) {
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NOT_EXIST);
}
BeanPlusUtil.copyProperties(req, supplier);
supplier.setUpdateTime(DateTimeUtil.getCurrentDateTime());
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);
}
......
package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.dto.WarehouseDto;
import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.query.TjReq.TjOrgPriceReq;
import com.junmp.jyzb.api.bean.query.WarehouseReq;
import com.junmp.jyzb.api.bean.req.UpdateWarehouseReq;
import com.junmp.jyzb.api.bean.vo.InOrderInfoVo;
import com.junmp.jyzb.api.exception.enums.WarehouseExceptionEnum;
import com.junmp.jyzb.cache.TemperatureRedisCache;
import com.junmp.jyzb.entity.*;
......@@ -19,11 +23,16 @@ import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.*;
import com.junmp.v2.common.exception.base.ServiceException;
import com.junmp.v2.common.util.BeanPlusUtil;
import com.junmp.v2.common.util.HttpServletUtil;
import com.junmp.v2.office.api.OfficeExcelApi;
import com.junmp.v2.office.api.bean.ExcelExportParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -44,15 +53,31 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Resource
private TemperatureRedisCache temperatureRedisCache;
@Autowired
private RabbitMQSendMsg MQ;
@Resource
private OfficeExcelApi officeExcelApi;
@Override
public String AddWarehouse(UpdateWarehouseReq req) {
List<Warehouse> list = list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getName, req.getName()));
if (CollectionUtil.isNotEmpty(list)){
throw new ServiceException(WarehouseExceptionEnum.WAREHOUSE_NAME_IS_EXIET);
}
Warehouse warehouse = new Warehouse();
BeanPlusUtil.copyProperties(req, warehouse);
warehouse.setCreateTime(DateTimeUtil.getCurrentDateTime());
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
save(warehouse);
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(4);
mqDto.setMessage("Adding warehouseInfo");
MQ.SendMsg("warehouseMsg",req.getOrgId().toString(),mqDto);//推送至仓库主机
return warehouse.getId();
}
......@@ -85,9 +110,19 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Override
public boolean updateWarehouse(UpdateWarehouseReq req) {
List<Warehouse> list = list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getName, req.getName()));
if (CollectionUtil.isNotEmpty(list)){
throw new ServiceException(WarehouseExceptionEnum.WAREHOUSE_NAME_IS_EXIET);
}
Warehouse warehouse = new Warehouse();
BeanPlusUtil.copyProperties(req,warehouse);
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(4);
mqDto.setMessage("Updating warehouseInfo");
MQ.SendMsg("warehouseMsg",req.getOrgId().toString(),mqDto);//推送至仓库主机
return this.updateById(warehouse);
}
......@@ -182,13 +217,13 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateHumidityAndtemperature(HumidityAndtemperature req) {
Date date = new Date(req.getCreateTime()*1000);
Date date = new Date(req.getCreateTime());
//查询数据库仓库id取到仓库名称
Warehouse warehouse = getById(req.getWarehouseId());
//将数据放入redis
temperatureRedisCache.addTemperatureHumidity(req.getWarehouseId(),warehouse.getName(),
req.getCreateTime()*1000,req.getHumidity(),req.getTemperature());
req.getCreateTime(),req.getHumidity(),req.getTemperature());
//更新仓库的温度和湿度
warehouse.setHumidity(req.getHumidity());
warehouse.setTemperature(req.getTemperature());
......@@ -211,5 +246,18 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
return collect;
}
@Override
public void HumidityAndtemperatureExport(WarehouseReq req) {
List<HumidityAndtemperature> collect = showHumidityAndtemperature(req);
HttpServletResponse response = HttpServletUtil.getResponse();
ExcelExportParam param = new ExcelExportParam();
param.setDataList(collect);
param.setClazz(InOrderInfoVo.class);
param.setResponse(response);
param.setFileName("入库单据列表.xls");
//对数据进行导出
officeExcelApi.easyExportDownload(param);
}
}
......@@ -17,7 +17,7 @@ public class BusinessUtil {
/**
* 创建补齐空数据
* 创建补齐空数据(页面显示补齐数据,如每页10条,当前只有6条数据,再创建4条空数据进行补齐)
*/
public static <T> List<T> createNullData(Long size,Long pageNo,Long pageSize,Class<T> clazz) {
......
......@@ -23,6 +23,7 @@ public class RabbitMQSendMsg {
rabbitAdmin.declareQueue(queue);
rabbitAdmin.declareExchange(exchange);
rabbitAdmin.declareBinding(BindingBuilder.bind(queue).to(exchange).with(name).noargs());
String jsonString = JSON.toJSONString(msg);
// // 创建 MessageProperties 对象,并设置 TTL
// MessageProperties messageProperties = new MessageProperties();
......@@ -34,6 +35,7 @@ public class RabbitMQSendMsg {
}
// 发布消息到交换机,根据不同的主题和消息内容
public void publishOrgMessage(String orgId, String message) {
String routingKey = "org." + orgId;
......@@ -44,6 +46,11 @@ public class RabbitMQSendMsg {
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发送的消息
......
......@@ -59,15 +59,17 @@
) as a
</select>
<select id="alignDeviceConfigInfo" resultType="java.lang.String">
select device_config from base_device_config where org_id=#{orgId}
select device_config from base_device_config where org_id=#{orgId} and device_type=#{deviceType}
<!-- <if test="deviceCode != null and deviceCode != ''">-->
<!-- and device_code=#{deviceCode}-->
<!-- </if>-->
<!-- <if test="deviceCode == null or deviceCode == ''">-->
<!-- and device_type=0-->
<!-- </if>-->
<if test="date != null and date!= ''">
and update_time &gt; #{date}
</if>
order by update_time desc
</select>
</mapper>
......@@ -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
......@@ -545,6 +545,9 @@
t.size_id,t.size_name,t.type_id,t.type_name
ORDER BY
t.type_id,size_id
<if test="column != null and column != '' and order != null and order != '' ">
order by ${column} ${order}
</if>
</select>
......
......@@ -591,5 +591,32 @@
</if>
</select>
<!-- <select id="alignInventoryInfo" resultType="com.junmp.jyzb.api.bean.dto.FetchingDataDto.EquipmentDto"-->
<!-- parameterType="com.junmp.jyzb.api.bean.query.InventoryReq">-->
<!-- SELECT wi.type_id,wi.size_id,wi.epc,-->
<!-- wi.org_id,wi.location_id,wi.location_type,wi.create_time,wi.update_time-->
<!-- FROM `base_warehouse_inventory` wi-->
<!-- join base_inventory i on i.epc=wi.epc-->
<!-- where wi.org_id=#{orgId}-->
<!-- <if test="locationId!= null and locationId != ''">-->
<!-- and wi.location_id=#{locationId}-->
<!-- </if>-->
<!-- <if test="date!= null and date != ''">-->
<!-- and wi.update_time &gt; #{date}-->
<!-- </if>-->
<!-- <if test="typeIdList != null and typeIdList.size()>0">-->
<!-- and wi.type_id in-->
<!-- <foreach collection="typeIdList" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="sizeIdList != null and sizeIdList.size()>0">-->
<!-- and wi.size_id in-->
<!-- <foreach collection="sizeIdList" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </select>-->
</mapper>
\ No newline at end of file
......@@ -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">
......@@ -533,6 +533,9 @@
</foreach>
</if>
GROUP BY `po`.`org_id`,`po`.`org_code`,`po`.`org_parent_id`,`po`.`org_name`
<if test="column != null and column != '' and order != null and order != '' ">
order by ${column} ${order}
</if>
</select>
<select id="getSumByViewOrgeqsSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgEqsDto">
select sum(total_number) as total_number,
......
......@@ -29,6 +29,9 @@
and pe.police_name like CONCAT('%', #{req.policeName}, '%')
</if>
GROUP BY pe.police_id
<if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' ">
limit #{pageNo},#{pageSize}
</if>
</select>
<select id="getCount" resultType="java.lang.Integer"
parameterType="com.junmp.jyzb.api.bean.query.TjReq.TjOrgPoliceReq">
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论