Commit d99cf0fb authored by hongguangwu's avatar hongguangwu

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

parents e34c8caa a65eaa6d
...@@ -229,7 +229,7 @@ public class CustomerBusinessContoller { ...@@ -229,7 +229,7 @@ public class CustomerBusinessContoller {
wrapper.last("limit " + limit); wrapper.last("limit " + limit);
return new R<>(tSettleDomainService.list(wrapper)); return new R<>(tSettleDomainService.list(wrapper));
}else{ }else{
return new R<>(tSettleDomainService.getOwnSettleDomainNoPage(user.getId().toString(),settleName)); return new R<>(tSettleDomainService.getOwnSettleDomainNoPage(user.getId(),settleName));
} }
} }
...@@ -268,9 +268,6 @@ public class CustomerBusinessContoller { ...@@ -268,9 +268,6 @@ public class CustomerBusinessContoller {
if(null == user){ if(null == user){
return R.failed("非法用户!"); return R.failed("非法用户!");
} }
if (Common.isEmpty(user.getSettleIdList())){ return tSettleDomainService.getCustomerOwnerPage(page,customerName,user.getId());
return R.ok();
}
return tSettleDomainService.getCustomerOwnerPage(page,customerName,user.getSettleIdList());
} }
} }
...@@ -177,7 +177,7 @@ public class EmployeeBusinessController { ...@@ -177,7 +177,7 @@ public class EmployeeBusinessController {
*/ */
@Inner @Inner
@PostMapping("/inner/updateEmployeeExtendRedundancy") @PostMapping("/inner/updateEmployeeExtendRedundancy")
public Boolean updateEmployeeExtendRedundancy(@RequestBody UpdateEmployeeExtendRedundancyDTO dtoList) { public Boolean updateEmployeeExtendRedundancy(@RequestBody List<UpdateEmployeeExtendRedundancyDTO> dtoList) {
return this.businessEmployeeExtendInfoService.updateEmployeeExtendRedundancy(dtoList); return this.businessEmployeeExtendInfoService.updateEmployeeExtendRedundancy(dtoList);
} }
...@@ -234,8 +234,8 @@ public class EmployeeBusinessController { ...@@ -234,8 +234,8 @@ public class EmployeeBusinessController {
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>> * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/ **/
@Inner @Inner
@GetMapping("/inner/getInfoByLeaveMap") @PostMapping("/inner/getInfoByLeaveMap")
public R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap() { public Map<String, BusinessEmployeeExtendByLeave> getInfoByLeaveMap() {
return this.businessEmployeeExtendInfoService.getInfoByLeaveMap(); return this.businessEmployeeExtendInfoService.getInfoByLeaveMap();
} }
......
...@@ -111,4 +111,5 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -111,4 +111,5 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
*/ */
List<BusinessEmployeeExtentExcelVO> getTEmployeeBusinessList(@Param("query") THroBusinessUserQuery query); List<BusinessEmployeeExtentExcelVO> getTEmployeeBusinessList(@Param("query") THroBusinessUserQuery query);
int updateSocialAndFundStatusById(@Param("project")TEmployeeProject project);
} }
...@@ -91,5 +91,5 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> { ...@@ -91,5 +91,5 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
IPage<CustomerOwnerSelectVo> getCustomerOwnerPage(Page page, IPage<CustomerOwnerSelectVo> getCustomerOwnerPage(Page page,
@Param("customerName")String customerName, @Param("customerName")String customerName,
@Param("settleIdList")List<String> settleIdList); @Param("userId")String userId);
} }
...@@ -28,7 +28,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm ...@@ -28,7 +28,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @author: wangweiguo * @author: wangweiguo
* @date: 2021/8/12 * @date: 2021/8/12
*/ */
Boolean updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO dto); Boolean updateEmployeeExtendRedundancy(List<UpdateEmployeeExtendRedundancyDTO> dto);
/** /**
* @description: 根据身份证号查询人员拓展表信息 * @description: 根据身份证号查询人员拓展表信息
* @param empIdcard 身份证号 * @param empIdcard 身份证号
...@@ -84,7 +84,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm ...@@ -84,7 +84,7 @@ public interface TBusinessEmployeeExtendInfoService extends IService<TBusinessEm
* @Date: 2021/8/18 16:45 * @Date: 2021/8/18 16:45
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>> * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/ **/
R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap(); Map<String, BusinessEmployeeExtendByLeave> getInfoByLeaveMap();
/** /**
* b端人员信息编辑拓展信息 * b端人员信息编辑拓展信息
......
...@@ -121,5 +121,5 @@ public interface TSettleDomainService extends IService<TSettleDomain> { ...@@ -121,5 +121,5 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
List<TCustomerInfo> getTCustomerInfoForB(List<String> customerList); List<TCustomerInfo> getTCustomerInfoForB(List<String> customerList);
R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName, List<String> settleIdList); R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName, String userId);
} }
...@@ -70,38 +70,40 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -70,38 +70,40 @@ implements TBusinessEmployeeExtendInfoService {
/** /**
* 更新人员信息冗余字段 * 更新人员信息冗余字段
* @description: 更新人员信息冗余字段 * @description: 更新人员信息冗余字段
* @param v * @param dtoList
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.List<ErrorMessage>> * @return: com.yifu.cloud.v1.common.core.util.R<java.lang.List<ErrorMessage>>
* @author: wangweiguo * @author: wangweiguo
* @date: 2021/8/12 * @date: 2021/8/12
*/ */
@Override @Override
public Boolean updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO v) { public Boolean updateEmployeeExtendRedundancy(List<UpdateEmployeeExtendRedundancyDTO> dtoList) {
if (Common.isEmpty(v)) { if (CollUtil.isEmpty(dtoList)) {
return false; return false;
} }
// 根据部门id更新冗余的部门信息 for (UpdateEmployeeExtendRedundancyDTO v : dtoList) {
if (null != v.getDepartId()) { // 根据部门id更新冗余的部门信息
this.lambdaUpdate() if (null != v.getDepartId()) {
.eq(TBusinessEmployeeExtendInfo::getDepartId, v.getDepartId()) this.lambdaUpdate()
.set(TBusinessEmployeeExtendInfo::getDepartName, v.getDepartName()) .eq(TBusinessEmployeeExtendInfo::getDepartId, v.getDepartId())
.set(TBusinessEmployeeExtendInfo::getDepartCode, v.getTreeLogo()) .set(TBusinessEmployeeExtendInfo::getDepartName, v.getDepartName())
.set(TBusinessEmployeeExtendInfo::getDepartId, v.getDepartIdVal()) .set(TBusinessEmployeeExtendInfo::getDepartCode, v.getTreeLogo())
.update(); .set(TBusinessEmployeeExtendInfo::getDepartId, v.getDepartIdVal())
} else { .update();
if (StringUtils.isBlank(v.getEmpIdcard())) { } else {
return false; if (StringUtils.isBlank(v.getEmpIdcard())) {
continue;
}
v.setEmployeeTags(formatLabelId(v.getEmployeeTags()));
// 身份证号更新冗余的离职,标签,证件相关信息
this.lambdaUpdate()
.eq(TBusinessEmployeeExtendInfo::getEmpIdcard, v.getEmpIdcard())
.set(null != v.getEmployeeTags(), TBusinessEmployeeExtendInfo::getEmployeeTags, v.getEmployeeTags())
.set(null != v.getBusinessLeaveReason(), TBusinessEmployeeExtendInfo::getBusinessLeaveReason, v.getBusinessLeaveReason())
.set(null != v.getBusinessWorkingStatus(), TBusinessEmployeeExtendInfo::getBusinessWorkingStatus, v.getBusinessWorkingStatus())
.set(null != v.getDocumentType(), TBusinessEmployeeExtendInfo::getDocumentType, v.getDocumentType())
.set(null != v.getBusinessLeaveDate(), TBusinessEmployeeExtendInfo::getBusinessLeaveDate, v.getBusinessLeaveDate())
.update();
} }
v.setEmployeeTags(formatLabelId(v.getEmployeeTags()));
// 身份证号更新冗余的离职,标签,证件相关信息
this.lambdaUpdate()
.eq(TBusinessEmployeeExtendInfo::getEmpIdcard, v.getEmpIdcard())
.set(null != v.getEmployeeTags(), TBusinessEmployeeExtendInfo::getEmployeeTags, v.getEmployeeTags())
.set(null != v.getBusinessLeaveReason(), TBusinessEmployeeExtendInfo::getBusinessLeaveReason, v.getBusinessLeaveReason())
.set(null != v.getBusinessWorkingStatus(), TBusinessEmployeeExtendInfo::getBusinessWorkingStatus, v.getBusinessWorkingStatus())
.set(null != v.getDocumentType(), TBusinessEmployeeExtendInfo::getDocumentType, v.getDocumentType())
.set(null != v.getBusinessLeaveDate(), TBusinessEmployeeExtendInfo::getBusinessLeaveDate, v.getBusinessLeaveDate())
.update();
} }
return true; return true;
} }
...@@ -369,7 +371,7 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -369,7 +371,7 @@ implements TBusinessEmployeeExtendInfoService {
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>> * @return: com.yifu.cloud.v1.common.core.util.R<java.util.Map < java.lang.String, com.yifu.cloud.v1.hrms.api.vo.basic.BusinessEmployeeExtendByLeave>>
**/ **/
@Override @Override
public R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap() { public Map<String, BusinessEmployeeExtendByLeave> getInfoByLeaveMap() {
List<BusinessEmployeeExtendByLeave> list = this.baseMapper.getInfoByLeaveList(); List<BusinessEmployeeExtendByLeave> list = this.baseMapper.getInfoByLeaveList();
Map<String, BusinessEmployeeExtendByLeave> leaveMap = new HashMap<>(); Map<String, BusinessEmployeeExtendByLeave> leaveMap = new HashMap<>();
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
...@@ -377,7 +379,7 @@ implements TBusinessEmployeeExtendInfoService { ...@@ -377,7 +379,7 @@ implements TBusinessEmployeeExtendInfoService {
leaveMap.put(leave.getBusinessTelecomNumber(), leave); leaveMap.put(leave.getBusinessTelecomNumber(), leave);
} }
} }
return new R<>(leaveMap); return leaveMap;
} }
/** /**
......
...@@ -1402,7 +1402,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1402,7 +1402,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(vo.getFundStatus())){ if (Common.isNotNull(vo.getFundStatus())){
project.setFundStatus(Integer.parseInt(vo.getFundStatus())); project.setFundStatus(Integer.parseInt(vo.getFundStatus()));
} }
baseMapper.updateById(project); baseMapper.updateSocialAndFundStatusById(project);
} }
return true; return true;
} }
......
...@@ -468,7 +468,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -468,7 +468,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Override @Override
public R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName, public R<IPage<CustomerOwnerSelectVo>> getCustomerOwnerPage(Page<CustomerOwnerSelectVo> page, String customerName,
List<String> settleIdList) { String userId) {
return R.ok(baseMapper.getCustomerOwnerPage(page,customerName,settleIdList)); return R.ok(baseMapper.getCustomerOwnerPage(page,customerName,userId));
} }
} }
...@@ -994,5 +994,13 @@ ...@@ -994,5 +994,13 @@
<include refid="BusinessQuery"/> <include refid="BusinessQuery"/>
order by a.ENJOIN_DATE DESC order by a.ENJOIN_DATE DESC
</select> </select>
<update id="updateSocialAndFundStatusById" >
update t_employee_project a
<trim prefix="set" suffixOverrides=",">
<if test="project.id != null">a.id=a.id,</if>
<if test="project.socialStatus != null">SOCIAL_STATUS=#{project.socialStatus},</if>
<if test="project.fundStatus != null">FUND_STATUS=#{project.fundStatus},</if>
</trim>
WHERE a.id=#{project.id}
</update>
</mapper> </mapper>
...@@ -426,6 +426,7 @@ ...@@ -426,6 +426,7 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0'
group by a.CUSTOMER_NO order by CREATE_TIME desc group by a.CUSTOMER_NO order by CREATE_TIME desc
</select> </select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.business.entity.vacation; package com.yifu.cloud.plus.v1.business.entity.vacation;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/** /**
* 假期监控清零日志表 * 假期监控清零日志表
* @TableName t_vacation_monitor_clear_log * @TableName t_vacation_monitor_clear_log
...@@ -19,7 +20,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> { ...@@ -19,7 +20,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> {
/** /**
* 主键 * 主键
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private String id; private String id;
/** /**
......
package com.yifu.cloud.plus.v1.business.controller.system; package com.yifu.cloud.plus.v1.business.controller.system;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.system.TBusDept; import com.yifu.cloud.plus.v1.business.entity.system.TBusDept;
...@@ -264,7 +265,7 @@ public class TBusDeptController { ...@@ -264,7 +265,7 @@ public class TBusDeptController {
dto.setDepartName(tBusDept.getName()); dto.setDepartName(tBusDept.getName());
dto.setTreeLogo(tBusDept.getTreeLogo()); dto.setTreeLogo(tBusDept.getTreeLogo());
dto.setDepartIdVal(tBusDept.getId()); dto.setDepartIdVal(tBusDept.getId());
archivesDaprUtil.updateEmployeeExtendRedundancy(dto); archivesDaprUtil.updateEmployeeExtendRedundancy(CollUtil.newArrayList(dto));
} }
return new R<>(isSuccess); return new R<>(isSuccess);
} }
...@@ -298,7 +299,7 @@ public class TBusDeptController { ...@@ -298,7 +299,7 @@ public class TBusDeptController {
dto.setDepartName(null); dto.setDepartName(null);
dto.setTreeLogo(null); dto.setTreeLogo(null);
dto.setDepartIdVal(null); dto.setDepartIdVal(null);
archivesDaprUtil.updateEmployeeExtendRedundancy(dto); archivesDaprUtil.updateEmployeeExtendRedundancy(CollUtil.newArrayList(dto));
} }
return new R<>(isSuccess); return new R<>(isSuccess);
} }
......
package com.yifu.cloud.plus.v1.business.controller.vacation;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import com.yifu.cloud.plus.v1.business.service.vacation.TBusLeaveService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.BusinessEmployeeExtendByLeave;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmployeeExtendRedundancyDTO;
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.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@RestController
@AllArgsConstructor
@RequestMapping("/tbusleave")
@Tag(name = "B端离职信息表")
public class TBusLeaveController {
private final TBusLeaveService tBusLeaveService;
private final ArchivesDaprUtil daprUtil;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tBusLeave B端离职信息表
* @return
*/
@Operation(summary = "简单分页查询", description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TBusLeave>> getTBusLeavePage(Page<TBusLeave> page, TBusLeave tBusLeave) {
return new R<>(tBusLeaveService.getTBusLeavePage(page, tBusLeave));
}
/**
* 获取list
*
* @param tBusLeave B端离职信息表
* @return
*/
@Operation(summary = "获取list", description = "获取list")
@GetMapping("/getTBusLeaveList")
public R<List<TBusLeave>> getTBusLeaveList(TBusLeave tBusLeave) {
return new R<>(tBusLeaveService.getTBusLeaveList(tBusLeave));
}
/**
* 通过id查询单条记录
*
* @param id
* @return R
*/
@Operation(summary = "id查询", description = "id查询")
@GetMapping("/{id}")
public R<TBusLeave> getById(@PathVariable("id") String id) {
return new R<>(tBusLeaveService.getById(id));
}
/**
* 新增记录
*
* @param tBusLeave
* @return R
*/
@Operation(summary = "新增", description = "新增")
@PostMapping
// @PreAuthorize("@pms.hasPermission('yifu-hro-business:tbusleave_add')")
public R<Boolean> save(@RequestBody TBusLeave tBusLeave) {
YifuUser user = SecurityUtils.getUser();
if (user != null && user.getId() != null) {
tBusLeave.setCreateUserId(String.valueOf(user.getId()));
tBusLeave.setCreateTime(LocalDateTime.now());
tBusLeave.setCreateUserName(user.getNickname());
this.updateEmpInfo(tBusLeave);
return new R<>(tBusLeaveService.save(tBusLeave));
} else {
return R.failed("未获取到登录人信息!");
}
}
/**
* @param leave
* @Description: 单个更新人员信息
* @Author: huyc
* @Date: 2023/1/6 11:14
* @return: void
**/
private void updateEmpInfo(TBusLeave leave) {
List<UpdateEmployeeExtendRedundancyDTO> dtoList = new ArrayList<>();
UpdateEmployeeExtendRedundancyDTO dto = new UpdateEmployeeExtendRedundancyDTO();
dto.setEmpIdcard(leave.getIdCard());
dto.setBusinessLeaveDate(leave.getLeaveDate());
dto.setBusinessLeaveReason(leave.getLeaveReason());
dto.setBusinessWorkingStatus(CommonConstants.ONE_STRING);
dtoList.add(dto);
daprUtil.updateEmployeeExtendRedundancy(dtoList);
}
/**
* @param leaveList
* @Description: 批量更新人员信息
* @Author: huyc
* @Date: 2023/1/6 11:14
* @return: void
**/
private void batchUpdateEmpInfo(List<TBusLeave> leaveList) {
if (leaveList != null && !leaveList.isEmpty()) {
List<UpdateEmployeeExtendRedundancyDTO> dtoList = new ArrayList<>();
UpdateEmployeeExtendRedundancyDTO dto;
for (TBusLeave leave : leaveList) {
dto = new UpdateEmployeeExtendRedundancyDTO();
dto.setEmpIdcard(leave.getIdCard());
dto.setBusinessLeaveDate(leave.getLeaveDate());
dto.setBusinessLeaveReason(leave.getLeaveReason());
dto.setBusinessWorkingStatus(CommonConstants.ONE_STRING);
dtoList.add(dto);
}
daprUtil.updateEmployeeExtendRedundancy(dtoList);
}
}
/**
* 导入
*
* @return R
*/
@Operation(summary = "导入", description = "导入")
@PostMapping("/importLeave")
public R<List<ErrorMessage>> importLeave(@RequestBody List<TBusLeave> leaveList) {
if (leaveList == null || leaveList.isEmpty()) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
YifuUser user = SecurityUtils.getUser();
if (user == null || user.getId() == null) {
return R.failed("未获取到登录人信息!");
}
LocalDateTime nows = LocalDateTime.now();
List<ErrorMessage> errorList = new ArrayList<>();
R<Map<String, BusinessEmployeeExtendByLeave>> dataR = daprUtil.getInfoByLeaveMap();
Map<String, BusinessEmployeeExtendByLeave> empMap;
if (dataR != null && dataR.getData() != null && !dataR.getData().isEmpty()) {
empMap = dataR.getData();
} else {
return R.failed("未获取到基础服务-人员附属信息!");
}
int i = 1;
List<TBusLeave> updateLsit = new ArrayList<>();
for (TBusLeave tBusLeave : leaveList) {
i++;
if (Common.isEmpty(tBusLeave.getLeaveDate()) || Common.isEmpty(tBusLeave.getLeavePostDate())
|| Common.isEmpty(tBusLeave.getLeaveReason()) || tBusLeave.getLeaveReason().length() > 200) {
// 判断并拦截
this.judgeLeave(errorList, i, tBusLeave);
} else {
// 导入
this.saveAndJudge(user, nows, errorList, empMap, i, updateLsit, tBusLeave);
}
}
// 更新人员信息
this.batchUpdateEmpInfo(updateLsit);
return R.ok(errorList,"操作成功");
}
/**
* @param errorList
* @param i
* @param tBusLeave
* @Description: 判断离职原因等
* @Author: hgw
* @Date: 2021/8/24 16:19
* @return: void
**/
private void judgeLeave(List<ErrorMessage> errorList, int i, TBusLeave tBusLeave) {
String error;
if (Common.isEmpty(tBusLeave.getLeaveDate())) {
error = "'" + tBusLeave.getTeleNo() + "'工号无离职日期,无法导入!";
errorList.add(new ErrorMessage(i, error));
}
if (Common.isEmpty(tBusLeave.getLeavePostDate())) {
error = "'" + tBusLeave.getTeleNo() + "'工号无离岗日期,无法导入!";
errorList.add(new ErrorMessage(i, error));
}
if (Common.isEmpty(tBusLeave.getLeaveReason())) {
error = "'" + tBusLeave.getTeleNo() + "'工号无离职原因,无法导入!";
errorList.add(new ErrorMessage(i, error));
}
if (Common.isNotNull(tBusLeave.getLeaveReason()) && tBusLeave.getLeaveReason().length() > 200) {
error = "'" + tBusLeave.getTeleNo() + "'工号离职原因超过200字符,无法导入!";
errorList.add(new ErrorMessage(i, error));
}
}
/**
* @Description: 保存和判断
* @Author: huyc
* @Date: 2023/1/6 11:14
* @return: void
**/
private void saveAndJudge(YifuUser user, LocalDateTime nows, List<ErrorMessage> errorList
, Map<String, BusinessEmployeeExtendByLeave> empMap, int i, List<TBusLeave> updateLsit, TBusLeave tBusLeave) {
BusinessEmployeeExtendByLeave empInfo;
String error;
String userName = user.getNickname();
String userId = String.valueOf(user.getId());
if (Common.isNotNull(tBusLeave.getTeleNo())) {
empInfo = empMap.get(tBusLeave.getTeleNo());
if (empInfo != null) {
if (Common.isNotNull(empInfo.getBusinessWorkingStatus()) && CommonConstants.ONE_STRING.equals(empInfo.getBusinessWorkingStatus())) {
error = "'" + tBusLeave.getTeleNo() + "'工号员工已离职,请核实无误后再操作!";
errorList.add(new ErrorMessage(i, error));
} else {
tBusLeave.setDeptId(empInfo.getDepartId());
tBusLeave.setDeptName(empInfo.getDepartName());
tBusLeave.setDeptTreeLogo(empInfo.getDepartCode());
tBusLeave.setName(empInfo.getEmpName());
tBusLeave.setIdCard(empInfo.getEmpIdcard());
tBusLeave.setPost(empInfo.getBusinessPost());
tBusLeave.setCreateTime(nows);
tBusLeave.setCreateUserId(userId);
tBusLeave.setCreateUserName(userName);
tBusLeaveService.save(tBusLeave);
updateLsit.add(tBusLeave);
error = "导入成功!";
errorList.add(new ErrorMessage(i, error));
}
} else {
error = "电信工号未匹配到人员附属信息:'" + tBusLeave.getTeleNo() + "'";
errorList.add(new ErrorMessage(i, error));
}
} else {
error = "电信工号不可为空!";
errorList.add(new ErrorMessage(i, error));
}
}
/**
* 修改记录
*
* @param tBusLeave
* @return R
*/
@SysLog("修改B端离职信息表")
@Operation(summary = "修改", description = "修改")
@PutMapping
// @PreAuthorize("@pms.hasPermission('yifu-hro-business:tbusleave_edit')")
public R<Boolean> update(@RequestBody TBusLeave tBusLeave) {
this.updateEmpInfo(tBusLeave);
return new R<>(tBusLeaveService.updateById(tBusLeave));
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@SysLog("假删除B端离职信息表")
@Operation(summary = "假删除", description = "假删除")
@DeleteMapping("/{id}")
// @PreAuthorize("@pms.hasPermission('yifu-hro-business:tbusleave_del')")
public R<Boolean> removeById(@PathVariable String id) {
TBusLeave tBusLeave = new TBusLeave();
tBusLeave.setId(id);
tBusLeave.setDeleteFlag(1);
return new R<>(tBusLeaveService.updateById(tBusLeave));
}
}
package com.yifu.cloud.plus.v1.business.controller.vacation;
import com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO;
import com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorClearLogService;
import com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* @description: 假期监控清零日志表 controller
* @author: wangweiguo
* @date: 2021-08-16
*/
@RestController
@AllArgsConstructor
@RequestMapping("/vacationMonitorClearLog")
@Tag(name = "假期监控清零日志表相关api")
public class TVacationMonitorClearLogController {
private final TVacationMonitorClearLogService tVacationMonitorClearLogService;
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
*/
@Operation(summary = "查询-列表: 查询当前年假所有清零记录", description = "查询-列表: 查询当前年假所有清零记录")
@GetMapping("/getList")
public R<List<TVacationMonitorClearLogVO>> getList(@RequestParam("vacationMonitorId") @Parameter(description = "年假监控id", required = true) Integer vacationMonitorId) {
return this.tVacationMonitorClearLogService.getList(vacationMonitorId);
}
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
*/
@Operation(summary = "清零说明: 记录年假清零说明", description = "清零说明: 记录年假清零说明")
@PostMapping("/clearNote")
public R<Boolean> clearNote(@RequestBody @Valid AddVacationMonitorClearLogDTO dto) {
return this.tVacationMonitorClearLogService.clearNote(dto);
}
}
package com.yifu.cloud.plus.v1.business.mapper.vacation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@Mapper
public interface TBusLeaveMapper extends BaseMapper<TBusLeave> {
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
IPage<TBusLeave> getTBusLeavePage(Page<TBusLeave> page, @Param("tBusLeave") TBusLeave tBusLeave);
List<TBusLeave> getTBusLeaveList(@Param("tBusLeave") TBusLeave tBusLeave);
}
package com.yifu.cloud.plus.v1.business.mapper.vacation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog;
import org.apache.ibatis.annotations.Mapper;
/**
* @description: 假期监控清零日志表 mapper
* @Entity com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitorClearLog
* @author: wangweiguo
* @date: 2021-08-16
*/
@Mapper
public interface TVacationMonitorClearLogMapper extends BaseMapper<TVacationMonitorClearLog> {
}
package com.yifu.cloud.plus.v1.business.service.vacation;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
public interface TBusLeaveService extends IService<TBusLeave> {
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
IPage<TBusLeave> getTBusLeavePage(Page<TBusLeave> page, TBusLeave tBusLeave);
/**
* @param tBusLeave
* @Description: 获取list
* @Author: hgw
* @Date: 2021/8/18 14:50
* @return: java.util.List<com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TBusLeave>
**/
List<TBusLeave> getTBusLeaveList(TBusLeave tBusLeave);
}
package com.yifu.cloud.plus.v1.business.service.vacation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog;
import com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* @description: 假期监控清零日志表 service层
* @author: wangweiguo
* @date: 2021-08-16
*/
public interface TVacationMonitorClearLogService extends IService<TVacationMonitorClearLog> {
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
*/
R<List<TVacationMonitorClearLogVO>> getList(Integer vacationMonitorId);
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
*/
R<Boolean> clearNote(AddVacationMonitorClearLogDTO dto);
}
package com.yifu.cloud.plus.v1.business.service.vacation.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import com.yifu.cloud.plus.v1.business.mapper.vacation.TBusLeaveMapper;
import com.yifu.cloud.plus.v1.business.service.vacation.TBusLeaveService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
*/
@Service("tBusLeaveService")
public class TBusLeaveServiceImpl extends ServiceImpl<TBusLeaveMapper, TBusLeave> implements TBusLeaveService {
/**
* B端离职信息表简单分页查询
*
* @param tBusLeave B端离职信息表
* @return
*/
@Override
public IPage<TBusLeave> getTBusLeavePage(Page<TBusLeave> page, TBusLeave tBusLeave) {
return baseMapper.getTBusLeavePage(page, tBusLeave);
}
@Override
public List<TBusLeave> getTBusLeaveList(TBusLeave tBusLeave) {
return baseMapper.getTBusLeaveList(tBusLeave);
}
}
package com.yifu.cloud.plus.v1.business.service.vacation.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.business.dto.vacation.AddVacationMonitorClearLogDTO;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitor;
import com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog;
import com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationMonitorClearLogMapper;
import com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorClearLogService;
import com.yifu.cloud.plus.v1.business.service.vacation.TVacationMonitorService;
import com.yifu.cloud.plus.v1.business.vo.vacation.TVacationMonitorClearLogVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
import static com.yifu.cloud.plus.v1.business.util.BusinessResultErrorMsg.*;
/**
* @description: 假期监控清零日志表 service实现层
* @author: wangweiguo
* @date: 2021-08-16
*/
@Service
@AllArgsConstructor
public class TVacationMonitorClearLogServiceImpl extends ServiceImpl<TVacationMonitorClearLogMapper, TVacationMonitorClearLog>
implements TVacationMonitorClearLogService {
private final TVacationMonitorService vacationMonitorService;
/**
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @Author: huyc
* @Date: 2023/1/6 11:14
*/
@Override
public R<List<TVacationMonitorClearLogVO>> getList(Integer vacationMonitorId) {
if (vacationMonitorId == null) {
return R.ok(null,VACATION_MONITOR_ID_IS_NOT_NULL);
}
List<TVacationMonitorClearLog> list = this.lambdaQuery()
.eq(TVacationMonitorClearLog::getVacationMonitorId, vacationMonitorId)
.orderByDesc(TVacationMonitorClearLog::getClearTime)
.list();
List<TVacationMonitorClearLogVO> voList = list.stream().map(v -> {
TVacationMonitorClearLogVO vo = new TVacationMonitorClearLogVO();
BeanUtil.copyProperties(v, vo, CopyOptions.create().setIgnoreCase(true));
return vo;
}).collect(Collectors.toList());
return R.ok(voList);
}
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @Author: huyc
* @Date: 2023/1/6 11:14
*/
@Override
public R<Boolean> clearNote(AddVacationMonitorClearLogDTO dto) {
YifuUser user = SecurityUtils.getUser();
if (user == null) {
return R.failed(USER_NOT_LOGIN);
}
if (dto.getVacationMonitorId() == null) {
return R.ok(null,VACATION_MONITOR_ID_IS_NOT_NULL);
}
TVacationMonitor vacationMonitor = this.vacationMonitorService.getById(dto.getVacationMonitorId());
if (vacationMonitor == null) {
return R.failed(VACATION_MONITOR_DATA_IS_NOT_EXIST);
}
TVacationMonitorClearLog log = new TVacationMonitorClearLog();
log.setClearNote(dto.getClearNote());
log.setVacationMonitorId(dto.getVacationMonitorId());
log.setVacationYear(vacationMonitor.getVacationYear());
log.setClearDuration(vacationMonitor.getNotUsedVacationDuration());
log.setClearUser(user.getNickname());
log.setClearUserId(Integer.valueOf(user.getId()));
log.setClearTime(LocalDateTime.now());
boolean isSuccess = this.save(log);
return R.ok(isSuccess,SUCCESS);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.business.mapper.vacation.TBusLeaveMapper">
<resultMap id="tBusLeaveMap" type="com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave">
<id property="id" column="id"/>
<result property="teleNo" column="tele_no"/>
<result property="name" column="name"/>
<result property="idCard" column="id_card"/>
<result property="post" column="post"/>
<result property="deptId" column="dept_id"/>
<result property="deptName" column="dept_name"/>
<result property="leaveDate" column="leave_date"/>
<result property="leavePostDate" column="leave_post_date"/>
<result property="leaveReason" column="leave_reason"/>
<result property="createUserId" column="create_user_id"/>
<result property="createUserName" column="create_user_name"/>
<result property="createTime" column="create_time"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="deptTreeLogo" column="dept_tree_logo"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.tele_no,
a.name,
a.id_card,
a.post,
a.dept_id,
a.dept_name,
a.leave_date,
a.leave_post_date,
a.leave_reason,
a.create_user_id,
a.create_user_name,
a.create_time,
a.delete_flag,
a.dept_tree_logo
</sql>
<sql id="tBusLeave_where">
<if test="tBusLeave != null">
<if test="tBusLeave.id != null and tBusLeave.id.trim() != ''">
AND a.id = #{tBusLeave.id}
</if>
<if test="tBusLeave.teleNo != null and tBusLeave.teleNo.trim() != ''">
AND a.tele_no like concat('%', #{tBusLeave.teleNo},'%')
</if>
<if test="tBusLeave.name != null and tBusLeave.name.trim() != ''">
AND a.name like concat('%', #{tBusLeave.name},'%')
</if>
<if test="tBusLeave.idCard != null and tBusLeave.idCard.trim() != ''">
AND a.id_card = #{tBusLeave.idCard}
</if>
<if test="tBusLeave.post != null and tBusLeave.post.trim() != ''">
AND a.post like concat('%', #{tBusLeave.post},'%')
</if>
/* 查找部门树以及底下的数据 */
<if test="tBusLeave.deptId != null and tBusLeave.deptId != 1">
AND (a.dept_id = #{tBusLeave.deptId} or a.dept_tree_logo like concat('%-', #{tBusLeave.deptId},'-%'))
</if>
<if test="tBusLeave.deptName != null and tBusLeave.deptName.trim() != ''">
AND a.dept_name = #{tBusLeave.deptName}
</if>
<if test="tBusLeave.leaveDate != null">
AND a.leave_date = #{tBusLeave.leaveDate}
</if>
<if test="tBusLeave.leavePostDate != null">
AND a.leave_post_date = #{tBusLeave.leavePostDate}
</if>
<if test="tBusLeave.leaveReason != null and tBusLeave.leaveReason.trim() != ''">
AND a.leave_reason = #{tBusLeave.leaveReason}
</if>
<if test="tBusLeave.createUserId != null and tBusLeave.createUserId.trim() != ''">
AND a.create_user_id = #{tBusLeave.createUserId}
</if>
<if test="tBusLeave.createUserName != null and tBusLeave.createUserName.trim() != ''">
AND a.create_user_name = #{tBusLeave.createUserName}
</if>
<if test="tBusLeave.createTime != null">
AND a.create_time = #{tBusLeave.createTime}
</if>
<if test="tBusLeave.deleteFlag != null">
AND a.delete_flag = #{tBusLeave.deleteFlag}
</if>
<if test="tBusLeave.leaveDateStart != null">
AND a.leave_date >= #{tBusLeave.leaveDateStart}
</if>
<if test="tBusLeave.leaveDateEnd != null">
AND a.leave_date <![CDATA[ <= ]]> #{tBusLeave.leaveDateEnd}
</if>
<if test="tBusLeave.leavePostStart != null">
AND a.leave_post_date >= #{tBusLeave.leavePostStart}
</if>
<if test="tBusLeave.leavePostEnd != null">
AND a.leave_post_date <![CDATA[ <= ]]> #{tBusLeave.leavePostEnd}
</if>
<if test="tBusLeave.deptTreeLogo != null and tBusLeave.deptTreeLogo.trim() != '' ">
AND a.dept_tree_logo like concat(#{tBusLeave.deptTreeLogo},'%')
</if>
</if>
</sql>
<!--tBusLeave简单分页查询-->
<select id="getTBusLeavePage" resultMap="tBusLeaveMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_bus_leave a
<where>
a.delete_flag = 0
<include refid="tBusLeave_where"/>
</where>
order by a.create_time desc
</select>
<!--获取list-->
<select id="getTBusLeaveList" resultMap="tBusLeaveMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_bus_leave a
<where>
a.delete_flag = 0
<include refid="tBusLeave_where"/>
</where>
order by a.create_time desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationMonitorClearLogMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.business.entity.vacation.TVacationMonitorClearLog">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="clearNote" column="CLEAR_NOTE" jdbcType="VARCHAR"/>
<result property="clearDuration" column="CLEAR_DURATION" jdbcType="DECIMAL"/>
<result property="vacationYear" column="VACATION_YEAR" jdbcType="CHAR"/>
<result property="clearUser" column="CLEAR_USER" jdbcType="VARCHAR"/>
<result property="clearUserId" column="CLEAR_USER_ID" jdbcType="INTEGER"/>
<result property="clearTime" column="CLEAR_TIME" jdbcType="TIMESTAMP"/>
<result property="vacationMonitorId" column="VACATION_MONITOR_ID" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID,CLEAR_NOTE,CLEAR_DURATION,
VACATION_YEAR,CLEAR_USER,CLEAR_USER_ID,VACATION_MONITOR_ID
CLEAR_TIME
</sql>
</mapper>
...@@ -307,7 +307,7 @@ public class ArchivesDaprUtil { ...@@ -307,7 +307,7 @@ public class ArchivesDaprUtil {
* @Param * @Param
* @return * @return
**/ **/
public R<Boolean> updateEmployeeExtendRedundancy(UpdateEmployeeExtendRedundancyDTO dto) { public R<Boolean> updateEmployeeExtendRedundancy(List<UpdateEmployeeExtendRedundancyDTO> dto) {
R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/updateEmployeeExtendRedundancy" , JSON.toJSONString(dto), Boolean.class, SecurityConstants.FROM_IN); R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/updateEmployeeExtendRedundancy" , JSON.toJSONString(dto), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("更新-对应身份证的冗余信息失败!"); return R.failed("更新-对应身份证的冗余信息失败!");
...@@ -345,6 +345,22 @@ public class ArchivesDaprUtil { ...@@ -345,6 +345,22 @@ public class ArchivesDaprUtil {
return res; return res;
} }
/**
* @Author huyc
* @Description 获取所有附属信息
* @Date 22:11 2022/8/4
* @Param
* @return
**/
public R<Map<String, BusinessEmployeeExtendByLeave>> getInfoByLeaveMap() {
R<Map> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/getInfoByLeaveMap" , "", Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取所有附属信息失败!");
}
Map<String,BusinessEmployeeExtendByLeave> map = JSON.parseObject(JSON.toJSONString(res.getData()),new TypeReference<HashMap<String,BusinessEmployeeExtendByLeave>>(){});
return R.ok(map);
}
/** /**
* @Author huyc * @Author huyc
* @Description 获取所有非离职员工拓展表信息 * @Description 获取所有非离职员工拓展表信息
......
...@@ -388,6 +388,7 @@ public class TDispatchInfoController { ...@@ -388,6 +388,7 @@ public class TDispatchInfoController {
* @return * @return
**/ **/
@Operation(description = "派单申请批量审核,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyAudit') auditStatus:1审核通过 2审核不通过") @Operation(description = "派单申请批量审核,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyAudit') auditStatus:1审核通过 2审核不通过")
@SysLog("派单申请批量审核")
@PostMapping("/addApplyAudit") @PostMapping("/addApplyAudit")
//@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')") //@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')")
public R<List<ErrorMessage>> addApplyAudit(@RequestBody List<String> idList, public R<List<ErrorMessage>> addApplyAudit(@RequestBody List<String> idList,
...@@ -409,6 +410,7 @@ public class TDispatchInfoController { ...@@ -409,6 +410,7 @@ public class TDispatchInfoController {
* @Date 2019-09-27 * @Date 2019-09-27
**/ **/
@Operation(description = "派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle') handleStatus 1 办理成功 2 办理失败") @Operation(description = "派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle') handleStatus 1 办理成功 2 办理失败")
@SysLog("派单批量办理")
@PostMapping("/addApplyHandle") @PostMapping("/addApplyHandle")
//@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')") //@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')")
public R<List<ErrorMessage>> addApplyHandle(@RequestBody List<String> idList, public R<List<ErrorMessage>> addApplyHandle(@RequestBody List<String> idList,
......
...@@ -37,4 +37,6 @@ public interface TProvidentFundMapper extends BaseMapper<TProvidentFund> { ...@@ -37,4 +37,6 @@ public interface TProvidentFundMapper extends BaseMapper<TProvidentFund> {
* @return * @return
*/ */
IPage<TProvidentFund> getTProvidentFundPage(Page<TProvidentFund> page, @Param("tProvidentFund") TProvidentFund tProvidentFund); IPage<TProvidentFund> getTProvidentFundPage(Page<TProvidentFund> page, @Param("tProvidentFund") TProvidentFund tProvidentFund);
int updateFundInfoById( @Param("tProvidentFund")TProvidentFund providentFund);
} }
...@@ -3555,7 +3555,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3555,7 +3555,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
providentFund.setHandleTime(now); providentFund.setHandleTime(now);
providentFund.setHandleUser(user.getId()); providentFund.setHandleUser(user.getId());
fundMapper.updateById(providentFund); fundMapper.updateFundInfoById(providentFund);
dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark)); dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
if (CommonConstants.ZERO_INT == flag) { if (CommonConstants.ZERO_INT == flag) {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), CommonConstants.SIX_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark); initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), CommonConstants.SIX_STRING, user, (DispatchConstants.DISPATCH_FUND_REDUCE_SUCCESS + handleRemark), remark);
......
...@@ -289,4 +289,18 @@ ...@@ -289,4 +289,18 @@
<include refid="tProvidentFund_where"/> <include refid="tProvidentFund_where"/>
</where> </where>
</select> </select>
<update id="updateFundInfoById">
update t_provident_fund
<trim prefix="set" suffixOverrides=",">
<if test="tProvidentFund.handleStatus != null">HANDLE_STATUS=#{tProvidentFund.handleStatus},</if>
<if test="tProvidentFund.reduceHandleTime != null">REDUCE_HANDLE_TIME=#{tProvidentFund.reduceHandleTime},</if>
<if test="tProvidentFund.reduceHandleUser != null">REDUCE_HANDLE_USER=#{tProvidentFund.reduceHandleUser},</if>
<if test="tProvidentFund.fundReduceDate != null">FUND_REDUCE_DATE=#{tProvidentFund.fundReduceDate},</if>
<if test="tProvidentFund.reduceCan != null">REDUCE_CAN=#{tProvidentFund.reduceCan},</if>
<if test="tProvidentFund.handleTime != null">HANDLE_TIME=#{tProvidentFund.handleTime},</if>
<if test="tProvidentFund.handleUser != null">HANDLE_USER=#{tProvidentFund.handleUser},</if>
</trim>
WHERE id=#{tProvidentFund.id}
</update>
</mapper> </mapper>
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