From 600dc8edf8cdb9b02f4ca80f9d2345fed2004396 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Wed, 3 Apr 2024 11:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E9=97=AE=E9=A2=98=EF=BC=8Cse?= =?UTF-8?q?rvice=E7=B1=BB=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/inv/InvProductController.java | 6 +- .../ThrConsumeMaterialCategoryMapper.java | 9 ++ .../thrsys/ThrConsumeMaterialCategory.java | 91 +++++++++++++++++++ .../inv/InvCountOrderDetailService.java | 3 + .../service/inv/impl/InvProductService.java | 4 +- .../ThrConsumeMaterialCategoryService.java | 12 +++ src/main/resources/application-dev.yml | 2 +- .../ThrConsumeMaterialCategoryMapper.xml | 23 +++++ 8 files changed, 144 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/glxp/api/dao/thrsys/ThrConsumeMaterialCategoryMapper.java create mode 100644 src/main/java/com/glxp/api/entity/thrsys/ThrConsumeMaterialCategory.java create mode 100644 src/main/java/com/glxp/api/service/thrsys/ThrConsumeMaterialCategoryService.java create mode 100644 src/main/resources/mybatis/mapper/thrsys/ThrConsumeMaterialCategoryMapper.xml diff --git a/src/main/java/com/glxp/api/controller/inv/InvProductController.java b/src/main/java/com/glxp/api/controller/inv/InvProductController.java index 940ec8c0f..b445e92c5 100644 --- a/src/main/java/com/glxp/api/controller/inv/InvProductController.java +++ b/src/main/java/com/glxp/api/controller/inv/InvProductController.java @@ -317,9 +317,9 @@ public class InvProductController extends BaseController { if (invWarehouseEntity != null) { outInvCode = invWarehouseEntity.getCode(); } - count = invProductDetailService.vailStockCount(codeTempEntity.getRelId(), codeTempEntity.getBatchNo(), codeTempEntity.getSupId(), null, outInvCode, null,true); + count = invProductDetailService.vailStockCount(codeTempEntity.getRelId(), codeTempEntity.getBatchNo(), codeTempEntity.getSupId(), null, outInvCode, null, true); } else if (bussinessTypeEntity.getSpaceOut() == ConstantStatus.SPACE_OUT_SET) { - count = invProductDetailService.vailStockCount(codeTempEntity.getRelId(), codeTempEntity.getBatchNo(), codeTempEntity.getSupId(), codeTempEntity.getDeptCode(), codeTempEntity.getInvCode(), codeTempEntity.getWarehouseCode(),true); + count = invProductDetailService.vailStockCount(codeTempEntity.getRelId(), codeTempEntity.getBatchNo(), codeTempEntity.getSupId(), codeTempEntity.getDeptCode(), codeTempEntity.getInvCode(), codeTempEntity.getWarehouseCode(), true); } else if (bussinessTypeEntity.getSpaceOut() == ConstantStatus.SPACE_OUT_CODE) { //按指定货位出库 if (StrUtil.isEmpty(codeTempEntity.getWarehouseCode())) { @@ -336,7 +336,7 @@ public class InvProductController extends BaseController { return ResultVOUtils.error(500, "添加失败,该产品未上架货位!"); } } else { - count = invProductDetailService.vailStockCount(codeTempEntity.getRelId(), codeTempEntity.getBatchNo(), codeTempEntity.getSupId(), codeTempEntity.getDeptCode(), codeTempEntity.getInvCode(), codeTempEntity.getWarehouseCode(),true); + count = invProductDetailService.vailStockCount(codeTempEntity.getRelId(), codeTempEntity.getBatchNo(), codeTempEntity.getSupId(), codeTempEntity.getDeptCode(), codeTempEntity.getInvCode(), codeTempEntity.getWarehouseCode(), true); } } if (count <= 0) { diff --git a/src/main/java/com/glxp/api/dao/thrsys/ThrConsumeMaterialCategoryMapper.java b/src/main/java/com/glxp/api/dao/thrsys/ThrConsumeMaterialCategoryMapper.java new file mode 100644 index 000000000..ac205dd74 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/thrsys/ThrConsumeMaterialCategoryMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.thrsys; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.thrsys.ThrConsumeMaterialCategory; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface ThrConsumeMaterialCategoryMapper extends BaseMapper { +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/thrsys/ThrConsumeMaterialCategory.java b/src/main/java/com/glxp/api/entity/thrsys/ThrConsumeMaterialCategory.java new file mode 100644 index 000000000..845cfb2cf --- /dev/null +++ b/src/main/java/com/glxp/api/entity/thrsys/ThrConsumeMaterialCategory.java @@ -0,0 +1,91 @@ +package com.glxp.api.entity.thrsys; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 医保耗材分类表 + */ +@ApiModel(value="com-glxp-api-entity-thrsys-ThrConsumeMaterialCategory") +@Data +@TableName(value = "thr_consume_material_category") +public class ThrConsumeMaterialCategory implements Serializable { + /** + * 分类ID + */ + @TableId(value = "categoryId", type = IdType.INPUT) + @ApiModelProperty(value="分类ID") + private Long categoryId; + + /** + * 父级分类ID,关联自身表 + */ + @TableField(value = "parentCategoryId") + @ApiModelProperty(value="父级分类ID,关联自身表") + private Long parentCategoryId; + + /** + * 分类名称 + */ + @TableField(value = "categoryName") + @ApiModelProperty(value="分类名称") + private String categoryName; + + /** + * 分类描述 + */ + @TableField(value = "description") + @ApiModelProperty(value="分类描述") + private String description; + + /** + * 分类级别 + */ + @TableField(value = "`level`") + @ApiModelProperty(value="分类级别") + private Integer level; + + /** + * 创建人 + */ + @TableField(value = "`createUser`") + @ApiModelProperty(value="创建人") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + @ApiModelProperty(value="创建时间") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + @ApiModelProperty(value="更新人") + private String updateUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + @ApiModelProperty(value="更新时间") + private Date updateTime; + + /** + * 备注 + */ + @TableField(value = "remark") + @ApiModelProperty(value="备注") + private String remark; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/service/inv/InvCountOrderDetailService.java b/src/main/java/com/glxp/api/service/inv/InvCountOrderDetailService.java index d29787dbb..5b5fa7406 100644 --- a/src/main/java/com/glxp/api/service/inv/InvCountOrderDetailService.java +++ b/src/main/java/com/glxp/api/service/inv/InvCountOrderDetailService.java @@ -84,6 +84,9 @@ public class InvCountOrderDetailService extends ServiceImpl().eq("relIdFk", relId) - .eq(StrUtil.isNotEmpty(batchNo), "batchNo", batchNo).isNull(StrUtil.isEmpty(batchNo), "batchNo") + .eq(StrUtil.isNotBlank(batchNo), "batchNo", batchNo).isNull(StrUtil.isEmpty(batchNo), "batchNo") .eq("supId", supId) - .eq("deptCode", deptCode) + .eq(StrUtil.isNotBlank(deptCode),"deptCode", deptCode) .eq("invCode", invCode) .eq(price != null, "price", price).isNull(price == null, "price").last("limit 1") ); diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrConsumeMaterialCategoryService.java b/src/main/java/com/glxp/api/service/thrsys/ThrConsumeMaterialCategoryService.java new file mode 100644 index 000000000..ac9a32275 --- /dev/null +++ b/src/main/java/com/glxp/api/service/thrsys/ThrConsumeMaterialCategoryService.java @@ -0,0 +1,12 @@ +package com.glxp.api.service.thrsys; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.thrsys.ThrConsumeMaterialCategory; +import com.glxp.api.dao.thrsys.ThrConsumeMaterialCategoryMapper; +@Service +public class ThrConsumeMaterialCategoryService extends ServiceImpl { + +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 819251754..1b940c383 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://192.168.0.43:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://192.168.0.166:3306/udi_wms_ct?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrConsumeMaterialCategoryMapper.xml b/src/main/resources/mybatis/mapper/thrsys/ThrConsumeMaterialCategoryMapper.xml new file mode 100644 index 000000000..0111a6e2b --- /dev/null +++ b/src/main/resources/mybatis/mapper/thrsys/ThrConsumeMaterialCategoryMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + categoryId, parentCategoryId, categoryName, description, `level`, `createUser`, createTime, + updateUser, updateTime, remark + + \ No newline at end of file