Commit fe0f4daa by tangzhaoqian

绩效管理、员工管理bug修复

parent 5d8e0f09
{
{
"RootName": "DataModels",
"CTVER": "43543231",
"TableCount": 4,
"Count": 1,
"items": [{
"ID": 74,
"Name": "组织管理更新版",
"OrderNo": 1,
"ConfigStr": "DrawerWidth=2120\nDrawerHeight=2880\nWorkAreaColor=12639424\nSelectedColor=-16777203\nDefaultObjectColor=15921906\nDefaultTitleColor=255\nDefaultPKColor=16711935\nDefaultFKColor=16711680\nDefaultBorderColor=12632256\nDefaultLineColor=16711680\nShowFieldType=1\nShowFieldIcon=1\nShowPhyFieldName=2\nDatabaseEngine=\nGenFKIndexesSQL=0\n",
"Tables": {
"Count": 4,
"items": [
{
"ID": 4,
"Name": "zzgl_bmgw_m",
"Caption": "部门岗位表",
"Memo": "部门岗位表",
"OrderNo": 1,
"GraphDesc": "Left=23.00\r\nTop=58.00",
"MetaFields": {
"Count": 11,
"items": [
{
"ID": 1,
"Name": "id",
"Memo": " ",
"OrderNo": 1,
"DisplayName": "编号",
"DataType": 2,
"KeyFieldType": 1
},
{
"ID": 426,
"Name": "up_dept_id",
"OrderNo": 2,
"DisplayName": "上级部门id",
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 7
},
{
"ID": 227,
"Name": "name",
"OrderNo": 3,
"DisplayName": "名称",
"DataType": 1,
"Nullable": true,
"DataLength": 255
},
{
"ID": 228,
"Name": "status",
"Memo": "状态 0:正常1:关闭",
"OrderNo": 4,
"DisplayName": "状态",
"DataType": 2,
"Nullable": true,
"DataLength": 2
},
{
"ID": 287,
"Name": "is_admin",
"Memo": "0:超管;1:管理员;2:员工",
"OrderNo": 5,
"DisplayName": "是否管理者",
"DataType": 2,
"Nullable": true,
"DataLength": 2
},
{
"ID": 277,
"Name": "is_update",
"Memo": "是否可修改 0:否 1:是",
"OrderNo": 6,
"DisplayName": "是否可修改",
"DataType": 2,
"Nullable": true,
"DataLength": 2
},
{
"ID": 542,
"Name": "add_way",
"Memo": "0:单个添加;1:批量导入",
"OrderNo": 7,
"DisplayName": "添加方式",
"DataType": 2,
"Nullable": true,
"DataLength": 2
},
{
"ID": 355,
"Name": "remark",
"OrderNo": 8,
"DisplayName": "备注",
"DataType": 1,
"Nullable": true,
"DataLength": 255
},
{
"ID": 429,
"Name": "tier",
"OrderNo": 9,
"DisplayName": "层级",
"DataType": 2,
"Nullable": true,
"DataLength": 2
},
{
"ID": 334,
"Name": "type",
"Memo": "0:部门;1:岗位",
"OrderNo": 10,
"DisplayName": "类型",
"DataType": 2,
"Nullable": true,
"DataLength": 2
},
{
"ID": 230,
"Name": "org_code",
"Memo": "企业中心(企业信息id)",
"OrderNo": 11,
"DisplayName": "组织机构代码",
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 8
}
]
}
},
{
"Name": "zzgl_asso_ygbmgwglb",
"Caption": "员工与部门岗位关联表",
"Memo": "员工与部门岗位关联表",
"OrderNo": 2,
"GraphDesc": "Left=451.00\r\nTop=45.00",
"MetaFields": {
"Count": 4,
"items": [
{
"ID": 1,
"Name": "id",
"OrderNo": 1,
"DisplayName": "主键",
"DataType": 2,
"KeyFieldType": 1
},
{
"ID": 2,
"Name": "emp_num",
"Memo": "员工工号",
"OrderNo": 2,
"DisplayName": "员工工号",
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 9
},
{
"ID": 3,
"Name": "dept_post_id",
"Memo": "部门岗位id",
"OrderNo": 3,
"DisplayName": "部门岗位id",
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 7
},
{
"ID": 1000,
"Name": "org_code",
"OrderNo": 4,
"DisplayName": "组织机构代码",
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 8
}
]
}
},
{
"ID": 6,
"Name": "zzgl_log_dgjl",
"Caption": "调岗记录",
"Memo": "调岗记录",
"OrderNo": 3,
"GraphDesc": "Left=236.00\r\nTop=58.00",
"MetaFields": {
"Count": 8,
"items": [
{
"ID": 1,
"Name": "id",
"OrderNo": 1,
"DisplayName": "编号",
"DataType": 2,
"KeyFieldType": 1
},
{
"ID": 2,
"Name": "emp_num",
"OrderNo": 2,
"DisplayName": "员工工号",
"DataType": 1,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 9
},
{
"ID": 3,
"Name": "obmgw_id",
"OrderNo": 3,
"DisplayName": "原部门id",
"DataType": 2,
"Nullable": true,
"DataLength": 7
},
{
"ID": 513,
"Name": "nbmgw_id",
"OrderNo": 4,
"DisplayName": "现部门id",
"DataType": 2,
"Nullable": true,
"DataLength": 7
},
{
"ID": 960,
"Name": "org_code",
"OrderNo": 5,
"DisplayName": "组织机构代码",
"DataType": 2,
"KeyFieldType": 3,
"Nullable": true,
"DataLength": 8
},
{
"ID": 6,
"Name": "create_time",
"OrderNo": 6,
"DisplayName": "创建时间",
"DataType": 4,
"Nullable": true
},
{
"ID": 7,
"Name": "comment",
"OrderNo": 7,
"DisplayName": "评语",
"DataType": 1,
"Nullable": true,
"DataLength": 255
},
{
"ID": 8,
"Name": "update_id",
"OrderNo": 8,
"DisplayName": "修改人的id",
"DataType": 2,
"Nullable": true,
"DataLength": 11
}
]
}
},
{
"ID": 4,
"Name": "zzgl_auth",
"Caption": "部门权限表+",
"CreateDate": "2019-11-29 13:32:04",
"OrderNo": 4,
"GraphDesc": "Left=249.00\r\nTop=231.00",
"MetaFields": {
"Count": 3,
"items": [
{
"ID": 1,
"Name": "menu_id",
"CreateDate": "2019-11-29 13:32:04",
"OrderNo": 1,
"DisplayName": "菜单编号",
"DataType": 1,
"Nullable": true
},
{
"ID": 5,
"Name": "bmgw_id",
"CreateDate": "2019-11-29 13:32:04",
"OrderNo": 2,
"DisplayName": "部门岗位编号",
"DataType": 2,
"Nullable": true
},
{
"ID": 6,
"Name": "org_code",
"CreateDate": "2019-11-29 13:32:04",
"OrderNo": 3,
"DisplayName": "企业编号",
"DataType": 2,
"Nullable": true
}
]
}
}
]
}
}]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -92,7 +92,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -92,7 +92,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
private Integer zzmm; private Integer zzmm;
@ApiModelProperty(value="籍贯 省/市/区 例:广东/广州/白云",example="101") @ApiModelProperty(value="籍贯 省/市/区 例:广东/广州/白云",example="101")
private Integer jg; private String jg;
@ApiModelProperty(value="户籍城市 省/市/区 例:广东/广州/白云",example="101") @ApiModelProperty(value="户籍城市 省/市/区 例:广东/广州/白云",example="101")
private Integer city; private Integer city;
......
...@@ -93,7 +93,7 @@ public interface YgEnumInterface { ...@@ -93,7 +93,7 @@ public interface YgEnumInterface {
*/ */
@Getter @Getter
enum jobStatus implements YgEnumInterface { enum jobStatus implements YgEnumInterface {
SHIYONG(1, "试用"), ZHENSHI(2, "正式"), LIZHIZHONG(3, "离职中"), YILIZHI(4, "已离职"); SHIYONG(0, "试用"), ZHENSHI(1, "正式"), LIZHIZHONG(2, "离职中"), YILIZHI(3, "已离职");
private Integer type; private Integer type;
......
...@@ -662,8 +662,12 @@ public class LoginController { ...@@ -662,8 +662,12 @@ public class LoginController {
String phone = entRegisterDto.getPhone(); String phone = entRegisterDto.getPhone();
String pw = entRegisterDto.getPw(); String pw = entRegisterDto.getPw();
if (phone == null || "".equals(phone) ) {
return ResultUtil.error("手机号不能为空!");
}
QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one(); .eq(QyzxEmpLogin::getPhone, phone).one();
if (qyzxEmpLogin1 != null) { if (qyzxEmpLogin1 != null) {
if (StrUtil.hasBlank(pw) || !qyzxEmpLogin1.getPw().equals(Md5.md5(pw))) if (StrUtil.hasBlank(pw) || !qyzxEmpLogin1.getPw().equals(Md5.md5(pw)))
return ResultUtil.error("帐号密码错误"); return ResultUtil.error("帐号密码错误");
......
...@@ -257,15 +257,17 @@ public class JxglController { ...@@ -257,15 +257,17 @@ public class JxglController {
List<JxglAppraisalIndicatorsT> aITs = jxglAppraisalT.getAppraisalIndicatorsTs(); List<JxglAppraisalIndicatorsT> aITs = jxglAppraisalT.getAppraisalIndicatorsTs();
if (aITs != null && aITs.size() > 0) { if (aITs != null && aITs.size() > 0) {
Integer weightSum = 0;
for (JxglAppraisalIndicatorsT aIT : aITs) { for (JxglAppraisalIndicatorsT aIT : aITs) {
// if (aIT.getIsEditWeight() == null) {
// throw new CustomException("权重编辑权限未设置");
// }
if (aIT.getType() == null) { if (aIT.getType() == null) {
throw new CustomException("指标类型未设置"); throw new CustomException("指标类型未设置");
} }
aIT.setWeight(aIT.getWeight() == null ? 0 : aIT.getWeight()); Integer weightNum = aIT.getWeight() == null ? 0 : aIT.getWeight();
weightSum += weightNum;
aIT.setWeight(weightNum);
aIT.setAppraisalTId(jxglAppraisalT.getId()); aIT.setAppraisalTId(jxglAppraisalT.getId());
// 新增 考核指标模板 // 新增 考核指标模板
if (aIT.insert()) { if (aIT.insert()) {
...@@ -280,6 +282,10 @@ public class JxglController { ...@@ -280,6 +282,10 @@ public class JxglController {
} }
} }
if (!weightSum.equals(100))
throw new CustomException("权重总和要等于 100%");
} }
return ResultUtil.success(); return ResultUtil.success();
} }
...@@ -929,10 +935,10 @@ public class JxglController { ...@@ -929,10 +935,10 @@ public class JxglController {
} }
/** /**
* 查询-所有员工绩效-汇总 * 查询-绩效管理-员工绩效-汇总
*/ */
@PostMapping(value = "/selects_emp_performance") @PostMapping(value = "/selects_emp_performance")
@ApiOperation(value = "14.查询-所有员工绩效-汇总", httpMethod = "POST", notes = "查询-所有员工绩效-汇总") @ApiOperation(value = "14.查询-绩效管理-员工绩效-汇总", httpMethod = "POST", notes = " 查询-绩效管理-员工绩效-汇总")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 14)
@Role @Role
public Result<Object> selectsEP(@CurrentUser UserBean userBean, @RequestBody EmpPerformanceQuery query) { public Result<Object> selectsEP(@CurrentUser UserBean userBean, @RequestBody EmpPerformanceQuery query) {
...@@ -955,9 +961,6 @@ public class JxglController { ...@@ -955,9 +961,6 @@ public class JxglController {
} }
} }
query.setEmpNums(empNums); query.setEmpNums(empNums);
IPage<JxglAppraisal> pageA = jxglAppraisalMapper.selectListEmpByQuery(page, query); IPage<JxglAppraisal> pageA = jxglAppraisalMapper.selectListEmpByQuery(page, query);
......
...@@ -265,9 +265,9 @@ public class YgglController { ...@@ -265,9 +265,9 @@ public class YgglController {
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one(); .eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
if (login == null) { if (login == null) {
// 初始化密码 pwd // 初始化密码 pwd
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pwd)) login = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pwd))
.sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(name).build(); .sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(name).build();
if (!qyzxEmpLogin.insert()) { if (!login.insert()) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("添加员工登录表失败,请检查输入信息"); return ResultUtil.error("添加员工登录表失败,请检查输入信息");
} }
...@@ -280,7 +280,7 @@ public class YgglController { ...@@ -280,7 +280,7 @@ public class YgglController {
QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(orgCode).userType(SysRoleType.U_TYPE_EMP.getType()) QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(orgCode).userType(SysRoleType.U_TYPE_EMP.getType())
.status(CommonEnum.U_STS_ON.getType()).build().insert(); .status(CommonEnum.U_STS_ON.getType()).build().insert();
ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType) ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex) .jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex)
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).build(); .empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).build();
ygglMainEmp.insert(); ygglMainEmp.insert();
...@@ -305,13 +305,12 @@ public class YgglController { ...@@ -305,13 +305,12 @@ public class YgglController {
if (ObjectUtil.isAllNotEmpty(ygglMainEmp.getRzTime(), ygglMainEmp.getZzTime()) if (ObjectUtil.isAllNotEmpty(ygglMainEmp.getRzTime(), ygglMainEmp.getZzTime())
&& !DateFormatUtils.getCompareDate(ygglMainEmp.getRzTime(), ygglMainEmp.getZzTime())) { && !DateFormatUtils.getCompareDate(ygglMainEmp.getRzTime(), ygglMainEmp.getZzTime())) {
ResultUtil.error("入职日期 不可以大于 转正日期"); return ResultUtil.error("入职日期 不可以大于 转正日期");
} }
if (ygglMainEmp.getEmpNum() != null) { if (ygglMainEmp.getEmpNum() != null) {
ygglMainEmp.update(new UpdateWrapper<YgglMainEmp>().lambda()
ygglMainEmp .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getEmpNum, ygglMainEmp.getEmpNum())); .eq(YgglMainEmp::getEmpNum, ygglMainEmp.getEmpNum()));
return ResultUtil.data(ygglMainEmp, "修改成功"); return ResultUtil.data(ygglMainEmp, "修改成功");
...@@ -346,17 +345,15 @@ public class YgglController { ...@@ -346,17 +345,15 @@ public class YgglController {
queryWrapper.lambda() queryWrapper.lambda()
.select(YgglMainEmp::getName, YgglMainEmp::getEmpNum, YgglMainEmp::getBmgwId, YgglMainEmp::getRzTime, .select(YgglMainEmp::getName, YgglMainEmp::getEmpNum, YgglMainEmp::getBmgwId, YgglMainEmp::getRzTime,
YgglMainEmp::getJobType, YgglMainEmp::getPhone, YgglMainEmp::getJobStatus) YgglMainEmp::getJobType, YgglMainEmp::getPhone, YgglMainEmp::getJobStatus)
.ne(YgglMainEmp::getJobStatus, YgEnumInterface.jobStatus.YILIZHI.getType()) .ne(YgglMainEmp::getJobStatus, jobStatus.YILIZHI.getType())
.eq(YgglMainEmp::getOrgCode, orgCode).eq(t != null && t > -1, YgglMainEmp::getJobType, t) .eq(YgglMainEmp::getOrgCode, orgCode).eq(t != null && t > -1, YgglMainEmp::getJobType, t)
.eq(j != null && j > -1, YgglMainEmp::getJobStatus, j) .eq(j != null && j > -1, YgglMainEmp::getJobStatus, j)
.in(!bList.isEmpty(), YgglMainEmp::getBmgwId, bList) .in(!bList.isEmpty(), YgglMainEmp::getBmgwId, bList)
.and(!StrUtil.hasBlank(q), wq -> wq.like(YgglMainEmp::getName, q).or().like(YgglMainEmp::getPhone, q)); .and(!StrUtil.hasBlank(q), wq -> wq.like(YgglMainEmp::getName, q).or().like(YgglMainEmp::getPhone, q));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper); IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper);
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
return ResultUtil.data(ygglMainEmpPage); return ResultUtil.data(ygglMainEmpPage);
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
} }
/** /**
...@@ -542,7 +539,7 @@ public class YgglController { ...@@ -542,7 +539,7 @@ public class YgglController {
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) { public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) {
List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper) List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, 1, 2, 3).list(); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jobStatus.SHIYONG.getType(), jobStatus.ZHENSHI.getType(), jobStatus.LIZHIZHONG.getType()).list();
return ResultUtil.data(list, "导出员工成功"); return ResultUtil.data(list, "导出员工成功");
} }
...@@ -1216,17 +1213,17 @@ public class YgglController { ...@@ -1216,17 +1213,17 @@ public class YgglController {
Integer empNum = lzygQueryDto.getEmpNum(); Integer empNum = lzygQueryDto.getEmpNum();
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda() YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())); .eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build(); YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表 // 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts"); BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts");
ygglMainLzb.insert(); ygglMainLzb.insert();
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()) YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(jobStatus.LIZHIZHONG.getType())
.beforeLeavingSts(ygglMainEmp.getJobStatus()).build() .beforeLeavingSts(ygglMainEmp.getJobStatus()).build()
.update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, empNum)); .update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, empNum));
YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime()) YgglMainLzb.builder().jobStatus(jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build() .lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build()
.update(new UpdateWrapper<YgglMainLzb>().lambda().eq(YgglMainLzb::getEmpNum, empNum)); .update(new UpdateWrapper<YgglMainLzb>().lambda().eq(YgglMainLzb::getEmpNum, empNum));
......
...@@ -305,8 +305,8 @@ ...@@ -305,8 +305,8 @@
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode} LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
LEFT JOIN jxgl_performance_appraisal c ON a.performance_appraisal_id = c.id LEFT JOIN jxgl_performance_appraisal c ON a.performance_appraisal_id = c.id
<!-- 缺部门 搜索 -->
<where> <where>
a.org_code = #{param.orgCode}
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and ( and (
b.name like CONCAT('%',#{param.query},'%') or b.name like CONCAT('%',#{param.query},'%') or
......
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