Browse Source

问题优化

dev
wangfukang 1 year ago
parent
commit
ec6eca6c88
  1. 16
      hiver-admin/test-output/test-report.html
  2. 4
      hiver-core/src/main/java/cc/hiver/core/logisticsorder/vo/StatisticsVo.java
  3. 3
      hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml
  4. 10
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java
  5. 40
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ReturnSale.java
  6. 2
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SalesAndDetailsServiceImpl.java
  7. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/AliOcrUtil.java
  8. 3
      hiver-modules/hiver-mall/src/main/resources/mapper/SaleMapper.xml

16
hiver-admin/test-output/test-report.html

@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a>
</li>
<li class="m-r-10">
<a href="#"><span class="badge badge-primary">十一月 26, 2024 09:27:39</span></a>
<a href="#"><span class="badge badge-primary">十一月 27, 2024 22:06:17</span></a>
</li>
</ul>
</div>
@ -84,7 +84,7 @@
<div class="test-detail">
<span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p>
<p class="text-sm"><span>09:27:40 上</span> / <span>0.027 secs</span></p>
<p class="text-sm"><span>22:06:18 下</span> / <span>0.023 secs</span></p>
</div>
<div class="test-contents d-none">
<div class="detail-head">
@ -92,9 +92,9 @@
<div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>11.26.2024 09:27:40</span>
<span class='badge badge-danger'>11.26.2024 09:27:40</span>
<span class='badge badge-default'>0.027 secs</span>
<span class='badge badge-success'>11.27.2024 22:06:18</span>
<span class='badge badge-danger'>11.27.2024 22:06:18</span>
<span class='badge badge-default'>0.023 secs</span>
</div>
<div class="m-t-10 m-l-5"></div>
</div>
@ -104,7 +104,7 @@
<tbody>
<tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td>
<td>9:27:40</td>
<td>22:06:18</td>
<td>
Test passed
</td>
@ -128,13 +128,13 @@
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Started</p>
<h3>十一月 26, 2024 09:27:39</h3>
<h3>十一月 27, 2024 22:06:17</h3>
</div></div>
</div>
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Ended</p>
<h3>十一月 26, 2024 09:27:40</h3>
<h3>十一月 27, 2024 22:06:18</h3>
</div></div>
</div>
<div class="col-md-3">

4
hiver-core/src/main/java/cc/hiver/core/logisticsorder/vo/StatisticsVo.java

@ -44,4 +44,8 @@ public class StatisticsVo {
// 总重量
@ApiModelProperty(value = "总重量")
private BigDecimal totalWeight;
// 总件数
@ApiModelProperty(value = "总件数")
private BigDecimal totalCount;
}

3
hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml

@ -217,7 +217,8 @@
COUNT(*) AS total_order,
SUM(t.tips) AS total_tips,
SUM(t.premium) AS total_insurance_fee,
SUM(t.weight) AS total_weight
SUM(t.weight) AS total_weight,
SUM(t.count) AS total_count
FROM
t_logistics_order t
WHERE

10
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java

@ -238,7 +238,9 @@ public class SaleController {
sale.setCreateBy(currUser.getId());
sale.setCreateByName(currUser.getNickname());
sale.setCreateByPhone(currUser.getMobile());
sale.setCreateTime(new Date());
if(sale.getCreateTime() == null) {
sale.setCreateTime(new Date());
}
sale.setDelFlag(CommonConstant.DEL_FLAG_FALSE);
sale.setStatus(SaleConstant.SALE_STATUS[4]);
saleService.save(sale);
@ -252,6 +254,12 @@ public class SaleController {
final SaleReturnDTO saleReturnDTO = saleQueryDTO.getSaleReturnDTO();
// 回填销售单id
saleReturnDTO.getReturnSale().setSaleId(sale.getId());
// 时间
if(sale.getCreateTime() == null) {
saleReturnDTO.getReturnSale().setCreateTime(new Date());
}else{
saleReturnDTO.getReturnSale().setCreateTime(sale.getCreateTime());
}
// 申请退货
final ReturnSale returnSale = salesAndDetailsService.handleBackSalesDetails(saleReturnDTO);
// 如确认退货

40
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ReturnSale.java

@ -1,27 +1,62 @@
package cc.hiver.mall.entity;
import cc.hiver.core.base.HiverBaseEntity;
import cc.hiver.core.common.constant.CommonConstant;
import cc.hiver.core.common.utils.SnowFlakeUtil;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "退货单主表")
@TableName(value = "t_return_sale", autoResultMap = true)
public class ReturnSale extends HiverBaseEntity {
public class ReturnSale implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@TableId
@ApiModelProperty(value = "唯一标识")
private String id = "TD" + SnowFlakeUtil.nextId();
@ApiModelProperty(value = "创建者")
@CreatedBy
@TableField(fill = FieldFill.INSERT)
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "更新者")
@LastModifiedBy
@TableField(fill = FieldFill.UPDATE)
private String updateBy;
@LastModifiedDate
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.UPDATE)
private Date updateTime;
@ApiModelProperty(value = "删除标志 默认0")
private Integer delFlag = CommonConstant.STATUS_NORMAL;
private String saleId;
@ApiModelProperty(value = "操作人姓名")
@ -95,5 +130,4 @@ public class ReturnSale extends HiverBaseEntity {
@ApiModelProperty(value = "下单总件数")
private String workerName;
private static final long serialVersionUID = 1L;
}

2
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SalesAndDetailsServiceImpl.java

@ -334,7 +334,7 @@ public class SalesAndDetailsServiceImpl implements SalesAndDetailsService {
final User user = securityUtil.getCurrUser();
returnSale.setCreateBy(user.getId());
returnSale.setCreateByName(user.getNickname());
returnSale.setCreateTime(new Date());
// returnSale.setCreateTime(new Date());
// 下游客户信息
returnSale.setUserId(sale.getUserId());
returnSale.setUserName(sale.getUserName());

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/utils/AliOcrUtil.java

@ -106,7 +106,7 @@ public class AliOcrUtil {
messages.add(systemMessage);
messages.add(userMessage);
final MultiModalConversationParam param = MultiModalConversationParam.builder()
.model("qwen-vl-max-1119")
.model("qwen-vl-max")
.messages(messages)
.build();
stopWatch.start("一轮会话");
@ -841,7 +841,7 @@ public class AliOcrUtil {
"1.productSn的返回值中去掉颜色,尺码等信息,\n" +
"2.如果识别到多种颜色,按不同颜色拆分返回。如果没有识别到\"color\"的内容,则\"color\"赋值“均色”。如果没有识别到\"size\"的内容,则\"size\"赋值“均码”,返回1条JSON数据即可。\n" +
"3.如果指令内容中有\"SYYS色\"则\"color\"字段返回“SYYS色”即可,如果指令内容中有\"SYCM码\"则\"size\"字段返回“SYCM码”即可,没有则忽略。\n" +
"4. 如果数量为负数,则productCount返回负数。" +
"4.如果某个规格数量为负数,则该规格对应的productCount返回负数。不要影响其他规格" +
"5.如果指令中有“各N件”,则每个尺码数量返回N。\n" +
"6.如果指令中尺码是?码到?码,请完整返回跨度内所有尺码JSON、不要省略中间的尺码。(常见的尺码顺序:S码-M码-L码-XL码-2XL码-3XL码-4XL码-5XL码-6XL码-7XL码......)。\n" +
"7.如果没有识别到\"wholesalePrice\"的内容,则\"wholesalePrice\"赋值\"0\"。\n" +

3
hiver-modules/hiver-mall/src/main/resources/mapper/SaleMapper.xml

@ -931,6 +931,9 @@ trans_company, company_name, product_count, remark, sale_name, company_phone, cr
and create_by = #{createBy}
</if>
)
<if test='startTime !=null and endTime !=null'>
and create_time BETWEEN #{startTime} AND #{endTime}
</if>
and product_id in
<foreach close=")" collection="productIds" item="listItem" open="(" separator=",">
#{listItem}

Loading…
Cancel
Save