Commit 3e2c1b45 by 翁国栋 Committed by 284718418@qq.com

8小时后台--

合同页面-列表查询问题
parent 0c91ae54
......@@ -5,6 +5,7 @@ import cn.timer.api.bean.kqgl.UserEquiRelation;
import cn.timer.api.bean.kqmk.*;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.businessService.QyzxOrderRecord;
import cn.timer.api.bean.spmk.SpmkCustomApproval;
import cn.timer.api.bean.wechat.MessageTemplate;
import cn.timer.api.bean.yggl.YgglMainEmp;
......@@ -35,6 +36,7 @@ import cn.timer.api.utils.ZpglMessageTemplate;
import cn.timer.api.utils.query.BaseQuery;
import cn.timer.api.config.enuminterface.YgEnumInterface.jobStatus;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -205,6 +207,7 @@ public class ZpglController {
}
}
/**
* 添加员工档案
*
......@@ -774,5 +777,17 @@ public class ZpglController {
}
}
@PostMapping(value = "/editInfo")
@ApiOperation(value = "14.招聘-变更基础信息", httpMethod = "POST", notes = "招聘-变更人才信息状态")
@ApiOperationSupport(order = 3)
public Result<Object> editInfo(@CurrentUser UserBean userBean, @RequestBody ZpglRcxxDto zpglRcxxDto) {
try {
boolean re = ZpglRcxx.builder().name(zpglRcxxDto.getName()).mobile(zpglRcxxDto.getMobile()).mail(zpglRcxxDto.getMail()).build().update(new LambdaUpdateWrapper<ZpglRcxx>().eq(ZpglRcxx::getId, zpglRcxxDto.getId()));
return re?ResultUtil.success("修改成功"):ResultUtil.error("修改成功");
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-修改成功");
}
}
}
package cn.timer.api.dao.yggl;
import cn.timer.api.dto.yggl.HtgkDto;
import cn.timer.api.utils.Page;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -19,7 +20,8 @@ public interface YgglAttaHtxxbMapper extends BaseMapper<YgglAttaHtxxb> {
List<HtgkDto> queryContract(@Param("orgCode") Integer orgCode);
List<HtgkDto> selectListByType(@Param("type") Integer type);
List<HtgkDto> selectListByType(@Param("type") Integer type,@Param("page") Page page,@Param("orgCode") Integer orgCode);
Integer selectTotalByType(@Param("type") Integer type,@Param("orgCode") Integer orgCode);
......
package cn.timer.api.dto.yggl;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -42,4 +43,9 @@ public class HtgkDto implements Serializable{
private Date statTime;
private Date endTime;
private Integer empNum;
private Page page;
private Integer bmgwId;
private String query;
private Integer htType;
}
......@@ -120,4 +120,9 @@ public class ZpglRcxxDto implements Serializable{
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "电话")
private String mobile;
@ApiModelProperty(value = "邮箱")
private String mail;
}
......@@ -3,28 +3,29 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.yggl.YgglAttaHtxxbMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglAttaHtxxb" >
<id column="id" property="id" />
<id column="id" property="id" />
<result column="emp_num" property="empNum" />
<result column="ht_id" property="htId" />
<result column="ht_name" property="htName" />
<result column="type" property="type" />
<result column="qd_date" property="qdDate" />
<result column="start_time" property="startTime" />
<result column="end_time" property="endTime" />
<result column="htqygs" property="htqygs" />
<result column="status" property="status" />
<result column="remark" property="remark" />
<result column="org_code" property="orgCode" />
<result column="jc_status" property="jcStatus" />
<result column="jc_date" property="jcDate" />
<result column="htfj" property="htfj" />
<result column="delete_flag" property="deleteFlag" />
<resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglAttaHtxxb">
<id column="id" property="id"/>
<id column="id" property="id"/>
<result column="emp_num" property="empNum"/>
<result column="ht_id" property="htId"/>
<result column="ht_name" property="htName"/>
<result column="type" property="type"/>
<result column="qd_date" property="qdDate"/>
<result column="start_time" property="startTime"/>
<result column="end_time" property="endTime"/>
<result column="htqygs" property="htqygs"/>
<result column="status" property="status"/>
<result column="remark" property="remark"/>
<result column="org_code" property="orgCode"/>
<result column="jc_status" property="jcStatus"/>
<result column="jc_date" property="jcDate"/>
<result column="htfj" property="htfj"/>
<result column="delete_flag" property="deleteFlag"/>
</resultMap>
<sql id="Base_Column_List">
id,
id
,
emp_num,
ht_id,
ht_name,
......@@ -154,23 +155,35 @@
-->
<select id="queryContract" resultType="cn.timer.api.dto.yggl.HtgkDto">
SELECT
zc.company_name companyName,
(SELECT SUM(job_status BETWEEN 0 and 3) AS probation FROM yggl_main_emp WHERE org_code = #{orgCode}) as probation,
(SELECT count(DISTINCT emp_num) AS signCount FROM yggl_atta_htxxb AS yah WHERE org_code = #{orgCode} AND zc.id=yah.htqygs
AND yah.jc_status=0 AND yah.delete_flag=0 AND yah.status=0
SELECT zc.company_name companyName,
(SELECT SUM(job_status BETWEEN 0 and 3) AS probation
FROM yggl_main_emp
WHERE org_code = #{orgCode}) as probation,
(SELECT count(DISTINCT emp_num) AS signCount
FROM yggl_atta_htxxb AS yah
WHERE org_code = #{orgCode}
AND zc.id = yah.htqygs
AND yah.jc_status = 0
AND yah.delete_flag = 0
AND yah.status = 0
) as signCount,
(SELECT count(DISTINCT emp_num) AS signCount FROM yggl_atta_htxxb AS yah WHERE org_code = #{orgCode} AND zc.id=yah.htqygs
AND yah.jc_status=0 AND yah.delete_flag=0 AND yah.status=0
and yah.end_time between NOW() AND DATE_FORMAT(DATE_add(NOW(),INTERVAL 5 DAY),'%Y-%m-%d')
(SELECT count(DISTINCT emp_num) AS signCount
FROM yggl_atta_htxxb AS yah
WHERE org_code = #{orgCode}
AND zc.id = yah.htqygs
AND yah.jc_status = 0
AND yah.delete_flag = 0
AND yah.status = 0
and yah.end_time between NOW() AND DATE_FORMAT(DATE_add(NOW(), INTERVAL 5 DAY), '%Y-%m-%d')
) as due_soon
FROM `zpgl_company` zc
where zc.org_code =#{orgCode}
</select>
<select id="selectListByType" resultType="cn.timer.api.dto.yggl.HtgkDto">
SELECT
yh.id as id,
yh.emp_num as empNum,
ye.emp_num as empNum,
ye.name as userName,
ye.head_url as headUrl,
zm.name as deptName,
......@@ -183,11 +196,51 @@
yh.start_time as statTime,
yh.end_time as endTime
FROM
yggl_atta_htxxb yh
LEFT JOIN yggl_main_emp ye ON ( ye.emp_num = yh.emp_num AND ye.org_code = yh.org_code )
yggl_main_emp ye
LEFT JOIN yggl_atta_htxxb yh ON ( ye.emp_num = yh.emp_num AND ye.org_code = yh.org_code )
LEFT JOIN zzgl_bmgw_m zm ON zm.id = ye.bmgw_id
LEFT JOIN zpgl_company zc ON zc.id = yh.htqygs
<where>
ye.org_code=#{orgCode}
<if test="type == 0">
and yh.id is not null
and yh.delete_flag = 0
</if>
<if test="type == 1">
and yh.id is null
</if>
</where>
LIMIT #{page.offset}, #{page.totalPage}
</select>
<select id="selectTotalByType" resultType="java.lang.Integer">
SELECT
count(ye.id)
FROM
yggl_main_emp ye
LEFT JOIN yggl_atta_htxxb yh ON ( ye.emp_num = yh.emp_num AND ye.org_code = yh.org_code )
LEFT JOIN zzgl_bmgw_m zm ON zm.id = ye.bmgw_id
LEFT JOIN zpgl_company zc ON zc.id = yh.htqygs
where yh.jc_status = #{type}
<where>
ye.org_code=#{orgCode}
<if test="type == 0">
and yh.id is not null
and yh.delete_flag = 0
</if>
<if test="type == 1">
and yh.id is null
</if>
<!-- <if test="bmgwId != null and bmgwId != null">-->
<!-- and ye.bmgwId = #{bmgwId}-->
<!-- </if>-->
<!-- <if test="htType != null and htType != null">-->
<!-- and yh.htType = #{htType}-->
<!-- </if>-->
<!-- <if test="jobType != null and jobType != null">-->
<!-- and ye.jobType = #{jobType}-->
<!-- </if>-->
</where>
</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