修改系统
This commit is contained in:
		| @@ -0,0 +1,22 @@ | ||||
| package com.stdiet.custom.controller; | ||||
|  | ||||
| import com.github.pagehelper.PageInfo; | ||||
| import com.stdiet.common.constant.HttpStatus; | ||||
| import com.stdiet.common.core.controller.BaseController; | ||||
| import com.stdiet.custom.page.OrderTableDataInfo; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.List; | ||||
|  | ||||
| public class OrderBaseController extends BaseController { | ||||
|  | ||||
|     protected OrderTableDataInfo getOrderDataTable(List<?> list, BigDecimal totalAmount) { | ||||
|         OrderTableDataInfo rspData = new OrderTableDataInfo(); | ||||
|         rspData.setCode(HttpStatus.SUCCESS); | ||||
|         rspData.setMsg("查询成功"); | ||||
|         rspData.setRows(list); | ||||
|         rspData.setTotalAmount(totalAmount); | ||||
|         rspData.setTotal(new PageInfo(list).getTotal()); | ||||
|         return rspData; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,82 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
|  | ||||
| import java.io.Serializable; | ||||
|  | ||||
| public class CusUserPost implements Serializable { | ||||
|  | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     private Long userId; | ||||
|  | ||||
|     private String userName; | ||||
|  | ||||
|     private String postCode; | ||||
|  | ||||
|     private String postId; | ||||
|  | ||||
|     private String postName; | ||||
|  | ||||
|     private String remark; | ||||
|  | ||||
|     public void setRemark(String remark) { | ||||
|         this.remark = remark; | ||||
|     } | ||||
|  | ||||
|     public String getRemark() { | ||||
|         return remark; | ||||
|     } | ||||
|  | ||||
|     public void setPostName(String postName) { | ||||
|         this.postName = postName; | ||||
|     } | ||||
|  | ||||
|     public String getPostName() { | ||||
|         return postName; | ||||
|     } | ||||
|  | ||||
|     public String getPostCode() { | ||||
|         return postCode; | ||||
|     } | ||||
|  | ||||
|     public Long getUserId() { | ||||
|         return userId; | ||||
|     } | ||||
|  | ||||
|     public String getUserName() { | ||||
|         return userName; | ||||
|     } | ||||
|  | ||||
|     public void setPostCode(String postCode) { | ||||
|         this.postCode = postCode; | ||||
|     } | ||||
|  | ||||
|     public void setUserId(Long userId) { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public void setUserName(String userName) { | ||||
|         this.userName = userName; | ||||
|     } | ||||
|  | ||||
|     public String getPostId() { | ||||
|         return postId; | ||||
|     } | ||||
|  | ||||
|     public void setPostId(String postId) { | ||||
|         this.postId = postId; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return "UserPostOption{" + | ||||
|                 "userId=" + userId + | ||||
|                 ", userName='" + userName + '\'' + | ||||
|                 ", postCode='" + postCode + '\'' + | ||||
|                 ", postid='" + postId + '\'' + | ||||
|                 ", postName='" + postName + '\'' + | ||||
|                 ", remark='" + remark + '\'' + | ||||
|                 '}'; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,143 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
|  | ||||
| /** | ||||
|  * 业务提成比例对象 sys_commision | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public class SysCommision extends BaseEntity { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|      * 编号 | ||||
|      */ | ||||
|     private Long ruleId; | ||||
|  | ||||
|     /** | ||||
|      * 业务员 | ||||
|      */ | ||||
|     private Long userId; | ||||
|  | ||||
|     /** | ||||
|      * 岗位id | ||||
|      */ | ||||
|     private Long postId; | ||||
|  | ||||
|     /** | ||||
|      * 业务员 | ||||
|      */ | ||||
|     @Excel(name = "业务员") | ||||
|     private String userName; | ||||
|  | ||||
|     @Excel(name = "岗位") | ||||
|     private String postName; | ||||
|  | ||||
|     /** | ||||
|      * 金额 | ||||
|      */ | ||||
|     @Excel(name = "金额", scale = 2) | ||||
|     private BigDecimal amount; | ||||
|  | ||||
|     /** | ||||
|      * 分成比例 | ||||
|      */ | ||||
|     @Excel(name = "比例", suffix = "%") | ||||
|     private Float rate; | ||||
|  | ||||
|     /** | ||||
|      * 提成 | ||||
|      */ | ||||
|     @Excel(name = "提成", scale = 2) | ||||
|     private BigDecimal commision; | ||||
|  | ||||
|     public BigDecimal getCommision() { | ||||
|         return commision; | ||||
|     } | ||||
|  | ||||
|     public void setCommision(BigDecimal commision) { | ||||
|         this.commision = commision; | ||||
|     } | ||||
|  | ||||
|     public Long getPostId() { | ||||
|         return postId; | ||||
|     } | ||||
|  | ||||
|     public void setPostId(Long postId) { | ||||
|         this.postId = postId; | ||||
|     } | ||||
|  | ||||
|     public void setPostName(String postName) { | ||||
|         this.postName = postName; | ||||
|     } | ||||
|  | ||||
|     public String getPostName() { | ||||
|         return postName; | ||||
|     } | ||||
|  | ||||
|     public void setRuleId(Long ruleId) { | ||||
|         this.ruleId = ruleId; | ||||
|     } | ||||
|  | ||||
|     public Long getRuleId() { | ||||
|         return ruleId; | ||||
|     } | ||||
|  | ||||
|     public void setUserId(Long userId) { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public Long getUserId() { | ||||
|         return userId; | ||||
|     } | ||||
|  | ||||
|     public void setUserName(String userName) { | ||||
|         this.userName = userName; | ||||
|     } | ||||
|  | ||||
|     public String getUserName() { | ||||
|         return userName; | ||||
|     } | ||||
|  | ||||
|     public void setAmount(BigDecimal amount) { | ||||
|         this.amount = amount; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getAmount() { | ||||
|         return amount; | ||||
|     } | ||||
|  | ||||
|     public void setRate(Float rate) { | ||||
|         this.rate = rate; | ||||
|     } | ||||
|  | ||||
|     public Float getRate() { | ||||
|         return rate; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("ruleId", getRuleId()) | ||||
|                 .append("userId", getUserId()) | ||||
|                 .append("userName", getUserName()) | ||||
|                 .append("postId", getPostId()) | ||||
|                 .append("postName", getPostName()) | ||||
|                 .append("amount", getAmount()) | ||||
|                 .append("commision", getCommision()) | ||||
|                 .append("rate", getRate()) | ||||
|                 .append("createBy", getCreateBy()) | ||||
|                 .append("createTime", getCreateTime()) | ||||
|                 .append("updateBy", getUpdateBy()) | ||||
|                 .append("updateTime", getUpdateTime()) | ||||
|                 .append("remark", getRemark()) | ||||
|                 .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,223 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
|  | ||||
| /** | ||||
|  * 合同对象 sys_contract | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| public class SysContract extends BaseEntity { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|      * 合同编号 | ||||
|      */ | ||||
|     @Excel(name = "合同编号") | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 客户姓名 | ||||
|      */ | ||||
|     @Excel(name = "客户姓名") | ||||
|     private String name; | ||||
|  | ||||
|     /** | ||||
|      * 客户签名 | ||||
|      */ | ||||
|     private String signName; | ||||
|  | ||||
|     /** | ||||
|      * 客户身份证 | ||||
|      */ | ||||
|     private String cusId; | ||||
|  | ||||
|     /** | ||||
|      * 电话 | ||||
|      */ | ||||
|     @Excel(name = "电话") | ||||
|     private String phone; | ||||
|  | ||||
|     /** | ||||
|      * 服务时间 | ||||
|      */ | ||||
|     @Excel(name = "服务时间") | ||||
|     private int serveTime; | ||||
|  | ||||
|     private String serveTimeStr; | ||||
|  | ||||
|     /** | ||||
|      * 金额 | ||||
|      */ | ||||
|     @Excel(name = "金额") | ||||
|     private BigDecimal amount; | ||||
|  | ||||
|     private String amountUpper; | ||||
|  | ||||
|     /** | ||||
|      * 文件路径 | ||||
|      */ | ||||
|     @Excel(name = "文件路径") | ||||
|     private String path; | ||||
|  | ||||
|     /** | ||||
|      * 签约日期 | ||||
|      */ | ||||
|     private String signDate; | ||||
|  | ||||
|     /** | ||||
|      * 营养师 | ||||
|      */ | ||||
|     private String tutor; | ||||
|  | ||||
|     /** | ||||
|      * 合同状态 | ||||
|      * 0-未签订;1-已签订 | ||||
|      */ | ||||
|     private String Status; | ||||
|  | ||||
|     private String servePromise; | ||||
|  | ||||
|     public String getSignName() { | ||||
|         return signName; | ||||
|     } | ||||
|  | ||||
|     public void setSignName(String signName) { | ||||
|         this.signName = signName; | ||||
|     } | ||||
|  | ||||
|     public String getTutor() { | ||||
|         return tutor; | ||||
|     } | ||||
|  | ||||
|     public void setTutor(String tutor) { | ||||
|         this.tutor = tutor; | ||||
|     } | ||||
|  | ||||
|     public String getServePromise() { | ||||
|         return servePromise; | ||||
|     } | ||||
|  | ||||
|     public void setServePromise(String servePromise) { | ||||
|         this.servePromise = servePromise; | ||||
|     } | ||||
|  | ||||
|     public Long getId() { | ||||
|         return id; | ||||
|     } | ||||
|  | ||||
|     public void setId(Long id) { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public String getName() { | ||||
|         return name; | ||||
|     } | ||||
|  | ||||
|     public void setName(String name) { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public String getPhone() { | ||||
|         return phone; | ||||
|     } | ||||
|  | ||||
|     public void setPhone(String phone) { | ||||
|         this.phone = phone; | ||||
|     } | ||||
|  | ||||
|     public int getServeTime() { | ||||
|         return serveTime; | ||||
|     } | ||||
|  | ||||
|     public void setServeTime(int serveTime) { | ||||
|         this.serveTime = serveTime; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getAmount() { | ||||
|         return amount; | ||||
|     } | ||||
|  | ||||
|     public void setAmount(BigDecimal amount) { | ||||
|         this.amount = amount; | ||||
|     } | ||||
|  | ||||
|     public String getAmountUpper() { | ||||
|         return amountUpper; | ||||
|     } | ||||
|  | ||||
|     public void setAmountUpper(String amountUpper) { | ||||
|         this.amountUpper = amountUpper; | ||||
|     } | ||||
|  | ||||
|     public String getPath() { | ||||
|         return path; | ||||
|     } | ||||
|  | ||||
|     public void setPath(String path) { | ||||
|         this.path = path; | ||||
|     } | ||||
|  | ||||
|     public String getStatus() { | ||||
|         return Status; | ||||
|     } | ||||
|  | ||||
|     public void setStatus(String status) { | ||||
|         Status = status; | ||||
|     } | ||||
|  | ||||
|     public String getCusId() { | ||||
|         return cusId; | ||||
|     } | ||||
|  | ||||
|     public void setCusId(String cusId) { | ||||
|         this.cusId = cusId; | ||||
|     } | ||||
|  | ||||
|     public String getSignDate() { | ||||
|         return signDate; | ||||
|     } | ||||
|  | ||||
|     public void setSignDate(String signDate) { | ||||
|         this.signDate = signDate; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     public String getServeTimeStr() { | ||||
|         return serveTimeStr; | ||||
|     } | ||||
|  | ||||
|     public void setServeTimeStr(String serveTimeStr) { | ||||
|         this.serveTimeStr = serveTimeStr; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("id", getId()) | ||||
|                 .append("name", getName()) | ||||
|                 .append("cusId", getCusId()) | ||||
|                 .append("status", getStatus()) | ||||
|                 .append("phone", getPhone()) | ||||
|                 .append("serveTime", getServeTime()) | ||||
|                 .append("amount", getAmount()) | ||||
|                 .append("amountUpper", getAmountUpper()) | ||||
|                 .append("signDate", getSignDate()) | ||||
|                 .append("path", getPath()) | ||||
|                 .append("createBy", getCreateBy()) | ||||
|                 .append("tutor", getTutor()) | ||||
|                 .append("createTime", getCreateTime()) | ||||
|                 .append("updateBy", getUpdateBy()) | ||||
|                 .append("updateTime", getUpdateTime()) | ||||
|                 .append("remark", getRemark()) | ||||
|                 .append("signName", getSignName()) | ||||
|  | ||||
|                 .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,447 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.Date; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonFormat; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
|  | ||||
| /** | ||||
|  * 销售订单对象 sys_order | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public class SysOrder extends BaseEntity { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|      * 编号 | ||||
|      */ | ||||
|     @Excel(name = "编号") | ||||
|     private Long orderId; | ||||
|  | ||||
|     /** | ||||
|      * 客户姓名 | ||||
|      */ | ||||
|     @Excel(name = "客户姓名") | ||||
|     private String customer; | ||||
|  | ||||
|     /** | ||||
|      * 电话 | ||||
|      */ | ||||
|     @Excel(name = "电话") | ||||
|     private String phone; | ||||
|  | ||||
|     /** | ||||
|      * 金额 | ||||
|      */ | ||||
|     @Excel(name = "金额") | ||||
|     private BigDecimal amount; | ||||
|  | ||||
|     /** | ||||
|      * 收款方式 | ||||
|      */ | ||||
|     private Long payTypeId; | ||||
|  | ||||
|     /** | ||||
|      * 收款方式 | ||||
|      */ | ||||
|     @Excel(name = "收款方式") | ||||
|     private String payType; | ||||
|  | ||||
|     /** | ||||
|      * 售前 | ||||
|      */ | ||||
|     private Long preSaleId; | ||||
|  | ||||
|     /** | ||||
|      * 售前 | ||||
|      */ | ||||
|     @Excel(name = "售前") | ||||
|     private String preSale; | ||||
|  | ||||
|     /** | ||||
|      * 售后 | ||||
|      */ | ||||
|     private Long afterSaleId; | ||||
|  | ||||
|     /** | ||||
|      * 售后 | ||||
|      */ | ||||
|     @Excel(name = "售后") | ||||
|     private String afterSale; | ||||
|  | ||||
|     /** | ||||
|      * 营养师 | ||||
|      */ | ||||
|     private Long nutritionistId; | ||||
|  | ||||
|     /** | ||||
|      * 营养师 | ||||
|      */ | ||||
|     @Excel(name = "营养师") | ||||
|     private String nutritionist; | ||||
|  | ||||
|     /** | ||||
|      * 助理营养师 | ||||
|      */ | ||||
|     private Long nutriAssisId; | ||||
|  | ||||
|     /** | ||||
|      * 助理营养师 | ||||
|      */ | ||||
|     @Excel(name = "助理营养师") | ||||
|     private String nutriAssis; | ||||
|  | ||||
|     /** | ||||
|      * 账号 | ||||
|      */ | ||||
|     private Long accountId; | ||||
|  | ||||
|     /** | ||||
|      * 账号 | ||||
|      */ | ||||
|     @Excel(name = "账号") | ||||
|     private String account; | ||||
|  | ||||
|     /** | ||||
|      * 策划 | ||||
|      */ | ||||
|     private Long plannerId; | ||||
|  | ||||
|     /** | ||||
|      * 策划 | ||||
|      */ | ||||
|     @Excel(name = "策划") | ||||
|     private String planner; | ||||
|  | ||||
|     /** | ||||
|      * 策划助理 | ||||
|      */ | ||||
|     private Long plannerAssisId; | ||||
|  | ||||
|     /** | ||||
|      * 策划助理 | ||||
|      */ | ||||
|     @Excel(name = "策划助理") | ||||
|     private String plannerAssis; | ||||
|  | ||||
|     /** | ||||
|      * 运营 | ||||
|      */ | ||||
|     private Long operatorId; | ||||
|  | ||||
|     /** | ||||
|      * 运营 | ||||
|      */ | ||||
|     @Excel(name = "运营") | ||||
|     private String operator; | ||||
|  | ||||
|     /** | ||||
|      * 运营助理 | ||||
|      */ | ||||
|     private Long operatorAssisId; | ||||
|  | ||||
|     @Excel(name = "运营助理") | ||||
|     private String operatorAssis; | ||||
|  | ||||
|     /** | ||||
|      * 推荐人 | ||||
|      */ | ||||
|     @Excel(name = "推荐人") | ||||
|     private String recommender; | ||||
|  | ||||
|     /** | ||||
|      * 服务月数 | ||||
|      */ | ||||
|     @Excel(name = "服务时长") | ||||
|     private String serveTime; | ||||
|  | ||||
|     private Long serveTimeId; | ||||
|  | ||||
|     @Excel(name = "审核状态", dictType = "cus_review_status") | ||||
|     private String reviewStatus; | ||||
|  | ||||
|     /** | ||||
|      * 成交日期 | ||||
|      */ | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||||
|     @Excel(name = "成交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") | ||||
|     private Date orderTime; | ||||
|  | ||||
|     public String getServeTime() { | ||||
|         return serveTime; | ||||
|     } | ||||
|  | ||||
|     public void setServeTimeId(Long serveTimeId) { | ||||
|         this.serveTimeId = serveTimeId; | ||||
|     } | ||||
|  | ||||
|     public Long getServeTimeId() { | ||||
|         return serveTimeId; | ||||
|     } | ||||
|  | ||||
|     public void setServeTime(String serveTime) { | ||||
|         this.serveTime = serveTime; | ||||
|     } | ||||
|  | ||||
|     public void setOperatorAssis(String operatorAssis) { | ||||
|         this.operatorAssis = operatorAssis; | ||||
|     } | ||||
|  | ||||
|     public void setOperatorAssisId(Long operatorAssisId) { | ||||
|         this.operatorAssisId = operatorAssisId; | ||||
|     } | ||||
|  | ||||
|     public Long getOperatorAssisId() { | ||||
|         return operatorAssisId; | ||||
|     } | ||||
|  | ||||
|     public String getOperatorAssis() { | ||||
|         return operatorAssis; | ||||
|     } | ||||
|  | ||||
|     public String getReviewStatus() { | ||||
|         return reviewStatus; | ||||
|     } | ||||
|  | ||||
|     public void setReviewStatus(String reviewStatus) { | ||||
|         this.reviewStatus = reviewStatus; | ||||
|     } | ||||
|  | ||||
|     public void setOrderId(Long orderId) { | ||||
|         this.orderId = orderId; | ||||
|     } | ||||
|  | ||||
|     public Long getOrderId() { | ||||
|         return orderId; | ||||
|     } | ||||
|  | ||||
|     public void setCustomer(String customer) { | ||||
|         this.customer = customer; | ||||
|     } | ||||
|  | ||||
|     public String getCustomer() { | ||||
|         return customer; | ||||
|     } | ||||
|  | ||||
|     public void setPhone(String phone) { | ||||
|         this.phone = phone; | ||||
|     } | ||||
|  | ||||
|     public String getPhone() { | ||||
|         return phone; | ||||
|     } | ||||
|  | ||||
|     public void setAmount(BigDecimal amount) { | ||||
|         this.amount = amount; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getAmount() { | ||||
|         return amount; | ||||
|     } | ||||
|  | ||||
|     public void setPayTypeId(Long payTypeId) { | ||||
|         this.payTypeId = payTypeId; | ||||
|     } | ||||
|  | ||||
|     public Long getPayTypeId() { | ||||
|         return payTypeId; | ||||
|     } | ||||
|  | ||||
|     public void setPayType(String payType) { | ||||
|         this.payType = payType; | ||||
|     } | ||||
|  | ||||
|     public String getPayType() { | ||||
|         return payType; | ||||
|     } | ||||
|  | ||||
|     public void setPreSaleId(Long preSaleId) { | ||||
|         this.preSaleId = preSaleId; | ||||
|     } | ||||
|  | ||||
|     public Long getPreSaleId() { | ||||
|         return preSaleId; | ||||
|     } | ||||
|  | ||||
|     public void setPreSale(String preSale) { | ||||
|         this.preSale = preSale; | ||||
|     } | ||||
|  | ||||
|     public String getPreSale() { | ||||
|         return preSale; | ||||
|     } | ||||
|  | ||||
|     public void setAfterSaleId(Long afterSaleId) { | ||||
|         this.afterSaleId = afterSaleId; | ||||
|     } | ||||
|  | ||||
|     public Long getAfterSaleId() { | ||||
|         return afterSaleId; | ||||
|     } | ||||
|  | ||||
|     public void setAfterSale(String afterSale) { | ||||
|         this.afterSale = afterSale; | ||||
|     } | ||||
|  | ||||
|     public String getAfterSale() { | ||||
|         return afterSale; | ||||
|     } | ||||
|  | ||||
|     public void setNutritionistId(Long nutritionistId) { | ||||
|         this.nutritionistId = nutritionistId; | ||||
|     } | ||||
|  | ||||
|     public Long getNutritionistId() { | ||||
|         return nutritionistId; | ||||
|     } | ||||
|  | ||||
|     public void setNutritionist(String nutritionist) { | ||||
|         this.nutritionist = nutritionist; | ||||
|     } | ||||
|  | ||||
|     public String getNutritionist() { | ||||
|         return nutritionist; | ||||
|     } | ||||
|  | ||||
|     public void setNutriAssisId(Long nutriAssisId) { | ||||
|         this.nutriAssisId = nutriAssisId; | ||||
|     } | ||||
|  | ||||
|     public Long getNutriAssisId() { | ||||
|         return nutriAssisId; | ||||
|     } | ||||
|  | ||||
|     public void setNutriAssis(String nutriAssis) { | ||||
|         this.nutriAssis = nutriAssis; | ||||
|     } | ||||
|  | ||||
|     public String getNutriAssis() { | ||||
|         return nutriAssis; | ||||
|     } | ||||
|  | ||||
|     public void setAccountId(Long accountId) { | ||||
|         this.accountId = accountId; | ||||
|     } | ||||
|  | ||||
|     public Long getAccountId() { | ||||
|         return accountId; | ||||
|     } | ||||
|  | ||||
|     public void setAccount(String account) { | ||||
|         this.account = account; | ||||
|     } | ||||
|  | ||||
|     public String getAccount() { | ||||
|         return account; | ||||
|     } | ||||
|  | ||||
|     public void setPlannerId(Long plannerId) { | ||||
|         this.plannerId = plannerId; | ||||
|     } | ||||
|  | ||||
|     public Long getPlannerId() { | ||||
|         return plannerId; | ||||
|     } | ||||
|  | ||||
|     public void setPlanner(String planner) { | ||||
|         this.planner = planner; | ||||
|     } | ||||
|  | ||||
|     public String getPlanner() { | ||||
|         return planner; | ||||
|     } | ||||
|  | ||||
|     public void setPlannerAssisId(Long plannerAssisId) { | ||||
|         this.plannerAssisId = plannerAssisId; | ||||
|     } | ||||
|  | ||||
|     public Long getPlannerAssisId() { | ||||
|         return plannerAssisId; | ||||
|     } | ||||
|  | ||||
|     public void setPlannerAssis(String plannerAssis) { | ||||
|         this.plannerAssis = plannerAssis; | ||||
|     } | ||||
|  | ||||
|     public String getPlannerAssis() { | ||||
|         return plannerAssis; | ||||
|     } | ||||
|  | ||||
|     public void setOperatorId(Long operatorId) { | ||||
|         this.operatorId = operatorId; | ||||
|     } | ||||
|  | ||||
|     public Long getOperatorId() { | ||||
|         return operatorId; | ||||
|     } | ||||
|  | ||||
|     public void setOperator(String operator) { | ||||
|         this.operator = operator; | ||||
|     } | ||||
|  | ||||
|     public String getOperator() { | ||||
|         return operator; | ||||
|     } | ||||
|  | ||||
|     public void setRecommender(String recommender) { | ||||
|         this.recommender = recommender; | ||||
|     } | ||||
|  | ||||
|     public String getRecommender() { | ||||
|         return recommender; | ||||
|     } | ||||
|  | ||||
|     public void setOrderTime(Date orderTime) { | ||||
|         this.orderTime = orderTime; | ||||
|     } | ||||
|  | ||||
|     public Date getOrderTime() { | ||||
|         return orderTime; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("orderId", getOrderId()) | ||||
|                 .append("customer", getCustomer()) | ||||
|                 .append("phone", getPhone()) | ||||
|                 .append("amount", getAmount()) | ||||
|                 .append("payTypeId", getPayTypeId()) | ||||
|                 .append("payType", getPayType()) | ||||
|                 .append("preSaleId", getPreSaleId()) | ||||
|                 .append("createBy", getCreateBy()) | ||||
|                 .append("preSale", getPreSale()) | ||||
|                 .append("createTime", getCreateTime()) | ||||
|                 .append("afterSaleId", getAfterSaleId()) | ||||
|                 .append("updateBy", getUpdateBy()) | ||||
|                 .append("afterSale", getAfterSale()) | ||||
|                 .append("updateTime", getUpdateTime()) | ||||
|                 .append("nutritionistId", getNutritionistId()) | ||||
|                 .append("remark", getRemark()) | ||||
|                 .append("nutritionist", getNutritionist()) | ||||
|                 .append("nutriAssisId", getNutriAssisId()) | ||||
|                 .append("nutriAssis", getNutriAssis()) | ||||
|                 .append("accountId", getAccountId()) | ||||
|                 .append("account", getAccount()) | ||||
|                 .append("plannerId", getPlannerId()) | ||||
|                 .append("planner", getPlanner()) | ||||
|                 .append("plannerAssisId", getPlannerAssisId()) | ||||
|                 .append("plannerAssis", getPlannerAssis()) | ||||
|                 .append("operatorId", getOperatorId()) | ||||
|                 .append("operator", getOperator()) | ||||
|                 .append("operatorAssisId", getOperatorAssisId()) | ||||
|                 .append("operatorAssis", getOperatorAssis()) | ||||
|                 .append("recommender", getRecommender()) | ||||
|                 .append("orderTime", getOrderTime()) | ||||
|                 .append("serveTimeId", getServeTimeId()) | ||||
|                 .append("serveTime", getServeTime()) | ||||
|                 .append("reviewStatus", getReviewStatus()) | ||||
|                 .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,9 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import java.io.Serializable; | ||||
|  | ||||
| public class WxPush implements Serializable { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|  | ||||
| } | ||||
| @@ -0,0 +1,9 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import com.stdiet.custom.domain.CusUserPost; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| public interface CusUserPostMapper { | ||||
|     public List<CusUserPost> selectAllCusUserPost(); | ||||
| } | ||||
| @@ -0,0 +1,63 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCommision; | ||||
|  | ||||
| /** | ||||
|  * 业务提成比例Mapper接口 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public interface SysCommisionMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例ID | ||||
|      * @return 业务提成比例 | ||||
|      */ | ||||
|     public SysCommision selectSysCommisionById(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 查询业务提成比例列表 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 业务提成比例集合 | ||||
|      */ | ||||
|     public List<SysCommision> selectSysCommisionList(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 新增业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCommision(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 修改业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCommision(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 删除业务提成比例 | ||||
|      *  | ||||
|      * @param ruleId 业务提成比例ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCommisionById(Long ruleId); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除业务提成比例 | ||||
|      *  | ||||
|      * @param ruleIds 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCommisionByIds(Long[] ruleIds); | ||||
|  | ||||
|     public List<SysCommision> selectSysCommisionDetail(SysCommision sysCommision); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysContract; | ||||
|  | ||||
| /** | ||||
|  * 合同Mapper接口 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| public interface SysContractMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询合同 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     public SysContract selectSysContractById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询合同列表 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 合同集合 | ||||
|      */ | ||||
|     public List<SysContract> selectSysContractList(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 新增合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 修改合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 删除合同 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除合同 | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,69 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysOrder; | ||||
|  | ||||
| /** | ||||
|  * 销售订单Mapper接口 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public interface SysOrderMapper | ||||
| { | ||||
|     /** | ||||
|      * 查询销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     public SysOrder selectSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单列表 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 销售订单集合 | ||||
|      */ | ||||
|     public List<SysOrder> selectSysOrderList(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 新增销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 修改销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 删除销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除销售订单 | ||||
|      * | ||||
|      * @param orderIds 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderByIds(Long[] orderIds); | ||||
|  | ||||
|     /** | ||||
|      * 计算所有订单总额 | ||||
|      * @param sysOrder | ||||
|      * @return | ||||
|      */ | ||||
|     public BigDecimal selectAllOrderAmount(SysOrder sysOrder); | ||||
| } | ||||
| @@ -0,0 +1,92 @@ | ||||
| package com.stdiet.custom.page; | ||||
|  | ||||
|  | ||||
| import java.io.Serializable; | ||||
| import java.math.BigDecimal; | ||||
| import java.util.List; | ||||
|  | ||||
| public class OrderTableDataInfo implements Serializable { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** | ||||
|      * 总记录数 | ||||
|      */ | ||||
|     private long total; | ||||
|  | ||||
|     /** | ||||
|      * 列表数据 | ||||
|      */ | ||||
|     private List<?> rows; | ||||
|  | ||||
|     /** | ||||
|      * 消息状态码 | ||||
|      */ | ||||
|     private int code; | ||||
|  | ||||
|     /** | ||||
|      * 消息内容 | ||||
|      */ | ||||
|     private String msg; | ||||
|  | ||||
|     /** | ||||
|      * 金额总数 | ||||
|      */ | ||||
|     private BigDecimal totalAmount; | ||||
|  | ||||
|     /** | ||||
|      * 表格数据对象 | ||||
|      */ | ||||
|     public OrderTableDataInfo() { | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 分页 | ||||
|      * | ||||
|      * @param list  列表数据 | ||||
|      * @param total 总记录数 | ||||
|      */ | ||||
|     public OrderTableDataInfo(List<?> list, int total) { | ||||
|         this.rows = list; | ||||
|         this.total = total; | ||||
|     } | ||||
|  | ||||
|     public long getTotal() { | ||||
|         return total; | ||||
|     } | ||||
|  | ||||
|     public void setTotal(long total) { | ||||
|         this.total = total; | ||||
|     } | ||||
|  | ||||
|     public List<?> getRows() { | ||||
|         return rows; | ||||
|     } | ||||
|  | ||||
|     public void setRows(List<?> rows) { | ||||
|         this.rows = rows; | ||||
|     } | ||||
|  | ||||
|     public int getCode() { | ||||
|         return code; | ||||
|     } | ||||
|  | ||||
|     public void setCode(int code) { | ||||
|         this.code = code; | ||||
|     } | ||||
|  | ||||
|     public String getMsg() { | ||||
|         return msg; | ||||
|     } | ||||
|  | ||||
|     public void setMsg(String msg) { | ||||
|         this.msg = msg; | ||||
|     } | ||||
|  | ||||
|     public void setTotalAmount(BigDecimal totalAmount) { | ||||
|         this.totalAmount = totalAmount; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getTotalAmount() { | ||||
|         return totalAmount; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,26 @@ | ||||
| package com.stdiet.custom.page; | ||||
|  | ||||
| import java.io.Serializable; | ||||
|  | ||||
| public class PdfProcessInfo implements Serializable { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     private int code; | ||||
|     private String msg; | ||||
|  | ||||
|     public int getCode() { | ||||
|         return code; | ||||
|     } | ||||
|  | ||||
|     public void setCode(int code) { | ||||
|         this.code = code; | ||||
|     } | ||||
|  | ||||
|     public String getMsg() { | ||||
|         return msg; | ||||
|     } | ||||
|  | ||||
|     public void setMsg(String msg) { | ||||
|         this.msg = msg; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,10 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import com.stdiet.custom.domain.CusUserPost; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| public interface ICusUserPostService { | ||||
|  | ||||
|     public List<CusUserPost> selectAllCusUserPost(); | ||||
| } | ||||
| @@ -0,0 +1,63 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCommision; | ||||
|  | ||||
| /** | ||||
|  * 业务提成比例Service接口 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public interface ISysCommisionService  | ||||
| { | ||||
|     /** | ||||
|      * 查询业务提成比例 | ||||
|      *  | ||||
|      * @param ruleId 业务提成比例ID | ||||
|      * @return 业务提成比例 | ||||
|      */ | ||||
|     public SysCommision selectSysCommisionById(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 查询业务提成比例列表 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 业务提成比例集合 | ||||
|      */ | ||||
|     public List<SysCommision> selectSysCommisionList(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 新增业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCommision(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 修改业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCommision(SysCommision sysCommision); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除业务提成比例 | ||||
|      *  | ||||
|      * @param ruleIds 需要删除的业务提成比例ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCommisionByIds(Long[] ruleIds); | ||||
|  | ||||
|     /** | ||||
|      * 删除业务提成比例信息 | ||||
|      *  | ||||
|      * @param ruleId 业务提成比例ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCommisionById(Long ruleId); | ||||
|  | ||||
|     public List<SysCommision> selectSysCommisionDetail(SysCommision sysCommision); | ||||
| } | ||||
| @@ -0,0 +1,64 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import com.stdiet.custom.domain.SysContract; | ||||
| import com.stdiet.custom.page.PdfProcessInfo; | ||||
|  | ||||
| /** | ||||
|  * 合同Service接口 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| public interface ISysContractService { | ||||
|     /** | ||||
|      * 查询合同 | ||||
|      * | ||||
|      * @param id 合同ID | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     public SysContract selectSysContractById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询合同列表 | ||||
|      * | ||||
|      * @param sysContract 合同 | ||||
|      * @return 合同集合 | ||||
|      */ | ||||
|     public List<SysContract> selectSysContractList(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 新增合同 | ||||
|      * | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 修改合同 | ||||
|      * | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除合同 | ||||
|      * | ||||
|      * @param ids 需要删除的合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除合同信息 | ||||
|      * | ||||
|      * @param id 合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractById(Long id); | ||||
|  | ||||
|     public PdfProcessInfo signContract(SysContract sysContract); | ||||
| } | ||||
| @@ -0,0 +1,69 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysOrder; | ||||
|  | ||||
| /** | ||||
|  * 销售订单Service接口 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public interface ISysOrderService | ||||
| { | ||||
|     /** | ||||
|      * 查询销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     public SysOrder selectSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单列表 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 销售订单集合 | ||||
|      */ | ||||
|     public List<SysOrder> selectSysOrderList(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 新增销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 修改销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除销售订单 | ||||
|      * | ||||
|      * @param orderIds 需要删除的销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderByIds(Long[] orderIds); | ||||
|  | ||||
|     /** | ||||
|      * 删除销售订单信息 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 计算所有订单总额 | ||||
|      * @param sysOrder | ||||
|      * @return | ||||
|      */ | ||||
|     public BigDecimal selectAllOrderAmount(SysOrder sysOrder); | ||||
| } | ||||
| @@ -0,0 +1,21 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import com.stdiet.custom.domain.CusUserPost; | ||||
| import com.stdiet.custom.mapper.CusUserPostMapper; | ||||
| import com.stdiet.custom.service.ICusUserPostService; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| @Service | ||||
| public class CusUserPostImpl implements ICusUserPostService { | ||||
|  | ||||
|     @Autowired | ||||
|     private CusUserPostMapper cusUserPostMapper; | ||||
|  | ||||
|     @Override | ||||
|     public List<CusUserPost> selectAllCusUserPost() { | ||||
|         return cusUserPostMapper.selectAllCusUserPost(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,101 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysCommisionMapper; | ||||
| import com.stdiet.custom.domain.SysCommision; | ||||
| import com.stdiet.custom.service.ISysCommisionService; | ||||
|  | ||||
| /** | ||||
|  * 业务提成比例Service业务层处理 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| @Service | ||||
| public class SysCommisionServiceImpl implements ISysCommisionService  | ||||
| { | ||||
|     @Autowired | ||||
|     private SysCommisionMapper sysCommisionMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询业务提成比例 | ||||
|      *  | ||||
|      * @param ruleId 业务提成比例ID | ||||
|      * @return 业务提成比例 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysCommision selectSysCommisionById(SysCommision sysCommision) | ||||
|     { | ||||
|         return sysCommisionMapper.selectSysCommisionById(sysCommision); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询业务提成比例列表 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 业务提成比例 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysCommision> selectSysCommisionList(SysCommision sysCommision) | ||||
|     { | ||||
|         return sysCommisionMapper.selectSysCommisionList(sysCommision); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysCommision(SysCommision sysCommision) | ||||
|     { | ||||
|         sysCommision.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sysCommisionMapper.insertSysCommision(sysCommision); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改业务提成比例 | ||||
|      *  | ||||
|      * @param sysCommision 业务提成比例 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysCommision(SysCommision sysCommision) | ||||
|     { | ||||
|         sysCommision.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysCommisionMapper.updateSysCommision(sysCommision); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除业务提成比例 | ||||
|      *  | ||||
|      * @param ruleIds 需要删除的业务提成比例ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCommisionByIds(Long[] ruleIds) | ||||
|     { | ||||
|         return sysCommisionMapper.deleteSysCommisionByIds(ruleIds); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除业务提成比例信息 | ||||
|      *  | ||||
|      * @param ruleId 业务提成比例ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCommisionById(Long ruleId) | ||||
|     { | ||||
|         return sysCommisionMapper.deleteSysCommisionById(ruleId); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public List<SysCommision> selectSysCommisionDetail(SysCommision sysCommision) { | ||||
|         return sysCommisionMapper.selectSysCommisionDetail(sysCommision); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,176 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import com.itextpdf.text.Document; | ||||
| import com.itextpdf.text.DocumentException; | ||||
| import com.itextpdf.text.pdf.*; | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import com.stdiet.custom.domain.SysContract; | ||||
| import com.stdiet.custom.mapper.SysContractMapper; | ||||
| import com.stdiet.custom.page.PdfProcessInfo; | ||||
| import com.stdiet.custom.service.ISysContractService; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
|  | ||||
| import java.io.ByteArrayOutputStream; | ||||
| import java.io.FileNotFoundException; | ||||
| import java.io.FileOutputStream; | ||||
| import java.io.IOException; | ||||
| import java.util.List; | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * 合同Service业务层处理 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| @Service | ||||
| public class SysContractServiceImpl implements ISysContractService { | ||||
|     @Autowired | ||||
|     private SysContractMapper sysContractMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询合同 | ||||
|      * | ||||
|      * @param id 合同ID | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysContract selectSysContractById(Long id) { | ||||
|         return sysContractMapper.selectSysContractById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询合同列表 | ||||
|      * | ||||
|      * @param sysContract 合同 | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysContract> selectSysContractList(SysContract sysContract) { | ||||
|         return sysContractMapper.selectSysContractList(sysContract); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增合同 | ||||
|      * | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysContract(SysContract sysContract) { | ||||
|         sysContract.setId(DateUtils.getNowDate().getTime()); | ||||
|         sysContract.setCreateTime(DateUtils.getNowDate()); | ||||
|         sysContract.setStatus("no"); | ||||
|         sysContract.setPath("/f/contract/" + sysContract.getId()); | ||||
|         return sysContractMapper.insertSysContract(sysContract); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改合同 | ||||
|      * | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysContract(SysContract sysContract) { | ||||
|         sysContract.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysContractMapper.updateSysContract(sysContract); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除合同 | ||||
|      * | ||||
|      * @param ids 需要删除的合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysContractByIds(Long[] ids) { | ||||
|         return sysContractMapper.deleteSysContractByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除合同信息 | ||||
|      * | ||||
|      * @param id 合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysContractById(Long id) { | ||||
|         return sysContractMapper.deleteSysContractById(id); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public PdfProcessInfo signContract(SysContract sysContract) { | ||||
| //        String templatePath = "/Users/wonder/Documents/Workspaces/java/RuoYi-Vue/running/pdf/contract.pdf"; | ||||
| //        String filePath = "/Users/wonder/Documents/Workspaces/java/RuoYi-Vue/running" + sysContract.getPath(); | ||||
|         String templatePath = "/home/workspace/ShengTangManage/running/pdf/contract.pdf"; | ||||
|         String filePath = "/home/web/manage.shengtangdiet.com" + sysContract.getPath(); | ||||
|  | ||||
|         PdfReader reader; | ||||
|         FileOutputStream out; | ||||
|         ByteArrayOutputStream bos; | ||||
|         PdfStamper stamper; | ||||
|  | ||||
|         PdfProcessInfo info = new PdfProcessInfo(); | ||||
|  | ||||
|         try { | ||||
|             out = new FileOutputStream(filePath);// 输出流到新的pdf,没有b2.pdf时会创建 | ||||
|             reader = new PdfReader(templatePath);// 读取pdf模板 | ||||
|             bos = new ByteArrayOutputStream(); | ||||
|             stamper = new PdfStamper(reader, bos); | ||||
|             AcroFields form = stamper.getAcroFields(); | ||||
|  | ||||
|             form.addSubstitutionFont(BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED)); | ||||
|             form.setField("signName", sysContract.getSignName(), true); | ||||
|             form.setField("serveTime", sysContract.getServeTimeStr(), true); | ||||
|             form.setField("tutor", sysContract.getTutor(), true); | ||||
|             form.setField("moneyUpper", sysContract.getAmountUpper(), true); | ||||
|             form.setField("money", sysContract.getAmount().intValue() + "", true); | ||||
|             form.setField("phone", sysContract.getPhone(), true); | ||||
|             form.setField("promise", sysContract.getServePromise(), true); | ||||
|             form.setField("date", DateUtils.getDate(), true); | ||||
|             form.setField("cusId", sysContract.getCusId(), true); | ||||
|             String remark = ""; | ||||
|             if (sysContract.getRemark() != null && !sysContract.getRemark().equals("")) { | ||||
|                 remark = "(备注:" + sysContract.getRemark() + ")"; | ||||
|             } | ||||
|             form.setField("remark", remark, true); | ||||
|  | ||||
|  | ||||
|             stamper.setFormFlattening(true);// 如果为false那么生成的PDF文件还能编辑,一定要设为true | ||||
|             stamper.close(); | ||||
|  | ||||
|             Document doc = new Document(); | ||||
|  | ||||
|             PdfCopy copy = new PdfCopy(doc, out); | ||||
|             doc.open(); | ||||
|             PdfImportedPage importPage = null; | ||||
|             for (int i = 1; i <= reader.getNumberOfPages(); i++) { | ||||
|                 importPage = copy | ||||
|                         .getImportedPage(new PdfReader(bos.toByteArray()), i); | ||||
|                 copy.addPage(importPage); | ||||
|             } | ||||
|             doc.close(); | ||||
|  | ||||
|             Runtime.getRuntime().exec("chmod 644 " + filePath); | ||||
|  | ||||
|             info.setCode(1); | ||||
|             info.setMsg("success"); | ||||
|  | ||||
|         } catch (FileNotFoundException e) { | ||||
|             e.printStackTrace(); | ||||
|             info.setCode(0); | ||||
|             info.setMsg(e.getMessage()); | ||||
|         } catch (IOException e) { | ||||
|             e.printStackTrace(); | ||||
|             info.setCode(0); | ||||
|             info.setMsg(e.getMessage()); | ||||
|         } catch (DocumentException e) { | ||||
|             e.printStackTrace(); | ||||
|             info.setCode(0); | ||||
|             info.setMsg(e.getMessage()); | ||||
|         } | ||||
|         return info; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,105 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.Date; | ||||
| import java.util.List; | ||||
|  | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysOrderMapper; | ||||
| import com.stdiet.custom.domain.SysOrder; | ||||
| import com.stdiet.custom.service.ISysOrderService; | ||||
|  | ||||
| /** | ||||
|  * 销售订单Service业务层处理 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| @Service | ||||
| public class SysOrderServiceImpl implements ISysOrderService { | ||||
|     @Autowired | ||||
|     private SysOrderMapper sysOrderMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysOrder selectSysOrderById(Long orderId) { | ||||
|         return sysOrderMapper.selectSysOrderById(orderId); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单列表 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysOrder> selectSysOrderList(SysOrder sysOrder) { | ||||
|         return sysOrderMapper.selectSysOrderList(sysOrder); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysOrder(SysOrder sysOrder) { | ||||
|         Date orderTime = DateUtils.getNowDate(); | ||||
|         sysOrder.setCreateTime(orderTime); | ||||
| //        sysOrder.setOrderTime(orderTime); | ||||
|         sysOrder.setOrderId(Long.parseLong(DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, orderTime))); | ||||
|         return sysOrderMapper.insertSysOrder(sysOrder); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysOrder(SysOrder sysOrder) { | ||||
|         sysOrder.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysOrderMapper.updateSysOrder(sysOrder); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除销售订单 | ||||
|      * | ||||
|      * @param orderIds 需要删除的销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysOrderByIds(Long[] orderIds) { | ||||
|         return sysOrderMapper.deleteSysOrderByIds(orderIds); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除销售订单信息 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysOrderById(Long orderId) { | ||||
|         return sysOrderMapper.deleteSysOrderById(orderId); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 计算所有订单总额 | ||||
|      * @param sysOrder | ||||
|      * @return | ||||
|      */ | ||||
|     @Override | ||||
|     public BigDecimal selectAllOrderAmount(SysOrder sysOrder) { | ||||
|         return sysOrderMapper.selectAllOrderAmount(sysOrder); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user