记账本
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import com.cool.store.entity.TallyBookDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TallyBookDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "加盟商ID")
|
||||
@NotNull(message = "加盟商ID不能为空")
|
||||
@Size(max = 64, message = "加盟商ID长度不能超过64个字符")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty(value = "店铺ID")
|
||||
@NotNull(message = "店铺ID不能为空")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty(value = "年")
|
||||
@NotNull(message = "年不能为空")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty(value = "月")
|
||||
@NotNull(message = "月不能为空")
|
||||
private Integer month;
|
||||
|
||||
@ApiModelProperty(value = "员工工资")
|
||||
@NotNull(message = "员工工资不能为空")
|
||||
private BigDecimal employeeSalary;
|
||||
|
||||
@ApiModelProperty(value = "办公费")
|
||||
@NotNull(message = "办公费不能为空")
|
||||
private BigDecimal administrativeExpenses;
|
||||
|
||||
@ApiModelProperty(value = "差旅费")
|
||||
@NotNull(message = "差旅费不能为空")
|
||||
private BigDecimal travelExpense;
|
||||
|
||||
@ApiModelProperty(value = "促销费")
|
||||
@NotNull(message = "促销费不能为空")
|
||||
private BigDecimal promotionExpense;
|
||||
|
||||
@ApiModelProperty(value = "水电费")
|
||||
@NotNull(message = "水电费不能为空")
|
||||
private BigDecimal utilities;
|
||||
|
||||
@ApiModelProperty(value = "社会保险费")
|
||||
@NotNull(message = "社会保险费不能为空")
|
||||
private BigDecimal socialInsurancePremium;
|
||||
|
||||
@ApiModelProperty(value = "员工宿舍费")
|
||||
@NotNull(message = "员工宿舍费不能为空")
|
||||
private BigDecimal staffDormitoryFee;
|
||||
|
||||
@ApiModelProperty(value = "低值易耗品摊销")
|
||||
@NotNull(message = "低值易耗品摊销不能为空")
|
||||
private BigDecimal consumablesCost;
|
||||
|
||||
@ApiModelProperty(value = "成本合计")
|
||||
@NotNull(message = "成本合计不能为空")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
public TallyBookDO toTallyBookDO() {
|
||||
TallyBookDO tallyBookDO = new TallyBookDO();
|
||||
tallyBookDO.setPartnerId(partnerId);
|
||||
tallyBookDO.setShopId(shopId);
|
||||
tallyBookDO.setYear(year);
|
||||
tallyBookDO.setMonth(month);
|
||||
tallyBookDO.setEmployeeSalary(employeeSalary);
|
||||
tallyBookDO.setAdministrativeExpenses(administrativeExpenses);
|
||||
tallyBookDO.setTravelExpense(travelExpense);
|
||||
tallyBookDO.setPromotionExpense(promotionExpense);
|
||||
tallyBookDO.setUtilities(utilities);
|
||||
tallyBookDO.setSocialInsurancePremium(socialInsurancePremium);
|
||||
tallyBookDO.setStaffDormitoryFee(staffDormitoryFee);
|
||||
tallyBookDO.setConsumablesCost(consumablesCost);
|
||||
tallyBookDO.setTotalCost(totalCost);
|
||||
tallyBookDO.setCreateTime(new Date());
|
||||
tallyBookDO.setUpdateTime(new Date());
|
||||
return tallyBookDO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -154,5 +154,10 @@ public class PointInfoDO {
|
||||
|
||||
@Column(name = "storage_status")
|
||||
private Integer storageStatus;
|
||||
|
||||
|
||||
@Column(name = "opportunity_point_code")
|
||||
private String opportunityPointCode;
|
||||
|
||||
@Column(name = "opportunity_point_name")
|
||||
private String opportunityPointName;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Entity
|
||||
@Table(name = "xfsg_tally_book")
|
||||
@Data
|
||||
public class TallyBookDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "partner_id")
|
||||
private String partnerId;
|
||||
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
@Column(name = "`year`")
|
||||
private Integer year;
|
||||
|
||||
@Column(name = "`month`")
|
||||
private Integer month;
|
||||
|
||||
@Column(name = "employee_salary")
|
||||
private BigDecimal employeeSalary;
|
||||
|
||||
@Column(name = "administrative_expenses", precision = 10, scale = 2)
|
||||
private BigDecimal administrativeExpenses;
|
||||
|
||||
@Column(name = "travel_expense", precision = 10, scale = 2)
|
||||
private BigDecimal travelExpense;
|
||||
|
||||
@Column(name = "promotion_expense", precision = 10, scale = 2)
|
||||
private BigDecimal promotionExpense;
|
||||
|
||||
@Column(name = "utilities", precision = 10, scale = 2)
|
||||
private BigDecimal utilities;
|
||||
|
||||
@Column(name = "social_insurance_premium", precision = 10, scale = 2)
|
||||
private BigDecimal socialInsurancePremium;
|
||||
|
||||
@Column(name = "staff_dormitory_fee", precision = 10, scale = 2)
|
||||
private BigDecimal staffDormitoryFee;
|
||||
|
||||
@Column(name = "consumables_cost", precision = 10, scale = 2)
|
||||
private BigDecimal consumablesCost;
|
||||
|
||||
@Column(name = "total_cost", precision = 10, scale = 2)
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "create_user", length = 255)
|
||||
private String createUser;
|
||||
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@Column(name = "update_user", length = 255)
|
||||
private String updateUser;
|
||||
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -85,6 +86,12 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("街道")
|
||||
private String township;
|
||||
|
||||
@ApiModelProperty("机会点编号")
|
||||
private String opportunityPointCode;
|
||||
|
||||
@ApiModelProperty("机会点名称")
|
||||
private String opportunityPointName;
|
||||
|
||||
|
||||
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.TallyBookDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TallyBookRequest {
|
||||
|
||||
@ApiModelProperty(value = "主键id,修改时候传")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "加盟商ID")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty(value = "店铺ID", required = true)
|
||||
@NotNull(message = "店铺ID不能为空")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty(value = "年", required = true)
|
||||
@NotNull(message = "年不能为空")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty(value = "月", required = true)
|
||||
@NotNull(message = "月不能为空")
|
||||
private Integer month;
|
||||
|
||||
@ApiModelProperty(value = "员工工资", required = true)
|
||||
@NotNull(message = "员工工资不能为空")
|
||||
private BigDecimal employeeSalary;
|
||||
|
||||
@ApiModelProperty(value = "办公费", required = true)
|
||||
@NotNull(message = "办公费不能为空")
|
||||
private BigDecimal administrativeExpenses;
|
||||
|
||||
@ApiModelProperty(value = "差旅费", required = true)
|
||||
@NotNull(message = "差旅费不能为空")
|
||||
private BigDecimal travelExpense;
|
||||
|
||||
@ApiModelProperty(value = "促销费", required = true)
|
||||
@NotNull(message = "促销费不能为空")
|
||||
private BigDecimal promotionExpense;
|
||||
|
||||
@ApiModelProperty(value = "水电费", required = true)
|
||||
@NotNull(message = "水电费不能为空")
|
||||
private BigDecimal utilities;
|
||||
|
||||
@ApiModelProperty(value = "社会保险费", required = true)
|
||||
@NotNull(message = "社会保险费不能为空")
|
||||
private BigDecimal socialInsurancePremium;
|
||||
|
||||
@ApiModelProperty(value = "员工宿舍费", required = true)
|
||||
@NotNull(message = "员工宿舍费不能为空")
|
||||
private BigDecimal staffDormitoryFee;
|
||||
|
||||
@ApiModelProperty(value = "低值易耗品摊销", required = true)
|
||||
@NotNull(message = "低值易耗品摊销不能为空")
|
||||
private BigDecimal consumablesCost;
|
||||
|
||||
@ApiModelProperty(value = "成本合计", required = true)
|
||||
@NotNull(message = "成本合计不能为空")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
public TallyBookDO toTallyBookDO() {
|
||||
TallyBookDO tallyBookDO = new TallyBookDO();
|
||||
tallyBookDO.setPartnerId(partnerId);
|
||||
tallyBookDO.setShopId(shopId);
|
||||
tallyBookDO.setYear(year);
|
||||
tallyBookDO.setMonth(month);
|
||||
tallyBookDO.setEmployeeSalary(employeeSalary);
|
||||
tallyBookDO.setAdministrativeExpenses(administrativeExpenses);
|
||||
tallyBookDO.setTravelExpense(travelExpense);
|
||||
tallyBookDO.setPromotionExpense(promotionExpense);
|
||||
tallyBookDO.setUtilities(utilities);
|
||||
tallyBookDO.setSocialInsurancePremium(socialInsurancePremium);
|
||||
tallyBookDO.setStaffDormitoryFee(staffDormitoryFee);
|
||||
tallyBookDO.setConsumablesCost(consumablesCost);
|
||||
tallyBookDO.setTotalCost(totalCost);
|
||||
tallyBookDO.setCreateTime(new Date());
|
||||
tallyBookDO.setUpdateTime(new Date());
|
||||
return tallyBookDO;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user