入场,出场,合同,工资优化
This commit is contained in:
parent
b112bc16e8
commit
b348aa6ed9
|
|
@ -155,4 +155,6 @@ public class BmWorkerAtt {
|
|||
*/
|
||||
private String attTime;
|
||||
|
||||
private String phone;
|
||||
|
||||
}
|
||||
|
|
@ -42,13 +42,13 @@ public class BmWorkerContract {
|
|||
* 合同开始时间
|
||||
*/
|
||||
@Excel(name = "合同生效时间", type = Excel.Type.EXPORT, sort = 9)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date contractStartDate;
|
||||
|
||||
/**
|
||||
* 合同结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date contractStopDate;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ public interface BmWorkerAttMapper {
|
|||
|
||||
List<BmWorkerAtt> getProAttList(BmWorkerAtt o);
|
||||
|
||||
List<BmWorkerAtt> getWorkerAttList(BmWorkerAtt o);
|
||||
|
||||
List<BmWorkerAtt> getTeamAttList(BmWorkerAtt o);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class BmWorkerBlackServiceImpl implements BmWorkerBlackService{
|
|||
public AjaxResult insert(BmWorkerBlack o) {
|
||||
// 添加员工时,判断员工编号是否已存在
|
||||
BmWorkerBlack worker = mapper.getWorkerBlackByNumber(o.getIdNumber());
|
||||
if(worker != null && worker.getId() != null){
|
||||
if(worker != null && worker.getName() != null){
|
||||
return new AjaxResult(500, "施工人员身份证已存在,当前姓名为"+worker.getName());
|
||||
}
|
||||
o.setCreateUser(SecurityUtils.getUsername());
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@
|
|||
<result column="is_repair" property="isRepair" />
|
||||
<result column="device_name" property="deviceName" />
|
||||
<result column="att_time" property="attTime" />
|
||||
|
||||
<result column="phone" property="phone" />
|
||||
<result column="post_name" property="postName" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getSubComAttList" resultMap="BaseResultMap">
|
||||
|
|
@ -77,8 +78,11 @@
|
|||
LEFT JOIN bm_worker_ein_msg bwem ON pp.id = bwem.pro_id
|
||||
LEFT JOIN bm_att_person bap ON bap.pro_id = pp.id AND bap.att_day = #{currentDay}
|
||||
WHERE
|
||||
pp.id = #{proId}
|
||||
AND pp.is_active = 1
|
||||
pp.is_active = 1
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
<if test="proName != null and proName !=''">
|
||||
AND pp.pro_name LIKE CONCAT('%',#{proName},'%')
|
||||
</if>
|
||||
GROUP BY
|
||||
bstc.id
|
||||
</select>
|
||||
|
|
@ -116,9 +120,12 @@
|
|||
bwedr.worker_id,
|
||||
bwedr.id_number,
|
||||
bwedr.name,
|
||||
pw.phone,
|
||||
bwedr.pro_id,
|
||||
bwedr.team_id,
|
||||
bwedr.sub_id
|
||||
bwedr.pro_name,
|
||||
bwedr.team_name,
|
||||
bwedr.sub_name,
|
||||
bwedr.post_name
|
||||
FROM bm_worker_ein_day_record bwedr
|
||||
INNER JOIN (
|
||||
-- 子查询:找出每个 worker_id 在 2025-08-01 至 2025-08-11 区间内的最后在场日期
|
||||
|
|
@ -133,6 +140,7 @@
|
|||
GROUP BY worker_id
|
||||
) latest ON bwedr.worker_id = latest.worker_id
|
||||
AND bwedr.ein_day = latest.max_current_day
|
||||
left join pm_worker pw on bwedr.worker_id = pw.id
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
and bwedr.name = #{name}
|
||||
|
|
|
|||
|
|
@ -52,9 +52,12 @@
|
|||
<if test="subName != null and subName != ''">
|
||||
and sub_name LIKE CONCAT('%',#{subName},'%')
|
||||
</if>
|
||||
<if test="isRemove != null and isRemove != ''">
|
||||
<if test="isRemove != null">
|
||||
and is_remove = #{isRemove}
|
||||
</if>
|
||||
<if test="idNumber != null and idNumber != ''">
|
||||
and id_number LIKE CONCAT('%',#{idNumber},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,15 @@ public class PmWorkerJob {
|
|||
*/
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 工种id
|
||||
*/
|
||||
private Integer postId;
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
private String postName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sub_name as subName,
|
||||
team_id as teamId,
|
||||
team_name as teamName,
|
||||
post_id as postId,
|
||||
post_name as postName,
|
||||
contract_id as contractId,
|
||||
ein_day as einDay,
|
||||
DATE_FORMAT(ein_day, '%Y-%m') as attMonth
|
||||
|
|
@ -29,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bwepr.sub_name,
|
||||
bwepr.team_id,
|
||||
bwepr.team_name,
|
||||
bwepr.post_id,
|
||||
bwepr.post_name,
|
||||
bwepr.contract_id,
|
||||
#{currentDay} as ein_day
|
||||
FROM
|
||||
|
|
@ -47,11 +51,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<insert id="insertEinDayRecord">
|
||||
replace INTO bm_worker_ein_day_record(
|
||||
worker_id,id_number,name,pro_id,pro_name,sub_id,sub_name,team_id,team_name,att_month,ein_day,contract_id
|
||||
worker_id,id_number,name,pro_id,pro_name,sub_id,sub_name,team_id,team_name,post_id,post_name,att_month,ein_day,contract_id
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.workerId},#{item.idNumber},#{item.name},#{item.proId},#{item.proName},#{item.subId},#{item.subName},#{item.teamId},
|
||||
#{item.teamName},#{item.attMonth},#{item.einDay},#{item.contractId}
|
||||
#{item.teamName},#{item.postId},#{item.postName},#{item.attMonth},#{item.einDay},#{item.contractId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
|||
Loading…
Reference in New Issue