Merge remote-tracking branch 'origin/dev' into zs

This commit is contained in:
SongZhang 2024-08-14 11:01:18 +08:00
commit 27f7d07f27
4 changed files with 59 additions and 1 deletions

View File

@ -84,6 +84,30 @@ public class ViewConInfoFlow implements Serializable {
@ApiModelProperty(value = "商品名称")
private String productName;
@Column(name = "`con_code`")
@ApiModelProperty(value = "耗材代码")
private String conCode;
@Column(name = "`con_type_code`")
@ApiModelProperty(value = "耗材类型代码")
private String conTypeCode;
@Column(name = "`con_type_name`")
@ApiModelProperty(value = "耗材类型名称")
private String conTypeName;
@Column(name = "`con_unit`")
@ApiModelProperty(value = "耗材单位")
private String conUnit;
@Column(name = "`con_warning`")
@ApiModelProperty(value = "预警值")
private String conWarning;
@Column(name = "`con_type_id`")
@ApiModelProperty(value = "耗材类型名称")
private Integer conTypeId;
public void copy(ViewConInfoFlow source){

View File

@ -49,4 +49,17 @@ public class ViewConInfoFlowDto implements Serializable {
private String productId;
private String productName;
private String conCode;
private String conTypeCode;
private String conTypeName;
private String conUnit;
private String conWarning;
private Integer conTypeId;
}

View File

@ -18,4 +18,7 @@ public class ViewConInfoFlowQueryCriteria{
@Query
private String shopId;
@Query
private String conTypeCode;
}

View File

@ -122,7 +122,25 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
resource.setStatus("1");
resource.setStockConsume(BigDecimal.ZERO);
resource.setCreateTime(new Timestamp(System.currentTimeMillis()));
tbConsInfoRepository.save(resource);
resource=tbConsInfoRepository.save(resource);
TbConsInfoFlow flow = new TbConsInfoFlow();
flow.setBizCode("init");
flow.setBizName("初始化耗材信息");
flow.setBizType("+");
flow.setConsId(resource.getId());
flow.setShopId(resource.getShopId());
flow.setConName(resource.getConName());
flow.setAmount(BigDecimal.ZERO);
flow.setBalance(BigDecimal.ZERO);
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
tbConsInfoFlowRepository.save(flow);
}
return tbConsInfoMapper.toDto(new TbConsInfo());
}