瀏覽代碼

managew 产品

master
chenchaod 1 月之前
父節點
當前提交
39ad1df4fe

+ 3
- 3
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/dto/product/product/ProductAddRequestDto.java 查看文件

import lombok.Setter; import lombok.Setter;


import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
/** 违约金 信息 */ /** 违约金 信息 */
@ApiModelProperty(value = "欠费月收比例") @ApiModelProperty(value = "欠费月收比例")
@NotNull @NotNull
@Max(value = 100,message = "比例不能大于100")
private Integer monthlyRate; private Integer monthlyRate;
/** 注销费 信息列表 */ /** 注销费 信息列表 */
@ApiModelProperty(value = "注销年限") @ApiModelProperty(value = "注销年限")
private SecretKeyType deviceType; private SecretKeyType deviceType;
@ApiModelProperty(value = "部中心编号") @ApiModelProperty(value = "部中心编号")
private String centerNo; private String centerNo;
@ApiModelProperty(value = "扣费渠道编号",required = true)
@NotBlank
private String deductionChannelsId;

@ApiModelProperty(value = "车辆性质 1营运 2非营运 3营运和非营运",required = true) @ApiModelProperty(value = "车辆性质 1营运 2非营运 3营运和非营运",required = true)
@NotNull @NotNull
private Integer useCharacter; private Integer useCharacter;

+ 13
- 6
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/product/ProductManagerImpl.java 查看文件

import cn.com.taiji.core.repo.jpa.user.StaffRepo; import cn.com.taiji.core.repo.jpa.user.StaffRepo;
import cn.com.taiji.managew.repo.jpa.request.IssueProductPageRequest; import cn.com.taiji.managew.repo.jpa.request.IssueProductPageRequest;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
} }
issueProduct.setAmount(amount); issueProduct.setAmount(amount);
} }
issueProduct.setExtensionTool(String.join(",", req.getExtensionTool()));
issueProduct.setVanType(String.join(",", req.getVanType()));
issueProduct.setVehiclePalce(String.join(",", req.getVehiclePalce()));
issueProduct.setExtensionTool(String.join(StrUtil.COMMA, req.getExtensionTool()));
issueProduct.setVanType(String.join(StrUtil.COMMA, req.getVanType()));
issueProduct.setVehicleType(String.join(StrUtil.COMMA, req.getVehicleType()));
if (CollectionUtil.isNotEmpty(req.getVehiclePalce())){
issueProduct.setVehiclePalce(String.join(StrUtil.COMMA, req.getVehiclePalce()));
}
Staff staff = staffRepo.findByStaffId(req.getStaffId()); Staff staff = staffRepo.findByStaffId(req.getStaffId());
issueProduct.setOperateUserId(staff.getOpenId()); issueProduct.setOperateUserId(staff.getOpenId());
issueProduct.setOperateUserName(staff.getStaffName()); issueProduct.setOperateUserName(staff.getStaffName());
issueProductPayRepo.deleteByfr(FeeCategory.AFTER, issueProduct.getReleaseId()); issueProductPayRepo.deleteByfr(FeeCategory.AFTER, issueProduct.getReleaseId());
} }
copyProperties(req, issueProduct); copyProperties(req, issueProduct);
issueProduct.setExtensionTool(String.join(",", req.getExtensionTool()));
issueProduct.setVanType(String.join(",", req.getVanType()));
issueProduct.setVehiclePalce(String.join(",", req.getVehiclePalce()));
issueProduct.setExtensionTool(String.join(StrUtil.COMMA, req.getExtensionTool()));
issueProduct.setVanType(String.join(StrUtil.COMMA, req.getVanType()));
issueProduct.setVehicleType(String.join(StrUtil.COMMA, req.getVehicleType()));
if (CollectionUtil.isNotEmpty(req.getVehiclePalce())) {
issueProduct.setVehiclePalce(String.join(StrUtil.COMMA, req.getVehiclePalce()));
}
Staff staff = staffRepo.findByStaffId(req.getStaffId()); Staff staff = staffRepo.findByStaffId(req.getStaffId());
issueProduct.setOperateUserId(staff.getOpenId()); issueProduct.setOperateUserId(staff.getOpenId());
issueProduct.setOperateUserName(staff.getStaffName()); issueProduct.setOperateUserName(staff.getStaffName());

Loading…
取消
儲存