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> {
@ApiModelProperty(value="注册时间 ",example="注册时间")
private Date regTime;
@ApiModelProperty(value="到期时间 ",example="到期时间")
private Date endTime;
/*
* @ApiModelProperty(value="到期时间 ",example="到期时间") private Date endTime;
*/
@ApiModelProperty(value="头像地址 ",example="http://asd")
private String headUrl;
......
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 com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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.ApiModelProperty;
import lombok.AllArgsConstructor;
......
......@@ -54,6 +54,18 @@ public enum CommonEnum {
AUTH_TYPE_SUCCESS(2,"认证成功"),
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;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
......@@ -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();
if (!b1) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
......@@ -389,9 +390,14 @@ public class LoginController {
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))
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date())
.endTime(DateUtil.nextMonth()).build();
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date()).build();
boolean b2 = qyzxEmpLogin.insert();
if (!b2) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
......
......@@ -97,16 +97,16 @@ public class QyzxController {
@Autowired
private ZzglBmgwMMapper zzglBmgwMMapper;
@Autowired
private QyzxPayServeMapper qyzxPayServeMapper;
@Autowired
private QyzxSuggestionFeebackMapper qyzxSuggestionFeebackMapper;
@Autowired
private QyzxFeebackAccessoryMapper qyzxFeebackAccessoryMapper;
@Autowired
private QyzxInvoiceUsualMapper qyzxInvoiceUsualMapper;
......@@ -124,7 +124,7 @@ public class QyzxController {
.eq(orgCode != null, QyzxEntInfoM::getId, orgCode).one();
return ResultUtil.data(qyzxEntInfoM, "获取企业信息成功");
}
/**
* 添加/修改企业信息
*
......@@ -135,10 +135,11 @@ public class QyzxController {
@ApiOperation(value = "添加/修改企业信息", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxEntInfoM> addent(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) {
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.insertOrUpdate();
return ResultUtil.data(qyzxEntInfoM, "添加/修改企业");
}
......@@ -179,38 +180,40 @@ public class QyzxController {
*/
/**
* 运营管理 企业认证-审核-通过/不通过(weng)
*
* @param qyzxEntAuth
* @return
*/
* 运营管理 企业认证-审核-通过/不通过(weng)
*
* @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 == CommonEnum.AUTH_TYPE_SUCCESS.getType()) {
msg = "企业认证成功";
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 = "企业认证失败";
}
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);
}
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("企业认证流程有误");
return ResultUtil.data("企业认证流程有误");
}
/**
* 新增/编辑常用企业开票资料
*
* @param QyzxInvoiceUsual
* @return
*/
* 新增/编辑常用企业开票资料
*
* @param QyzxInvoiceUsual
* @return
*/
@PostMapping(value = "/invoiceusual")
@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.setModifyUser(userBean.getEmpNum());
boolean tof = qyzxInvoiceUsual.insertOrUpdate();
......@@ -219,17 +222,19 @@ public class QyzxController {
}
return ResultUtil.error("开票资料修改无效");
}
/**
* 显示常用的企业开票资料
*
* @param QyzxInvoiceUsual
* @return
*/
* 显示常用的企业开票资料
*
* @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();
QyzxInvoiceUsual one = new LambdaQueryChainWrapper<QyzxInvoiceUsual>(qyzxInvoiceUsualMapper)
.eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()).one();
return ResultUtil.data(one, "显示常用的企业开票资料");
}
......@@ -251,6 +256,20 @@ public class QyzxController {
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,
* "获取企业的到期时间和版本号成功"); }
*/
/**
* 企业列表
*
......@@ -497,13 +516,12 @@ public class QyzxController {
*/
@PostMapping(value = "/feedback")
@ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
@RequestParam(required = false) String opinionText,
@RequestParam(required = false) String moudle,
public Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
@RequestParam(required = false) String opinionText, @RequestParam(required = false) String moudle,
@Param("files") List<MultipartFile> files) {
String url = null;
List<String> list = new ArrayList<String>();
if (files!=null) {
if (files != null) {
for (MultipartFile file : files) {
String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle + "/" + file.getOriginalFilename();
if (file == null || file.getSize() <= 0) {
......@@ -524,30 +542,28 @@ public class QyzxController {
feeback.setCreateTime(new Date());
feeback.setOrgCode(userBean.getOrgCode());
boolean a = feeback.insert();
if (a && list.size()>0) {
if (a && list.size() > 0) {
for (String opinionUrl : list) {
QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(opinionUrl).build().insert();
}
}
return ResultUtil.success("意见反馈成功!");
}
/**
* 查看服务列表
*/
@GetMapping(value = "/servelist")
@ApiOperation(value = "查看服务列表",httpMethod = "GET",notes = "接口发布说明")
public Result<List<QyzxPayServe>> servelist(){
List<QyzxPayServe> list = new LambdaQueryChainWrapper<QyzxPayServe>(qyzxPayServeMapper)
.select(QyzxPayServe::getName,QyzxPayServe::getNum,QyzxPayServe::getSpecialPrice,QyzxPayServe::getOriginalPrice,
QyzxPayServe::getSort,QyzxPayServe::getUnit,QyzxPayServe::getRemark).orderByAsc(QyzxPayServe::getId).list();
@ApiOperation(value = "查看服务列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxPayServe>> servelist() {
List<QyzxPayServe> list = new LambdaQueryChainWrapper<QyzxPayServe>(qyzxPayServeMapper)
.select(QyzxPayServe::getName, QyzxPayServe::getNum, QyzxPayServe::getSpecialPrice,
QyzxPayServe::getOriginalPrice, QyzxPayServe::getSort, QyzxPayServe::getUnit,
QyzxPayServe::getRemark)
.orderByAsc(QyzxPayServe::getId).list();
return ResultUtil.data(list, "查看服务列表成功");
}
/**
* 购买服务(添加服务计算,添加购买记录)
*
......@@ -641,8 +657,6 @@ public class QyzxController {
return ResultUtil.data(page, logBuyDto, "查询成功");
}
/**
* 账号管理 获取账号
*
......
......@@ -23,7 +23,6 @@
<result column="status" property="status" />
<result column="org_id" property="orgId" />
<result column="email" property="email" />
<result column="end_time" property="endTime" />
<result column="reg_time" property="regTime" />
<result column="head_url" property="headUrl" />
<result column="phone" property="phone" />
......@@ -36,8 +35,8 @@
</resultMap>
<select id="adminlist"
resultMap="adminlistdto" >
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
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.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
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
......
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