Commit 00f41ade by dengshichuan

Merge branch 'wdz' into 'develop'

Wdz

See merge request 8timerv2/8timerapiv200!49
parents 435b5021 6623d009
...@@ -60,8 +60,9 @@ public class QyzxEmpLogin extends Model<QyzxEmpLogin> { ...@@ -60,8 +60,9 @@ public class QyzxEmpLogin extends Model<QyzxEmpLogin> {
@ApiModelProperty(value="注册时间 ",example="注册时间") @ApiModelProperty(value="注册时间 ",example="注册时间")
private Date regTime; private Date regTime;
@ApiModelProperty(value="到期时间 ",example="到期时间") /*
private Date endTime; * @ApiModelProperty(value="到期时间 ",example="到期时间") private Date endTime;
*/
@ApiModelProperty(value="头像地址 ",example="http://asd") @ApiModelProperty(value="头像地址 ",example="http://asd")
private String headUrl; private String headUrl;
......
package cn.timer.api.bean.qyzx; package cn.timer.api.bean.qyzx;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.bean.qyzx.QyzxEmpLogin.QyzxEmpLoginBuilder;
import cn.timer.api.dto.login.QysDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
...@@ -54,6 +54,18 @@ public enum CommonEnum { ...@@ -54,6 +54,18 @@ public enum CommonEnum {
AUTH_TYPE_SUCCESS(2,"认证成功"), AUTH_TYPE_SUCCESS(2,"认证成功"),
AUTH_TYPE_FAILURE(3,"认证失败"), AUTH_TYPE_FAILURE(3,"认证失败"),
/**
* 企业系统版本试用
*/
LEVEL_PROBATION(0,"试用"),
/**
* 企业系统版本标准
*/
LEVEL_STANDARD(1,"标准"),
/**
* 企业系统版本专业
*/
LEVEL_PROFESSION(2,"专业"),
/** /**
* 顶级部门上级 * 顶级部门上级
......
...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
...@@ -380,7 +381,7 @@ public class LoginController { ...@@ -380,7 +381,7 @@ public class LoginController {
} }
// 企业信息 // 企业信息
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().name(name).registerTime(DateUtil.date()).build(); QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().name(name).registerTime(DateUtil.date()).endTime(DateUtil.nextMonth()).level(CommonEnum.LEVEL_PROBATION.getType()).build();
boolean b1 = qyzxEntInfoM.insert(); boolean b1 = qyzxEntInfoM.insert();
if (!b1) { if (!b1) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
...@@ -389,9 +390,14 @@ public class LoginController { ...@@ -389,9 +390,14 @@ public class LoginController {
if (login == null) { if (login == null) {
// 员工信息 // 员工信息
/*
* QyzxEmpLogin qyzxEmpLogin =
* QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
* .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(
* DateUtil.date()) .endTime(DateUtil.nextMonth()).build();
*/
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw)) QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date()) .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date()).build();
.endTime(DateUtil.nextMonth()).build();
boolean b2 = qyzxEmpLogin.insert(); boolean b2 = qyzxEmpLogin.insert();
if (!b2) { if (!b2) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
......
...@@ -135,7 +135,8 @@ public class QyzxController { ...@@ -135,7 +135,8 @@ public class QyzxController {
@ApiOperation(value = "添加/修改企业信息", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加/修改企业信息", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxEntInfoM> addent(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) { public Result<QyzxEntInfoM> addent(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) {
qyzxEntInfoM.setId(userBean.getOrgCode()); qyzxEntInfoM.setId(userBean.getOrgCode());
QyzxEntInfoM q = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper).eq(QyzxEntInfoM::getId, userBean.getOrgCode()).one(); QyzxEntInfoM q = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
.eq(QyzxEntInfoM::getId, userBean.getOrgCode()).one();
qyzxEntInfoM.setRegisterTime(q.getRegisterTime()); qyzxEntInfoM.setRegisterTime(q.getRegisterTime());
qyzxEntInfoM.insertOrUpdate(); qyzxEntInfoM.insertOrUpdate();
...@@ -186,22 +187,23 @@ public class QyzxController { ...@@ -186,22 +187,23 @@ public class QyzxController {
*/ */
@PostMapping(value = "/entauthpass") @PostMapping(value = "/entauthpass")
@ApiOperation(value = "企业认证-审核-通过", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "企业认证-审核-通过", httpMethod = "POST", notes = "接口发布说明")
public Result<String> entauthpass(@RequestBody EntauthDto entauthDto) {//2未通过,3通过 public Result<String> entauthpass(@RequestBody EntauthDto entauthDto) {// 2未通过,3通过
String msg = "企业未认证"; String msg = "企业未认证";
Integer type = entauthDto.getAuthType(); Integer type = entauthDto.getAuthType();
if(type == CommonEnum.AUTH_TYPE_SUCCESS.getType()) { if (type == CommonEnum.AUTH_TYPE_SUCCESS.getType()) {
msg = "企业认证成功"; msg = "企业认证成功";
} }
if(type == CommonEnum.AUTH_TYPE_FAILURE.getType()) { if (type == CommonEnum.AUTH_TYPE_FAILURE.getType()) {
msg = "企业认证失败"; msg = "企业认证失败";
} }
boolean b = new LambdaUpdateChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper).eq(QyzxEntInfoM::getId, entauthDto.getOrgCode()) boolean b = new LambdaUpdateChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
.set(QyzxEntInfoM::getAttestStatus, type).update(); .eq(QyzxEntInfoM::getId, entauthDto.getOrgCode()).set(QyzxEntInfoM::getAttestStatus, type).update();
if (b){ if (b) {
return ResultUtil.data(msg); return ResultUtil.data(msg);
} }
return ResultUtil.data("企业认证流程有误"); return ResultUtil.data("企业认证流程有误");
} }
/** /**
* 新增/编辑常用企业开票资料 * 新增/编辑常用企业开票资料
* *
...@@ -210,7 +212,8 @@ public class QyzxController { ...@@ -210,7 +212,8 @@ public class QyzxController {
*/ */
@PostMapping(value = "/invoiceusual") @PostMapping(value = "/invoiceusual")
@ApiOperation(value = "新增/编辑常用企业开票资料", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "新增/编辑常用企业开票资料", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean,@RequestBody QyzxInvoiceUsual qyzxInvoiceUsual) { public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean,
@RequestBody QyzxInvoiceUsual qyzxInvoiceUsual) {
qyzxInvoiceUsual.setOrgCode(userBean.getOrgCode()); qyzxInvoiceUsual.setOrgCode(userBean.getOrgCode());
qyzxInvoiceUsual.setModifyUser(userBean.getEmpNum()); qyzxInvoiceUsual.setModifyUser(userBean.getEmpNum());
boolean tof = qyzxInvoiceUsual.insertOrUpdate(); boolean tof = qyzxInvoiceUsual.insertOrUpdate();
...@@ -219,6 +222,7 @@ public class QyzxController { ...@@ -219,6 +222,7 @@ public class QyzxController {
} }
return ResultUtil.error("开票资料修改无效"); return ResultUtil.error("开票资料修改无效");
} }
/** /**
* 显示常用的企业开票资料 * 显示常用的企业开票资料
* *
...@@ -229,7 +233,8 @@ public class QyzxController { ...@@ -229,7 +233,8 @@ public class QyzxController {
@GetMapping(value = "/invoiceusual") @GetMapping(value = "/invoiceusual")
@ApiOperation(value = "显示常用的企业开票资料", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "显示常用的企业开票资料", httpMethod = "GET", notes = "接口发布说明")
public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) { public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) {
QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper).eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one(); QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper)
.eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one();
return ResultUtil.data(one, "显示常用的企业开票资料"); return ResultUtil.data(one, "显示常用的企业开票资料");
} }
...@@ -251,6 +256,20 @@ public class QyzxController { ...@@ -251,6 +256,20 @@ public class QyzxController {
return ResultUtil.data(smanagerphone, "企业超管头像和电话号码"); return ResultUtil.data(smanagerphone, "企业超管头像和电话号码");
} }
/* *//**
* 获取企业的到期时间和版本号
*//*
* @GetMapping(value = "/endtimeversion")
*
* @ApiOperation(value = "获取企业的到期时间和版本号", httpMethod = "GET", notes = "接口发布说明")
* public Result<QyzxEntInfoM> endtimeversion(@CurrentUser UserBean userBean) {
* QyzxEntInfoM qyzxEntInfoM = new
* LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
* .select(QyzxEntInfoM::getEndTime,QyzxEntInfoM::getLevel).eq(QyzxEntInfoM::
* getId, userBean.getOrgCode()).one(); return ResultUtil.data(qyzxEntInfoM,
* "获取企业的到期时间和版本号成功"); }
*/
/** /**
* 企业列表 * 企业列表
* *
...@@ -498,12 +517,11 @@ public class QyzxController { ...@@ -498,12 +517,11 @@ public class QyzxController {
@PostMapping(value = "/feedback") @PostMapping(value = "/feedback")
@ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean, public Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
@RequestParam(required = false) String opinionText, @RequestParam(required = false) String opinionText, @RequestParam(required = false) String moudle,
@RequestParam(required = false) String moudle,
@Param("files") List<MultipartFile> files) { @Param("files") List<MultipartFile> files) {
String url = null; String url = null;
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
if (files!=null) { if (files != null) {
for (MultipartFile file : files) { for (MultipartFile file : files) {
String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle + "/" + file.getOriginalFilename(); String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle + "/" + file.getOriginalFilename();
if (file == null || file.getSize() <= 0) { if (file == null || file.getSize() <= 0) {
...@@ -524,7 +542,7 @@ public class QyzxController { ...@@ -524,7 +542,7 @@ public class QyzxController {
feeback.setCreateTime(new Date()); feeback.setCreateTime(new Date());
feeback.setOrgCode(userBean.getOrgCode()); feeback.setOrgCode(userBean.getOrgCode());
boolean a = feeback.insert(); boolean a = feeback.insert();
if (a && list.size()>0) { if (a && list.size() > 0) {
for (String opinionUrl : list) { for (String opinionUrl : list) {
QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(opinionUrl).build().insert(); QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(opinionUrl).build().insert();
} }
...@@ -532,22 +550,20 @@ public class QyzxController { ...@@ -532,22 +550,20 @@ public class QyzxController {
return ResultUtil.success("意见反馈成功!"); return ResultUtil.success("意见反馈成功!");
} }
/** /**
* 查看服务列表 * 查看服务列表
*/ */
@GetMapping(value = "/servelist") @GetMapping(value = "/servelist")
@ApiOperation(value = "查看服务列表",httpMethod = "GET",notes = "接口发布说明") @ApiOperation(value = "查看服务列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxPayServe>> servelist(){ public Result<List<QyzxPayServe>> servelist() {
List<QyzxPayServe> list = new LambdaQueryChainWrapper<QyzxPayServe>(qyzxPayServeMapper) List<QyzxPayServe> list = new LambdaQueryChainWrapper<QyzxPayServe>(qyzxPayServeMapper)
.select(QyzxPayServe::getName,QyzxPayServe::getNum,QyzxPayServe::getSpecialPrice,QyzxPayServe::getOriginalPrice, .select(QyzxPayServe::getName, QyzxPayServe::getNum, QyzxPayServe::getSpecialPrice,
QyzxPayServe::getSort,QyzxPayServe::getUnit,QyzxPayServe::getRemark).orderByAsc(QyzxPayServe::getId).list(); QyzxPayServe::getOriginalPrice, QyzxPayServe::getSort, QyzxPayServe::getUnit,
QyzxPayServe::getRemark)
.orderByAsc(QyzxPayServe::getId).list();
return ResultUtil.data(list, "查看服务列表成功"); return ResultUtil.data(list, "查看服务列表成功");
} }
/** /**
* 购买服务(添加服务计算,添加购买记录) * 购买服务(添加服务计算,添加购买记录)
* *
...@@ -641,8 +657,6 @@ public class QyzxController { ...@@ -641,8 +657,6 @@ public class QyzxController {
return ResultUtil.data(page, logBuyDto, "查询成功"); return ResultUtil.data(page, logBuyDto, "查询成功");
} }
/** /**
* 账号管理 获取账号 * 账号管理 获取账号
* *
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
<result column="status" property="status" /> <result column="status" property="status" />
<result column="org_id" property="orgId" /> <result column="org_id" property="orgId" />
<result column="email" property="email" /> <result column="email" property="email" />
<result column="end_time" property="endTime" />
<result column="reg_time" property="regTime" /> <result column="reg_time" property="regTime" />
<result column="head_url" property="headUrl" /> <result column="head_url" property="headUrl" />
<result column="phone" property="phone" /> <result column="phone" property="phone" />
...@@ -36,8 +35,8 @@ ...@@ -36,8 +35,8 @@
</resultMap> </resultMap>
<select id="adminlist" <select id="adminlist"
resultMap="adminlistdto" > resultMap="adminlistdto" ><!-- b.email,b.end_time,b.reg_time, -->
select a.emp_num,a.user_type,a.status,b.org_id,b.email,b.end_time,b.reg_time,b.head_url,b.phone,b.username,c.name,c.sex,c.job_num,c.english_name,c.bmgw_id select a.emp_num,a.user_type,a.status,b.org_id,b.email,b.reg_time,b.head_url,b.phone,b.username,c.name,c.sex,c.job_num,c.english_name,c.bmgw_id
from qyzx_emp_ent_asso a from qyzx_emp_ent_asso a
left join qyzx_emp_login b on a.emp_num = b.id left join qyzx_emp_login b on a.emp_num = b.id
left join yggl_main_emp c on a.emp_num = c.emp_num and a.org_code = c.org_code left join yggl_main_emp c on a.emp_num = c.emp_num and a.org_code = c.org_code
......
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