Commit 82334943 authored by wangzb's avatar wangzb

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

parents 71837951 0fd3f163
...@@ -1439,7 +1439,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1439,7 +1439,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if ((tEmployeeProject.getSocialStatus() == CommonConstants.ZERO_INT if ((tEmployeeProject.getSocialStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getSocialStatus() == CommonConstants.FOUR_INT) && || tEmployeeProject.getSocialStatus() == CommonConstants.FOUR_INT) &&
(tEmployeeProject.getFundStatus() == CommonConstants.ZERO_INT (tEmployeeProject.getFundStatus() == CommonConstants.ZERO_INT
|| tEmployeeProject.getFundStatus() == CommonConstants.FOUR_INT)) { || tEmployeeProject.getFundStatus() == CommonConstants.THREE_INT)) {
tEmployeeProject.setProjectStatus(CommonConstants.ONE_INT); tEmployeeProject.setProjectStatus(CommonConstants.ONE_INT);
tEmployeeProject.setLeaveRemark("终止合同联动减项"); tEmployeeProject.setLeaveRemark("终止合同联动减项");
tEmployeeProject.setLeaveTime(LocalDateTime.now()); tEmployeeProject.setLeaveTime(LocalDateTime.now());
...@@ -1452,8 +1452,22 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1452,8 +1452,22 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper.updateById(tEmployeeProject); baseMapper.updateById(tEmployeeProject);
//如果项目档案已减项,如果人员存在多个项目不处理,反之则减档 //如果项目档案已减项,如果人员存在多个项目不处理,反之则减档
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId()); TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
if (tEmployeeProject.getProjectStatus() == CommonConstants.ONE_INT && Common.isNotNull(tEmployeeInfo)) { if (Common.isNotNull(tEmployeeInfo)) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId()); TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
// 判断人员有无审核通过的其他合同
TEmployeeContractInfo contractInfoInUse = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpIdcard, vo.getEmpIdCard())
.and(obj -> obj.ge(TEmployeeContractInfo::getContractEnd, DateUtil.getThisDayByPatten("yyyy-MM-dd"))
.or().isNull(TEmployeeContractInfo::getContractEnd))
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (contractInfoInUse != null) {
tEmployeeInfo.setContractStatus(CommonConstants.ONE_INT);
} else {
tEmployeeInfo.setContractStatus(CommonConstants.TWO_INT);
}
if (tEmployeeProject.getProjectStatus() == CommonConstants.ONE_INT) {
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() - CommonConstants.ONE_INT); tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() - CommonConstants.ONE_INT);
tEmployeeInfo.setContractStatus(CommonConstants.TWO_INT); tEmployeeInfo.setContractStatus(CommonConstants.TWO_INT);
//减项成功把人员档案现存项目数减一 //减项成功把人员档案现存项目数减一
...@@ -1468,6 +1482,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1468,6 +1482,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} else { } else {
failueInfo.append("存在其他项目,无法减档"); failueInfo.append("存在其他项目,无法减档");
} }
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo); "", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo); tEmployeeInfoMapper.updateById(tEmployeeInfo);
......
...@@ -52,7 +52,7 @@ public class EkpOrderController { ...@@ -52,7 +52,7 @@ public class EkpOrderController {
@Schema(description = "接收处理ekp订单") @Schema(description = "接收处理ekp订单")
@PostMapping(value = "/receiveOrder") @PostMapping(value = "/receiveOrder")
public R receiveOrder(OrderAddVO vo) throws IOException { public R receiveOrder(OrderAddVO vo) throws IOException {
return tOrderService.receiveOrder(vo); return tOrderService.receiveOrder(vo,ekpOrderFileTask);
} }
......
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,6 +6,7 @@ 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.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrder; import com.yifu.cloud.plus.v1.yifu.order.entity.TOrder;
import com.yifu.cloud.plus.v1.yifu.order.util.EkpOrderFileTask;
import com.yifu.cloud.plus.v1.yifu.order.vo.*; import com.yifu.cloud.plus.v1.yifu.order.vo.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -95,10 +96,11 @@ public interface TOrderService extends IService<TOrder> { ...@@ -95,10 +96,11 @@ public interface TOrderService extends IService<TOrder> {
* *
* @author licancan * @author licancan
* @param vo * @param vo
* @param ekpOrderFileTask
* @return {@link R} * @return {@link R}
* @throws IOException * @throws IOException
*/ */
R receiveOrder(OrderAddVO vo) throws IOException; R receiveOrder(OrderAddVO vo, EkpOrderFileTask ekpOrderFileTask) throws IOException;
/** /**
* 接收处理ekp订单回复 * 接收处理ekp订单回复
...@@ -118,6 +120,8 @@ public interface TOrderService extends IService<TOrder> { ...@@ -118,6 +120,8 @@ public interface TOrderService extends IService<TOrder> {
*/ */
void receiveOrderNew(InputStream inputStream, String file1, String orderNo, String fileName, String originalFileName) throws IOException; void receiveOrderNew(InputStream inputStream, String file1, String orderNo, String fileName, String originalFileName) throws IOException;
void receiveOrderFileAsc(InputStream inputStream, String orderNo, String fileName, String originalFileName);
/** /**
* 订单作废 * 订单作废
* *
......
...@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.order.service.TOrderEnclosureService; ...@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.order.service.TOrderEnclosureService;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderHandlerService; import com.yifu.cloud.plus.v1.yifu.order.service.TOrderHandlerService;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderReplyService; import com.yifu.cloud.plus.v1.yifu.order.service.TOrderReplyService;
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.util.EkpOrderFileTask;
import com.yifu.cloud.plus.v1.yifu.order.util.ValidityUtil; import com.yifu.cloud.plus.v1.yifu.order.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.order.vo.*; import com.yifu.cloud.plus.v1.yifu.order.vo.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -466,12 +467,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -466,12 +467,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
* *
* @author licancan * @author licancan
* @param vo * @param vo
* @param ekpOrderFileTask
* @return {@link R} * @return {@link R}
* @throws IOException * @throws IOException
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public R receiveOrder(OrderAddVO vo) throws IOException{ public R receiveOrder(OrderAddVO vo, EkpOrderFileTask ekpOrderFileTask) throws IOException{
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);
...@@ -558,12 +560,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -558,12 +560,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename(); fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录 //filePath不传默认存储空间的根目录
//支持的附件格式 //支持的附件格式
getObjectR(multipartFile.getInputStream(),vo.getOrderNo(),fileName,multipartFile.getOriginalFilename(),CommonConstants.ZERO_INT); ekpOrderFileTask.receiveOrderFileAsc(multipartFile.getInputStream(),vo.getOrderNo(),fileName,multipartFile.getOriginalFilename());
} }
} }
return R.ok(OrderConstants.OPERATE_SUCCESS); return R.ok(OrderConstants.OPERATE_SUCCESS);
} }
...@@ -657,14 +657,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -657,14 +657,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
} }
/** /**
* @Author fxj * 接收处理ekp订单回复
* @Description 附件上传 *
* @Date 9:38 2023/6/26 * @author licancan
* @Param * @return {@link R}
* @return * @throws IOException
**/ */
@Override @Override
public void receiveOrderNew(InputStream inputStream, String file1, String orderNo, String fileName, String originalFileName){ public void receiveOrderNew(InputStream inputStream, String file1, String orderNo, String fileName, String originalFileName){
R<Object> e;
if (file1.equals("fileOne")) { if (file1.equals("fileOne")) {
getObjectR(inputStream, orderNo, fileName, originalFileName,CommonConstants.TWO_INTEGER); getObjectR(inputStream, orderNo, fileName, originalFileName,CommonConstants.TWO_INTEGER);
} }
...@@ -695,6 +696,18 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -695,6 +696,18 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
getObjectR(inputStream, orderNo, fileName, originalFileName,CommonConstants.ELEVEN_INTEGER); getObjectR(inputStream, orderNo, fileName, originalFileName,CommonConstants.ELEVEN_INTEGER);
} }
} }
/**
* 接收处理ekp订单回复
*
* @author licancan
* @return {@link R}
* @throws IOException
*/
@Override
public void receiveOrderFileAsc(InputStream inputStream, String orderNo, String fileName, String originalFileName){
getObjectR(inputStream, orderNo, fileName, originalFileName,CommonConstants.ZERO_INT);
}
private R<Object> getObjectR(InputStream inputStream, String orderNo, String fileName, String originalFileName,Integer enclosureflag) { private R<Object> getObjectR(InputStream inputStream, String orderNo, String fileName, String originalFileName,Integer enclosureflag) {
//filePath不传默认存储空间的根目录 //filePath不传默认存储空间的根目录
......
package com.yifu.cloud.plus.v1.yifu.order.util; package com.yifu.cloud.plus.v1.yifu.order.util;
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.OrderAttVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
...@@ -38,4 +37,9 @@ public class EkpOrderFileTask { ...@@ -38,4 +37,9 @@ public class EkpOrderFileTask {
} }
} }
} }
@Async
public void receiveOrderFileAsc(InputStream inputStream,String orderNo, String fileName, String originalFileName){
orderService.receiveOrderFileAsc(inputStream,orderNo,fileName,originalFileName);
}
} }
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