Commit 13cfabad authored by hongguangwu's avatar hongguangwu

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

parents d860ab28 6979ed08
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
......@@ -15,5 +16,6 @@ import java.time.LocalDateTime;
public class EmpProjectStatusVo implements Serializable {
private String deptNo;
private String empIdcard;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime projectTime;
}
......@@ -158,7 +158,7 @@ public class PreUploadEmpImportTwoVo implements Serializable {
@ExcelAttribute(name = "是否有职业资格证书", isDataId = true, readConverterExp = "0=是,1=否")
private String haveQualification;
// 1.9.7: 职业资格信息
@ExcelAttribute(name = "申报年度", isDate = true, dateFormat = "yyyy", maxLength = 32)
@ExcelAttribute(name = "申报年度", isDate = true, dateFormat = "yyyy", maxLength = 6)
private String declareYear;
@ExcelAttribute(name = "职业资格名称", isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_TYPE, maxLength = 32)
private String qualificationType;
......@@ -246,25 +246,23 @@ public class PreUploadEmpImportTwoVo implements Serializable {
@ExcelAttribute(name = "结束工作日期-值")
private LocalDateTime endDateValue;
@ExcelAttribute(name = "与本人关系")
@ExcelAttribute(name = "与本人关系-值")
private String relationshipSelfValue;
@ExcelAttribute(name = "申报年度")
private String declareYearValue;
@ExcelAttribute(name = "职业资格名称")
@ExcelAttribute(name = "职业资格名称-值")
private String qualificationTypeValue;
@ExcelAttribute(name = "是否曾被认定为工伤")
@ExcelAttribute(name = "是否曾被认定为工伤-值")
private String injuryIdentificationValue;
@ExcelAttribute(name = "是否有职业病")
@ExcelAttribute(name = "是否有职业病-值")
private String occupationalDiseaseFlagValue;
@ExcelAttribute(name = "是否有传染性疾病")
@ExcelAttribute(name = "是否有传染性疾病-值")
private String infectiousDiseaseFlagValue;
@ExcelAttribute(name = "是否被劳动能力鉴定委员会鉴定为具有伤残等级")
@ExcelAttribute(name = "是否被劳动能力鉴定委员会鉴定为具有伤残等级-值")
private String disabilityFlagValue;
@ExcelAttribute(name = "伤残等级")
@ExcelAttribute(name = "伤残等级-值")
private String disabilityLevelValue;
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种")
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种-值")
private String otherFlagValue;
// 字典值结束
......
......@@ -392,4 +392,15 @@ public class TEmployeeProjectController {
public EmpProjectStatusVo getEmpProjectStatus(@RequestBody EmpProjectStatusVo vo) {
return tEmployeeProjectService.getEmpProjectStatus(vo);
}
/**
* 通过项目编码查询项目信息
* @param tEmployeeProject
* @return R
*/
@Operation(summary = "通过项目编码查询项目信息", description = "通过项目编码查询项目信息")
@GetMapping("/getProjectByDetpNo" )
public R<IPage<TEmployeeProject>> getProjectByDetpNo(Page page, TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.getProjectByDetpNo(page,tEmployeeProject));
}
}
......@@ -330,6 +330,24 @@ public class TSettleDomainController {
return tSettleDomainService.getSettleInfoByCodes(codes);
}
/**
* @Author huych
* @Description 通过项目编码获取项目信息
* @Date 11:37 2025/3/3
* @Param
* @return
**/
@Operation(description = "通过项目编码获取项目信息")
@SysLog("通过项目编码获取项目信息")
@PostMapping("/getSettleDomainByNo")
public R getSettleDomainByNo(@RequestParam String deptNo) {
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, deptNo)
.eq(TSettleDomain::getDeleteFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
return R.ok(tSettleDomain);
}
/**
* @param id 项目主键
* @Description: 通过id获取结算主体及单位部分信息
......
......@@ -54,6 +54,8 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
IPage<TEmployeeProject> getProjectByDetpNo(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
// getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
......
......@@ -178,6 +178,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R getItemByEmpNo(String empIdcard, String empNo);
IPage<TEmployeeProject> getProjectByDetpNo(Page page, TEmployeeProject tEmployeeProject);
/**
* @param empId
* @param deptId
......
......@@ -3455,6 +3455,25 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if ("bankName".equals(shuName) && bankMap.get(shuValue) == null) {
errorFormat.append(attr.name()).append("_不符合财务要求,请查薪资配置;");
}
// 1.9.7 : 校验年份不可为未来年份
if ("declareYear".equals(shuName) && Common.isNotNull(shuValue)){
Boolean isNum = true;
shuValue = shuValue.replaceAll("\\..*", "");
for (char c : shuValue.toCharArray()) {
if (!Character.isDigit(c)) {
errorFormat.append(attr.name()).append("_只能是纯数字;");
isNum = false;
break;
}
}
if(isNum && shuValue.length() != 4){
errorFormat.append(attr.name()).append("_不符合年份格式;");
}
if(isNum && shuValue.length() == 4 && (Integer.parseInt(shuValue) > DateUtil.getYearOfInt(new Date()))){
errorFormat.append(attr.name()).append("_不可为未来年份;");
}
}
fieldType = field.getType();
if (Common.isNotNull(fieldType)) {
DiyExcelImportUtil.setFields(field, shuValue, fieldType, detail);
......@@ -3529,6 +3548,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(detail.getTel())) {
mobileList.add(detail.getTel());
}
// 1.9.7 手机号真实性校验加 :手机号码(家庭成员)
if (Common.isNotNull(detail.getContractTel())) {
mobileList.add(detail.getContractTel());
}
// 1.9.7 新增必填校验
// 1.9.7 工作经历必填校验
if ("否".equals(detail.getIsFirstWork())) {
......@@ -3545,7 +3569,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 1.9.7 职业资格信息必填校验
if ("是".equals(detail.getHaveQualification())) {
if(Common.isEmpty(detail.getDeclareYear())|| Common.isEmpty(detail.getQualificationType())){
if(Common.isEmpty(detail.getDeclareYear()) || Common.isEmpty(detail.getQualificationType())){
errorMust.append("是否有职业资格证书为【是】时,申报年度、职业资格名称同时必填!");
}
}
......@@ -3572,7 +3596,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
} else {
errorMust.append("是否曾被认定为工伤,是否有职业病、是否有传染性疾病、是否被劳动能力鉴定委员会鉴定为具有伤残等级 必须同时必填!");
errorMust.append("是否曾被认定为工伤,是否有职业病、是否有传染性疾病、是否被劳动能力鉴定委员会鉴定为具有伤残等级、是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 必须同时必填!");
}
}
......@@ -3683,6 +3707,17 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorCheck.append("手机号码(紧急联系人)").append("未校验;");
}
}
// 1.9.7: 手机号码(家庭成员)校验
if (Common.isNotNull(info.getContractTel())) {
resultB = phoneMap.get(info.getContractTel());
if (resultB != null) {
if (Boolean.FALSE.equals(resultB)) {
errorCheck.append("手机号码(家庭成员)").append("校验不通过;");
}
} else {
errorCheck.append("手机号码(家庭成员)").append("未校验;");
}
}
if (errorCheck.length() > 0) {
info.setErrorInfo(info.getErrorInfo() + "校验未通过:" + errorCheck);
allTrue = false;
......@@ -3959,6 +3994,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
workRecord.setCreateName(user.getNickname());
workRecord.setCreateTime(LocalDateTime.now());
workRecord.setWorkingStatus(CommonConstants.ONE_STRING);
workRecord.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
workRecordList.add(workRecord);
}
......@@ -3987,9 +4023,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
qualificationRecord.setEmpId(saveEmp.getId());
qualificationRecord.setEmpCode(saveEmp.getEmpCode());
qualificationRecord.setEmpIdcard(saveEmp.getEmpIdcard());
qualificationRecord.setDeclareYear(excel.getDeclareYearValue());
qualificationRecord.setDeclareYear(excel.getDeclareYear());
qualificationRecord.setQualificationType(excel.getQualificationTypeValue());
qualificationRecord.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
qualificationRecord.setCreateBy(user.getId());
qualificationRecord.setCreateName(user.getNickname());
qualificationRecord.setCreateTime(LocalDateTime.now());
......@@ -4026,6 +4062,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
disabilityRecord.setCreateBy(user.getId());
disabilityRecord.setCreateName(user.getNickname());
disabilityRecord.setCreateTime(LocalDateTime.now());
disabilityRecord.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
disabilityRecordList.add(disabilityRecord);
}
......
......@@ -1374,6 +1374,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.ok(map);
}
@Override
public IPage<TEmployeeProject> getProjectByDetpNo(Page page, TEmployeeProject tEmployeeProject) {
return baseMapper.getProjectByDetpNo(page,tEmployeeProject);
}
@Override
public TEmployeeProject getByEmpIdAndDeptId(String empId, String deptId) {
TEmployeeProject employeeProject = null;
......
......@@ -172,7 +172,7 @@
from t_employee_project_belong_dept b
LEFT JOIN t_employee_project a on b.id = a.id
<where>
a.DELETE_FLAG ='0'
a.DELETE_FLAG ='0' and ((a.PROJECT_SOURCE = '1' and a.STATUS = 1) or a.PROJECT_SOURCE != '1')
<if test="tEmployeeProjectBelongDept.deptId != null and tEmployeeProjectBelongDept.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProjectBelongDept.deptId}
</if>
......@@ -188,7 +188,7 @@
from t_employee_project_belong_dept b
LEFT JOIN t_employee_project a on b.id = a.id
<where>
a.DELETE_FLAG ='0'
a.DELETE_FLAG ='0' and ((a.PROJECT_SOURCE = '1' and a.STATUS = 1) or a.PROJECT_SOURCE != '1')
<if test="deptId != null and deptId.trim() != ''">
AND a.DEPT_ID = #{deptId}
</if>
......@@ -209,7 +209,7 @@
from t_employee_project a
LEFT JOIN t_employee_project_belong_dept b on a.id=b.id
<where>
a.DELETE_FLAG ='0' and b.id is null
a.DELETE_FLAG ='0' and ((a.PROJECT_SOURCE = '1' and a.STATUS = 1) or a.PROJECT_SOURCE != '1') and b.id is null
<if test="tEmployeeProjectBelongDept.deptId != null and tEmployeeProjectBelongDept.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProjectBelongDept.deptId}
</if>
......
......@@ -869,6 +869,23 @@
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo简单分页查询-->
<select id="getProjectByDetpNo" resultMap="tEmployeeProjectMap">
SELECT
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
b.EMP_PHONE
FROM t_employee_project a left join t_employee_info b on a.EMP_ID = b.id
where
a.DELETE_FLAG = '0' and a.DEPT_NO = #{tEmployeeProject.deptNo}
and a.PROJECT_STATUS = 0
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND (a.EMP_IDCARD like concat('%',#{tEmployeeProject.empIdcard},'%') or a.EMP_NAME like concat('%',#{tEmployeeProject.empIdcard}))
</if>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
SELECT
......
......@@ -15,4 +15,9 @@ public interface ClientNameConstants {
* MVP
*/
String CLIENT_B = "hrCustomer";
/**
* csp
*/
String CLIENT_CSP = "yifu-csp";
}
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -18,7 +17,7 @@ import java.util.Date;
*/
@Data
@ColumnWidth(12)
public class EmployeeRegistrationExportVo extends RowIndex implements Serializable {
public class EmployeeRegistrationExportVo implements Serializable {
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
......
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -18,18 +17,18 @@ import java.util.Date;
*/
@Data
@ColumnWidth(12)
public class EmployeeRegistrationHrExportVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
public class EmployeeRegistrationHrExportVo implements Serializable {
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
......
......@@ -7,7 +7,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
......@@ -56,12 +55,12 @@ public class EmployeeRegistrationSearchVo extends EmployeeRegistration {
//开始时间(查询专用)
@Schema(description = "入离职开始时间")
@TableField(exist = false)
private Date joinTimeStart;
private LocalDateTime joinTimeStart;
//截止时间(查询专用)
@Schema(description = "入离职截止时间")
@TableField(exist = false)
private Date joinTimeEnd;
private LocalDateTime joinTimeEnd;
@Schema(description = "就职岗位数组")
@TableField(exist = false)
......@@ -71,4 +70,8 @@ public class EmployeeRegistrationSearchVo extends EmployeeRegistration {
@TableField(exist = false)
private List<String> statusList;
@Schema(description = "登记类型数组")
@TableField(exist = false)
private List<String> typeList;
}
......@@ -62,9 +62,9 @@ public class EmployeeRegistrationVo extends RowIndex implements Serializable {
/**
* 反馈类型 1入职 2离职
*/
@ExcelAttribute(name = "反馈类型", readConverterExp = "1=入职,2=离职")
@Schema(description = "反馈类型")
@ExcelProperty("反馈类型")
@ExcelAttribute(name = "登记类型", readConverterExp = "1=入职,2=离职")
@Schema(description = "登记类型")
@ExcelProperty("登记类型")
private String feedbackType;
/**
......
......@@ -386,7 +386,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return RegistConstants.REGIST_SAME_CHECK;
}
//针对离职的判断人员项目档案状态是否正常
if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) {
if (CommonConstants.TWO_STRING.equals(registration.getFeedbackType())) {
EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(registration.getEmpIdcard());
vo.setDeptNo(registration.getDeptNo());
......@@ -431,6 +431,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
private void sendMessageToWx(EmployeeRegistration registration, String type) {
//获取前端客服
SysUser user;
if (Common.isEmpty(registration.getCustomerUserLoginname())) {
return;
}
R<SysUser> res = upmsDaprUtils.getSimpleUserByLoginName(registration.getCustomerUserLoginname());
if (Common.isNotNull(res) && Common.isNotNull(res.getData())){
user = res.getData();
......@@ -444,16 +447,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (sendUser != null) {
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
// String authUrl = null;
String authUrl = null;
Map<String, Object> textcard = new HashMap<>();
// authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName()+"/auth/oauth/wxLogin", "01"+registration.getId());
authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid(), wxConfig.getDomainName()+"/auth/oauth/wxLogin", "01"+registration.getId());
StringBuilder description = new StringBuilder();
String title = "";
if (CommonConstants.ONE_STRING.equals(type) || CommonConstants.TWO_STRING.equals(type)) {
title = "人员入职提醒";
description.append(CommonConstants.ONE_STRING.equals(type) ? "入职日期:":"离职日期:")
.append(registration.getJoinLeaveDate()).append("<br>");
.append(DateUtil.dateToString(registration.getJoinLeaveDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT)).append("<br>");
description.append("项目名称:").append(registration.getDeptName()).append("<br>");
description.append("项目编码:").append(registration.getDeptNo()).append("<br>");
description.append("员工姓名:").append(registration.getEmployeeName()).append("<br>");
......@@ -467,7 +470,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
description.append("离职人数:").append(registration.getOutNum()).append("<br>");
}
textcard.put("title", title);
// textcard.put("url", authUrl);
textcard.put("url", authUrl);
textcard.put("description", description.toString());
requestMap.put("touser", sendUser);
requestMap.put("agentid", wxConfig.getAgentid());
......
......@@ -79,6 +79,10 @@ public class TOperationLogServiceImpl extends ServiceImpl<TOperationLogMapper, T
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TOperationLog::getCreateName, entity.getCreateName());
}
if (Common.isNotNull(entity.getMainId())) {
wrapper.eq(TOperationLog::getMainId, entity.getMainId());
wrapper.eq(TOperationLog::getType, CommonConstants.ZERO_STRING);
}
return wrapper;
}
......
......@@ -100,15 +100,18 @@
<if test="employeeRegistration.empPhone != null and employeeRegistration.empPhone.trim() != ''">
AND a.emp_phone like CONCAT(#{employeeRegistration.empPhone},'%')
</if>
<if test="employeeRegistration.postList != null">
<if test="employeeRegistration.postList != null and employeeRegistration.postList.size() > 0 ">
AND a.position in
<foreach item="item" index="index" collection="employeeRegistration.postList" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
<if test="employeeRegistration.feedbackType != null and employeeRegistration.feedbackType.trim() != ''">
AND a.feedback_type = #{employeeRegistration.feedbackType}
</if>
<if test="employeeRegistration.typeList != null and employeeRegistration.typeList.size() > 0 ">
AND a.feedback_type in
<foreach item="item" index="index" collection="employeeRegistration.typeList" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
<if test="employeeRegistration.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{employeeRegistration.createTimeStart}
</if>
......@@ -124,7 +127,7 @@
<if test="employeeRegistration.joinLeaveDate != null">
AND a.join_leave_date = #{employeeRegistration.joinLeaveDate}
</if>
<if test="employeeRegistration.statusList != null">
<if test="employeeRegistration.statusList != null and employeeRegistration.statusList.size() > 0 ">
AND a.process_status in
<foreach item="item" index="index" collection="employeeRegistration.statusList" open="(" separator="," close=")">
'${item}'
......@@ -165,6 +168,7 @@
1=1
<include refid="employeeRegistration_where"/>
</where>
order by a.create_time desc
</select>
<select id="selectExportCount" resultType="java.lang.Long">
......@@ -193,10 +197,11 @@
<where>
1=1
<include refid="employeeRegistration_where"/>
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</where>
order by a.create_time desc
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</select>
......@@ -218,10 +223,11 @@
<where>
1=1
<include refid="employeeRegistration_where"/>
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</where>
order by a.create_time desc
<if test="employeeRegistration.limitStart != null">
limit #{employeeRegistration.limitStart},#{employeeRegistration.limitEnd}
</if>
</select>
<!-- 获取待处理的数据 -->
......
......@@ -332,10 +332,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet = null;
List<String> ids;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_2) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_2);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
if (i < 200000){
list = baseMapper.getTPaymentInfoNoPage(searchVo);
}else{
......@@ -411,7 +411,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} else {
redisUtil.set(key, user.getId(), 600L);
}
if (count > 150000 && !CommonConstants.ONE_STRING.equals(user.getId())) {
if (count > 20000 && !CommonConstants.ONE_STRING.equals(user.getId())) {
out.write(CommonConstants.SOCIAL_EXPORT_LIMIT.getBytes("GBK"));
out.close();
redisUtil.remove(key);
......@@ -423,10 +423,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet = null;
List<String> ids;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
if (i < 200000){
list = baseMapper.getTPaymentInfoSumNoPage(searchVo);
}else{
......@@ -5252,22 +5252,46 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
**/
@Override
public R<Integer> listSumExportCheck(HttpServletResponse response, TPaymentInfoSearchVo searchVo){
if (Common.isEmpty(searchVo.getEmpIdcard())
boolean flag = Common.isEmpty(searchVo.getEmpIdcard())
&& Common.isEmpty(searchVo.getSocialSecurityNo())
&& Common.isEmpty(searchVo.getUnitName())
&& Common.isEmpty(searchVo.getSettleDomainName())
&& Common.isEmpty(searchVo.getSocialCreateMonth())
&& Common.isEmpty(searchVo.getSocialPayMonth())
&& Common.isEmpty(searchVo.getSocialProvince())
&& Common.isEmpty(searchVo.getSecondIndicatorBelong())){
&& Common.isEmpty(searchVo.getCreateName())
&& null == searchVo.getCreateTimeEnd()
&& Common.isEmpty(searchVo.getSecondIndicatorBelong())
&& Common.isEmpty(searchVo.getPushStatus())
&& Common.isEmpty(searchVo.getLockStatus());
// 单独处理户数据查询
if (false && Common.isEmpty(searchVo.getSocialProvince())){
// 只有社保户
if (Common.isNotNull(searchVo.getSocialHousehold())){
if (Common.isNotNull(searchVo.getSocialHousehold()) && !Common.isNotNull(searchVo.getProvidentHousehold())){
//特殊处理皖信户
if ("安徽皖信人力资源管理有限公司".equals(searchVo.getSocialHousehold())){
return R.ok(20001);
}
return R.ok(baseMapper.selectCountPaymentSearchInfoSocialByLimit(searchVo));
}
//只有公积金户
if (Common.isNotNull(searchVo.getProvidentHousehold())){
if (Common.isNotNull(searchVo.getProvidentHousehold()) && !Common.isNotNull(searchVo.getSocialHousehold())){
//特殊处理皖信户
if ("安徽皖信人力资源管理有限公司".equals(searchVo.getProvidentHousehold())){
return R.ok(20001);
}
return R.ok(baseMapper.selectCountPaymentSearchInfoSocialByLimit(searchVo));
}
}
// 单独处理区域数据
if (false && Common.isEmpty(searchVo.getSocialHousehold())
&& Common.isEmpty(searchVo.getProvidentHousehold())
&& !Common.isEmpty(searchVo.getSocialProvince())){
if ((Common.isEmpty(searchVo.getSocialCity()) && "12".equals(searchVo.getSocialProvince()))
||(Common.isEmpty(searchVo.getSocialTown()) && "135".equals(searchVo.getSocialProvince()))){
return R.ok(20001);
}
}
return R.ok(baseMapper.selectCountSumPaymentInfo(searchVo));
}
/**
......
......@@ -89,9 +89,16 @@ public class MenuController {
if (Common.isEmpty(clientId)){
clientId = ClientNameConstants.CLIENT_MVP;
}
Set<SysMenu> menuSet = SecurityUtils.getRolesByClient(clientId).stream().map(sysMenuService::findMenuByRoleId)
.flatMap(Collection::stream).collect(Collectors.toSet());
return R.ok(sysMenuService.filterMenu(menuSet, parentId));
List<Long> roles = SecurityUtils.getRolesByClient(clientId);
Set<SysMenu> menuSet = null;
if (Common.isNotNull(roles)){
menuSet = roles.stream().map(sysMenuService::findMenuByRoleId)
.flatMap(Collection::stream).collect(Collectors.toSet());
}
if (Common.isNotNull(menuSet)){
return R.ok(sysMenuService.filterMenu(menuSet, parentId));
}
return R.failed("获取菜单失败");
}
/**
......
......@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysDeptMapper;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysUserMapper;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysDeptRelationService;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysDeptService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -494,18 +495,17 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
if (Common.isEmpty(info)) {
return R.failed("父级部门未找到");
}
if (Common.isNotNull(info.getAncestors())){
// todo 商量是否加这个限制
String[] split = info.getAncestors().split(",");
if (split.length >= 6){
return R.failed("添加部门的层级超出限制,最多支持5级");
}
}
// 暂时不加这个限制
// if (Common.isNotNull(info.getAncestors())){
// String[] split = info.getAncestors().split(",");
// if (split.length >= 6){
// return R.failed("添加部门的层级超出限制,最多支持5级");
// }
// }
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
}
}
// todo 去常量
dept.setClient("yifu-csp");
dept.setClient(ClientNameConstants.CLIENT_CSP);
this.save(dept);
return R.ok("创建成功");
}
......
......@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysUserDeptPermissionMapper;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysUserMapper;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysUserDeptPermissionService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -156,8 +157,7 @@ public class SysUserDeptPermissionServiceImpl extends ServiceImpl<SysUserDeptPer
}
// 更新用户数据权限
// todo 去常量
sysUserDeptPermission.setClient("yifu-csp");
sysUserDeptPermission.setClient(ClientNameConstants.CLIENT_CSP);
sysUserDeptPermission.setPermissionsType(CommonConstants.TWO_STRING);
baseMapper.insert(sysUserDeptPermission);
redisUtil.remove(CacheConstants.USER_DETAILS +"::"+ userInfo.getUsername());
......@@ -306,9 +306,7 @@ public class SysUserDeptPermissionServiceImpl extends ServiceImpl<SysUserDeptPer
user.setNickname(entity.getNickname());
user.setPhone(entity.getPhone());
user.setLockFlag(CommonConstants.STATUS_NORMAL);
if (Common.isNotNull(user.getPassword())){
user.setPassword(ENCODER.encode(UserDeptPermConstants.DEFAULT_PASSWORD));
}
user.setPassword(ENCODER.encode(UserDeptPermConstants.DEFAULT_PASSWORD));
user.setPost(UserDeptPermConstants.CUSTOMER_SERVICE_PLATFORM);
user.setLockFlag(CommonConstants.STATUS_NORMAL);
user.setDelFlag(CommonConstants.STATUS_NORMAL);
......@@ -318,7 +316,7 @@ public class SysUserDeptPermissionServiceImpl extends ServiceImpl<SysUserDeptPer
SysUserDeptPermission permission = new SysUserDeptPermission();
permission.setDeptId(entity.getDeptId());
permission.setUserId(user.getUserId());
permission.setClient("yifu-csp");
permission.setClient(ClientNameConstants.CLIENT_CSP);
permission.setProjectName(entity.getProjectName());
permission.setProjectNo(entity.getProjectNo());
permission.setUserType(entity.getUserType());
......
......@@ -55,7 +55,7 @@
<select id="getDeptListByDeptId" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept">
select
dept_id as deptId,
dept_name as deptName
name as deptName
from
sys_dept
where
......
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