diff --git a/hiver-admin/test-output/test-report.html b/hiver-admin/test-output/test-report.html index 50a3e3c7..e5012a3a 100644 --- a/hiver-admin/test-output/test-report.html +++ b/hiver-admin/test-output/test-report.html @@ -35,7 +35,7 @@ Hiver
  • -十一月 06, 2024 09:30:15 +十一月 07, 2024 20:11:47
  • @@ -84,7 +84,7 @@

    passTest

    -

    09:30:15 上午 / 0.016 secs

    +

    20:11:48 下午 / 0.016 secs

    @@ -92,8 +92,8 @@
    #test-id=1
    passTest
    -11.06.2024 09:30:15 -11.06.2024 09:30:15 +11.07.2024 20:11:48 +11.07.2024 20:11:48 0.016 secs
    @@ -104,7 +104,7 @@ Pass - 9:30:15 + 20:11:48 Test passed @@ -128,13 +128,13 @@

    Started

    -

    十一月 06, 2024 09:30:15

    +

    十一月 07, 2024 20:11:47

    Ended

    -

    十一月 06, 2024 09:30:15

    +

    十一月 07, 2024 20:11:48

    diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/CustomerBillSaleVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/CustomerBillSaleVo.java index 8e7d6e81..608f5878 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/CustomerBillSaleVo.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/CustomerBillSaleVo.java @@ -1,9 +1,12 @@ package cc.hiver.mall.bill.vo; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; +import java.util.Date; import java.util.List; /** @@ -59,6 +62,14 @@ public class CustomerBillSaleVo { @ApiModelProperty(value = "浜ゆ槗绫诲瀷锛0:寮鍗曪紱1锛氶璐э紱2锛氬洖娆") private Integer dealingsType; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "浜ゆ槗鏃堕棿") + private Date dealingsTime; + + @ApiModelProperty(value = "浜ゆ槗澶囨敞") + private String dealingsRecordRemark; + @ApiModelProperty(value = "鍒犻櫎鏍囪瘑") private Integer delFlag; diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/SupplierBillPurchaseVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/SupplierBillPurchaseVo.java index d8c54cad..5e52e277 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/SupplierBillPurchaseVo.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/vo/SupplierBillPurchaseVo.java @@ -47,6 +47,12 @@ public class SupplierBillPurchaseVo { @ApiModelProperty(value = "浜ゆ槗绫诲瀷锛0:寮鍗曪紱1锛氶璐э紱2锛氬洖娆") private Integer dealingsType; + @ApiModelProperty(value = "浜ゆ槗鏃堕棿") + private Integer dealingsTime; + + @ApiModelProperty(value = "浜ゆ槗澶囨敞") + private String dealingsRecordRemark; + @ApiModelProperty(value = "鍏ュ簱鏃堕棿锛20240727閲嶆柊瀹氫箟涓哄叆搴撳崟鐨勫垱寤烘椂闂达紝createTime涓哄墠鍙颁紶閫掔殑鍏ュ簱鍗") private String purchaseTime; diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/service/impl/CheckStockDetailServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/service/impl/CheckStockDetailServiceImpl.java index 893dfef5..cfd43fa2 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/service/impl/CheckStockDetailServiceImpl.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/service/impl/CheckStockDetailServiceImpl.java @@ -8,6 +8,8 @@ import cc.hiver.mall.checkstock.service.CheckStockDetailService; import cc.hiver.mall.checkstock.vo.CheckStockAttributeVo; import cc.hiver.mall.checkstock.vo.CheckStockDetailVo; import cc.hiver.mall.deductlog.vo.WorkerDeductLogVo; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.service.mybatis.ProductService; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; @@ -34,6 +36,9 @@ public class CheckStockDetailServiceImpl extends ServiceImpl()); } checkStockPageQuery.setProductIdList(checkStockDetailListOfProduct.getRecords()); - - + // 鏌ヨ鍑烘潵鍟嗗搧淇℃伅锛岃幏鍙栭噰璐环 + List productList = productService.getProductList(checkStockDetailListOfProduct.getRecords()); + // 鍟嗗搧id涓簁ey,鍟嗗搧淇℃伅涓簐alue灏佽琚玬ap + Map productMap = new HashMap<>(); + for (Product product : productList) { + productMap.put(product.getId(),product); + } if (!checkStockPageQuery.getProductIdList().isEmpty()) { final List checkStockDetailList = checkStockDetailMapper.getByCheckStockDetailByCheckIdOfPage(checkStockPageQuery); @@ -187,6 +197,9 @@ public class CheckStockDetailServiceImpl extends ServiceImpl()); final CheckStockAttributeVo attributeVo = new CheckStockAttributeVo(); attributeVo.setAttributeList(detail.getAttributeList()); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/vo/CheckStockDetailVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/vo/CheckStockDetailVo.java index e0e113e1..f097995a 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/vo/CheckStockDetailVo.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/checkstock/vo/CheckStockDetailVo.java @@ -3,6 +3,7 @@ package cc.hiver.mall.checkstock.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.util.List; @Data @@ -23,6 +24,9 @@ public class CheckStockDetailVo { @ApiModelProperty(value = "鍟嗗搧璐у彿") private String productSn; + @ApiModelProperty(value = "閲囪喘浠") + private BigDecimal purchasePrice; + @ApiModelProperty(value = "鍟嗗搧瑙勬牸鏄庣粏") private List checkStockAttributeVos; } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java index 591ae1c7..39fc65eb 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java @@ -171,7 +171,7 @@ public class CommonController { for (String id : ids) { final User user = userService.get(id); // 鍛樺伐淇℃伅 - userService.delete(id); + // userService.delete(id); // 鍛樺伐搴楅摵鍏宠仈淇℃伅 final String shopId = securityUtil.getShopId(); shopUserService.deleteAllByShopIdAndUserId(shopId, id); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CustomerController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CustomerController.java index 2261d2e3..a5c4b93f 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CustomerController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CustomerController.java @@ -13,6 +13,8 @@ import cc.hiver.core.entity.UserRole; import cc.hiver.core.service.RoleService; import cc.hiver.core.service.UserRoleService; import cc.hiver.core.service.UserService; +import cc.hiver.mall.debt.entity.Debt; +import cc.hiver.mall.debt.service.DebtService; import cc.hiver.mall.entity.Customer; import cc.hiver.mall.pojo.dto.DebtCustomer; import cc.hiver.mall.pojo.query.CustomerPageQuery; @@ -54,6 +56,9 @@ public class CustomerController { @Autowired private RoleService roleService; + @Autowired + private DebtService debtService; + @RequestMapping(value = "/save", method = RequestMethod.POST) @ApiOperation("鏂板瀹㈡埛") @Transactional @@ -132,6 +137,12 @@ public class CustomerController { } final boolean result = customerService.updateById(customer); + // 鏇存柊瀹㈡埛娆犳鐨勫悕绉 + final Debt debt = debtService.selectByUserId(customer.getShopId(), customer.getId()); + if(!customer.getName().equals(debt.getUserName())){ + debt.setUserName(customer.getName()); + debtService.updateById(debt); + } if (result) { return ResultUtil.success("淇敼鎴愬姛"); } else { diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java index 5324fed8..d4c666de 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java @@ -334,4 +334,24 @@ public class ShopController { } return ResultUtil.data(shop.getShopIcon()); } + + /** + * 淇敼搴楅摵鐨凷hopIcon + * @author 鐜嬪瘜搴 + * @date 2024/11/7 + * @param shopId + * @param shopIcon + * @return Result + */ + @RequestMapping(value = "/editShopIconById", method = RequestMethod.POST) + @ApiOperation("淇敼搴楅摵鐨凷hopIcon") + public Result editShopIconById(String shopId,String shopIcon) { + if (StringUtils.isEmpty(shopId)) { + return ResultUtil.error("搴楅摵id涓嶈兘涓虹┖"); + } + final Shop shop = shopService.findById(shopId); + shop.setShopIcon(shopIcon); + shopService.update(shop); + return ResultUtil.data(shop); + } } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/entity/Debt.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/entity/Debt.java index 1c860bb9..142e0421 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/entity/Debt.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/entity/Debt.java @@ -3,12 +3,15 @@ package cc.hiver.mall.debt.entity; import cc.hiver.core.base.HiverBaseEntity; import com.baomidou.mybatisplus.annotation.TableField; 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.format.annotation.DateTimeFormat; import javax.persistence.Transient; import java.math.BigDecimal; +import java.util.Date; @Data @ApiModel(value = "娆犳琛") @@ -47,4 +50,16 @@ public class Debt extends HiverBaseEntity { @ApiModelProperty(value = "瀹㈡埛鍒嗙被鍚嶇О") private String categoryName; + @Transient + @TableField(exist = false) + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "浜ゆ槗鏃堕棿") + private Date dealingsTime; + + @Transient + @TableField(exist = false) + @ApiModelProperty(value = "澶囨敞") + private String remark; + } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java index a30156ea..e85f80de 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java @@ -350,6 +350,8 @@ public class DebtServiceImpl extends ServiceImpl implements De dealingsRecord.setAmount(debt.getAmountOwed()); // 鍏呭 dealingsRecord.setDealingsType(dealingsType); + dealingsRecord.setDealingsTime(debt.getDealingsTime()); + dealingsRecord.setRemark(debt.getRemark()); dealingsRecord.setUserType(DealingsRecordConstant.TYPE[1]); dealingsRecordService.save(dealingsRecord); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/DealingsRecord.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/DealingsRecord.java index 2a45dcf9..9f260e29 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/DealingsRecord.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/DealingsRecord.java @@ -2,16 +2,19 @@ package cc.hiver.mall.entity; import cc.hiver.core.base.HiverBaseEntity; 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 lombok.experimental.Accessors; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; +import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.Entity; import javax.persistence.Table; import java.math.BigDecimal; +import java.util.Date; @Data @Accessors(chain = true) @@ -64,4 +67,12 @@ public class DealingsRecord extends HiverBaseEntity { @ApiModelProperty(value = "浜ゆ槗绫诲瀷锛0:寮鍗曪紱1锛氶璐э紱2锛氬洖娆") private Integer dealingsType; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "浜ゆ槗鏃堕棿") + private Date dealingsTime; + + @ApiModelProperty(value = "澶囨敞") + private String remark; + } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java index b907d3d0..8e22eec9 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java @@ -1,5 +1,6 @@ package cc.hiver.mall.pojo.vo; +import cc.hiver.core.base.HiverBasePageQuery; import cc.hiver.core.common.vo.PageVo; import cc.hiver.core.common.vo.SearchDateVo; import io.swagger.annotations.ApiModel; @@ -9,7 +10,7 @@ import lombok.Data; import java.io.Serializable; @Data @ApiModel(value = "閿鍞崟涓昏〃") -public class SaleVO implements Serializable { +public class SaleVO extends HiverBasePageQuery implements Serializable { @ApiModelProperty(value = "閿鍞崟id") private String saleId; diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml index 5d9bd77b..ce0e1cc5 100644 --- a/hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml @@ -21,6 +21,8 @@ + + @@ -85,7 +87,7 @@ id, create_by, create_by_name, create_time, update_time, update_by, del_flag, sale_id, dealings_user_id, dealings_user_name, user_type, amount,dealings_way,balance_due,shop_id, - sale_amount,return_amount,last_debt_amount,dealings_type + sale_amount,return_amount,last_debt_amount,dealings_type,dealings_time,remark @@ -141,6 +143,8 @@ tdr.amount, tdr.balance_due, tdr.dealings_type, + tdr.dealings_time, + tdr.remark as dealings_record_remark, tdr.del_flag, tdr.dealings_user_name, ts.total_amount, @@ -185,6 +189,8 @@ tdr.amount, tdr.balance_due, tdr.dealings_type, + tdr.dealings_time, + tdr.remark as dealings_record_remark, tdr.del_flag, ts.should_pay, ts.balance_deduction_amount, @@ -215,6 +221,8 @@ tdr.amount, tdr.balance_due, tdr.dealings_type, + tdr.dealings_time, + tdr.remark as dealings_record_remark, tdr.del_flag, ts.should_pay, ts.balance_deduction_amount,