开票审核、基本信息
This commit is contained in:
+18
@@ -30,6 +30,7 @@ import com.jero.project.entity.PayCommonProject;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.service.IPayCommonProjectService;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.standards.memberinfo.service.IMemberInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -88,6 +89,9 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
||||
private IPayMemberProjectSubitemService memberProjectSubitemService;
|
||||
@Resource
|
||||
private ITbMemberProjectSubitemService tbMemberProjectSubitemService;
|
||||
@Resource
|
||||
private IMemberInfoService memberInfoService;
|
||||
|
||||
@Value("${defaultPassword}")
|
||||
private String defaultPassword;
|
||||
|
||||
@@ -976,4 +980,18 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
||||
return Result.OK("文件导入成功!");
|
||||
}
|
||||
|
||||
// @RequiresPermissions("contact:search")
|
||||
@ApiOperation(value="联系人管理-分页列表查询", notes="联系人管理-分页列表查询")
|
||||
@GetMapping(value = "/baseInfo")
|
||||
public Result<?> baseInfo() {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
LambdaQueryWrapper<PayContactsManagement> queryPayContactsManagement = new LambdaQueryWrapper<>();
|
||||
queryPayContactsManagement.eq(PayContactsManagement::getUsername,sysUser.getUsername());
|
||||
PayContactsManagement contacts = payContactsManagementService.getOne(queryPayContactsManagement);
|
||||
|
||||
Map<String,Object> baseInfo = memberInfoService.baseInfo(contacts);
|
||||
|
||||
return Result.OK(baseInfo);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -120,7 +120,11 @@ public class PayPaymentCheckController extends JeroController<PayPaymentRecordSu
|
||||
log.error("审核异常",e);
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK(list.get(0));
|
||||
if(list!=null && list.size()>0){
|
||||
return Result.OK(list.get(0));
|
||||
}else{
|
||||
return Result.OK("无数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.jero.standards.memberinfo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表
|
||||
* </p>
|
||||
*
|
||||
* @Author scott
|
||||
* @since 2018-12-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class SysUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Excel(name = "用户名", width = 15)
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String realname;
|
||||
|
||||
/**
|
||||
* 单位全称
|
||||
*/
|
||||
@Excel(name = "单位全称", width = 15)
|
||||
@ApiModelProperty(value = "单位全称")
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Excel(name = "E-mail", width = 15)
|
||||
@ApiModelProperty(value = "电子邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 确认密码
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@ApiModelProperty(value = "确认密码")
|
||||
@TableField(exist = false)
|
||||
private String verifyPassword;
|
||||
|
||||
/**
|
||||
* md5密码盐
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
@ApiModelProperty(value = "md5密码盐")
|
||||
private String salt;
|
||||
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Excel(name = "手机号", width = 15)
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
|
||||
/**
|
||||
* 删除状态(0,正常,1已删除 用户注册之后审核之前的状态为1)
|
||||
*/
|
||||
@Excel(name = "删除状态", width = 15,dicCode="del_flag")
|
||||
// @TableLogic
|
||||
@ApiModelProperty(value = "删除状态")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
@ApiModelProperty(value = "角色")
|
||||
@TableField(exist = false)
|
||||
private String roleName;
|
||||
|
||||
/**通讯地址*/
|
||||
@ApiModelProperty(value = "通讯地址")
|
||||
@TableField(exist = false)
|
||||
private String address;
|
||||
|
||||
}
|
||||
+6
@@ -3,6 +3,7 @@ package com.jero.standards.memberinfo.mapper;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.standards.memberinfo.entity.SysUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import com.jero.standards.memberinfo.entity.MemberInfo;
|
||||
@@ -18,4 +19,9 @@ import java.util.List;
|
||||
public interface MemberInfoMapper extends BaseMapper<MemberInfo> {
|
||||
Integer countByCompanyName(@Param("companyName")String companyName);
|
||||
|
||||
/**
|
||||
* 得到标协管理者信息
|
||||
* @return
|
||||
*/
|
||||
SysUser getBXGLZ();
|
||||
}
|
||||
|
||||
+8
@@ -8,4 +8,12 @@
|
||||
where tmi.member_type is not null
|
||||
and (su.realname = #{companyName} or su.company_name = #{companyName})
|
||||
</select>
|
||||
|
||||
<!-- 得到标协管理者信息 -->
|
||||
<select id="getBXGLZ" resultType="com.jero.standards.memberinfo.entity.SysUser">
|
||||
select su.*,tmi.address
|
||||
from sys_user su
|
||||
left join tb_member_info tmi on su.id = tmi.id
|
||||
where username = 'BXGLZ'
|
||||
</select>
|
||||
</mapper>
|
||||
+10
@@ -1,8 +1,11 @@
|
||||
package com.jero.standards.memberinfo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.standards.memberinfo.entity.MemberInfo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 会员信息表
|
||||
* @Author: jeecg-boot
|
||||
@@ -12,4 +15,11 @@ import com.jero.standards.memberinfo.entity.MemberInfo;
|
||||
public interface IMemberInfoService extends IService<MemberInfo> {
|
||||
|
||||
int check(String companyName);
|
||||
|
||||
/**
|
||||
* 查询会员信息
|
||||
* @param contacts
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> baseInfo(PayContactsManagement contacts);
|
||||
}
|
||||
|
||||
+41
-1
@@ -3,13 +3,24 @@ package com.jero.standards.memberinfo.service.impl;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.member.entity.PayMemberProject;
|
||||
import com.jero.standards.memberinfo.entity.MemberInfo;
|
||||
import com.jero.standards.memberinfo.entity.SysUser;
|
||||
import com.jero.standards.memberinfo.mapper.MemberInfoMapper;
|
||||
import com.jero.standards.memberinfo.service.IMemberInfoService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 会员信息表
|
||||
* @Author: jeecg-boot
|
||||
@@ -20,9 +31,38 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
|
||||
@DS(value = "multi-datasource1")
|
||||
public class MemberInfoServiceImpl extends ServiceImpl<MemberInfoMapper, MemberInfo> implements IMemberInfoService {
|
||||
|
||||
@Resource
|
||||
MemberInfoMapper memberInfoMapper;
|
||||
@Override
|
||||
public int check(String companyName) {
|
||||
return baseMapper.countByCompanyName(companyName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员信息
|
||||
* @param contacts
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String,Object> baseInfo(PayContactsManagement contacts) {
|
||||
|
||||
//右侧本企业信息
|
||||
LambdaQueryWrapper<MemberInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(MemberInfo::getId,contacts.getMemberId());
|
||||
MemberInfo memberInfo = memberInfoMapper.selectOne(wrapper);
|
||||
|
||||
//左侧秘书处信息
|
||||
SysUser secretariat = memberInfoMapper.getBXGLZ();
|
||||
//解密
|
||||
String phone = PasswordUtil.decrypt(secretariat.getPhone(), PasswordUtil.ALGORITHM, PasswordUtil.Salt);
|
||||
secretariat.setPhone(phone);
|
||||
String email = PasswordUtil.decrypt(secretariat.getEmail(), PasswordUtil.ALGORITHM, PasswordUtil.Salt);
|
||||
secretariat.setEmail(email);
|
||||
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("memberInfo",memberInfo);
|
||||
map.put("secretariat",secretariat);
|
||||
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user