feat(car): 添加保单图片字段并优化时间格式化
- 在HjmCar实体类中新增bdImg字段用于存储保单图片- 在HjmCarParam参数类中新增bdImg字段用于查询保单图片 - 优化HjmViolationServiceImpl中的时间格式化逻辑,使用Date替代LocalDateTime
This commit is contained in:
@@ -131,6 +131,7 @@ public class HjmCarController extends BaseController {
|
||||
}
|
||||
hjmCar.setDriverName(loginUser.getRealName());
|
||||
hjmCar.setUserId(loginUser.getUserId());
|
||||
hjmCar.setCode(null);
|
||||
if (hjmCarService.updateById(hjmCar)) {
|
||||
return success("绑定成功");
|
||||
}
|
||||
@@ -330,13 +331,13 @@ public class HjmCarController extends BaseController {
|
||||
@GetMapping("/pageByQQMap")
|
||||
public ApiResult<PageResult<HjmCar>> pageByQQMap(HjmCarParam param) {
|
||||
// 检查必要的坐标参数
|
||||
if (param.getLatitude() == null || param.getLatitude().isEmpty() ||
|
||||
if (param.getLatitude() == null || param.getLatitude().isEmpty() ||
|
||||
param.getLongitude() == null || param.getLongitude().isEmpty()) {
|
||||
// 如果坐标为空,直接返回分页结果
|
||||
param.setLimit(100L);
|
||||
return success(hjmCarService.pageRel(param));
|
||||
}
|
||||
|
||||
|
||||
final DictDataParam dictDataParam = new DictDataParam();
|
||||
dictDataParam.setDictCode("QQMapKey");
|
||||
// final List<DictData> dictDataList = dictDataService.listRel(dictDataParam);
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@@ -93,6 +94,7 @@ public class SdyDealerOrderController extends BaseController {
|
||||
item.setOrderNo(d.getOrderNo());
|
||||
item.setOrderNo(orderNo);
|
||||
item.setOrderPrice(d.getOrderPrice());
|
||||
item.setDegreePrice(d.getOrderPrice().multiply(new BigDecimal(1000)));
|
||||
item.setFirstUserId(d.getFirstUserId());
|
||||
item.setSecondUserId(d.getSecondUserId());
|
||||
item.setThirdUserId(d.getThirdUserId());
|
||||
@@ -101,7 +103,8 @@ public class SdyDealerOrderController extends BaseController {
|
||||
item.setThirdMoney(d.getThirdMoney());
|
||||
item.setTenantId(d.getTenantId());
|
||||
item.setComments(d.getComments());
|
||||
item.setPrice(d.getPrice());
|
||||
// 假设d.getPrice()返回的BigDecimal未设置精度
|
||||
item.setPrice(d.getPrice().divide(new BigDecimal(1000), 3, BigDecimal.ROUND_HALF_UP));
|
||||
item.setSettledPrice(d.getSettledPrice());
|
||||
item.setPayPrice(d.getPayPrice());
|
||||
item.setRate(d.getRate());
|
||||
|
||||
@@ -28,6 +28,9 @@ public class SdyDealerOrderImportParam implements Serializable {
|
||||
@Excel(name = "结算电量")
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
@Excel(name = "换算成度")
|
||||
private BigDecimal degreePrice;
|
||||
|
||||
@Excel(name = "结算金额")
|
||||
private BigDecimal settledPrice;
|
||||
|
||||
|
||||
@@ -53,6 +53,13 @@ public class ShopUserRefereeController extends BaseController {
|
||||
return success(shopUserRefereeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据userId查询推荐人信息")
|
||||
@GetMapping("/getByUserId/{userId}")
|
||||
public ApiResult<ShopUserReferee> getByUserId(@PathVariable("userId") Integer userId) {
|
||||
// 使用关联查询
|
||||
return success(shopUserRefereeService.getByUserIdRel(userId));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopUserReferee:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加用户推荐关系表")
|
||||
|
||||
@@ -46,6 +46,9 @@ public class ShopDealerOrder implements Serializable {
|
||||
@Schema(description = "结算金额")
|
||||
private BigDecimal settledPrice;
|
||||
|
||||
@Schema(description = "换算成度")
|
||||
private BigDecimal degreePrice;
|
||||
|
||||
@Schema(description = "实发金额")
|
||||
private BigDecimal payPrice;
|
||||
|
||||
|
||||
@@ -39,4 +39,5 @@ public interface ShopUserRefereeService extends IService<ShopUserReferee> {
|
||||
*/
|
||||
ShopUserReferee getByIdRel(Integer id);
|
||||
|
||||
ShopUserReferee getByUserIdRel(Integer userId);
|
||||
}
|
||||
|
||||
@@ -44,4 +44,12 @@ public class ShopUserRefereeServiceImpl extends ServiceImpl<ShopUserRefereeMappe
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopUserReferee getByUserIdRel(Integer userId) {
|
||||
ShopUserRefereeParam param = new ShopUserRefereeParam();
|
||||
param.setUserId(userId);
|
||||
param.setLevel(1);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user