Compare commits
2 Commits
f9eac35ec3
...
5bc1addcad
| Author | SHA1 | Date |
|---|---|---|
|
|
5bc1addcad | |
|
|
ae804d3643 |
|
|
@ -206,7 +206,12 @@ public class PmWorkerController extends BaseController {
|
|||
file.transferTo(tempFile);
|
||||
ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
|
||||
// 调用原方法,传入临时文件的路径
|
||||
String faceFeatures = arcFaceHelper.getIsFaceImage(tempFile.getAbsolutePath());
|
||||
String faceFeatures;
|
||||
try {
|
||||
faceFeatures = arcFaceHelper.getIsFaceImage(tempFile.getAbsolutePath());
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("人脸照片识别有问题");
|
||||
}
|
||||
String[] split = faceFeatures.split(",");
|
||||
if ("200".equals(split[0])){
|
||||
return AjaxResult.success(split[1]);
|
||||
|
|
@ -256,7 +261,12 @@ public class PmWorkerController extends BaseController {
|
|||
|
||||
ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
|
||||
// 调用原方法,传入临时文件的路径
|
||||
String faceFeatures = arcFaceHelper.getIsFaceImage(tempFile.getAbsolutePath());
|
||||
String faceFeatures = null;
|
||||
try {
|
||||
faceFeatures = arcFaceHelper.getIsFaceImage(tempFile.getAbsolutePath());
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("人脸照片识别有问题");
|
||||
}
|
||||
String[] split = faceFeatures.split(",");
|
||||
if ("200".equals(split[0])){
|
||||
return AjaxResult.success(split[1]);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.annotation.Resource;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/8/14
|
||||
|
|
@ -257,7 +260,10 @@ public class AppRecognitionServiceImpl implements AppRecognitionService {
|
|||
System.err.println("resultFront:"+resultFront);
|
||||
System.err.println("resultBack:"+resultBack);
|
||||
// BaiduRecognitionUtils.updateBankName(bank_name);
|
||||
return null;
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("resultFront", resultFront);
|
||||
map.put("resultBack", resultBack);
|
||||
return AjaxResult.success("识别成功", map);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,10 +173,10 @@
|
|||
AND locate(#{subComName},aa.sub_company_name)
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
AND locate(#{proId},aa.pro_id)
|
||||
AND aa.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="subComId != null">
|
||||
AND locate(#{subComId},aa.sub_company_id)
|
||||
AND aa.sub_company_id = #{subComId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
@ -187,9 +187,9 @@
|
|||
pst.team_name,
|
||||
ps.id AS sub_id,
|
||||
ps.sub_name,
|
||||
pp.id AS pro_id,
|
||||
group_concat(distinct pp.id) AS pro_id,
|
||||
group_concat(distinct pp.pro_name) AS pro_name,
|
||||
psc.id AS sub_company_id,
|
||||
pp.pro_name,
|
||||
psc.sub_company_name,
|
||||
count(DISTINCT bwem.worker_id) AS einNum,
|
||||
count(DISTINCT bap.worker_id) AS attNum,
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
INNER JOIN pm_project pp ON pp.id = bsc.pro_id and pp.id = pstc.pro_id
|
||||
AND pp.is_active = 1
|
||||
LEFT JOIN pm_sub_company psc ON pp.sub_com_id = psc.id
|
||||
LEFT JOIN bm_worker_ein_msg bwem ON pp.id = bwem.pro_id
|
||||
LEFT JOIN bm_worker_ein_msg bwem ON pp.id = bwem.pro_id AND bwem.team_id = pst.id
|
||||
AND bwem.is_active = 1
|
||||
LEFT JOIN bm_att_person bap ON pp.id = bap.pro_id
|
||||
AND bap.is_active = 1
|
||||
|
|
@ -338,7 +338,7 @@
|
|||
<where>
|
||||
bwem.ein_status = 2 and bwem.is_upload_file = 0
|
||||
<if test="subComId != null">
|
||||
AND pp.sub_com_id
|
||||
AND pp.sub_com_id = #{subComId}
|
||||
</if>
|
||||
<if test="workerName != null">
|
||||
AND locate(#{workerName},pw.name)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.job.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 人员基础信息表
|
||||
*/
|
||||
@Data
|
||||
public class PmWorkerEinLightJob {
|
||||
|
||||
|
||||
/**
|
||||
* 施工人员id
|
||||
*/
|
||||
private String proId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String workerId;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
private String lightStatus;
|
||||
|
||||
/**
|
||||
* 入场状态 0未入场 1 已入场
|
||||
*/
|
||||
private String yellowDate;
|
||||
|
||||
/**
|
||||
* 合同工资是否全
|
||||
*/
|
||||
private String conAndWage;
|
||||
}
|
||||
|
|
@ -116,4 +116,16 @@ public interface WorkerJobMapper {
|
|||
List<PmWorkerJob> getWorkerContractToday(String startDate);
|
||||
|
||||
void updateWorkerContractByListToday(List<PmWorkerJob> list);
|
||||
|
||||
List<PmWorkerEinLightJob> getEinWorker();
|
||||
|
||||
/**
|
||||
* 更新人员红绿灯
|
||||
* @param workerId
|
||||
* @param proId
|
||||
* @param lightStatus
|
||||
* @param now
|
||||
* @return
|
||||
*/
|
||||
int updateEinMsgByWorkerId(@Param("workerId") String id,@Param("proId") String proId, @Param("lightStatus") String lightStatus,@Param("lightDate") String lightDate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.job.task;
|
|||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.bonus.job.domain.BmWorkerBlackJob;
|
||||
import com.bonus.job.domain.PmWorkerEinLightJob;
|
||||
import com.bonus.job.domain.PmWorkerJob;
|
||||
import com.bonus.job.mapper.WorkerJobMapper;
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -38,12 +39,35 @@ public class WorkerEinDayRecordTask{
|
|||
updateWorkerContract();
|
||||
//当天合同以最新的为准
|
||||
updateWorkerContractToday(startDate);
|
||||
//TODO加一个红绿灯判断和更新的接口
|
||||
//加一个红绿灯判断和更新的接口
|
||||
updateWorkerLight();
|
||||
}catch (Exception e){
|
||||
logger.error("人员入场更新表失败,{}",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯判断和更新的接口
|
||||
*/
|
||||
private void updateWorkerLight() {
|
||||
List<PmWorkerEinLightJob> list = mapper.getEinWorker();
|
||||
if(list != null && !list.isEmpty()){
|
||||
for (PmWorkerEinLightJob worker : list) {
|
||||
if(!worker.getConAndWage().equals(worker.getLightStatus())){
|
||||
String lightStatus = worker.getConAndWage();
|
||||
String now = DateUtil.now();
|
||||
if("2".equals(lightStatus)){
|
||||
now = "";
|
||||
}
|
||||
int j = mapper.updateEinMsgByWorkerId(worker.getWorkerId(), worker.getProId(), lightStatus, now);
|
||||
}else{
|
||||
//匹配上的需要校验一下数据,但是现在就不校验了
|
||||
//黄灯看时间有没有,绿灯时间清没清除
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 当天合同以最新的为准
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -425,4 +425,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update bm_worker_ein_day_record set contract_id = #{item.contractId} where worker_id = #{item.workerId} and pro_id = #{item.proId} and ein_day = #{item.einDay}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getEinWorker" resultType="com.bonus.job.domain.PmWorkerEinLightJob">
|
||||
SELECT
|
||||
bwem.pro_id,
|
||||
bwem.worker_id,
|
||||
light_status,
|
||||
yellow_date,
|
||||
IF(bwwc.id IS NOT NULL AND bwc.id IS NOT NULL, 2, 1) AS conAndWage
|
||||
FROM
|
||||
bm_worker_ein_msg bwem
|
||||
LEFT JOIN `bm_worker_wage_card` bwwc ON bwem.worker_id = bwwc.worker_id
|
||||
AND bwwc.is_active = 1
|
||||
LEFT JOIN `bm_worker_contract` bwc ON bwc.worker_id = bwem.worker_id
|
||||
AND bwc.pro_id = bwem.pro_id
|
||||
AND bwc.is_active = 1
|
||||
</select>
|
||||
|
||||
<update id="updateEinMsgByWorkerId">
|
||||
update bm_worker_ein_msg
|
||||
set light_status = #{lightStatus},yellow_date = #{lightDate}
|
||||
where worker_id = #{workerId} and pro_id = #{proId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue