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.setDriverName(loginUser.getRealName());
|
||||||
hjmCar.setUserId(loginUser.getUserId());
|
hjmCar.setUserId(loginUser.getUserId());
|
||||||
|
hjmCar.setCode(null);
|
||||||
if (hjmCarService.updateById(hjmCar)) {
|
if (hjmCarService.updateById(hjmCar)) {
|
||||||
return success("绑定成功");
|
return success("绑定成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -93,6 +94,7 @@ public class SdyDealerOrderController extends BaseController {
|
|||||||
item.setOrderNo(d.getOrderNo());
|
item.setOrderNo(d.getOrderNo());
|
||||||
item.setOrderNo(orderNo);
|
item.setOrderNo(orderNo);
|
||||||
item.setOrderPrice(d.getOrderPrice());
|
item.setOrderPrice(d.getOrderPrice());
|
||||||
|
item.setDegreePrice(d.getOrderPrice().multiply(new BigDecimal(1000)));
|
||||||
item.setFirstUserId(d.getFirstUserId());
|
item.setFirstUserId(d.getFirstUserId());
|
||||||
item.setSecondUserId(d.getSecondUserId());
|
item.setSecondUserId(d.getSecondUserId());
|
||||||
item.setThirdUserId(d.getThirdUserId());
|
item.setThirdUserId(d.getThirdUserId());
|
||||||
@@ -101,7 +103,8 @@ public class SdyDealerOrderController extends BaseController {
|
|||||||
item.setThirdMoney(d.getThirdMoney());
|
item.setThirdMoney(d.getThirdMoney());
|
||||||
item.setTenantId(d.getTenantId());
|
item.setTenantId(d.getTenantId());
|
||||||
item.setComments(d.getComments());
|
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.setSettledPrice(d.getSettledPrice());
|
||||||
item.setPayPrice(d.getPayPrice());
|
item.setPayPrice(d.getPayPrice());
|
||||||
item.setRate(d.getRate());
|
item.setRate(d.getRate());
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ public class SdyDealerOrderImportParam implements Serializable {
|
|||||||
@Excel(name = "结算电量")
|
@Excel(name = "结算电量")
|
||||||
private BigDecimal orderPrice;
|
private BigDecimal orderPrice;
|
||||||
|
|
||||||
|
@Excel(name = "换算成度")
|
||||||
|
private BigDecimal degreePrice;
|
||||||
|
|
||||||
@Excel(name = "结算金额")
|
@Excel(name = "结算金额")
|
||||||
private BigDecimal settledPrice;
|
private BigDecimal settledPrice;
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,13 @@ public class ShopUserRefereeController extends BaseController {
|
|||||||
return success(shopUserRefereeService.getByIdRel(id));
|
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')")
|
@PreAuthorize("hasAuthority('shop:shopUserReferee:save')")
|
||||||
@OperationLog
|
@OperationLog
|
||||||
@Operation(summary = "添加用户推荐关系表")
|
@Operation(summary = "添加用户推荐关系表")
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ public class ShopDealerOrder implements Serializable {
|
|||||||
@Schema(description = "结算金额")
|
@Schema(description = "结算金额")
|
||||||
private BigDecimal settledPrice;
|
private BigDecimal settledPrice;
|
||||||
|
|
||||||
|
@Schema(description = "换算成度")
|
||||||
|
private BigDecimal degreePrice;
|
||||||
|
|
||||||
@Schema(description = "实发金额")
|
@Schema(description = "实发金额")
|
||||||
private BigDecimal payPrice;
|
private BigDecimal payPrice;
|
||||||
|
|
||||||
|
|||||||
@@ -39,4 +39,5 @@ public interface ShopUserRefereeService extends IService<ShopUserReferee> {
|
|||||||
*/
|
*/
|
||||||
ShopUserReferee getByIdRel(Integer id);
|
ShopUserReferee getByIdRel(Integer id);
|
||||||
|
|
||||||
|
ShopUserReferee getByUserIdRel(Integer userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,12 @@ public class ShopUserRefereeServiceImpl extends ServiceImpl<ShopUserRefereeMappe
|
|||||||
return param.getOne(baseMapper.selectListRel(param));
|
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