Commit 079faf5b by 邓实川 Committed by chenzg

业务组判空

parent 64344ae5
......@@ -103,12 +103,12 @@ public class CrmController {
return getYg(orgCode, empNum).getName();
}
private Integer getQyzxManager(Integer orgCode, Integer empNum) {
return YgglMainEmp.builder().build()
.selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
.eq(YgglMainEmp::getEmpNum, empNum).select(YgglMainEmp::getIsManager))
.getIsManager();
}
// private Integer getQyzxManager(Integer orgCode, Integer empNum) {
// return YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
// .eq(YgglMainEmp::getEmpNum, empNum).select(YgglMainEmp::getIsManager))
// .getIsManager();
// }
@GetMapping("getIndustry")
@ApiOperation(value = "获取行业列表", httpMethod = "GET", notes = "接口发布说明")
......@@ -220,8 +220,11 @@ public class CrmController {
public Result<Object> getBusinessGroup(@CurrentUser UserBean userBean) {
Integer nowEmpNum = getEmpNum(userBean);
Integer orgCode = getOrgCode(userBean);
Integer isManager = getQyzxManager(orgCode, nowEmpNum);
if (isManager != null && (isManager == 1 || isManager == 2)) {
YgglMainEmp yg = YgglMainEmp.builder().build()
.selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
.eq(YgglMainEmp::getEmpNum, nowEmpNum).select(YgglMainEmp::getIsManager));
if (yg != null && yg.getIsManager() != null && (yg.getIsManager() == 1 || yg.getIsManager() == 2)) {
List<CrmBusinessGroup> list = CrmBusinessGroup.builder().build()
.selectList(new QueryWrapper<CrmBusinessGroup>().lambda()
......
......@@ -201,9 +201,14 @@ public class DzhtController2 {
@PostMapping("/orgTemplate")
@ApiOperation(value = "创建机构模板印章", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> orgTemplate(@CurrentUser UserBean userBean, @RequestBody DzhtAssoQyyz qyyz) {
String orgId = DzhtAssoQyzc.builder().build().selectOne(
// new QueryWrapper<DzhtAssoQyzc>().eq("third_party_user_id", qyyz.getThirdPartyUserId()).select("org_id"))
new QueryWrapper<DzhtAssoQyzc>().eq("org_code", userBean.getOrgCode()).select("org_id")).getOrgId();// 查询orgId
DzhtAssoQyzc yz = DzhtAssoQyzc.builder().build()
.selectOne(new QueryWrapper<DzhtAssoQyzc>().eq("org_code", userBean.getOrgCode()).select("org_id"));
if (yz == null) {
return ResultUtil.error("请先在签约主体中进行企业认证");
}
String orgId = yz.getOrgId();// 查询orgId
// String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户
// 印章参数
String alias = qyyz.getAlias();
......
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