Commit 39fd513c authored by fangxinjiang's avatar fangxinjiang

派单详情& 获取合同远程接口 & 审核记录新增标题和部门

parent 1a8911c9
......@@ -175,6 +175,13 @@ public class DispatchEmpVo implements Serializable {
@Schema(description = "合同年限", name = "contractTerm")
private String contractTerm;
/**
* 合同ID
*/
@ExcelAttribute(name = "合同ID")
@Schema(description = "合同ID")
private String contractId;
/**
* 业务细分
*/
......
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -279,4 +280,18 @@ public class TEmployeeContractInfoController {
tEmployeeContractInfoService.exportContractInfoHistory(contractInfo, response);
}
/**
* @Author fxj
* @Description 通过id查询员工合同
* @Date 10:41 2022/7/25
* @Param
* @return
**/
@Operation(summary = "通过id查询", description = "通过id查询员工合同")
@Inner
@PostMapping("/getContractById")
public R<TEmployeeContractInfo> getContractById(@RequestBody String id) {
return R.ok(tEmployeeContractInfoService.getById(id));
}
}
......@@ -149,6 +149,7 @@
<result property="contractEnd" column="CONTRACT_END"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
......@@ -669,7 +670,7 @@
a.ID_TOWN,a.EMP_REGIS_TYPE,a.FILE_PROVINCE,a.FILE_CITY,a.FILE_TOWN,a.HIGN_EDUCATION,a.FILE_STATUS,
b.CONTRACT_NAME,b.CONTRACT_TYPE,
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID
c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST
......@@ -710,7 +711,8 @@
x.CONTRACT_START,
x.CONTRACT_END,
x.CONTRACT_TERM,
x.CONTRACT_SUB_NAME
x.CONTRACT_SUB_NAME,
x.ID as "CONTRACT_ID"
FROM
t_employee_contract_info x
WHERE
......
......@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
......@@ -143,4 +144,21 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @param id
* @Description: 获取档案合同
* @Author: fxj
* @Date: 2022/7/25 10:38
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
public R<TEmployeeContractInfo> getContractById(String id) {
R<TEmployeeContractInfo> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/getContractById" , id, TEmployeeContractInfo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取档案信息失败!");
}
return res;
}
}
#\u6D4B\u8BD5\u73AF\u5883-\u7BA1\u7406\u540E\u53F0
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appUrl=http://localhost:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
#\u6D4B\u8BD5\u73AF\u5883-\u6821\u9A8C\u670D\u52A1
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local: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://localhost:3502/v1.0/invoke/
dapr.check.appUrl=http://localhost:3507/v1.0/invoke/
dapr.check.appId=yifu-check
#\u6D4B\u8BD5\u73AF\u5883-\u6863\u6848\u670D\u52A1
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.archives.appUrl=http://localhost:3508/v1.0/invoke/
dapr.archives.appId=yifu-archives
dapr.social.appUrl=http://localhost:3510/v1.0/invoke/
dapr.social.appId=yifu-social
......@@ -35,5 +35,11 @@
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
......@@ -265,6 +265,14 @@ public class TDispatchInfo extends BaseEntity {
@Schema(description = "合同年限" )
@ExcelProperty("合同年限" )
private String contractTerm;
/**
* 合同ID ---- 派增持有
*/
@ExcelAttribute(name = "合同ID" )
@Schema(description = "合同ID---- 派增持有" )
@ExcelProperty("合同ID" )
private String contractId;
/**
* 户口性质
*/
......
......@@ -19,11 +19,16 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
......@@ -65,6 +70,7 @@ public class TDispatchInfoController {
public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
* 不分页查询
* @param tDispatchInfo 派单信息记录表
......@@ -76,7 +82,48 @@ public class TDispatchInfoController {
public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfoSearchVo tDispatchInfo) {
return R.ok(tDispatchInfoService.noPageDiy(tDispatchInfo));
}
/**
* 简单分页查询--申请
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--申请
* @return
*/
@Operation(description = "简单分页查询--申请")
@GetMapping("/pageApply")
public R<IPage<TDispatchInfo>> getTDispatchApplyPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
tDispatchInfo.setCreateBy(user.getId());
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
* 简单分页查询--审核
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @return
*/
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageAudit")
public R<IPage<TDispatchInfo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setStatus(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
* 简单分页查询--审核
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @return
*/
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageHandle")
public R<IPage<TDispatchInfo>> getTDispatchHandlePage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
* 通过id查询派单信息记录表
* @param id id
......@@ -89,7 +136,21 @@ public class TDispatchInfoController {
return R.ok(tDispatchInfoService.getById(id));
}
/**
/**
* 通过id查询派单相关系信息
* @author fxj
* @param id id
* @return R
* @date 2022-07-25 10:19
*/
@Operation(summary = "通过id查询派单相关系信息", description = "通过id查询派单相关系信息")
@GetMapping("/getSocialAndFundInfoById" )
public R<DispatchDetailVo> getSocialAndFundInfoById(@RequestParam(value = "id") String id) {
return R.ok(tDispatchInfoService.getSocialAndFundInfoById(id));
}
/**
* 新增派单信息记录表
* @param tDispatchInfo 派单信息记录表
* @return R
......
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import javax.servlet.http.HttpServletResponse;
......@@ -50,4 +51,6 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
R<Boolean> removeByIdDiy(String id);
DispatchDetailVo getSocialAndFundInfoById(String id);
}
......@@ -30,6 +30,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
......@@ -41,6 +44,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchReduceVo;
......@@ -79,6 +83,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private final TProvidentFundMapper fundMapper;
/**
* 派单信息记录表简单分页查询
*
......@@ -394,7 +399,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, EmpProjectDispatchVo> projectsMap = null;
TDispatchImportVo excel;
DispatchEmpVo empVo;
EmpContractDispatchVo contract;
EmpContractDispatchVo contract = null;
EmpProjectDispatchVo project = null;
EmpAddDispatchVo emp = null;
TSocialInfo social = null;
......@@ -458,6 +463,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(fund)){
dispatch.setFundId(fund.getId());
}
if (Common.isNotNull(contract)){
dispatch.setContractId(contract.getId());
}
}
insertDispatch(emp, dispatch);
}
......@@ -789,6 +797,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setFileProvince(empVo.getFileProvince());
dispatch.setFileCity(empVo.getFileCity());
dispatch.setFileTown(empVo.getFileTown());
dispatch.setContractId(empVo.getContractId());
}
dispatchMap.put(excel.getEmpIdcard(),dispatch);
......@@ -1606,4 +1615,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return R.failed(false,CommonConstants.SAVE_FAILED);
}
}
/**
* 通过id查询派单相关系信息
* @author fxj
* @param id id
* @return R
* @date 2022-07-25 10:19
*/
@Override
public DispatchDetailVo getSocialAndFundInfoById(String id) {
DispatchDetailVo detailVo = new DispatchDetailVo();
TDispatchInfo dispatch = baseMapper.selectById(id);
detailVo.setDispatch(dispatch);
if (Common.isNotNull(dispatch)){
if (Common.isNotNull(dispatch.getSocialId())){
detailVo.setSocial(socialMapper.selectById(dispatch.getSocialId()));
}
if (Common.isNotNull(dispatch.getFundId())){
detailVo.setFund(fundMapper.selectById(dispatch.getFundId()));
}
if (Common.isNotNull(dispatch.getContractId())){
R<TEmployeeContractInfo> res = archivesDaprUtil.getContractById(dispatch.getContractId());
if (Common.isNotNull(res)){
detailVo.setContract(res.getData());
}
}
if (Common.isNotNull(dispatch.getSettleDomain()) && Common.isNotNull(dispatch.getEmpId())){
TEmployeeProject temp = new TEmployeeProject();
temp.setDeptId(dispatch.getSettleDomain());
temp.setEmpId(dispatch.getEmpId());
R<TEmployeeProject> res = archivesDaprUtil.getTEmployeeProjectById(temp);
if (Common.isNotNull(res)){
detailVo.setProject(res.getData());
}
}
if (Common.isNotNull(dispatch.getEmpId())){
R<TEmployeeInfo> res = archivesDaprUtil.getTEmployeeInfoById(dispatch.getEmpId());
if (Common.isNotNull(res)){
detailVo.setEmployee(res.getData());
}
}
}
return detailVo;
}
}
......@@ -85,6 +85,8 @@
<result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="dispatchCode" column="DISPATCH_CODE"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -149,7 +151,8 @@
a.BELONG_UNIT_NAME,
a.DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME
a.CONTRACT_SUB_NAME,
a.CONTRACT_ID
</sql>
<sql id="tDispatchInfo_where">
<if test="tDispatchInfo != null">
......
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