Commit f12d0e9b authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.6.5' into MVP1.6.5

parents 00f54fdd 59add654
...@@ -60,6 +60,13 @@ public class R<T> implements Serializable { ...@@ -60,6 +60,13 @@ public class R<T> implements Serializable {
this.msg = e.getMessage(); this.msg = e.getMessage();
this.code = CommonConstants.FAIL; this.code = CommonConstants.FAIL;
} }
public R( String msg ,int code) {
super();
this.msg = msg;
this.code = code;
}
public static <T> R<T> ok() { public static <T> R<T> ok() {
return restResult(null, CommonConstants.SUCCESS, null); return restResult(null, CommonConstants.SUCCESS, null);
} }
......
...@@ -52,10 +52,10 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable { ...@@ -52,10 +52,10 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable {
/** /**
* 缴费工资 * 缴费工资
*/ */
@ExcelAttribute(name = "缴费工资", isFloat = true,max = "999999999.99", min= -999999999) @ExcelAttribute(name = "缴费工资(不导入)", isFloat = true,max = "999999999.99", min= -999999999)
@Schema(description = "缴费工资") @Schema(description = "缴费工资(不导入)")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴费工资", converter = BigDecimalConverter.class) @ExcelProperty(value = "缴费工资(不导入)", converter = BigDecimalConverter.class)
private BigDecimal paymentSalary; private BigDecimal paymentSalary;
/** /**
...@@ -70,10 +70,10 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable { ...@@ -70,10 +70,10 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable {
/** /**
* 费率 * 费率
*/ */
@ExcelAttribute(name = "费率") @ExcelAttribute(name = "费率(不导入)")
@Schema(description = "费率") @Schema(description = "费率(不导入)")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "费率") @ExcelProperty(value = "费率(不导入)")
private String paymentPer; private String paymentPer;
/** /**
...@@ -86,12 +86,12 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable { ...@@ -86,12 +86,12 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable {
private BigDecimal paymentMoney; private BigDecimal paymentMoney;
/** /**
* 人员编号 * 人员编号(不导入)
*/ */
@ExcelAttribute(name = "人员编号") @ExcelAttribute(name = "人员编号(不导入)")
@Schema(description = "人员编号") @Schema(description = "人员编号(不导入)")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员编号") @ExcelProperty(value = "人员编号(不导入)")
private String empNo; private String empNo;
/** /**
...@@ -164,6 +164,8 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable { ...@@ -164,6 +164,8 @@ public class TPaymentTaxSocialVo extends RowIndex implements Serializable {
@Length(max = 32, message = "社保户不能超过32个字符") @Length(max = 32, message = "社保户不能超过32个字符")
@ExcelAttribute(name = "社保户", maxLength = 32) @ExcelAttribute(name = "社保户", maxLength = 32)
@Schema(description = "社保户") @Schema(description = "社保户")
@ExcelProperty(value = "社保户")
@HeadFontStyle(fontHeightInPoints = 11)
private String socialHousehold; private String socialHousehold;
} }
...@@ -504,7 +504,7 @@ public class UserController { ...@@ -504,7 +504,7 @@ public class UserController {
*/ */
@SysLog("从ldap实时更新用户和部门") @SysLog("从ldap实时更新用户和部门")
@PostMapping("/updateUserAndDept") @PostMapping("/updateUserAndDept")
public R updateUserAndDept(HttpServletRequest request,@RequestBody JSONObject json) { public R<String> updateUserAndDept(HttpServletRequest request,@RequestBody JSONObject json) {
return R.ok(userService.updateUserAndDept(request,json)); return userService.updateUserAndDept(request,json);
} }
} }
...@@ -184,5 +184,5 @@ public interface SysUserService extends IService<SysUser> { ...@@ -184,5 +184,5 @@ public interface SysUserService extends IService<SysUser> {
* 从ldap实时更新用户和部门 * 从ldap实时更新用户和部门
* @return R * @return R
*/ */
R updateUserAndDept(HttpServletRequest request, JSONObject json); R<String> updateUserAndDept(HttpServletRequest request, JSONObject json);
} }
...@@ -739,26 +739,23 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -739,26 +739,23 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
* @return R * @return R
*/ */
@Override @Override
public R updateUserAndDept(HttpServletRequest request,JSONObject json) { public R<String> updateUserAndDept(HttpServletRequest request,JSONObject json) {
//权限验证 //权限验证
String appId = request.getHeader("HRBS-APP-ID"); String appId = request.getHeader("HRBS-APP-ID");
String appSecret = request.getHeader("HRBS-APP-SECRET"); String appSecret = request.getHeader("HRBS-APP-SECRET");
if(Common.isEmpty(appId) || Common.isEmpty(appSecret)){ if(Common.isEmpty(appId) || Common.isEmpty(appSecret)){
return R.failed("操作失败,权限标识错误!"); return new R<>("操作失败,权限标识错误!", 500);
} }
if(!hcmId.equals(appId) || !hcmSecret.equals(appSecret) ){ if(!hcmId.equals(appId) || !hcmSecret.equals(appSecret) ){
return R.failed("操作失败,无权限!"); return new R<>("操作失败,无权限!", 500);
} }
if(Common.isEmpty(json)) { if(Common.isEmpty(json)) {
return R.failed("传参不能为空"); return new R<>("传参不能为空", 500);
} }
boolean isAll = (boolean) json.get("isAll"); boolean isAll = (boolean) json.get("isAll");
String dataType = json.get("dataType").toString(); String dataType = json.get("dataType").toString();
//获取人员和部门信息 //获取人员和部门信息
JSONArray updateParamsArr=json.getJSONArray("data"); JSONArray updateParamsArr=json.getJSONArray("data");
if (Common.isEmpty(updateParamsArr)) {
return R.failed("传参不能为空");
}
//全量更新直接调用定时任务接口 //全量更新直接调用定时任务接口
if (isAll) { if (isAll) {
this.updateByLdap(); this.updateByLdap();
...@@ -770,7 +767,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -770,7 +767,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
//更新或者新增部门信息 //更新或者新增部门信息
updateOrSaveDept(updateParamsArr); updateOrSaveDept(updateParamsArr);
} }
return R.ok(); return new R<>("同步成功!", 200);
} }
/** /**
......
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