Commit 9c2751dc by 284718418@qq.com

1.人事代码

parent 6867089b
...@@ -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
...@@ -22,6 +22,8 @@ import javax.servlet.ServletOutputStream; ...@@ -22,6 +22,8 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import cn.timer.api.dao.yggl.YgglAttaHtxxbMapper;
import cn.timer.api.dto.yggl.*;
import cn.timer.api.utils.redis.RedisUtil; import cn.timer.api.utils.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -110,22 +112,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper; ...@@ -110,22 +112,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.yggl.YgglMainLzbMapper; import cn.timer.api.dao.yggl.YgglMainLzbMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dto.kqmk.AdditionalDto; import cn.timer.api.dto.kqmk.AdditionalDto;
import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.dto.yggl.EmpQuery;
import cn.timer.api.dto.yggl.ImportEmpDto;
import cn.timer.api.dto.yggl.LoginInfoDto;
import cn.timer.api.dto.yggl.LoginerChargeDto;
import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.ModifyAvatarDto;
import cn.timer.api.dto.yggl.UserInfo;
import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgKVDto;
import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgbintuDto;
import cn.timer.api.dto.yggl.YgglCartogramDto;
import cn.timer.api.bean.clazz.NationClass; import cn.timer.api.bean.clazz.NationClass;
import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.DateFormatUtils; import cn.timer.api.utils.DateFormatUtils;
import cn.timer.api.utils.Md5; import cn.timer.api.utils.Md5;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
...@@ -172,6 +159,9 @@ public class YgglController { ...@@ -172,6 +159,9 @@ public class YgglController {
@Value("${server.servlet.session.timeout}") @Value("${server.servlet.session.timeout}")
public Integer session_timeout; public Integer session_timeout;
@Autowired
private YgglAttaHtxxbMapper ygglAttaHtxxbMapper;
/** /**
* 获取员工档案 * 获取员工档案
* *
...@@ -1235,7 +1225,7 @@ public class YgglController { ...@@ -1235,7 +1225,7 @@ public class YgglController {
@ApiOperationSupport(order = 43) @ApiOperationSupport(order = 43)
public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build() List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build()
.selectList(new QueryWrapper<YgglAttaHtxxb>().lambda() .selectList(new QueryWrapper<YgglAttaHtxxb>().lambda().eq(YgglAttaHtxxb::getDeleteFlag,0)
.eq(YgglAttaHtxxb::getOrgCode, userBean.getOrgCode()).eq(YgglAttaHtxxb::getEmpNum, empNum)); .eq(YgglAttaHtxxb::getOrgCode, userBean.getOrgCode()).eq(YgglAttaHtxxb::getEmpNum, empNum));
return ResultUtil.data(ygglAttaHtxxbs); return ResultUtil.data(ygglAttaHtxxbs);
} }
...@@ -2058,5 +2048,12 @@ public class YgglController { ...@@ -2058,5 +2048,12 @@ public class YgglController {
return ResultUtil.data(ygQueryDto); return ResultUtil.data(ygQueryDto);
} }
@GetMapping(value = "/getContract")
@ApiOperation(value = "72.运营后台--合同概况列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 72)
public Result<Object> getContract(@CurrentUser UserBean userBean) {
List<HtgkDto> htgkDtos = ygglAttaHtxxbMapper.queryContract(userBean.getOrgCode());
return ResultUtil.data(htgkDtos);
}
} }
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