Commit 3cc0796a authored by huyuchen's avatar huyuchen

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

parents 01419d12 d4375a82
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("feed_back_detail")
public class FeedBackDetail implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 反馈人
*/
@Schema(description ="反馈人")
private String feedbackPerson;
/**
* 反馈时间
*/
@Schema(description ="反馈时间")
private Date feedbackTime;
/**
* 反馈原因
*/
@Schema(description ="反馈原因")
private String feedbackReason;
/**
* 反馈详情
*/
@Schema(description ="反馈详情")
private String feedbackDetail;
/**
* 续签代办表关联主键
*/
@Schema(description ="续签代办表关联主键")
private String contractAlertId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -269,6 +269,52 @@ public class TEmpContractAlert extends BaseEntity { ...@@ -269,6 +269,52 @@ public class TEmpContractAlert extends BaseEntity {
private String empPhone; private String empPhone;
/**
* 是否反馈
*/
@ExcelAttribute(name = "是否反馈" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否反馈")
@Schema(description = "是否反馈")
private Integer isFeedback;
/**
* 反馈原因
*/
@ExcelAttribute(name = "未续签原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("未续签原因")
@Schema(description = "未续签原因")
private String feedbackReason;
/**
* 详情
*/
@ExcelAttribute(name = "具体描述信息" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("具体描述信息")
@Schema(description = "具体描述信息")
private String feedbackDetail;
/**
* 反馈人
*/
@ExcelAttribute(name = "反馈人" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("反馈人")
@Schema(description = "反馈人")
private String feedbackPerson;
/**
* 反馈时间
*/
@ExcelAttribute(name = "反馈时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("反馈时间")
@Schema(description = "反馈时间")
private Date feedbackTime;
/** /**
* 合同截止日期 * 合同截止日期
*/ */
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;
@Data
public class ChangeFeedBackAllVo {
private String [] ids;
/**
* 是否反馈
*/
private Integer isFeedback;
/**
* 反馈原因
*/
@Schema(description = "未续签原因")
private String feedbackReason;
/**
* 详情
*/
@Schema(description = "具体描述信息")
private String feedbackDetail;
/**
* 反馈人
*/
@Schema(description = "反馈人")
private String feedbackPerson;
/**
* 反馈时间
*/
@Schema(description = "反馈时间")
private Date feedbackTime;
}
...@@ -161,4 +161,11 @@ public class EmpAddDispatchVo extends TEmployeeInfo { ...@@ -161,4 +161,11 @@ public class EmpAddDispatchVo extends TEmployeeInfo {
@Schema(description = "是否删除 0否/1是") @Schema(description = "是否删除 0否/1是")
private String deleteFlag; private String deleteFlag;
/**
* 通信地址
*/
@Schema(description = "通信地址")
private String contactAddress;
} }
...@@ -191,6 +191,18 @@ public class EmployeeContractExportVO implements Serializable { ...@@ -191,6 +191,18 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "审核状态") @Schema(description = "审核状态")
private String auditStatus; private String auditStatus;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "不通过原因")
@Schema(description = "不通过原因")
@ExcelProperty("不通过原因")
private String noPassReason;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "审核说明")
@Schema(description = "审核说明")
@ExcelProperty("审核说明")
private String remark;
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同状态") @ExcelProperty("合同状态")
@ExcelAttribute(name = "合同状态", readConverterExp = "0=可用,1=不可用") @ExcelAttribute(name = "合同状态", readConverterExp = "0=可用,1=不可用")
...@@ -268,4 +280,5 @@ public class EmployeeContractExportVO implements Serializable { ...@@ -268,4 +280,5 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "导出的表头的Set") @Schema(description = "导出的表头的Set")
private Set<String> exportFields; private Set<String> exportFields;
} }
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,6 +21,7 @@ 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.yifu.archives.entity.TEmpContractAlert; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; 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.Common;
...@@ -55,6 +56,7 @@ public class TEmpContractAlertController { ...@@ -55,6 +56,7 @@ public class TEmpContractAlertController {
private final TEmpContractAlertService tEmpContractAlertService; private final TEmpContractAlertService tEmpContractAlertService;
private final MenuUtil menuUtil; private final MenuUtil menuUtil;
/** /**
* 分页查询 * 分页查询
* @param page 分页对象 * @param page 分页对象
...@@ -171,4 +173,33 @@ public class TEmpContractAlertController { ...@@ -171,4 +173,33 @@ public class TEmpContractAlertController {
public R taskCreateContractAlert() { public R taskCreateContractAlert() {
return tEmpContractAlertService.taskCreateContractAlert(); return tEmpContractAlertService.taskCreateContractAlert();
} }
/**
* 批量反馈
*
* @author wzb
* @param changeFeedBackAllVo
* @return {@link R}
*/
@Operation(summary = "批量反馈", description = "批量反馈")
@PostMapping("/changeFeedbackAll")
public R<Boolean> changeFeedBackAll(@RequestBody ChangeFeedBackAllVo changeFeedBackAllVo) {
return R.ok(tEmpContractAlertService.changeFeedBackAll(changeFeedBackAllVo));
}
/**
* 获取反馈日志详情
*
* @author wzb
* @param id
* @return {@link R}
*/
@Operation(summary = "获取反馈日志详情", description = "获取反馈日志详情")
@GetMapping("/getFeedbackDetail/{id}" )
public R getFeedbackDetail(@PathVariable("id" ) String id) {
return R.ok(tEmpContractAlertService.getFeedbackDetail(id));
}
} }
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface FeedBackDetailMapper extends BaseMapper<FeedBackDetail> {
List<FeedBackDetail> getDetail(@Param("id") String id);
}
...@@ -19,7 +19,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper; ...@@ -19,7 +19,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 员工合同续签待办 * 员工合同续签待办
...@@ -31,4 +33,6 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -31,4 +33,6 @@ import org.apache.ibatis.annotations.Mapper;
public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> { public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> {
void truncate(); void truncate();
boolean changeFeedBackAll(@Param("changeFeedBackAllVo") ChangeFeedBackAllVo changeFeedBackAllVo);
} }
...@@ -20,7 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -20,7 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
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.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -47,5 +49,12 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> { ...@@ -47,5 +49,12 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
* @Date 2022-07-4 * @Date 2022-07-4
**/ **/
R<Boolean> taskCreateContractAlert(); R<Boolean> taskCreateContractAlert();
boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo);
List<FeedBackDetail> getFeedbackDetail(String id);
} }
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.archives.service.impl; package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
...@@ -27,15 +28,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -27,15 +28,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -62,6 +63,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -62,6 +63,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private final TEmployeeProjectMapper projectMapper; private final TEmployeeProjectMapper projectMapper;
private final FeedBackDetailMapper feedbackDetailMapper;
@Override @Override
public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) { public IPage<TEmpContractAlert> pageDiy(Page page, ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
...@@ -246,6 +249,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -246,6 +249,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if (Common.isNotNull(entity.getUnitNo())) { if (Common.isNotNull(entity.getUnitNo())) {
wrapper.eq(TEmpContractAlert::getUnitNo, entity.getUnitNo()); wrapper.eq(TEmpContractAlert::getUnitNo, entity.getUnitNo());
} }
if (Common.isNotNull(entity.getIsFeedback())){
wrapper.eq(TEmpContractAlert::getIsFeedback,entity.getIsFeedback());
}
return wrapper; return wrapper;
} }
/** /**
...@@ -303,6 +309,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -303,6 +309,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
return R.ok(); return R.ok();
} }
private void initExistMap(Map<String, TEmpContractAlert> existMap) { private void initExistMap(Map<String, TEmpContractAlert> existMap) {
List<TEmpContractAlert> exists = baseMapper.selectList(Wrappers.<TEmpContractAlert>query()); List<TEmpContractAlert> exists = baseMapper.selectList(Wrappers.<TEmpContractAlert>query());
if (Common.isNotNull(exists)){ if (Common.isNotNull(exists)){
...@@ -403,4 +411,27 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -403,4 +411,27 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert.setHandleStatus(CommonConstants.ZERO_STRING); alert.setHandleStatus(CommonConstants.ZERO_STRING);
alertMap.put(alert.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+alert.getProjectNo(),alert); alertMap.put(alert.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+alert.getProjectNo(),alert);
} }
@Override
public boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo) {
YifuUser user = SecurityUtils.getUser();
for (int i = 0; i < changeFeedBackAllVo.getIds().length; i++) {
FeedBackDetail feedbackDetail = new FeedBackDetail();
feedbackDetail.setFeedbackPerson(user.getNickname());
feedbackDetail.setFeedbackTime(DateTime.now());
feedbackDetail.setContractAlertId(changeFeedBackAllVo.getIds()[i]);
feedbackDetail.setFeedbackReason(changeFeedBackAllVo.getFeedbackReason());
feedbackDetail.setFeedbackDetail(changeFeedBackAllVo.getFeedbackDetail());
feedbackDetailMapper.insert(feedbackDetail);
}
changeFeedBackAllVo.setFeedbackPerson(user.getNickname());
changeFeedBackAllVo.setFeedbackTime(DateTime.now());
return baseMapper.changeFeedBackAll(changeFeedBackAllVo);
}
@Override
public List<FeedBackDetail> getFeedbackDetail(String id) {
return feedbackDetailMapper.getDetail(id);
}
} }
...@@ -1404,6 +1404,19 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1404,6 +1404,19 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
contractInfo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); contractInfo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmployeeContractExport(contractInfo); list = baseMapper.getTEmployeeContractExport(contractInfo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
for(EmployeeContractExportVO ll:list){
if(ll.getAuditStatus().contains("审核不通过")) {
if (null != ll.getRemark()) {
String[] a = ll.getRemark().split(":");
for(int t=0;t<a.length;t++){
if(t==1) {
ll.setNoPassReason(a[0]);
ll.setRemark(a[1]);
}
}
}
}
}
writeSheet = EasyExcel.writerSheet("员工合同" + index).build(); writeSheet = EasyExcel.writerSheet("员工合同" + index).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
index++; index++;
......
...@@ -2368,6 +2368,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2368,6 +2368,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo = new TEmployeeInfo(); employeeInfo = new TEmployeeInfo();
BeanUtil.copyProperties(empAdd, employeeInfo); BeanUtil.copyProperties(empAdd, employeeInfo);
employeeInfo.setEmpCode(getCode()); employeeInfo.setEmpCode(getCode());
employeeInfo.setContactAddress(employeeInfo.getContactAddress());
employeeInfo.setIsCollege(CommonConstants.ONE_INT);
employeeInfo.setHignEducation(employeeInfo.getHignEducation());
employeeInfo.setStatus(CommonConstants.ZERO_INT); employeeInfo.setStatus(CommonConstants.ZERO_INT);
date = IdCardUtil.getBirthdate(employeeInfo.getEmpIdcard()); date = IdCardUtil.getBirthdate(employeeInfo.getEmpIdcard());
if (Common.isNotNull(date)) { if (Common.isNotNull(date)) {
......
<?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.yifu.archives.mapper.FeedBackDetailMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="FEEDBACK_PERSON" jdbcType="VARCHAR" property="feedbackPerson" />
<result column="FEEDBACK_TIME" jdbcType="TIMESTAMP" property="feedbackTime" />
<result column="FEEDBACK_REASON" jdbcType="VARCHAR" property="feedbackReason" />
<result column="FEEDBACK_DETAIL" jdbcType="VARCHAR" property="feedbackDetail" />
<result column="CONTRACT_ALERT_ID" jdbcType="VARCHAR" property="contractAlertId" />
</resultMap>
<sql id="Base_Column_List">
id, FEEDBACK_PERSON, FEEDBACK_TIME, FEEDBACK_REASON, FEEDBACK_DETAIL, CONTRACT_ALERT_ID
</sql>
<select id="getDetail" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
SELECT *
FROM feed_back_detail a
where a.CONTRACT_ALERT_ID=#{id}
order by FEEDBACK_TIME DESC
</select>
</mapper>
...@@ -24,36 +24,52 @@ ...@@ -24,36 +24,52 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper"> <mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpContractAlertMapper">
<resultMap id="tEmpContractAlertMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert"> <resultMap id="tEmpContractAlertMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert">
<id property="id" column="ID"/> <id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
<result property="empId" column="EMP_ID"/> <result property="empId" column="EMP_ID"/>
<result property="project" column="PROJECT"/> <result property="project" column="PROJECT"/>
<result property="projectNo" column="PROJECT_NO"/> <result property="projectNo" column="PROJECT_NO"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
<result property="empCode" column="EMP_CODE"/> <result property="empCode" column="EMP_CODE"/>
<result property="contractStart" column="CONTRACT_START"/> <result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/> <result property="contractEnd" column="CONTRACT_END"/>
<result property="fileProvince" column="FILE_PROVINCE"/> <result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/> <result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/> <result property="fileTown" column="FILE_TOWN"/>
<result property="empType" column="EMP_TYPE"/> <result property="empType" column="EMP_TYPE"/>
<result property="contractType" column="CONTRACT_TYPE"/> <result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractTerm" column="CONTRACT_TERM"/> <result property="contractTerm" column="CONTRACT_TERM"/>
<result property="daysDue" column="DAYS_DUE"/> <result property="daysDue" column="DAYS_DUE"/>
<result property="dueFlag" column="DUE_FLAG"/> <result property="dueFlag" column="DUE_FLAG"/>
<result property="daysOver" column="DAYS_OVER"/> <result property="daysOver" column="DAYS_OVER"/>
<result property="firstAlertTime" column="FIRST_ALERT_TIME"/> <result property="firstAlertTime" column="FIRST_ALERT_TIME"/>
<result property="alertPerson" column="ALERT_PERSON"/> <result property="alertPerson" column="ALERT_PERSON"/>
<result property="handleStatus" column="HANDLE_STATUS"/> <result property="handleStatus" column="HANDLE_STATUS"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="contractId" column="CONTRACT_ID"/> <result property="isFeedback" column="IS_FEEDBACK"/>
<result property="feedbackReason" column="FEEDBACK_REASON"/>
<result property="feedbackDetail" column="FEEDBACK_DATAIL"/>
<result property="contractId" column="CONTRACT_ID"/>
</resultMap> </resultMap>
<update id="truncate"> <update id="truncate">
TRUNCATE t_emp_contract_alert TRUNCATE t_emp_contract_alert
</update> </update>
<update id="changeFeedBackAll" parameterType="com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo">
update t_emp_contract_alert a
set a.IS_FEEDBACK=#{changeFeedBackAllVo.isFeedback},a.FEEDBACK_REASON=#{changeFeedBackAllVo.feedbackReason},a.FEEDBACK_DETAIL=#{changeFeedBackAllVo.feedbackDetail},
a.FEEDBACK_PERSON=#{changeFeedBackAllVo.feedbackPerson},a.FEEDBACK_TIME=#{changeFeedBackAllVo.feedbackTime}
where a.ID in
<foreach item="idStr" index="index" collection="changeFeedBackAllVo.ids" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
</mapper> </mapper>
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
<result property="contractNo" column="CONTRACT_NO"/> <result property="contractNo" column="CONTRACT_NO"/>
<result property="workingHours" column="WORKING_HOURS"/> <result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/> <result property="post" column="POST"/>
<result property="remark" column="REMARK"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -226,6 +227,7 @@ ...@@ -226,6 +227,7 @@
a.CONTRACT_PARTY, a.CONTRACT_PARTY,
a.SUBJECT_UNIT, a.SUBJECT_UNIT,
a.AUDIT_STATUS, a.AUDIT_STATUS,
b.REMARK,
a.IN_USE, a.IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES, if(a.IS_FILE = 0,'有附件','无附件') FILES,
a.IS_FILE, a.IS_FILE,
...@@ -399,9 +401,7 @@ ...@@ -399,9 +401,7 @@
<if test="tEmployeeContractInfo.applyNo != null and tEmployeeContractInfo.applyNo.trim() != ''"> <if test="tEmployeeContractInfo.applyNo != null and tEmployeeContractInfo.applyNo.trim() != ''">
AND a.APPLY_NO = #{tEmployeeContractInfo.applyNo} AND a.APPLY_NO = #{tEmployeeContractInfo.applyNo}
</if> </if>
<if test="tEmployeeContractInfo.auditStatus != null">
AND a.AUDIT_STATUS = #{tEmployeeContractInfo.auditStatus}
</if>
<if test="tEmployeeContractInfo.empNatrue != null and tEmployeeContractInfo.empNatrue.trim() != ''"> <if test="tEmployeeContractInfo.empNatrue != null and tEmployeeContractInfo.empNatrue.trim() != ''">
AND a.EMP_NATRUE = #{tEmployeeContractInfo.empNatrue} AND a.EMP_NATRUE = #{tEmployeeContractInfo.empNatrue}
</if> </if>
...@@ -426,8 +426,10 @@ ...@@ -426,8 +426,10 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_employee_contract_info a FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/> <include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"> <if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql} ${tEmployeeContractInfo.authSql}
...@@ -441,6 +443,9 @@ ...@@ -441,6 +443,9 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_employee_contract_info a FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/> <include refid="tEmployeeContractInfo_where"/>
...@@ -453,8 +458,10 @@ ...@@ -453,8 +458,10 @@
SELECT SELECT
count(1) count(1)
FROM t_employee_contract_info a FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/> <include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"> <if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql} ${tEmployeeContractInfo.authSql}
...@@ -504,13 +511,16 @@ ...@@ -504,13 +511,16 @@
WHEN a.type =3 THEN "派减-作废" WHEN a.type =3 THEN "派减-作废"
WHEN a.type =4 THEN "派减-终止" WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type", ELSE a.type END as "type",
b.REMARK,
a.CREATE_TIME a.CREATE_TIME
FROM t_employee_contract_info a FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.FILE_CITY LEFT JOIN sys_area a2 on a2.id=a.FILE_CITY
LEFT JOIN sys_area a3 on a3.id=a.FILE_TOWN LEFT JOIN sys_area a3 on a3.id=a.FILE_TOWN
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/> <include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"> <if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql} ${tEmployeeContractInfo.authSql}
...@@ -645,10 +655,17 @@ ...@@ -645,10 +655,17 @@
a.TYPE, a.TYPE,
a.LEAVE_DATE, a.LEAVE_DATE,
a.CONTRACT_NO, a.CONTRACT_NO,
a.REDUCE_REASON a.REDUCE_REASON,
b.AUDIT_STATUS,
b.REMARK
FROM t_employee_contract_info a FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/> <include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"> <if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql} ${tEmployeeContractInfo.authSql}
...@@ -666,8 +683,10 @@ ...@@ -666,8 +683,10 @@
SELECT SELECT
count(1) count(1)
FROM t_employee_contract_info a FROM t_employee_contract_info a
join t_employee_contract_audit b on a.ID=b.LINK_ID
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and b.ROOT_NAME='合同审核'
<include refid="tEmployeeContractInfo_where"/> <include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"> <if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql} ${tEmployeeContractInfo.authSql}
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* @Author fxj
* @Date 2022/7/4
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource("classpath:daprConfig.properties")
@ConfigurationProperties(value = "dapr.msg", ignoreInvalidFields = false)
public class DaprMsgProperties {
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String appUrl;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String appId;
String appPort;
String httpPort;
String grpcPort;
String metricsPort;
}
dapr.upms.appUrl=http://127.0.0.1:3500/v1.0/invoke/ dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms dapr.upms.appId=yifu-upms
dapr.check.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appId=yifu-check dapr.check.appId=yifu-check
#\u751F\u4EA7
dapr.archives.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
#\u751F\u4EA7 #\u672C\u5730
dapr.social.appUrl=http://127.0.0.1:3500/v1.0/invoke/ dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId=yifu-social dapr.archives.appId=yifu-archives
#\u751F\u4EA7
dapr.salary.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.salary.appId=yifu-salary
#\u751F\u4EA7 dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.insurances.appUrl=http://127.0.0.1:3500/v1.0/invoke/ dapr.social.appId=yifu-social
dapr.insurances.appId=yifu-insurances
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1 #\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl=http://127.0.0.1:3500/v1.0/invoke/ dapr.business.appUrl=http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.business.appId=yifu-business dapr.business.appId=yifu-business
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl=http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.msg.appId=yifu-msg
\ No newline at end of file
...@@ -28,7 +28,7 @@ seata: ...@@ -28,7 +28,7 @@ seata:
enable-degrade: false # 降级开关 enable-degrade: false # 降级开关
disable-global-transaction: false # 禁用全局事务(默认false) disable-global-transaction: false # 禁用全局事务(默认false)
grouplist: grouplist:
default: 192.168.0.153:33091 default: 192.168.1.65:33091
transport: transport:
shutdown: shutdown:
wait: 3 wait: 3
......
package com.yifu.cloud.plus.v1.job.compont;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprMsgProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @Author fxj
* @Description 定時任務--定时生成 超时提醒
* @Date 19:57 2023/5/30
* @Param
* @return
**/
@Component(value = "msgTask")
@Slf4j
@EnableConfigurationProperties(DaprMsgProperties.class)
public class MsgTask {
@Autowired
private DaprMsgProperties daprMsgProperties;
/**
* @Author fxj
* @Description 每29分钟刷新 超时待办提醒
* @Date 20:01 2023/5/30
* @Param
* @return
**/
public void createOderOverTimeMsg() {
log.info("-------------每29分钟刷新 超时待办提醒-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprMsgProperties.getAppUrl(), daprMsgProperties.getAppId(),
"/msg/inner/updateOverTimeMsg", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每29分钟刷新 超时待办提醒定时任务结束------------");
}
}
\ No newline at end of file
...@@ -127,5 +127,18 @@ public class SalaryTask { ...@@ -127,5 +127,18 @@ public class SalaryTask {
log.info("------------定时生成本期申报-定时任务结束------------"); log.info("------------定时生成本期申报-定时任务结束------------");
} }
/**
* @Author hgw
* @Description 前12月平均工资(MVP-TDC接口)
* @Date 2023-6-19 16:31:32
* @Param
* @return
**/
public void doCreateAverageSalary() {
log.info("------------定时生成【前12月平均工资】-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprSalarylProperties.getAppUrl(),daprSalarylProperties.getAppId(),"/taveragesalary/inner/doCreateAverageSalary","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时生成【前12月平均工资】-定时任务结束------------");
}
} }
\ No newline at end of file
...@@ -22,21 +22,20 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -22,21 +22,20 @@ import com.baomidou.mybatisplus.annotation.IdType;
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 com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
/** /**
* @author fxj * @author fxj
* @date 2023-06-01 10:41:25 * @date 2023-06-01 10:41:25
*/ */
@Data @Data
@TableName("msg_info") @TableName("msg_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "EKP 消息提醒") @Schema(description = "EKP 消息提醒")
public class MsgInfo extends BaseEntity { public class MsgInfo {
/** /**
* id * id
...@@ -46,20 +45,20 @@ public class MsgInfo extends BaseEntity { ...@@ -46,20 +45,20 @@ public class MsgInfo extends BaseEntity {
@Schema(description = "id") @Schema(description = "id")
private String id; private String id;
/** /**
* orderId * 订单号
*/ */
@ExcelAttribute(name = "orderId", maxLength = 50) @ExcelAttribute(name = "订单号", maxLength = 50)
@Length(max = 50, message = "orderId不能超过50个字符") @Length(max = 50, message = "orderId不能超过50个字符")
@ExcelProperty("orderId") @ExcelProperty("订单号")
@Schema(description = "orderId") @Schema(description = "订单号")
private String orderId; private String orderId;
/** /**
* 订单号 * URL
*/ */
@ExcelAttribute(name = "订单号", maxLength = 200) @ExcelAttribute(name = "URL", maxLength = 200)
@Length(max = 200, message = "订单号不能超过200个字符") @Length(max = 200, message = "URL不能超过200个字符")
@ExcelProperty("订单号") @ExcelProperty("URL")
@Schema(description = "订单号") @Schema(description = "URL")
private String url; private String url;
/** /**
* 提交人 * 提交人
...@@ -85,7 +84,7 @@ public class MsgInfo extends BaseEntity { ...@@ -85,7 +84,7 @@ public class MsgInfo extends BaseEntity {
@Length(max = 1, message = "0 未阅 1 已阅不能超过1个字符") @Length(max = 1, message = "0 未阅 1 已阅不能超过1个字符")
@ExcelProperty("0 未阅 1 已阅") @ExcelProperty("0 未阅 1 已阅")
@Schema(description = "0 未阅 1 已阅") @Schema(description = "0 未阅 1 已阅")
private String read; private String readStatus;
/** /**
* 提醒人 * 提醒人
*/ */
...@@ -95,4 +94,14 @@ public class MsgInfo extends BaseEntity { ...@@ -95,4 +94,14 @@ public class MsgInfo extends BaseEntity {
@Schema(description = "提醒人") @Schema(description = "提醒人")
private String alertUser; private String alertUser;
private LocalDateTime createTime;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过1个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String domainName;
} }
...@@ -10,13 +10,10 @@ import org.springframework.stereotype.Component; ...@@ -10,13 +10,10 @@ import org.springframework.stereotype.Component;
* @Description * @Description
* @Version 1.0 * @Version 1.0
*/ */
@Component
@PropertySource("classpath:application.yml")
@ConfigurationProperties(value = "ekp", ignoreInvalidFields = false)
public interface MesConstants { public interface MesConstants {
/** /**
* 項目订单URL * 項目订单URL
**/ **/
String orderUrl =""; String orderUrl ="http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=";
} }
...@@ -86,7 +86,7 @@ public class MsgInfoController { ...@@ -86,7 +86,7 @@ public class MsgInfoController {
@Operation(summary = "每29分钟刷新 超时待办提醒", description = "每29分钟刷新 超时待办提醒") @Operation(summary = "每29分钟刷新 超时待办提醒", description = "每29分钟刷新 超时待办提醒")
@Inner @Inner
@PostMapping("/inner/updateOverTimeMsg") @PostMapping("/inner/updateOverTimeMsg")
public void everyMonthUpdateSalaryStatus() { public void updateOverTimeMsg() {
msgInfoService.updateOverTimeMsg(); msgInfoService.updateOverTimeMsg();
} }
} }
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
package com.yifu.cloud.plus.v1.msg.service.impl; package com.yifu.cloud.plus.v1.msg.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -30,9 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -30,9 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
* *
...@@ -82,8 +88,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl ...@@ -82,8 +88,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
if (Common.isNotNull(save)){ if (Common.isNotNull(save)){
save.setCreateTime(LocalDateTime.now()); save.setCreateTime(LocalDateTime.now());
save.setUrl(MesConstants.orderUrl+vo.getOrderId()); save.setUrl(MesConstants.orderUrl+vo.getOrderId());
save.setUrl(vo.getAlertUser()); save.setAlertUser(vo.getAlertUser().replace("\"",""));
baseMapper.insert(save); baseMapper.insert(save);
log.error(JSON.toJSONString(save));
} }
} }
// 变更提醒 // 变更提醒
...@@ -93,8 +100,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl ...@@ -93,8 +100,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
save.setCreateTime(LocalDateTime.now()); save.setCreateTime(LocalDateTime.now());
save.setUrl(MesConstants.orderUrl+save.getOrderId()); save.setUrl(MesConstants.orderUrl+save.getOrderId());
save.setAlertType(CommonConstants.TWO_STRING); save.setAlertType(CommonConstants.TWO_STRING);
save.setUrl(vo.getAlertUser()); save.setAlertUser(vo.getAlertUser().replace("\"",""));
baseMapper.insert(save); baseMapper.insert(save);
log.error(JSON.toJSONString(save));
} }
} }
} }
...@@ -110,18 +118,41 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl ...@@ -110,18 +118,41 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
* @Param * @Param
* @return * @return
**/ **/
@Transactional
@Override @Override
public void updateOverTimeMsg() { public void updateOverTimeMsg() {
// 1. 删除未读的超时,如果有继续生成
baseMapper.delete(Wrappers.<MsgInfo>query().lambda()
.eq(MsgInfo::getReadStatus,CommonConstants.ZERO_STRING)
.eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING));
List<MsgInfo> temps = baseMapper.selectList(Wrappers.<MsgInfo>query().lambda()
.eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING)
.eq(MsgInfo::getReadStatus,CommonConstants.ONE_STRING));
Map<String,MsgInfo> tempMap = new HashMap<>();
if (Common.isNotNull(temps)){
for (MsgInfo msg:temps){
tempMap.put(msg.getOrderNo(),msg);
}
}
List<MsgInfo> msgInfos = baseMapper.getMsgByTask(); List<MsgInfo> msgInfos = baseMapper.getMsgByTask();
List<MsgInfo> saves = new ArrayList<>();
if (Common.isNotNull(msgInfos)){ if (Common.isNotNull(msgInfos)){
//1.先删除
baseMapper.delete(Wrappers.<MsgInfo>query().lambda().eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING));
//2. 重新生成 //2. 重新生成
MsgInfo temp;
for (MsgInfo ms:msgInfos){ for (MsgInfo ms:msgInfos){
temp = tempMap.get(ms.getOrderNo());
if (Common.isNotNull(temp)){
tempMap.remove(ms.getOrderNo());
continue;
}
ms.setCreateTime(LocalDateTime.now()); ms.setCreateTime(LocalDateTime.now());
ms.setUrl(MesConstants.orderUrl+ms.getOrderId()); ms.setUrl(MesConstants.orderUrl+ms.getOrderId());
saves.add(ms);
}
if (Common.isNotNull(tempMap)){
this.removeByIds(tempMap.values());
} }
this.saveBatch(msgInfos); this.saveBatch(saves);
} }
} }
} }
...@@ -63,7 +63,4 @@ springdoc: ...@@ -63,7 +63,4 @@ springdoc:
#分组名 #分组名
- group: mail - group: mail
#按包路径匹配 #按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.msg.controller packagesToScan: com.yifu.cloud.plus.v1.msg.controller
\ No newline at end of file
ekp:
orderUrl: http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=
\ No newline at end of file
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
<result property="orderNo" column="ORDER_NO"/> <result property="orderNo" column="ORDER_NO"/>
<result property="alertType" column="ALERT_TYPE"/> <result property="alertType" column="ALERT_TYPE"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="read" column="READ"/> <result property="readStatus" column="READ_STATUS"/>
<result property="alertUser" column="ALERT_USER"/> <result property="alertUser" column="ALERT_USER"/>
<result property="domainName" column="DOMAIN_NAME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -40,8 +41,9 @@ ...@@ -40,8 +41,9 @@
a.ORDER_NO, a.ORDER_NO,
a.ALERT_TYPE, a.ALERT_TYPE,
a.CREATE_TIME, a.CREATE_TIME,
a.READ, a.READ_STATUS,
a.ALERT_USER a.ALERT_USER,
a.DOMAIN_NAME
</sql> </sql>
<sql id="msgInfo_where"> <sql id="msgInfo_where">
<if test="msgInfo != null"> <if test="msgInfo != null">
...@@ -63,8 +65,8 @@ ...@@ -63,8 +65,8 @@
<if test="msgInfo.createTime != null"> <if test="msgInfo.createTime != null">
AND a.CREATE_TIME = #{msgInfo.createTime} AND a.CREATE_TIME = #{msgInfo.createTime}
</if> </if>
<if test="msgInfo.read != null and msgInfo.read.trim() != ''"> <if test="msgInfo.readStatus != null and msgInfo.readStatus.trim() != ''">
AND a.READ = #{msgInfo.read} AND a.READ_STATUS = #{msgInfo.readStatus}
</if> </if>
<if test="msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''"> <if test="msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''">
AND a.ALERT_USER = #{msgInfo.alertUser} AND a.ALERT_USER = #{msgInfo.alertUser}
...@@ -93,31 +95,38 @@ ...@@ -93,31 +95,38 @@
<select id="getMsgByOrderId" resultMap="msgInfoMap"> <select id="getMsgByOrderId" resultMap="msgInfoMap">
SELECT SELECT
p.fd_name alertUser, a.fd_3ac901ba3b9d3e domain_name,
a.fd_3ac901c5184274 orderNo, p.fd_name ALERT_USER,
a.fd_id orderId, a.fd_3ac901c5184274 ORDER_NO,
'0' as alertType a.fd_id ORDER_ID,
'0' as ALERT_TYPE
FROM FROM
ekp_ea33075576149bb8a4f5 a ekp_ea33075576149bb8a4f5 a
LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id
WHERE WHERE
a.fd_id = #{orderId} limit 1 a.fd_id = #{orderId} limit 1
</select> </select>
<!-- 加急(2-3小时)|1 紧急(3-5小时)|4 常规(5-8小时)|7 -->
<select id="getMsgByTask" resultMap="msgInfoMap"> <select id="getMsgByTask" resultMap="msgInfoMap">
select SELECT * from (
<!-- 加急(2-3小时)|1 紧急(3-5小时)|4 常规(5-8小时)|7 --> SELECT
o.fd_name alertUser, b1.fd_3ac901ba3b9d3e domain_name,
b1.fd_3ac901c5184274 orderNo, o.fd_no ALERT_USER,
b1.fd_id orderId, b1.fd_3ac901c5184274 ORDER_NO,
'1' as alertType b1.fd_id ORDER_ID,
FROM lbpm_workitem a '1' AS ALERT_TYPE,
LEFT JOIN lbpm_node e on e.fd_id= a.fd_node_id DATE_ADD(NOW(), INTERVAL 30 MINUTE) as 'date1',
LEFT JOIN lbpm_process p on p.fd_id=e.fd_process_id IF(b1.fd_3b779ba2168eea = 1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea = 4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR))) as 'date2'
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 on p.fd_model_id=b1.fd_id FROM
LEFT JOIN sys_org_element o on o.fd_id=fd_expected_id lbpm_workitem a
where LEFT JOIN lbpm_node e ON e.fd_id = a.fd_node_id
e.fd_fact_node_id='N5' and b1.fd_id is not null; LEFT JOIN lbpm_process p ON p.fd_id = e.fd_process_id
and DATE_ADD(NOW(),INTERVAL 30 MINUTE) > IF(b1.fd_3b779ba2168eea=1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea=4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR))) LEFT JOIN ekp_ea33075576149bb8a4f5 b1 ON p.fd_model_id = b1.fd_id
LEFT JOIN sys_org_element o ON o.fd_id = fd_expected_id
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
) x
where x.date1 > date2
</select> </select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.yifu.order.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
@Data
public class OrderAttVo implements Serializable {
private static final long serialVersionUID = 6620652346415180825L;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 订标识
*/
@Schema(description = "唯一标识")
private String file1;
/**
* 附件
*/
@Schema(description = "附件")
private MultipartFile[] file;
}
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.order.controller; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.order.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderService; import com.yifu.cloud.plus.v1.yifu.order.service.TOrderService;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO; import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO; import com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
...@@ -47,6 +49,21 @@ public class EkpOrderController { ...@@ -47,6 +49,21 @@ public class EkpOrderController {
return tOrderService.receiveOrder(vo); return tOrderService.receiveOrder(vo);
} }
/**
* 接收处理ekp
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Schema(description = "接收处理ekp附件")
@PostMapping(value = "/receiveOrderNew")
public R receiveOrder(OrderAttVo vo) throws IOException {
return tOrderService.receiveOrderNew(vo);
}
/** /**
* 接收处理ekp订单回复 * 接收处理ekp订单回复
* *
......
...@@ -99,6 +99,18 @@ public interface TOrderService extends IService<TOrder> { ...@@ -99,6 +99,18 @@ public interface TOrderService extends IService<TOrder> {
*/ */
R receiveOrder(OrderAddVO vo) throws IOException; R receiveOrder(OrderAddVO vo) throws IOException;
/**
* 接收处理ekp附件
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
R receiveOrderNew(OrderAttVo vo ) throws IOException;
/** /**
* 接收处理ekp订单回复 * 接收处理ekp订单回复
* *
......
...@@ -276,17 +276,17 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -276,17 +276,17 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if (CollectionUtils.isNotEmpty(withHoldingList)) { if (CollectionUtils.isNotEmpty(withHoldingList)) {
orderDetailVO.setWithHoldingEnclosure(withHoldingList); orderDetailVO.setWithHoldingEnclosure(withHoldingList);
} else { } else {
orderDetailVO.setFundEnclosure(Lists.newArrayList()); orderDetailVO.setWithHoldingEnclosure(Lists.newArrayList());
} }
if (CollectionUtils.isNotEmpty(collectionList)) { if (CollectionUtils.isNotEmpty(collectionList)) {
orderDetailVO.setCollectionEnclosure(collectionList); orderDetailVO.setCollectionEnclosure(collectionList);
} else { } else {
orderDetailVO.setFundEnclosure(Lists.newArrayList()); orderDetailVO.setCollectionEnclosure(Lists.newArrayList());
} }
if (CollectionUtils.isNotEmpty(noTaxList)) { if (CollectionUtils.isNotEmpty(noTaxList)) {
orderDetailVO.setCollectionEnclosure(noTaxList); orderDetailVO.setNoTaxEnclosure(noTaxList);
} else { } else {
orderDetailVO.setNoTaxEnclosure(Lists.newArrayList()); orderDetailVO.setNoTaxEnclosure(Lists.newArrayList());
...@@ -471,9 +471,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -471,9 +471,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public R receiveOrder(OrderAddVO vo) throws IOException{ public R receiveOrder(OrderAddVO vo) throws IOException{
log.error("vo.getCreateTime()="+vo.getCreateTime());
log.error("vo.getDeptNo()="+vo.getDeptNo());
log.error("vo.getOrderNo()="+vo.getOrderNo());
if (Common.isEmpty(vo.getOrderNo())){ if (Common.isEmpty(vo.getOrderNo())){
return R.failed(OrderConstants.ORDER_NO_IS_EMPTY); return R.failed(OrderConstants.ORDER_NO_IS_EMPTY);
} }
...@@ -514,7 +512,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -514,7 +512,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if (CollectionUtils.isEmpty(vo.getHandleUserList())){ if (CollectionUtils.isEmpty(vo.getHandleUserList())){
return R.failed(OrderConstants.HANDLE_USER_IS_EMPTY); return R.failed(OrderConstants.HANDLE_USER_IS_EMPTY);
} TSettleDomain settleDomain = new TSettleDomain(); } TSettleDomain settleDomain = new TSettleDomain();
if(vo.getUrgencyExtent().equals(CommonConstants.ONE_STRING)){
vo.setUrgencyExtent("加急(2-3小时)");
}
if(vo.getUrgencyExtent().equals(CommonConstants.FOUR_STRING)){
vo.setUrgencyExtent("紧急(3-5小时)");
}
if(vo.getUrgencyExtent().equals(CommonConstants.SEVEN_STRING)){
vo.setUrgencyExtent("常规(5-8小时)");
}
List<TSettleDomainSelectVo> settleDomainR; List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo; R<TSettleDomainListVo> listVo;
listVo = archivesDaprUtil.selectSettleDomainSelectVoByNo(vo.getDeptNo()); listVo = archivesDaprUtil.selectSettleDomainSelectVoByNo(vo.getDeptNo());
...@@ -573,278 +579,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -573,278 +579,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
} }
} }
if (save && ArrayUtils.isNotEmpty(vo.getWageFile())){
for (MultipartFile multipartFile : vo.getWageFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.TWO_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getSalaryFile())){
for (MultipartFile multipartFile : vo.getWageFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.THREE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getSocialFile())){
for (MultipartFile multipartFile : vo.getSocialFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.FOUR_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getFundFile())){
for (MultipartFile multipartFile : vo.getFundFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.FIVE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getInsuranceFile())){
for (MultipartFile multipartFile : vo.getInsuranceFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.SIX_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getWithHoldingFile())){
for (MultipartFile multipartFile : vo.getWithHoldingFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.SEVEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getCollectionFile())){
for (MultipartFile multipartFile : vo.getCollectionFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.EIGHT_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getNoTaxFile())){
for (MultipartFile multipartFile : vo.getNoTaxFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.NINE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getOtherFile())){
for (MultipartFile multipartFile : vo.getOtherFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.TEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getSalaryHandoverFile())){
for (MultipartFile multipartFile : vo.getOtherFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.ELEVEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
return R.ok(OrderConstants.OPERATE_SUCCESS); return R.ok(OrderConstants.OPERATE_SUCCESS);
} }
...@@ -938,6 +673,327 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -938,6 +673,327 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
return R.ok(OrderConstants.OPERATE_SUCCESS); return R.ok(OrderConstants.OPERATE_SUCCESS);
} }
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Override
public R receiveOrderNew(OrderAttVo vo) throws IOException{
if (Common.isEmpty(vo.getOrderNo())){
return R.failed(OrderConstants.ORDER_NO_IS_EMPTY);
}
if (ArrayUtils.isNotEmpty(vo.getFile())){
if (vo.getFile().length > CommonConstants.TWENTY_INT){
return R.failed(OrderConstants.ENCLOSURE_SIZE_ERROR);
}
for (MultipartFile multipartFile : vo.getFile()) {
if(!Common.checkInsuranceFile(multipartFile.getOriginalFilename())){
return R.failed(OrderConstants.ENCLOSURE_TYPE_IS_ERROR);
}
if (multipartFile.getSize() > (CommonConstants.FIFTY_INT*CommonConstants.BYTE*CommonConstants.BYTE)){
return R.failed(OrderConstants.ENCLOSURE_SIZE_ERROR);
}
}
}
if (vo.getFile1().equals("fileOne")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.TWO_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileTwo")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.THREE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileThree")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.FOUR_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileFour")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.FIVE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileFive")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.SIX_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
} if (vo.getFile1().equals("fileSix")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.SEVEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileSeven")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.EIGHT_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileEight")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.NINE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileNine")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.TEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
if (vo.getFile1().equals("fileTen")) {
if (ArrayUtils.isNotEmpty(vo.getFile())) {
for (MultipartFile multipartFile : vo.getFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(vo.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.ELEVEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
}
return R.ok(OrderConstants.OPERATE_SUCCESS);
}
public R invalidOrder(String id) { public R invalidOrder(String id) {
TOrder one = baseMapper.selectById(id); TOrder one = baseMapper.selectById(id);
if (Common.isNotNull(one) && CommonConstants.ZERO_INT != one.getOrderStatus()) { if (Common.isNotNull(one) && CommonConstants.ZERO_INT != one.getOrderStatus()) {
......
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 前12月平均工资(MVP-TDC接口)
* 保留上月与本月,删除上上月数据,用以比对差异部分,推送到TDC
*
* @author hgw
* @date 2023-6-19 15:54:50
*/
@Getter
@Setter
@TableName("t_average_salary")
@Tag(name = "前12月平均工资")
public class TAverageSalary implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "id")
private String id;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", maxLength = 25)
@Length(max = 25, message = "身份证号不能超过25个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 应发薪酬(劳务费、稿酬)
*/
@ExcelAttribute(name = "应发薪酬")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("应发薪酬")
private BigDecimal averageSalary;
/**
* 结算月
*/
@ExcelAttribute(name = "生成月", isNotEmpty = true, errorInfo = "生成月不能为空", maxLength = 6)
@NotBlank(message = "生成月不能为空")
@Length(max = 6, message = "生成月不能超过20个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生成月")
private String createMonth;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 前12月平均工资(MVP-TDC接口)
* 保留上月与本月,删除上上月数据,用以比对差异部分,推送到TDC
*
* @author hgw
* @date 2023-6-19 15:54:50
*/
@Data
public class TAverageSalaryVo implements Serializable {
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", maxLength = 25)
@Length(max = 25, message = "身份证号不能超过25个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 应发薪酬(劳务费、稿酬)
*/
@ExcelAttribute(name = "应发薪酬")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("应发薪酬")
private BigDecimal averageSalary;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.service.TAverageSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 前12月平均工资(MVP-TDC接口)
*
* @author hgw
* @date 2023-6-19 16:27:44
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/taveragesalary")
@Tag(name = "前12月平均工资(MVP-TDC接口)")
public class TAverageSalaryController {
private final TAverageSalaryService tAverageSalaryService;
/**
* @Description: 定时任务-前12月平均工资
* @Author: hgw
* @Date: 2023-6-19 16:29:50
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Inner
@Operation(description = "定时任务-前12月平均工资")
@PostMapping("/inner/doCreateAverageSalary")
public void doCreateAverageSalary() {
tAverageSalaryService.createAverageSalary();
}
/**
* @Author fxj
* @Description 获取-前12月平均工资数据
* @Date 10:20 2023/6/20
* @Param
* @return
**/
@Operation(description = "获取-前12月平均工资数据")
@GetMapping("/getAverageSalary")
public R<List<TAverageSalaryVo>> getAverageSalary(String idNum) {
// 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_DISPATCH_BATCH_ADD_IMPORT + CommonConstants.DOWN_LINE_STRING + "getAverageSalary";
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
//主动释放锁
return tAverageSalaryService.getAverageSalary(idNum);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
}
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 前12月平均工资(MVP-TDC接口)
*
* @author hgw
* @date 2023-6-19 16:24:41
*/
@Mapper
public interface TAverageSalaryMapper extends BaseMapper<TAverageSalary> {
/**
* 删除多余的数据
*
* @return
*/
int deleteByCreateMonth();
/**
* @param
* @Description: 新增新数据
* @Author: hgw
* @Date: 2023/6/19 16:10
* @return: int
**/
int insertAverageSalary();
/**
* @return
* @Author fxj
* @Description 获取-前12月平均工资数据 取值增量
* @Date 10:26 2023/6/20
* @Param
**/
List<TAverageSalaryVo> getAverageSalary(@Param("idNum") List<String> idNum);
}
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo;
import java.util.List;
/**
* @Author hgw
* @Description 前12月平均工资(MVP-TDC接口)
* @Date 2023-6-19 16:25:54
**/
public interface TAverageSalaryService extends IService<TAverageSalary> {
/**
* @Description: 删除本月与上上月数据,生成本月数据
* @Author: hgw
* @Date: 2023/6/19 16:26
* @return: void
**/
void createAverageSalary();
R<List<TAverageSalaryVo>> getAverageSalary(String idNum);
}
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TAverageSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TAverageSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Author hgw
* @Description 前12月平均工资(MVP-TDC接口)
* @Date 2023-6-19 16:25:16
**/
@Service("tAverageSalaryService")
public class TAverageSalaryServiceImpl extends ServiceImpl<TAverageSalaryMapper, TAverageSalary> implements TAverageSalaryService {
/**
* @Description: 删除本月与上上月数据,生成本月数据
* @Author: hgw
* @Date: 2023/6/19 16:32
* @return: void
**/
@Override
public void createAverageSalary() {
baseMapper.deleteByCreateMonth();
baseMapper.insertAverageSalary();
}
/**
* @return
* @Author fxj
* @Description 获取-前12月平均工资数据
* @Date 10:25 2023/6/20
* @Param
**/
@Override
public R<List<TAverageSalaryVo>> getAverageSalary(String idNum) {
return R.ok(baseMapper.getAverageSalary(Common.getList(idNum)), CommonConstants.RESULT_DATA_SUCESS);
}
}
...@@ -39,6 +39,7 @@ security: ...@@ -39,6 +39,7 @@ security:
- /v3/api-docs - /v3/api-docs
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
- /taveragesalary/getAverageSalary
......
<?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.yifu.salary.mapper.TAverageSalaryMapper">
<resultMap id="tAverageSalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary">
<id property="id" column="ID"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="averageSalary" column="AVERAGE_SALARY"/>
<result property="createMonth" column="CREATE_MONTH"/>
</resultMap>
<resultMap id="tAverageSalaryVoMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo">
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="averageSalary" column="AVERAGE_SALARY"/>
</resultMap>
<!-- 删除不需要的数据 -->
<delete id="deleteByCreateMonth">
delete
from t_average_salary
where CREATE_MONTH in (
DATE_FORMAT(now(), '%Y%m'), DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 MONTH), '%Y%m')
)
</delete>
<!-- 生成需要的数据 -->
<insert id="insertAverageSalary">
insert into t_average_salary
select CONCAT(DATE_FORMAT(now(), '%Y%m-'), a.ID) ID
, a.EMP_IDCARD
, round(sum(a.RELAY_SALARY) / ifnull(count(DISTINCT a.SALARY_MONTH), 1), 2) AVERAGE_SALARY
, DATE_FORMAT(now(), '%Y%m') CREATE_MONTH
from t_salary_account a
where a.SALARY_MONTH >= date_format(DATE_SUB(NOW(), INTERVAL 1 YEAR), '%Y%m')
GROUP BY a.EMP_IDCARD
</insert>
<select id="getAverageSalary" resultMap="tAverageSalaryVoMap">
select x.* from
(select a.EMP_IDCARD,a.AVERAGE_SALARY from view_average_cur_month a) x
LEFT JOIN
(select a.EMP_IDCARD,a.AVERAGE_SALARY from view_average_last_month a) y
on x.EMP_IDCARD=y.EMP_IDCARD
where (x.AVERAGE_SALARY <![CDATA[ <> ]]> IFNULL(y.AVERAGE_SALARY,-1))
<if test="idNum != null and idNum.size > 0">
AND x.EMP_IDCARD in
<foreach item="item" index="index" collection="idNum" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>
...@@ -488,6 +488,16 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -488,6 +488,16 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelProperty("派单ID" ) @ExcelProperty("派单ID" )
private String dispatchId; private String dispatchId;
/**
* 通信地址
*/
@Schema(description = "通信地址" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址" )
private String contactAddress;
/** /**
* 订单ID * 订单ID
*/ */
......
...@@ -2048,6 +2048,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2048,6 +2048,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
emp.setCreateBy(user.getId()); emp.setCreateBy(user.getId());
emp.setCreateName(user.getNickname()); emp.setCreateName(user.getNickname());
emp.setEmpIdcard(excel.getEmpIdcard()); emp.setEmpIdcard(excel.getEmpIdcard());
emp.setContactAddress(excel.getContactAddress());
emp.setEmpName(excel.getEmpName()); emp.setEmpName(excel.getEmpName());
emp.setEmpNational(excel.getEmpNational()); emp.setEmpNational(excel.getEmpNational());
emp.setEmpNatrue(excel.getEmpType()); emp.setEmpNatrue(excel.getEmpType());
......
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