Commit ef5c8d6f by 284718418@qq.com

1.人事代码

parent 5c04960e
...@@ -46,6 +46,9 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> { ...@@ -46,6 +46,9 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> {
@ApiModelProperty(value="合同类型 0:固定期限劳动合同;1:无固定期限劳动合同;2:以完成一定工作任务为期限的劳动合同;3:实习协议;4:劳务合同;5:返聘协议;6:劳务派遣合同7:借调合同;8:其他",example="101") @ApiModelProperty(value="合同类型 0:固定期限劳动合同;1:无固定期限劳动合同;2:以完成一定工作任务为期限的劳动合同;3:实习协议;4:劳务合同;5:返聘协议;6:劳务派遣合同7:借调合同;8:其他",example="101")
private Integer type; private Integer type;
@ApiModelProperty(value="合同名称",example="合同名称")
private Integer htName;
@ApiModelProperty(value="合同开始日期 ",example="合同开始日期") @ApiModelProperty(value="合同开始日期 ",example="合同开始日期")
private Date startTime; private Date startTime;
...@@ -54,7 +57,7 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> { ...@@ -54,7 +57,7 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> {
private Date endTime; private Date endTime;
@ApiModelProperty(value="合同签约公司 ",example="合同签约公司") @ApiModelProperty(value="合同签约公司 ",example="合同签约公司")
private String htqygs; private Integer htqygs;
@ApiModelProperty(value="合同状态 0:执行中;1:已到期;2:未执行",example="101") @ApiModelProperty(value="合同状态 0:执行中;1:已到期;2:未执行",example="101")
private Integer status; private Integer status;
...@@ -65,4 +68,21 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> { ...@@ -65,4 +68,21 @@ public class YgglAttaHtxxb extends Model<YgglAttaHtxxb> {
@ApiModelProperty(value="组织机构代码 组织机构代码",example="101") @ApiModelProperty(value="组织机构代码 组织机构代码",example="101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value="合同期限(年)",example="3")
private Integer htqx;
@ApiModelProperty(value="合同解除状态:0未解除,1已解除",example="0")
private Integer jcStatus;
@ApiModelProperty(value="合同签订日期",example="合同签订日期")
private Date qdDate;
@ApiModelProperty(value="合同解除时间",example="合同解除时间")
private Date jcDate;
@ApiModelProperty(value="合同附件",example="合同附件")
private String htfj;
@ApiModelProperty(value="逻辑删除标记0.未删除 1.删除",example="0")
private Integer deleteFlag;
} }
\ No newline at end of file
package cn.timer.api.dao.yggl; package cn.timer.api.dao.yggl;
import cn.timer.api.dto.yggl.HtgkDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.yggl.YgglAttaHtxxb; import cn.timer.api.bean.yggl.YgglAttaHtxxb;
import java.util.List;
/** /**
* 员工合同信息表 * 员工合同信息表
* @author Tang 2019-11-15 * @author Tang 2019-11-15
...@@ -12,6 +16,8 @@ import cn.timer.api.bean.yggl.YgglAttaHtxxb; ...@@ -12,6 +16,8 @@ import cn.timer.api.bean.yggl.YgglAttaHtxxb;
@Repository @Repository
public interface YgglAttaHtxxbMapper extends BaseMapper<YgglAttaHtxxb> { public interface YgglAttaHtxxbMapper extends BaseMapper<YgglAttaHtxxb> {
List<HtgkDto> queryContract(@Param("orgCode") Integer orgCode);
} }
package cn.timer.api.dto.yggl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HtgkDto implements Serializable{
private static final long serialVersionUID = -4358081686220759754L;
@ApiModelProperty(value="已签订",example="1")
private Integer signCount;
@ApiModelProperty(value="在职员工",example="12")
private Integer probation;
@ApiModelProperty(value="合同即将到期人数",example="12")
private Integer dueSoon;
@ApiModelProperty(value="合同签约公司",example="合同签约公司")
private String companyName;
}
...@@ -8,19 +8,27 @@ ...@@ -8,19 +8,27 @@
<id column="id" property="id" /> <id column="id" property="id" />
<result column="emp_num" property="empNum" /> <result column="emp_num" property="empNum" />
<result column="ht_id" property="htId" /> <result column="ht_id" property="htId" />
<result column="ht_name" property="htName" />
<result column="type" property="type" /> <result column="type" property="type" />
<result column="qd_date" property="qdDate" />
<result column="start_time" property="startTime" /> <result column="start_time" property="startTime" />
<result column="end_time" property="endTime" /> <result column="end_time" property="endTime" />
<result column="htqygs" property="htqygs" /> <result column="htqygs" property="htqygs" />
<result column="status" property="status" /> <result column="status" property="status" />
<result column="remark" property="remark" /> <result column="remark" property="remark" />
<result column="org_code" property="orgCode" /> <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> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
emp_num, emp_num,
ht_id, ht_id,
ht_name,
qd_date,
type, type,
start_time, start_time,
end_time, end_time,
...@@ -28,23 +36,12 @@ ...@@ -28,23 +36,12 @@
htqygs, htqygs,
status, status,
remark, remark,
org_code org_code,
jc_status,
jc_date,
htfj,
delete_flag
</sql> </sql>
<sql id="Base_Column_List_Alias">
id YgglAttaHtxxb_id,
emp_num YgglAttaHtxxb_emp_num,
ht_id YgglAttaHtxxb_ht_id,
type YgglAttaHtxxb_type,
start_time YgglAttaHtxxb_start_time,
end_time YgglAttaHtxxb_end_time,
htqx YgglAttaHtxxb_htqx,
htqygs YgglAttaHtxxb_htqygs,
status YgglAttaHtxxb_status,
remark YgglAttaHtxxb_remark,
org_code YgglAttaHtxxb_org_code
</sql>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglAttaHtxxb"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglAttaHtxxb">
...@@ -156,5 +153,18 @@ ...@@ -156,5 +153,18 @@
</select> </select>
--> -->
<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
) as signCount,
(SELECT count(DISTINCT emp_num) AS signCount FROM yggl_atta_htxxb AS yah WHERE org_code = 3 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
</select>
</mapper> </mapper>
\ No newline at end of file
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