Commit f8b0dff9 by 东州 翁 Committed by chenzg

新增默认发票资料接口

parent 38892880
......@@ -95,7 +95,7 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
@ApiModelProperty(value="营业执照 ",example="营业执照url ")
private String licenseUrl;
@ApiModelProperty(value="认证状态 ",example="0 认证中,1已认证,2认证失败 ")
@ApiModelProperty(value="认证状态 ",example="1 认证中,2已认证,3认证失败 ")
private Integer attestStatus;
@ApiModelProperty(value="认证时间 ",example="2019-12-12 08:00:00")
......
/**
* <p>Title: QyzxInvoiceData.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
package cn.timer.api.bean.qyzx;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <p>Title: QyzxInvoiceData.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name="qyzx_invoice_data")
@ApiModel("发票资料表")
public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
private static final long serialVersionUID = 2890357568571822258L;
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="主键",example="1")
private Integer id;
@ApiModelProperty(value="发票抬头",example="广东优领")
private String invoiceTitle;
@ApiModelProperty(value="税号",example="915345164")
private String dutyParagraph;
@ApiModelProperty(value="公司地址",example="广东省")
private String companyAddress;
@ApiModelProperty(value="电话号码",example="18152456464")
private String companyPhone;
@ApiModelProperty(value="开户行",example="中信银行广州白云支行")
private String bankName;
@ApiModelProperty(value="银行账号",example="8110901011900785029")
private String bankAccount;
@ApiModelProperty(value="发票类型",example="0-普通 1-专用")
private Integer invoiceType;
@ApiModelProperty(value="收货人",example="翁🐻")
private String consignee;
@ApiModelProperty(value="收货人电话",example="13144400255")
private String consigneePhone;
@ApiModelProperty(value="邮箱",example="13144400255@163.com")
private String email;
@ApiModelProperty(value="收货地址",example="白云东平伯曼酒店")
private String shippingAddress;
@ApiModelProperty(value="邮编",example="510080")
private String zipCode;
@ApiModelProperty(value="企业",example="117")
private Integer orgCode;
@ApiModelProperty(value="模块状态",example="默认0-开启,1-关闭")
private Integer status;
@ApiModelProperty(value="是否删除",example="默认0-未删除,1-删除")
private Integer isDelete;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value="创建时间 ",example="")
private Date createTime;
@ApiModelProperty(value="创建人 ",example="")
private Integer createUser;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value="修改时间 ",example="")
private Date modifyTime;
@ApiModelProperty(value="修改人 ",example="")
private Integer modifyUser;
}
......@@ -34,6 +34,7 @@ import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntAuth;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.qyzx.QyzxFeebackAccessory;
import cn.timer.api.bean.qyzx.QyzxInvoiceUsual;
import cn.timer.api.bean.qyzx.QyzxLogBuy;
import cn.timer.api.bean.qyzx.QyzxPayServe;
import cn.timer.api.bean.qyzx.QyzxSuggestionFeeback;
......@@ -48,6 +49,7 @@ import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.qyzx.QyzxEntAuthMapper;
import cn.timer.api.dao.qyzx.QyzxEntInfoMMapper;
import cn.timer.api.dao.qyzx.QyzxFeebackAccessoryMapper;
import cn.timer.api.dao.qyzx.QyzxInvoiceUsualMapper;
import cn.timer.api.dao.qyzx.QyzxLogBuyMapper;
import cn.timer.api.dao.qyzx.QyzxPayServeMapper;
import cn.timer.api.dao.qyzx.QyzxSuggestionFeebackMapper;
......@@ -105,6 +107,9 @@ public class QyzxController {
@Autowired
private QyzxFeebackAccessoryMapper qyzxFeebackAccessoryMapper;
@Autowired
private QyzxInvoiceUsualMapper qyzxInvoiceUsualMapper;
/**
* 获取企业信息
*
......@@ -179,18 +184,54 @@ public class QyzxController {
* @param qyzxEntAuth
* @return
*/
/*
* @PostMapping(value = "/entauthpass")
*
* @ApiOperation(value = "企业认证-审核-通过", httpMethod = "POST", notes = "接口发布说明")
* public Result<String> entauthpass(@RequestBody EntauthDto entauthDto) {//
* 2未通过,3通过 String msg = "企业认证不通过"; Integer type = entauthDto.getAuthType(); if
* (type != 2) { type = 3; msg = "企业认证成功"; } boolean b = new
* LambdaUpdateChainWrapper<QyzxEntAuth>(qyzxEntAuthMapper)
* .eq(QyzxEntAuth::getId,
* entauthDto.getOrgCode()).set(QyzxEntAuth::getAuthType, type).update(); if (b)
* { return ResultUtil.data(msg); } return ResultUtil.error("企业认证未通过"); }
@PostMapping(value = "/entauthpass")
@ApiOperation(value = "企业认证-审核-通过", httpMethod = "POST", notes = "接口发布说明")
public Result<String> entauthpass(@RequestBody EntauthDto entauthDto) {//2未通过,3通过
String msg = "企业未认证";
Integer type = entauthDto.getAuthType();
if(type == CommonEnum.AUTH_TYPE_SUCCESS.getType()) {
msg = "企业认证成功";
}
if(type == CommonEnum.AUTH_TYPE_FAILURE.getType()) {
msg = "企业认证失败";
}
boolean b = new LambdaUpdateChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper).eq(QyzxEntInfoM::getId, entauthDto.getOrgCode())
.set(QyzxEntInfoM::getAttestStatus, type).update();
if (b){
return ResultUtil.data(msg);
}
return ResultUtil.data("企业认证流程有误");
}
/**
* 新增/编辑常用企业开票资料
*
* @param QyzxInvoiceUsual
* @return
*/
@PostMapping(value = "/invoiceusual")
@ApiOperation(value = "新增/编辑常用企业开票资料", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean,@RequestBody QyzxInvoiceUsual qyzxInvoiceUsual) {
qyzxInvoiceUsual.setOrgCode(userBean.getOrgCode());
qyzxInvoiceUsual.setModifyUser(userBean.getEmpNum());
boolean tof = qyzxInvoiceUsual.insertOrUpdate();
if (tof) {
return ResultUtil.data(qyzxInvoiceUsual, "常用企业开票资料已修改");
}
return ResultUtil.error("开票资料修改无效");
}
/**
* 显示常用的企业开票资料
*
* @param QyzxInvoiceUsual
* @return
*/
@SuppressWarnings("deprecation")
@GetMapping(value = "/invoiceusual")
@ApiOperation(value = "显示常用的企业开票资料", httpMethod = "GET", notes = "接口发布说明")
public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) {
QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper).eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one();
return ResultUtil.data(one, "企业超管头像和电话号码");
}
/**
* 显示企业的超级管理员
......
/**
* <p>Title: QyzxInvoiceDataMapper.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
package cn.timer.api.dao.qyzx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.qyzx.QyzxInvoiceUsual;
/**
* <p>Title: QyzxInvoiceDataMapper.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
public interface QyzxInvoiceUsualMapper extends BaseMapper<QyzxInvoiceUsual>{
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment