feat:发票回传
This commit is contained in:
@@ -221,7 +221,7 @@ public enum ErrorCodeEnum {
|
|||||||
FITMENT_FAIL(12003,"装修款阶段未完成",null),
|
FITMENT_FAIL(12003,"装修款阶段未完成",null),
|
||||||
SEE_ACCEPTANCE_ERROR(12004,"获取鲜丰撤场数据失败",null),
|
SEE_ACCEPTANCE_ERROR(12004,"获取鲜丰撤场数据失败",null),
|
||||||
SEE_ACCEPTANCE_AUDIT_NULL(12005,"视觉验收结果为空",null),
|
SEE_ACCEPTANCE_AUDIT_NULL(12005,"视觉验收结果为空",null),
|
||||||
STATUS_NOT_SUPPORT_SUMMIT(121006,"该状态不支持上传",null),
|
STATUS_NOT_SUPPORT_SUMMIT(121006,"该状态不支持提交",null),
|
||||||
DESIGN_NO_COMPLETE(121007,"请先完成设计阶段!",null),
|
DESIGN_NO_COMPLETE(121007,"请先完成设计阶段!",null),
|
||||||
SIGN_COMPLETED(121008,"你已完成验收,无需重复操作!",null),
|
SIGN_COMPLETED(121008,"你已完成验收,无需重复操作!",null),
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public enum ShopSubStageEnum {
|
|||||||
SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 23),
|
SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 23),
|
||||||
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 1),
|
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 1),
|
||||||
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 4),
|
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 4),
|
||||||
|
SHOP_STAGE_8_5(ShopStageEnum.SHOP_STAGE_2, 85, "发票回传", 5),
|
||||||
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 14),
|
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 14),
|
||||||
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 25),
|
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 25),
|
||||||
SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "装修验收", 27),
|
SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "装修验收", 27),
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ public enum ShopSubStageStatusEnum {
|
|||||||
SHOP_SUB_STAGE_STATUS_84(ShopSubStageEnum.SHOP_STAGE_8, 840, "已签约", Boolean.TRUE),
|
SHOP_SUB_STAGE_STATUS_84(ShopSubStageEnum.SHOP_STAGE_8, 840, "已签约", Boolean.TRUE),
|
||||||
SHOP_SUB_STAGE_STATUS_85(ShopSubStageEnum.SHOP_STAGE_8, 850, "退回", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_85(ShopSubStageEnum.SHOP_STAGE_8, 850, "退回", Boolean.FALSE),
|
||||||
|
|
||||||
|
//发票回传
|
||||||
|
SHOP_SUB_STAGE_STATUS_85_1(ShopSubStageEnum.SHOP_STAGE_8_5, 880, "待提交", Boolean.FALSE),
|
||||||
|
SHOP_SUB_STAGE_STATUS_85_3(ShopSubStageEnum.SHOP_STAGE_8_5, 890, "已完成", Boolean.TRUE),
|
||||||
|
|
||||||
|
|
||||||
//设计阶段
|
//设计阶段
|
||||||
SHOP_SUB_STAGE_STATUS_90(ShopSubStageEnum.SHOP_STAGE_9, 900, "待上传", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_90(ShopSubStageEnum.SHOP_STAGE_9, 900, "待上传", Boolean.FALSE),
|
||||||
SHOP_SUB_STAGE_STATUS_905(ShopSubStageEnum.SHOP_STAGE_9, 905, "待确认", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_905(ShopSubStageEnum.SHOP_STAGE_9, 905, "待确认", Boolean.FALSE),
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.InvoicingDO;
|
||||||
|
import com.cool.store.mapper.InvoicingMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/31 13:37
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class InvoicingDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
InvoicingMapper invoicingMapper;
|
||||||
|
|
||||||
|
public Integer add(InvoicingDO invoicingDO){
|
||||||
|
return invoicingMapper.insert(invoicingDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer update(InvoicingDO invoicingDO){
|
||||||
|
return invoicingMapper.updateByPrimaryKeySelective(invoicingDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvoicingDO getByShopId(Long shopId){
|
||||||
|
if (shopId == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return invoicingMapper.selectByShopId(shopId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.InvoicingDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface InvoicingMapper extends Mapper<InvoicingDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据shopId查询
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InvoicingDO selectByShopId(Long shopId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.InvoicingMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.InvoicingDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||||
|
<result column="invoice_url" jdbcType="VARCHAR" property="invoiceUrl" />
|
||||||
|
<result column="invoice_date" jdbcType="VARCHAR" property="invoiceDate" />
|
||||||
|
<result column="invoice_number" jdbcType="VARCHAR" property="invoiceNumber" />
|
||||||
|
<result column="franchise_fee" jdbcType="DECIMAL" property="franchiseFee" />
|
||||||
|
<result column="franchise_fee_tax" jdbcType="DECIMAL" property="franchiseFeeTax" />
|
||||||
|
<result column="management_fee" jdbcType="DECIMAL" property="managementFee" />
|
||||||
|
<result column="management_fee_tax" jdbcType="DECIMAL" property="managementFeeTax" />
|
||||||
|
<result column="brand_usage_fee" jdbcType="DECIMAL" property="brandUsageFee" />
|
||||||
|
<result column="brand_usage_fee_tax" jdbcType="DECIMAL" property="brandUsageFeeTax" />
|
||||||
|
<result column="design_service_fee" jdbcType="DECIMAL" property="designServiceFee" />
|
||||||
|
<result column="design_service_fee_tax" jdbcType="DECIMAL" property="designServiceFeeTax" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||||
|
select * from xfsg_invoicing
|
||||||
|
<where>
|
||||||
|
<if test="shopId!=null">
|
||||||
|
and shop_id=#{shopId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -3,6 +3,6 @@ jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcoll
|
|||||||
jdbc.user= coolstore
|
jdbc.user= coolstore
|
||||||
jdbc.password = CSCErYcXniNYm7bT
|
jdbc.password = CSCErYcXniNYm7bT
|
||||||
|
|
||||||
table.name = xfsg_qualifications_info
|
table.name = xfsg_invoicing
|
||||||
table.object.class = QualificationsInfoDO
|
table.object.class = InvoicingDO
|
||||||
table.mapper = QualificationsInfoMapper
|
table.mapper = InvoicingMapper
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/31 13:46
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("发票DTO")
|
||||||
|
public class InvoicingDTO {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xfsg_shop_info.id
|
||||||
|
*/
|
||||||
|
@Column(name = "shop_id")
|
||||||
|
@ApiModelProperty("shopId")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票URL
|
||||||
|
*/
|
||||||
|
@Column(name = "invoice_url")
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private String invoiceUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票日期
|
||||||
|
*/
|
||||||
|
@Column(name = "invoice_date")
|
||||||
|
@ApiModelProperty("开票日期")
|
||||||
|
private String invoiceDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票据编码
|
||||||
|
*/
|
||||||
|
@Column(name = "invoice_number")
|
||||||
|
@ApiModelProperty("票据编码")
|
||||||
|
private String invoiceNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟费
|
||||||
|
*/
|
||||||
|
@Column(name = "franchise_fee")
|
||||||
|
@ApiModelProperty("加盟费")
|
||||||
|
private BigDecimal franchiseFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟费税
|
||||||
|
*/
|
||||||
|
@Column(name = "franchise_fee_tax")
|
||||||
|
@ApiModelProperty("加盟费税")
|
||||||
|
private BigDecimal franchiseFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费
|
||||||
|
*/
|
||||||
|
@Column(name = "management_fee")
|
||||||
|
@ApiModelProperty("管理费")
|
||||||
|
private BigDecimal managementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费税
|
||||||
|
*/
|
||||||
|
@Column(name = "management_fee_tax")
|
||||||
|
@ApiModelProperty("管理费税")
|
||||||
|
private BigDecimal managementFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌使用费
|
||||||
|
*/
|
||||||
|
@Column(name = "brand_usage_fee")
|
||||||
|
@ApiModelProperty("品牌使用费")
|
||||||
|
private BigDecimal brandUsageFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌使用费税
|
||||||
|
*/
|
||||||
|
@Column(name = "brand_usage_fee_tax")
|
||||||
|
@ApiModelProperty("品牌使用费税")
|
||||||
|
private BigDecimal brandUsageFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计服务费
|
||||||
|
*/
|
||||||
|
@Column(name = "design_service_fee")
|
||||||
|
@ApiModelProperty("设计服务费")
|
||||||
|
private BigDecimal designServiceFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计服务费税
|
||||||
|
*/
|
||||||
|
@Column(name = "design_service_fee_tax")
|
||||||
|
@ApiModelProperty("设计服务费税")
|
||||||
|
private BigDecimal designServiceFeeTax;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.cool.store.dto.ocr;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/30 16:14
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class InvoiceDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发票号码")
|
||||||
|
private String invoiceNumber;
|
||||||
|
@ApiModelProperty(value = "发票日期")
|
||||||
|
private String invoiceDate;
|
||||||
|
@ApiModelProperty(value = "发票明细")
|
||||||
|
private List<InvoiceDetailDTO> invoiceDetails;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
class InvoiceDetailDTO{
|
||||||
|
@ApiModelProperty(value = "发票明细名称")
|
||||||
|
private String itemName;
|
||||||
|
@ApiModelProperty(value = "发票明细金额")
|
||||||
|
private String amount;
|
||||||
|
@ApiModelProperty(value = "发票明细税额")
|
||||||
|
private String tax;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,410 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_invoicing")
|
||||||
|
public class InvoicingDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xfsg_shop_info.id
|
||||||
|
*/
|
||||||
|
@Column(name = "shop_id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "invoice_url")
|
||||||
|
private String invoiceUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票日期
|
||||||
|
*/
|
||||||
|
@Column(name = "invoice_date")
|
||||||
|
private String invoiceDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票据编码
|
||||||
|
*/
|
||||||
|
@Column(name = "invoice_number")
|
||||||
|
private String invoiceNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟费
|
||||||
|
*/
|
||||||
|
@Column(name = "franchise_fee")
|
||||||
|
private BigDecimal franchiseFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟费税
|
||||||
|
*/
|
||||||
|
@Column(name = "franchise_fee_tax")
|
||||||
|
private BigDecimal franchiseFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费
|
||||||
|
*/
|
||||||
|
@Column(name = "management_fee")
|
||||||
|
private BigDecimal managementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费税
|
||||||
|
*/
|
||||||
|
@Column(name = "management_fee_tax")
|
||||||
|
private BigDecimal managementFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌使用费
|
||||||
|
*/
|
||||||
|
@Column(name = "brand_usage_fee")
|
||||||
|
private BigDecimal brandUsageFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌使用费税
|
||||||
|
*/
|
||||||
|
@Column(name = "brand_usage_fee_tax")
|
||||||
|
private BigDecimal brandUsageFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计服务费
|
||||||
|
*/
|
||||||
|
@Column(name = "design_service_fee")
|
||||||
|
private BigDecimal designServiceFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计服务费税
|
||||||
|
*/
|
||||||
|
@Column(name = "design_service_fee_tax")
|
||||||
|
private BigDecimal designServiceFeeTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "create_user_id")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@Column(name = "update_user_id")
|
||||||
|
private String updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取xfsg_shop_info.id
|
||||||
|
*
|
||||||
|
* @return shop_id - xfsg_shop_info.id
|
||||||
|
*/
|
||||||
|
public Long getShopId() {
|
||||||
|
return shopId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置xfsg_shop_info.id
|
||||||
|
*
|
||||||
|
* @param shopId xfsg_shop_info.id
|
||||||
|
*/
|
||||||
|
public void setShopId(Long shopId) {
|
||||||
|
this.shopId = shopId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建人
|
||||||
|
*
|
||||||
|
* @return invoice_url - 创建人
|
||||||
|
*/
|
||||||
|
public String getInvoiceUrl() {
|
||||||
|
return invoiceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建人
|
||||||
|
*
|
||||||
|
* @param invoiceUrl 创建人
|
||||||
|
*/
|
||||||
|
public void setInvoiceUrl(String invoiceUrl) {
|
||||||
|
this.invoiceUrl = invoiceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取开票日期
|
||||||
|
*
|
||||||
|
* @return invoice_date - 开票日期
|
||||||
|
*/
|
||||||
|
public String getInvoiceDate() {
|
||||||
|
return invoiceDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置开票日期
|
||||||
|
*
|
||||||
|
* @param invoiceDate 开票日期
|
||||||
|
*/
|
||||||
|
public void setInvoiceDate(String invoiceDate) {
|
||||||
|
this.invoiceDate = invoiceDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取票据编码
|
||||||
|
*
|
||||||
|
* @return invoice_number - 票据编码
|
||||||
|
*/
|
||||||
|
public String getInvoiceNumber() {
|
||||||
|
return invoiceNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置票据编码
|
||||||
|
*
|
||||||
|
* @param invoiceNumber 票据编码
|
||||||
|
*/
|
||||||
|
public void setInvoiceNumber(String invoiceNumber) {
|
||||||
|
this.invoiceNumber = invoiceNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取加盟费
|
||||||
|
*
|
||||||
|
* @return franchise_fee - 加盟费
|
||||||
|
*/
|
||||||
|
public BigDecimal getFranchiseFee() {
|
||||||
|
return franchiseFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置加盟费
|
||||||
|
*
|
||||||
|
* @param franchiseFee 加盟费
|
||||||
|
*/
|
||||||
|
public void setFranchiseFee(BigDecimal franchiseFee) {
|
||||||
|
this.franchiseFee = franchiseFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取加盟费税
|
||||||
|
*
|
||||||
|
* @return franchise_fee_tax - 加盟费税
|
||||||
|
*/
|
||||||
|
public BigDecimal getFranchiseFeeTax() {
|
||||||
|
return franchiseFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置加盟费税
|
||||||
|
*
|
||||||
|
* @param franchiseFeeTax 加盟费税
|
||||||
|
*/
|
||||||
|
public void setFranchiseFeeTax(BigDecimal franchiseFeeTax) {
|
||||||
|
this.franchiseFeeTax = franchiseFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理费
|
||||||
|
*
|
||||||
|
* @return management_fee - 管理费
|
||||||
|
*/
|
||||||
|
public BigDecimal getManagementFee() {
|
||||||
|
return managementFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置管理费
|
||||||
|
*
|
||||||
|
* @param managementFee 管理费
|
||||||
|
*/
|
||||||
|
public void setManagementFee(BigDecimal managementFee) {
|
||||||
|
this.managementFee = managementFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理费税
|
||||||
|
*
|
||||||
|
* @return management_fee_tax - 管理费税
|
||||||
|
*/
|
||||||
|
public BigDecimal getManagementFeeTax() {
|
||||||
|
return managementFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置管理费税
|
||||||
|
*
|
||||||
|
* @param managementFeeTax 管理费税
|
||||||
|
*/
|
||||||
|
public void setManagementFeeTax(BigDecimal managementFeeTax) {
|
||||||
|
this.managementFeeTax = managementFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取品牌使用费
|
||||||
|
*
|
||||||
|
* @return brand_usage_fee - 品牌使用费
|
||||||
|
*/
|
||||||
|
public BigDecimal getBrandUsageFee() {
|
||||||
|
return brandUsageFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置品牌使用费
|
||||||
|
*
|
||||||
|
* @param brandUsageFee 品牌使用费
|
||||||
|
*/
|
||||||
|
public void setBrandUsageFee(BigDecimal brandUsageFee) {
|
||||||
|
this.brandUsageFee = brandUsageFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取品牌使用费税
|
||||||
|
*
|
||||||
|
* @return brand_usage_fee_tax - 品牌使用费税
|
||||||
|
*/
|
||||||
|
public BigDecimal getBrandUsageFeeTax() {
|
||||||
|
return brandUsageFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置品牌使用费税
|
||||||
|
*
|
||||||
|
* @param brandUsageFeeTax 品牌使用费税
|
||||||
|
*/
|
||||||
|
public void setBrandUsageFeeTax(BigDecimal brandUsageFeeTax) {
|
||||||
|
this.brandUsageFeeTax = brandUsageFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计服务费
|
||||||
|
*
|
||||||
|
* @return design_service_fee - 设计服务费
|
||||||
|
*/
|
||||||
|
public BigDecimal getDesignServiceFee() {
|
||||||
|
return designServiceFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置设计服务费
|
||||||
|
*
|
||||||
|
* @param designServiceFee 设计服务费
|
||||||
|
*/
|
||||||
|
public void setDesignServiceFee(BigDecimal designServiceFee) {
|
||||||
|
this.designServiceFee = designServiceFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设计服务费税
|
||||||
|
*
|
||||||
|
* @return design_service_fee_tax - 设计服务费税
|
||||||
|
*/
|
||||||
|
public BigDecimal getDesignServiceFeeTax() {
|
||||||
|
return designServiceFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置设计服务费税
|
||||||
|
*
|
||||||
|
* @param designServiceFeeTax 设计服务费税
|
||||||
|
*/
|
||||||
|
public void setDesignServiceFeeTax(BigDecimal designServiceFeeTax) {
|
||||||
|
this.designServiceFeeTax = designServiceFeeTax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return create_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return update_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updateTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建人
|
||||||
|
*
|
||||||
|
* @return create_user_id - 创建人
|
||||||
|
*/
|
||||||
|
public String getCreateUserId() {
|
||||||
|
return createUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建人
|
||||||
|
*
|
||||||
|
* @param createUserId 创建人
|
||||||
|
*/
|
||||||
|
public void setCreateUserId(String createUserId) {
|
||||||
|
this.createUserId = createUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新人
|
||||||
|
*
|
||||||
|
* @return update_user_id - 更新人
|
||||||
|
*/
|
||||||
|
public String getUpdateUserId() {
|
||||||
|
return updateUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新人
|
||||||
|
*
|
||||||
|
* @param updateUserId 更新人
|
||||||
|
*/
|
||||||
|
public void setUpdateUserId(String updateUserId) {
|
||||||
|
this.updateUserId = updateUserId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -52,4 +52,6 @@ public class SignFranchiseDO {
|
|||||||
private Date createTime;
|
private Date createTime;
|
||||||
@Column(name = "update_time")
|
@Column(name = "update_time")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
@Column(name = "contract_code")
|
||||||
|
private String contractCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ public class AddSignFranchiseRequest {
|
|||||||
@ApiModelProperty("加盟商联系方式")
|
@ApiModelProperty("加盟商联系方式")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编码")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
|
||||||
public SignFranchiseDO toSignFranchiseDO() {
|
public SignFranchiseDO toSignFranchiseDO() {
|
||||||
SignFranchiseDO signFranchiseDO = new SignFranchiseDO();
|
SignFranchiseDO signFranchiseDO = new SignFranchiseDO();
|
||||||
@@ -81,6 +84,7 @@ public class AddSignFranchiseRequest {
|
|||||||
signFranchiseDO.setRemark(this.remark);
|
signFranchiseDO.setRemark(this.remark);
|
||||||
signFranchiseDO.setResign(this.resign);
|
signFranchiseDO.setResign(this.resign);
|
||||||
signFranchiseDO.setMobile(this.mobile);
|
signFranchiseDO.setMobile(this.mobile);
|
||||||
|
signFranchiseDO.setContractCode(this.contractCode);
|
||||||
return signFranchiseDO;
|
return signFranchiseDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ public class AddSignFranchiseResponse {
|
|||||||
|
|
||||||
@ApiModelProperty("失败时间")
|
@ApiModelProperty("失败时间")
|
||||||
private Date resultTime;
|
private Date resultTime;
|
||||||
|
@ApiModelProperty("合同编码")
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,11 @@
|
|||||||
<artifactId>ocr_api20210707</artifactId>
|
<artifactId>ocr_api20210707</artifactId>
|
||||||
<version>2.0.7</version>
|
<version>2.0.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>darabonba-stream</artifactId>
|
||||||
|
<version>0.0.1</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.aspectj</groupId>
|
<groupId>org.aspectj</groupId>
|
||||||
<artifactId>aspectjrt</artifactId>
|
<artifactId>aspectjrt</artifactId>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.ocr.InvoiceDTO;
|
||||||
import com.cool.store.enums.IDCardSideEnum;
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
import com.cool.store.enums.SmsCodeTypeEnum;
|
import com.cool.store.enums.SmsCodeTypeEnum;
|
||||||
import com.cool.store.exception.ApiException;
|
import com.cool.store.exception.ApiException;
|
||||||
@@ -7,6 +8,8 @@ import com.cool.store.response.ResponseResult;
|
|||||||
import com.cool.store.vo.BusinessLicenseInfoVO;
|
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||||
import com.cool.store.vo.FoodLicenseVO;
|
import com.cool.store.vo.FoodLicenseVO;
|
||||||
import com.cool.store.vo.IdentityCardInfoVO;
|
import com.cool.store.vo.IdentityCardInfoVO;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
public interface AliyunService {
|
public interface AliyunService {
|
||||||
/**
|
/**
|
||||||
@@ -40,4 +43,11 @@ public interface AliyunService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
FoodLicenseVO getFoodLicense(String imageUrl) throws ApiException ;
|
FoodLicenseVO getFoodLicense(String imageUrl) throws ApiException ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OCR 发票解析数据
|
||||||
|
* @param imageUrl
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InvoiceDTO getRecognizeInvoiceWithOptions(String imageUrl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,16 @@ public interface DeskService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票回传待处理数据
|
||||||
|
* @param pageNum
|
||||||
|
* @param pageSize
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<PreparationCommonPendingVO> invoiceReturnPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||||
/**
|
/**
|
||||||
* 开业运营方案待处理数据
|
* 开业运营方案待处理数据
|
||||||
* @param pageNum
|
* @param pageNum
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.InvoicingDTO;
|
||||||
|
import com.cool.store.entity.InvoicingDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/31 13:44
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface InvoicingService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交发票详情
|
||||||
|
* @param invoicingDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean addInvoicing(InvoicingDTO invoicingDTO, LoginUserInfo userInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑发票详情
|
||||||
|
* @param invoicingDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean editInvoicing(InvoicingDTO invoicingDTO,LoginUserInfo userInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发票详情
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InvoicingDTO getInvoicingByShopId(Long shopId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -34,7 +34,9 @@ public interface PreparationService {
|
|||||||
PreparationProcessVO getPreparationProcess(Long shopId);
|
PreparationProcessVO getPreparationProcess(Long shopId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验建店与加盟签约合同是否完成 并初始化后续流程数据
|
* V1.0 校验建店与加盟签约合同是否完成 并初始化后续流程数据
|
||||||
|
* V1.1 加盟签约合同是否完成 并初始化后续流程数据
|
||||||
|
* V1.2 新增发票回传阶段 校验发票回传是否完成 并初始化后续流程数据
|
||||||
* @param shopId
|
* @param shopId
|
||||||
*/
|
*/
|
||||||
void contractAndBuildStoreCompletion(Long shopId);
|
void contractAndBuildStoreCompletion(Long shopId);
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ package com.cool.store.service.impl;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.aliyun.ocr20191230.models.*;
|
import com.aliyun.ocr20191230.models.*;
|
||||||
import com.aliyun.ocr_api20210707.Client;
|
import com.aliyun.ocr20191230.models.RecognizeBusinessLicenseResponse;
|
||||||
import com.aliyun.ocr_api20210707.models.RecognizeAdvancedRequest;
|
import com.aliyun.ocr20191230.models.RecognizeBusinessLicenseResponseBody;
|
||||||
import com.aliyun.ocr_api20210707.models.RecognizeFoodManageLicenseRequest;
|
import com.aliyun.ocr_api20210707.models.*;
|
||||||
import com.aliyun.ocr_api20210707.models.RecognizeFoodManageLicenseResponse;
|
import com.aliyun.tea.*;
|
||||||
import com.aliyuncs.CommonRequest;
|
import com.aliyuncs.CommonRequest;
|
||||||
import com.aliyuncs.http.MethodType;
|
import com.aliyuncs.http.MethodType;
|
||||||
|
import com.cool.store.dto.ocr.InvoiceDTO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.IDCardSideEnum;
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
import com.cool.store.enums.SmsCodeTypeEnum;
|
import com.cool.store.enums.SmsCodeTypeEnum;
|
||||||
@@ -17,6 +18,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.AliyunService;
|
import com.cool.store.service.AliyunService;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import com.cool.store.vo.BusinessLicenseInfoVO;
|
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||||
import com.cool.store.vo.FoodLicenseVO;
|
import com.cool.store.vo.FoodLicenseVO;
|
||||||
import com.cool.store.vo.IdentityCardInfoVO;
|
import com.cool.store.vo.IdentityCardInfoVO;
|
||||||
@@ -203,6 +205,39 @@ public class AliyunServiceImpl implements AliyunService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InvoiceDTO getRecognizeInvoiceWithOptions(String url){
|
||||||
|
if (StringUtils.isEmpty(url)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
|
||||||
|
.setAccessKeyId(accessKeyId)
|
||||||
|
.setAccessKeySecret(accessKeySecret);
|
||||||
|
config.endpoint = "ocr-api.cn-hangzhou.aliyuncs.com";
|
||||||
|
try {
|
||||||
|
com.aliyun.ocr_api20210707.Client client = new com.aliyun.ocr_api20210707.Client(config);
|
||||||
|
RecognizeInvoiceRequest recognizeInvoiceRequest = new RecognizeInvoiceRequest().setUrl(url);
|
||||||
|
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
|
||||||
|
RecognizeInvoiceResponse recognizeInvoiceResponse = client.recognizeInvoiceWithOptions(recognizeInvoiceRequest, runtime);
|
||||||
|
InvoiceDTO invoiceDTO = null;
|
||||||
|
if (recognizeInvoiceResponse!=null&&recognizeInvoiceResponse.getBody()!=null){
|
||||||
|
String data = recognizeInvoiceResponse.getBody().getData();
|
||||||
|
if (StringUtils.isNotEmpty(data)){
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||||
|
Object specialData = jsonObject.get("data");
|
||||||
|
invoiceDTO = JSONObject.parseObject(JSONObject.toJSONString(specialData), InvoiceDTO.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.info("普通发票:{}", JSONObject.toJSONString(recognizeInvoiceResponse));
|
||||||
|
return invoiceDTO;
|
||||||
|
} catch (Exception _error) {
|
||||||
|
log.info("getRecognizeInvoiceWithOptions error:{}",_error);
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE,"发票解析异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseResult sendMessage(String mobile, SmsCodeTypeEnum codeType) {
|
public ResponseResult sendMessage(String mobile, SmsCodeTypeEnum codeType) {
|
||||||
String msgKey = codeType + ":" + mobile;
|
String msgKey = codeType + ":" + mobile;
|
||||||
|
|||||||
@@ -364,6 +364,12 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus()), Boolean.TRUE);
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus()), Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PreparationCommonPendingVO> invoiceReturnPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
|
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_8_5,
|
||||||
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1.getShopSubStageStatus()), Boolean.FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> openingAndOperationPlanPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> openingAndOperationPlanPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_14, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus()), Boolean.FALSE);
|
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_14, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus()), Boolean.FALSE);
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import ch.qos.logback.classic.jmx.MBeanUtil;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.InvoicingDAO;
|
||||||
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
|
import com.cool.store.dto.InvoicingDTO;
|
||||||
|
import com.cool.store.entity.InvoicingDO;
|
||||||
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.InvoicingService;
|
||||||
|
import com.cool.store.service.PreparationService;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/31 13:53
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class InvoicingServiceImpl implements InvoicingService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private InvoicingDAO invoicingDAO;
|
||||||
|
@Resource
|
||||||
|
PreparationService preparationService;
|
||||||
|
@Resource
|
||||||
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean addInvoicing(InvoicingDTO invoicingDTO, LoginUserInfo userInfo) {
|
||||||
|
if (invoicingDTO==null||invoicingDTO.getId()!=null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(invoicingDTO.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_5);
|
||||||
|
//待提交时候支持提交
|
||||||
|
if (shopSubStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||||
|
}
|
||||||
|
InvoicingDO invoicingDO = new InvoicingDO();
|
||||||
|
BeanUtil.copyProperties(invoicingDTO, invoicingDO);
|
||||||
|
invoicingDO.setCreateUserId(userInfo.getUserId());
|
||||||
|
invoicingDAO.add(invoicingDO);
|
||||||
|
////如果发票回传完成 开始设计阶段与验收阶段
|
||||||
|
preparationService.contractAndBuildStoreCompletion(invoicingDTO.getShopId());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean editInvoicing(InvoicingDTO invoicingDTO,LoginUserInfo userInfo) {
|
||||||
|
if (invoicingDTO==null||invoicingDTO.getId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(invoicingDTO.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_5);
|
||||||
|
//已完成支持编辑
|
||||||
|
if (shopSubStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_3.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||||
|
}
|
||||||
|
InvoicingDO invoicingDO = new InvoicingDO();
|
||||||
|
BeanUtil.copyProperties(invoicingDTO, invoicingDO);
|
||||||
|
invoicingDO.setUpdateUserId(userInfo.getUserId());
|
||||||
|
invoicingDAO.update(invoicingDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InvoicingDTO getInvoicingByShopId(Long shopId) {
|
||||||
|
if (shopId==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
InvoicingDO invoicingDO = invoicingDAO.getByShopId(shopId);
|
||||||
|
InvoicingDTO invoicingDTO = new InvoicingDTO();
|
||||||
|
BeanUtil.copyProperties(invoicingDO, invoicingDTO);
|
||||||
|
return invoicingDTO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -206,7 +206,7 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
|
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
|
||||||
if (CollectionUtils.isNotEmpty(shopStageInfo)) {
|
if (CollectionUtils.isNotEmpty(shopStageInfo)) {
|
||||||
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
|
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
|
||||||
Boolean contractCompletionFlag = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage()).getShopSubStageStatus());
|
Boolean contractCompletionFlag = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_3.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_8_5.getShopSubStage()).getShopSubStageStatus());
|
||||||
//都完成了 初始化后续流程数据
|
//都完成了 初始化后续流程数据
|
||||||
if (contractCompletionFlag) {
|
if (contractCompletionFlag) {
|
||||||
//初始化后续流程数据s
|
//初始化后续流程数据s
|
||||||
|
|||||||
@@ -171,8 +171,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||||
//todo 提交之后先直接到已签约 正常是待审核
|
//todo 提交之后先直接到已签约 正常是待审核
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
||||||
//如果加盟合同完成 开始设计阶段与验收阶段
|
//初始化数据
|
||||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1));
|
||||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
||||||
} else {
|
} else {
|
||||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||||
@@ -263,6 +263,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setRemark(signFranchiseDO.getRemark());
|
addSignFranchiseResponse.setRemark(signFranchiseDO.getRemark());
|
||||||
addSignFranchiseResponse.setResign(signFranchiseDO.getResign());
|
addSignFranchiseResponse.setResign(signFranchiseDO.getResign());
|
||||||
addSignFranchiseResponse.setMobile(signFranchiseDO.getMobile());
|
addSignFranchiseResponse.setMobile(signFranchiseDO.getMobile());
|
||||||
|
addSignFranchiseResponse.setContractCode(signFranchiseDO.getContractCode());
|
||||||
} else {
|
} else {
|
||||||
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
|
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,6 +126,14 @@ public class DeskController {
|
|||||||
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||||
return ResponseResult.success(deskService.signingOfFranchiseContractPendingList(pageNumber,pageSize,userInfo));
|
return ResponseResult.success(deskService.signingOfFranchiseContractPendingList(pageNumber,pageSize,userInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("待处理-发票回传")
|
||||||
|
@GetMapping("/invoiceReturnPendingList")
|
||||||
|
public ResponseResult<PageInfo<PreparationCommonPendingVO>> invoiceReturnPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||||
|
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
|
||||||
|
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(deskService.invoiceReturnPendingList(pageNumber,pageSize,userInfo));
|
||||||
|
}
|
||||||
@ApiOperation("待处理-开店运营方案")
|
@ApiOperation("待处理-开店运营方案")
|
||||||
@GetMapping("/openingAndOperationPlanPendingList")
|
@GetMapping("/openingAndOperationPlanPendingList")
|
||||||
public ResponseResult<PageInfo<PreparationCommonPendingVO>> openingAndOperationPlanPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
public ResponseResult<PageInfo<PreparationCommonPendingVO>> openingAndOperationPlanPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.InvoicingDTO;
|
||||||
|
import com.cool.store.request.LineListRequest;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.InvoicingService;
|
||||||
|
import com.cool.store.vo.LineInfoVO;
|
||||||
|
import com.cool.store.vo.LineListVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/31 14:02
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/invoicing")
|
||||||
|
@Api("发票")
|
||||||
|
public class InvoicingController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
InvoicingService invoicingService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("提交发票")
|
||||||
|
@PostMapping("/submitInvoicing")
|
||||||
|
public ResponseResult<Boolean> submitInvoicing(@RequestBody InvoicingDTO invoicingDTO) {
|
||||||
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(invoicingService.addInvoicing(invoicingDTO,user));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("编辑发票")
|
||||||
|
@PostMapping("/editInvoicing")
|
||||||
|
public ResponseResult<Boolean> editInvoicing(@RequestBody InvoicingDTO invoicingDTO) {
|
||||||
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(invoicingService.editInvoicing(invoicingDTO,user));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询发票")
|
||||||
|
@GetMapping("/getInvoicingByShopId")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "shopId", value = "门店shopId", required = true)
|
||||||
|
})
|
||||||
|
public ResponseResult<InvoicingDTO> getInvoicingByShopId(@RequestParam("lineId")Long shopId) {
|
||||||
|
return ResponseResult.success(invoicingService.getInvoicingByShopId(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.dto.ocr.InvoiceDTO;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.AliyunService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/1/2 9:46
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping({"/pc/orc"})
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "PC文字识别OCR")
|
||||||
|
public class PCOcrController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
AliyunService aliyunService;
|
||||||
|
|
||||||
|
@GetMapping(path = "/getInvoice")
|
||||||
|
@ApiOperation("根据发票解析获取数据")
|
||||||
|
public ResponseResult<InvoiceDTO> getInvoice(@RequestParam(value = "imageUrl")String imageUrl){
|
||||||
|
return ResponseResult.success(aliyunService.getRecognizeInvoiceWithOptions(imageUrl));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.dto.InvoicingDTO;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.InvoicingService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/12/31 14:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/invoicing")
|
||||||
|
@Api("小程序发票")
|
||||||
|
public class MiniInvoicingController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
InvoicingService invoicingService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("小程序查询发票详情")
|
||||||
|
@GetMapping("/getInvoicingByShopId")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "shopId", value = "门店shopId", required = true)
|
||||||
|
})
|
||||||
|
public ResponseResult<InvoicingDTO> getInvoicingByShopId(@RequestParam("lineId")Long shopId) {
|
||||||
|
return ResponseResult.success(invoicingService.getInvoicingByShopId(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.controller.webc;
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.dto.ocr.InvoiceDTO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.IDCardSideEnum;
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
@@ -64,4 +65,10 @@ public class OcrController {
|
|||||||
throw new ServiceException(ErrorCodeEnum.FOOD_BUSINESS_LICENSE_PARSE_FAIL);
|
throw new ServiceException(ErrorCodeEnum.FOOD_BUSINESS_LICENSE_PARSE_FAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(path = "/getInvoice")
|
||||||
|
@ApiOperation("根据发票解析获取数据")
|
||||||
|
public ResponseResult<InvoiceDTO> getInvoice(@RequestParam(value = "imageUrl")String imageUrl){
|
||||||
|
return ResponseResult.success(aliyunService.getRecognizeInvoiceWithOptions(imageUrl));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,22 @@ package com.cool.store.controller.webc;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.OpenCityDTO;
|
import com.cool.store.dto.OpenCityDTO;
|
||||||
|
import com.cool.store.dto.ocr.InvoiceDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.job.XxlJobHandler;
|
import com.cool.store.job.XxlJobHandler;
|
||||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||||
import com.cool.store.request.xfsgFirstOrderListRequest;
|
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.response.xfsgFirstOderListResponse;
|
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||||
|
import com.cool.store.service.AliyunService;
|
||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.RegionService;
|
import com.cool.store.service.RegionService;
|
||||||
import com.cool.store.utils.poi.ExcelUtil;
|
import com.cool.store.utils.poi.ExcelUtil;
|
||||||
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.vo.RegionPathNameVO;
|
import com.cool.store.vo.RegionPathNameVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -192,4 +199,5 @@ public class TestController {
|
|||||||
xxlJobHandler.threeAcceptanceBookingMessage();
|
xxlJobHandler.threeAcceptanceBookingMessage();
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user