1.人员入场界面加一个红绿灯搜索框,列表加一个红绿灯字段

2.做一个可以看人脸的页面,查看和下发功能(加权限)
3.入场工种可以修改
4.上海多工程入场判断修改
This commit is contained in:
方亮 2025-12-29 18:06:08 +08:00
parent f257500cae
commit eefd084d21
21 changed files with 175 additions and 23 deletions

View File

@ -14,6 +14,9 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 考勤机操作控制层
@ -40,6 +43,11 @@ public class KqCmdController extends BaseController {
@SysLog(title = "工程考勤机树", businessType = OperaType.QUERY, logType = 0, module = "工程考勤机树", details = "工程考勤机树")
public AjaxResult getProKqjTree(KqCmdBean o) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
org.apache.commons.beanutils.BeanUtils.populate(o, map);
}
return service.getProKqjTree(o);
} catch (Exception e) {
logger.error(e.toString(), e);

View File

@ -1,5 +1,6 @@
package com.bonus.bmw.controller;
import com.bonus.bmw.domain.po.BmBasicDataHisVo;
import com.bonus.bmw.domain.po.PmSubCompany;
import com.bonus.bmw.service.PmSubComService;
import com.bonus.common.core.web.controller.BaseController;
@ -11,7 +12,6 @@ import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -118,4 +118,21 @@ public class PmSubComController extends BaseController {
return getDataTableError(new ArrayList<>());
}
/**
* 分公司/项目部/总工程/工程 历史修改记录
*/
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:company:list"))
@GetMapping("/getHisList")
@SysLog(title = "分公司管理", businessType = OperaType.QUERY, logType = 0, module = "分公司管理->分公司列表")
public TableDataInfo getHisList(BmBasicDataHisVo bean) {
try {
startPage();
List<BmBasicDataHisVo> list = pmSubComService.getHisList(bean);
return getDataTable(list);
} catch (Exception e) {
log.error(e.toString(), e);
}
return getDataTableError(new ArrayList<>());
}
}

View File

@ -2,8 +2,6 @@ package com.bonus.bmw.domain.dto;
import lombok.Data;
import java.util.Date;
/**
* 人员基础信息表
*/
@ -95,4 +93,9 @@ public class PmWorkerDto {
*/
private String photoIds;
/**
* 0 默认 1 黄灯 2 绿灯 3 失信人员
*/
private String lightStatus;
}

View File

@ -80,4 +80,14 @@ public class PmMainProject {
*/
private String orgId;
/**
*开始时间
*/
private String startDate;
/**
*结束时间
*/
private String endDate;
}

View File

@ -68,4 +68,14 @@ public class PmOrg {
*关键字搜索
*/
private String keyWord;
/**
*开始时间
*/
private String startDate;
/**
*结束时间
*/
private String endDate;
}

View File

@ -119,4 +119,16 @@ public class PmProject {
* 是否有效
*/
private Integer isActive;
/**
*开始时间
*/
private String startDate;
/**
*结束时间
*/
private String endDate;
}

View File

@ -72,4 +72,15 @@ public class PmSubCompany {
* 项目部列表
*/
private List<PmOrgVo> pmOrgList;
/**
*开始时间
*/
private String startDate;
/**
*结束时间
*/
private String endDate;
}

View File

@ -140,6 +140,8 @@ public class KqCmdBean {
private String workerName;
private String phone;
private Integer subComId;
/**
* 是否在库
*/

View File

@ -45,4 +45,6 @@ public interface PmSubComMapper {
* @param bmBasicDataHisVo
*/
void insertOldSubComName(BmBasicDataHisVo bmBasicDataHisVo);
List<BmBasicDataHisVo> getHisList(BmBasicDataHisVo bean);
}

View File

@ -164,4 +164,10 @@ public interface PmWorkerMapper {
Integer getTeamIdByTeamName(@Param("teamName") String teamName, @Param("subId") Integer subId);
Integer getPostIdByPostName(String postName);
/**
* 更新人员岗位
* @param record
*/
void updateWorkerPost(PmWorker record);
}

View File

@ -1,5 +1,6 @@
package com.bonus.bmw.service;
import com.bonus.bmw.domain.po.BmBasicDataHisVo;
import com.bonus.bmw.domain.po.PmSubCompany;
import java.util.List;
@ -22,4 +23,11 @@ public interface PmSubComService {
int delSubCompany(PmSubCompany pmSubCompany);
List<PmSubCompany> selectSubCompanyListAll(PmSubCompany pmSubCompany);
/**
* 获取历史记录
* @param bean
* @return
*/
List<BmBasicDataHisVo> getHisList(BmBasicDataHisVo bean);
}

View File

@ -64,7 +64,7 @@ public class PmOrgServiceImpl implements PmOrgService {
PmOrg oldOrgName = pmOrgMapper.getPmOrgByOrgId(pmOrg.getId());
if (!oldOrgName.getOrgName().equals(pmOrg.getOrgName())){
BmBasicDataHisVo bmBasicDataHisVo = new BmBasicDataHisVo();
bmBasicDataHisVo.setOrgId(pmOrg.getOrgId());
bmBasicDataHisVo.setOrgId(pmOrg.getId());
bmBasicDataHisVo.setType(3);
bmBasicDataHisVo.setOldName(oldOrgName.getOrgName());
bmBasicDataHisVo.setName(pmOrg.getOrgName());

View File

@ -106,4 +106,9 @@ public class PmSubComServiceImpl implements PmSubComService {
}
return pmSubCompanyList;
}
@Override
public List<BmBasicDataHisVo> getHisList(BmBasicDataHisVo bean) {
return pmSubComMapper.getHisList(bean);
}
}

View File

@ -52,6 +52,9 @@ public class PmWorkerServiceImpl implements PmWorkerService{
@Resource
private AppRecognitionService appRecognitionService;
@Autowired
private TbProConfigService configService;
@Autowired
private FileUploadUtils fileUploadUtils;
@ -229,6 +232,12 @@ public class PmWorkerServiceImpl implements PmWorkerService{
//人员数据
PmWorker worker = mapper.selectByIdNumber(idNumber);
if(worker != null){
//20251229 人员多入场不再依赖与是否上海工程而是根据配置使用接口查询
TbProConfigVo config = new TbProConfigVo();
config.setProId(String.valueOf(worker.getProId()));
AjaxResult configByProId = configService.getConfigByProId(config);
Map<String,String> map = (Map<String, String>) configByProId.get("data");
worker.setIsShanghai(map.get("dgc"));
worker.setFiles(fileUploadUtils.getFileList("", worker.getId().toString(), Constants.FILE_UPLOAD_WORKER, ""));
//查询工资卡 数据
BmWorkerWageCard wageCard = new BmWorkerWageCard();
@ -453,6 +462,10 @@ public class PmWorkerServiceImpl implements PmWorkerService{
}
if(record.getEinStatus() == 1){
//已经入过场了
//是否修改工种
if(record.getPostId() != null && record.getPostId() > 0){
mapper.updateWorkerPost(record);
}
addWorkerWageCardDataAndContract(record,fileMsg);
}else {
//重新入场 再入场清除最新标识

View File

@ -6,7 +6,6 @@ import com.bonus.bmw.service.TbProConfigService;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.core.web.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -153,7 +152,7 @@ public class TbProConfigServiceImpl implements TbProConfigService {
*/
@Override
public AjaxResult getConfigByProId(TbProConfigVo params) {
Map<String,Object> map=new HashMap<String,Object>();
Map<String,String> map=new HashMap<>();
try{
List<TbProConfigVo> list=mapper.getConfigByProId(params);
if(list!=null&& !list.isEmpty()){

View File

@ -82,14 +82,22 @@
pad.device_code,
ps.id as sub_id,
ps.sub_name,
pst.id as team_id
,pst.team_name,
pad.on_line onLine
pst.id as team_id,
pst.team_name,
pad.on_line onLine
FROM
pm_att_device pad
INNER JOIN pm_project pp ON pad.pro_id = pp.id
LEFT JOIN pm_sub ps ON ps.id = pad.sub_id
LEFT JOIN pm_sub_team pst ON pst.id = pad.team_id
<where>
<if test="subComId != null and subComId != ''">
AND (pp.sub_com_id = #{subComId} or pp.sub_com_id is null)
</if>
<if test="proId != null and proId != ''">
AND pp.Id = #{proId}
</if>
</where>
order by pad.on_line desc
</select>
<select id="getTaskList" resultType="com.bonus.bmw.domain.vo.KqCmdBean">

View File

@ -32,10 +32,12 @@
<select id="selectMainProjectList" resultType="com.bonus.bmw.domain.vo.PmMainProjectVo">
select pmp.id,pmp.main_pro_name,pmp.vol_level,pmp.create_user,pmp.update_user,pmp.create_time,
select pmp.id,pmp.main_pro_name,pmp.vol_level,pmp.create_user,pmp.update_user,
if(bbdh.create_time is null,pmp.create_time,bbdh.create_time) as createTime,
pmp.update_time,pmp.pro_status,pmp.sub_com_id,psc.sub_company_name as subComName
from pm_main_project pmp
left join pm_sub_company psc on pmp.sub_com_id = psc.id
left join bm_basic_data_his bbdh on bbdh.id = pmp.id and bbdh.type = 4
where pmp.is_active='1'
<if test="mainProName!=null and mainProName!= ''">
and pmp.main_pro_name LIKE CONCAT('%', #{mainProName}, '%')
@ -49,6 +51,9 @@
or pmp.vol_level like concat('%', #{keyWord}, '%')
)
</if>
<if test="startDate!=null and startDate != ''">
and DATE_FORMAT(if(bbdh.create_time is null,pmp.create_time,bbdh.create_time), '%Y-%m-%d') between #{startDate} and #{endDate}
</if>
order by pmp.create_time desc
</select>
<select id="selectMainProjectByMainProName" resultType="com.bonus.bmw.domain.po.PmMainProject">
@ -64,9 +69,8 @@
</select>
<insert id="insertOldMainProName">
insert into bm_basic_data_his (id, type, old_name, name)
values (#{id}, #{type}, #{oldName}, #{name})
insert into bm_basic_data_his (id, type, old_name, name, update_user)
values (#{id}, #{type}, #{oldName}, #{name}, #{updateUser})
</insert>
<select id="selectMainProjectByMainProId" resultType="com.bonus.bmw.domain.po.PmMainProject">

View File

@ -34,9 +34,11 @@
po.sub_com_id as subComId,
psc.sub_company_name as subComName,
po.org_name as orgName,
if(bbdh.create_time is null,psc.create_time,po.create_time) as createTime,
po.is_enable as isEnable
from pm_org po
left join pm_sub_company psc on po.sub_com_id = psc.id
left join bm_basic_data_his bbdh on bbdh.org_id = po.id and bbdh.type = 3
where po.is_active='1'
<if test="keyWord !=null and keyWord!= ''" >
and (
@ -47,10 +49,12 @@
<if test="subComId !=null">
and po.sub_com_id = #{subComId}
</if>
<if test="orgId !=null">
and po.id = #{orgId}
</if>
<if test="orgId !=null">
and po.id = #{orgId}
</if>
<if test="startDate!=null and startDate != ''">
and DATE_FORMAT(if(bbdh.create_time is null,psc.create_time,po.create_time), '%Y-%m-%d') between #{startDate} and #{endDate}
</if>
</select>
<select id="selectPmOrgByOrgName" resultType="com.bonus.bmw.domain.po.PmOrg">
select id as id,
@ -61,8 +65,8 @@
</select>
<insert id="insertOldOrgName">
insert into bm_basic_data_his (org_id,type,old_name,name)
values (#{orgId},#{type},#{oldName},#{name})
insert into bm_basic_data_his (org_id,type,old_name,name,update_user)
values (#{orgId},#{type},#{oldName},#{name},#{updateUser})
</insert>
<select id="getPmOrgByOrgId" resultType="com.bonus.bmw.domain.po.PmOrg">

View File

@ -120,11 +120,13 @@
pp.create_user as createUser,
pp.update_user as updateUser,
pp.create_time as createTime,
if(bbdh.create_time is null,psc.create_time,pp.create_time) as createTime,
pp.update_time as updateTime
from pm_project pp
left join pm_main_project pmp on pp.main_pro_id = pmp.id
left join pm_org po on pp.org_id = po.id
left join pm_sub_company psc on po.sub_com_id = psc.id
left join bm_basic_data_his bbdh on bbdh.id = pp.id and bbdh.type = 5
where pp.is_active = '1'
<if test="subComId != null">
and pp.sub_com_id = #{subComId}
@ -144,6 +146,9 @@
<if test="proName != null">
and pp.pro_name = #{proName}
</if>
<if test="startDate!=null and startDate != ''">
and DATE_FORMAT(if(bbdh.create_time is null,psc.create_time,pp.create_time), '%Y-%m-%d') between #{startDate} and #{endDate}
</if>
</select>
<select id="selectProjectByProName" resultType="com.bonus.bmw.domain.po.PmProject">
select pp.id as id,
@ -356,8 +361,8 @@
</select>
<insert id="insertOldProName">
insert into bm_basic_data_his (id, type, old_name, name)
values (#{id}, #{type}, #{oldName}, #{name})
insert into bm_basic_data_his (id, type, old_name, name, update_user)
values (#{id}, #{type}, #{oldName}, #{name}, #{updateUser})
</insert>
<update id="updateProjectName">

View File

@ -35,10 +35,11 @@
psc.is_enable as isEnable,
psc.create_user as createUser,
psc.update_user as updateUser,
psc.create_time as createTime,
if(bbdh.create_time is null,psc.create_time,bbdh.create_time) as createTime,
psc.update_time as updateTime
from pm_sub_company psc
left join pm_company pc on psc.com_id = pc.id
left join bm_basic_data_his bbdh on psc.id = bbdh.id and bbdh.type = 2
where psc.is_active = '1'
<if test="subCompanyName!=null and subCompanyName!=''">
and psc.sub_company_name LIKE CONCAT('%', #{subCompanyName}, '%')
@ -48,6 +49,9 @@
</if>
<if test="subComId!=null">
and psc.id = #{subComId}
</if>
<if test="startDate!=null and startDate != ''">
and DATE_FORMAT(if(bbdh.create_time is null,psc.create_time,bbdh.create_time), '%Y-%m-%d') between #{startDate} and #{endDate}
</if>
order by psc.create_time desc
</select>
@ -93,4 +97,15 @@
insert into bm_basic_data_his (id, type, old_name, name, update_user)
values (#{id}, #{type}, #{oldName}, #{name}, #{updateUser})
</insert>
<select id="getHisList" resultType="com.bonus.bmw.domain.po.BmBasicDataHisVo">
select id, type, old_name, name, update_user, create_time from bm_basic_data_his
where type = #{type}
<if test="id!=null">
and id = #{id}
</if>
<if test="orgId != null and orgId != ''">
and org_id = #{orgId}
</if>
</select>
</mapper>

View File

@ -24,6 +24,7 @@
<result column="post_id" property="postId" />
<result column="sub_id" property="subId" />
<result column="is_shanghai" property="isShanghai"/>
<result column="light_status" property="lightStatus"/>
</resultMap>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
SELECT
@ -76,6 +77,7 @@
bwem.sub_name,
bwem.team_name,
IFNULL(bwem.ein_status,2) as ein_status,
bwem.light_status,
bwem.ein_time
FROM
pm_worker pw
@ -92,6 +94,9 @@
<if test="phone != null and phone != ''">
AND pw.phone LIKE CONCAT('%',#{phone},'%')
</if>
<if test="lightStatus != null and lightStatus != ''">
AND bwem.light_status = #{lightStatus}
</if>
<if test="postId != null and postId != ''">
AND bwem.post_id = #{postId}
</if>
@ -113,7 +118,7 @@
<if test="subComId != null and subComId != ''">
AND (pp.sub_com_id = #{subComId} or pp.sub_com_id is null)
</if>
order by pw.create_time DESC
order by pw.create_time DESC, pw.name DESC
</select>
<select id="getWorkerByNumber" resultMap="BaseResultMap">
@ -384,4 +389,9 @@
<select id="getPostIdByPostName" resultType="java.lang.Integer">
select id from pm_post_type where post_name = #{postName}
</select>
<update id="updateWorkerPost">
update bm_worker_ein_msg set post_id = #{postId},post_name = #{postName} where worker_id = #{id};
update bm_worker_ein_pro_record set post_id = #{postId},post_name = #{postName} where worker_id = #{id};
</update>
</mapper>