Commit 66070157 by lal

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal

parents c3475342 e2ac51a1
......@@ -202,8 +202,8 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="手机APPid",example="appopenid手机app")
private String appopenid;
@ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号")
private Integer isManager;
// @ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号")
// private Integer isManager;
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts;
......
......@@ -13,7 +13,8 @@ public class Regular {
/**
* 手机号码
*/
public static final String PHONE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
// public static final String PHONE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
public static final String PHONE = "^[1]{10}$";
/**
* 账号是否合法
*/
......
......@@ -535,10 +535,13 @@ public class LoginController {
return ResultUtil.error("注册企业失败2");
}
login = qyzxEmpLogin;
} else {
login.setOrgId(qyId);
login.updateById();
}
// 员工信息
boolean b4 = YgglMainEmp.builder().orgCode(qyId).empNum(login.getId()).rzTime(new Date())
.name(username).phone(phone).workEmail(email).jobType(YgJobType.QUANZHI.getType())
boolean b4 = YgglMainEmp.builder().orgCode(qyId).empNum(login.getId()).rzTime(new Date()).name(username)
.phone(phone).workEmail(email).jobType(YgJobType.QUANZHI.getType())
.jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType()).build().insert();
if (!b4) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
......@@ -667,6 +670,22 @@ public class LoginController {
qyzxEmpLogin1.setUserType(eEA != null ? eEA.getUserType() : null);
List<QysDto> qys = qyzxEmpLoginMapper.getQys(qyzxEmpLogin1.getId());
// 查询部门放进去
for (QysDto qysDto : qys) {
Integer bmgwId = qysDto.getBmgwId();
ZzglBmgwM gw = ZzglBmgwM.builder().build()
.selectOne(new LambdaQueryWrapper<ZzglBmgwM>().eq(ZzglBmgwM::getId, bmgwId));
if (gw != null) {
qysDto.setGwName(gw.getName());
if (gw.getUpId() != null) {
Integer upId = gw.getUpId();
ZzglBmgwM bm = ZzglBmgwM.builder().build()
.selectOne(new LambdaQueryWrapper<ZzglBmgwM>().eq(ZzglBmgwM::getId, upId));
qysDto.setBmName(bm.getName());
}
}
}
if (qys.size() == 0)
return ResultUtil.error("没有任何公司可以查看!");
qyzxEmpLogin1.setQys(qys);
......
......@@ -219,7 +219,6 @@ public class CrmController {
// YgglMainEmp yg = YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
// .eq(YgglMainEmp::getEmpNum, nowEmpNum).select(YgglMainEmp::getIsManager));
// TODO
QyzxEmpEntAsso qyzxEmpEntAsso = QyzxEmpEntAsso.builder().build()
.selectOne(new LambdaQueryWrapper<QyzxEmpEntAsso>().eq(QyzxEmpEntAsso::getOrgCode, orgCode)
.eq(QyzxEmpEntAsso::getEmpNum, nowEmpNum));
......@@ -365,13 +364,15 @@ public class CrmController {
crmClientData.setCreateUser(empNum);
SysRegion district = getSysRegion(crmClientData.getDistrictId());
// crmClientData.setZipCode(district.getZipCode());
crmClientData.setDistrict(district.getRegionName());
SysRegion city = getSysRegion(district.getRegionCode());
crmClientData.setCity(city.getRegionName());
crmClientData.setCityId(city.getKeyId());
SysRegion province = getSysRegion(city.getRegionCode());
crmClientData.setProvinceId(province.getKeyId());
crmClientData.setProvince(province.getRegionName());
if (district != null) {
crmClientData.setDistrict(district.getRegionName());
SysRegion city = getSysRegion(district.getRegionCode());
crmClientData.setCity(city.getRegionName());
crmClientData.setCityId(city.getKeyId());
SysRegion province = getSysRegion(city.getRegionCode());
crmClientData.setProvinceId(province.getKeyId());
crmClientData.setProvince(province.getRegionName());
}
crmClientData.setBelongUserName(getEmpName(orgCode, crmClientData.getBelongUser()));
crmClientData.setOrgCode(getOrgCode(userBean));
......
package cn.timer.api.controller.qyzx;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
......@@ -40,7 +38,6 @@ import cn.timer.api.bean.qyzx.QyzxLogBuy;
import cn.timer.api.bean.qyzx.QyzxOperLog;
import cn.timer.api.bean.qyzx.QyzxPayServe;
import cn.timer.api.bean.qyzx.QyzxSuggestionFeeback;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser;
......@@ -479,17 +476,17 @@ public class QyzxController {
// IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery(page, qyzxOperLogQuaryDto);
if (qyzxOperLogQuaryDto.getEmpNums() == null) {
YgglMainEmp main = YgglMainEmp.builder().build()
.selectOne(new LambdaQueryWrapper<YgglMainEmp>().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getIsManager, 1)
.select(YgglMainEmp::getEmpNum, YgglMainEmp::getIsManager));
List<YgglMainEmp> child = YgglMainEmp.builder().build()
.selectList(new LambdaQueryWrapper<YgglMainEmp>().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getIsManager, 2)
.select(YgglMainEmp::getEmpNum, YgglMainEmp::getIsManager));
child.add(main);
Collections.sort(child, Comparator.comparing(YgglMainEmp::getIsManager));
List<Integer> empNums = child.stream().map(YgglMainEmp::getEmpNum).collect(Collectors.toList());
List<Integer> roles = new ArrayList<Integer>();
roles.add(SysRoleType.U_TYPE_ADMIN.getType());
roles.add(SysRoleType.U_TYPE_C_ADMIN.getType());
List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build()
.selectList(new LambdaQueryWrapper<QyzxEmpEntAsso>()
.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
.in(QyzxEmpEntAsso::getUserType, roles).select(QyzxEmpEntAsso::getEmpNum));
List<Integer> empNums = list.stream().map(QyzxEmpEntAsso::getEmpNum).collect(Collectors.toList());
qyzxOperLogQuaryDto.setEmpNums(empNums);
}
IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery2(page, qyzxOperLogQuaryDto);
......
package cn.timer.api.controller.zzgl;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
......@@ -28,6 +29,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.util.StrUtil;
......@@ -129,13 +131,41 @@ public class ZzglController {
tree.setName(treeNode.getName());
// 扩展属性 ...
tree.putExtra("leader", treeNode.getLeader());
tree.putExtra("type", treeNode.getType());
// tree.putExtra("other", new Object());
});
// System.out.println(treeNodes);
// System.out.println(treeNodes.size());
// System.out.println(deep2(treeNodes));
return ResultUtil.data(treeNodes);
}
// 非递归,利用树的层次遍历
// public static int deep2(List<Tree<String>> treeNodes) {
// if(treeNodes == null)
// return 0;
// int depth = 0;
// for (Tree<String> tree : treeNodes) {
// if (tree.getChildren() == null) {
// depth = tree.size()-1 > depth ? tree.size()-1 : depth;
// if (Convert.toInt(tree.get("type")) == 1) {
// depth = depth > 1 ? depth - 1 : depth;
// }
// System.out.println("depth = "+ depth);
// }else {
// int temp = deep2(tree.getChildren());
// depth = temp > depth ? temp : depth;
// System.out.println("temp = "+ temp);
// }
// }
//
// return depth;
// }
/**
* 获取部门
*
......
......@@ -61,12 +61,19 @@ public class QysDto implements Serializable{
private String enName;
@ApiModelProperty(value = "部门岗位编号", example = "123")
private Integer bmgwId;
@ApiModelProperty(value = "部门名", example = "123")
private String bmName;
@ApiModelProperty(value = "岗位名", example = "123")
private String gwName;
@ApiModelProperty(value = "在企业中的员工工号", example = "123")
private Integer jobNum;
@ApiModelProperty(value = "性别", example = "女")
private String sex;
@ApiModelProperty(value = "是否企业中心账号", example = "0-否 1-主账号 2-子账号")
private Integer isManager;
// @ApiModelProperty(value = "是否企业中心账号", example = "0-否 1-主账号 2-子账号")
// private Integer isManager;
}
......@@ -156,7 +156,7 @@ public class RouterUtils {
router.setExecute(EXECUTING);
if (r != null && RELATION_TYPE_USERS.equals(r.getType())) {
// if (r != null && RELATION_TYPE_USERS.equals(r.getType())) {
List<User> listUser = router.getRelation().get(0).getUsers();
user:
for (int i = 0; i < listUser.size(); i++) {
......@@ -174,7 +174,7 @@ public class RouterUtils {
}
}
}
// }
}
NextNode(router.getChildren(), obj , isFirse, isAuditNext);
......
......@@ -40,7 +40,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
Integer TransferInDepartment = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Convert.toInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue());
// 调入岗位
Integer TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInPosition",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInPosition",FromData.class).getValue());
if (TransferInDepartment == null || TransferInPosition == null) {
if (TransferInDepartment == null) {
throw new CustomException("部门或岗位 未填写,审批失败");
}
// 生效日期
......
......@@ -38,14 +38,16 @@
<result column="bmgw_id" property="bmgwId" />
<result column="job_num" property="jobNum" />
<result column="sex" property="sex" />
<result column="is_manager" property="isManager" />
<!-- <result column="is_manager" property="isManager" /> -->
</resultMap>
<select id="getQys" resultMap="qysdto">
select b.id,b.name,b.credit_code,b.codes,b.is_on_stock,b.logo_url,b.register_time,b.end_time,b.size,b.level,a.user_type,b.auth_type,a.status
,c.name empname,c.english_name,c.bmgw_id,c.job_num,c.sex,c.is_manager
select b.id,b.name,b.credit_code,b.codes,b.is_on_stock,b.logo_url,b.register_time,
b.end_time,b.size,b.level,a.user_type,b.auth_type,a.status,
c.name empname,c.english_name,c.bmgw_id,c.job_num,c.sex,c.is_manager
from qyzx_emp_ent_asso a
left join qyzx_ent_info_m b on a.org_code = b.id
left join yggl_main_emp c on a.emp_num = c.emp_num and a.org_code = c.org_code
<!-- left join zzgl_bmgw_m d on d.id = c.bmgw_id -->
where a.emp_num = #{emp_num}
order by a.status desc,a.user_type desc,b.id
</select>
......
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