Commit e01e2040 authored by hongguangwu's avatar hongguangwu

MVP1.5.2-派单查验有没有合同

parent 26e8ebcb
......@@ -30,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
......@@ -385,4 +384,18 @@ public class TEmployeeContractInfoController {
tEmployeeContractInfoService.exportAuditContractInfo(contractInfo, response);
}
/**
* @param empIdCard 身份证
* @param deptId 项目id
* @Description: 通过身份证与项目id查询
* @Author: hgw
* @Date: 2023/3/9 14:30
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(summary = "通过身份证与项目id查询", description = "通过身份证与项目id查询")
@PostMapping("/getContractByEmpIdCardAndDeptId")
public R<String> getContractByEmpIdCardAndDeptId(@RequestParam String empIdCard, @RequestParam String deptId) {
return tEmployeeContractInfoService.getContractByEmpIdCardAndDeptId(empIdCard, deptId);
}
}
......@@ -21,10 +21,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractBusinessPageVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -107,4 +107,6 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(@Param("empId")String empId, @Param("contractId")String contractId);
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
int getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
}
......@@ -184,4 +184,6 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(String empId, String contractId);
R<String> getContractByEmpIdCardAndDeptId(String mpIdCard, String deptId);
}
......@@ -1519,5 +1519,15 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
public List<EmpContractBusinessPageVo> getOtherContractBusinessInfo(String empId, String contractId) {
return baseMapper.getOtherContractBusinessInfo(empId,contractId);
}
@Override
public R<String> getContractByEmpIdCardAndDeptId(String mpIdCard, String deptId) {
int count = baseMapper.getContractByEmpIdCardAndDeptId(mpIdCard, deptId);
if (count >0) {
return R.ok();
} else {
return R.failed("未找到合同");
}
}
}
......@@ -790,4 +790,13 @@
a.SUBJECT_UNIT=b.CUSTOMER_NAME
where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and a.IN_USE='0' and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0';
</update>
<select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.Integer">
select
count(1)
from t_employee_contract_info e
where e.EMP_IDCARD = #{empIdCard} and e.SETTLE_DOMAIN = #{deptId}
and e.DELETE_FLAG = '0' and e.IS_OBSOLETE = '0'
and e.situation !='作废' and e.situation !='终止' and e.AUDIT_STATUS != 3
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment