提交数据
parent
57fb2aeca4
commit
4edca70f3d
|
@ -38,6 +38,7 @@ import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
|||
import com.yanzhu.jh.project.domain.SurProjectAttendanceGroup;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceUser;
|
||||
import com.yanzhu.jh.project.domain.vo.LabourDataVo;
|
||||
import com.yanzhu.jh.project.domain.vo.LabourDataVoPM;
|
||||
import com.yanzhu.jh.project.domain.vo.LabourGroupVO;
|
||||
import com.yanzhu.jh.project.domain.vo.LabourUserVO;
|
||||
import com.yanzhu.jh.project.service.ISurProjectAttendanceDataService;
|
||||
|
@ -505,9 +506,26 @@ public class LabourApiController extends BaseController {
|
|||
SurProjectAttendanceData data = surProjectAttendanceDataService.findCurrentAttendanceData(findData);
|
||||
if(data!=null){
|
||||
//这里不能修改出勤时间
|
||||
data.setAttendanceOutTime(labourDataVo.getAttendanceTime());
|
||||
if(Objects.equals("L",surProjectAttendanceData.getAttendanceType())){
|
||||
data.setAttendanceOutTime(labourDataVo.getAttendanceTime());
|
||||
}
|
||||
data.setUpdateBy(sysApplyConfig.getAppId()+"Api推送离场打卡");
|
||||
data.setUpdateTime(new Date());
|
||||
try {
|
||||
List<LabourDataVoPM> result;
|
||||
if(data.getRemark()!=null){
|
||||
result = JSON.parseArray(data.getRemark(), LabourDataVoPM.class);
|
||||
}else{
|
||||
result = new ArrayList<>();
|
||||
}
|
||||
LabourDataVoPM labourDataVoPM = new LabourDataVoPM();
|
||||
labourDataVoPM.setAttendanceType(surProjectAttendanceData.getAttendanceType());
|
||||
labourDataVoPM.setAttendanceTime(surProjectAttendanceData.getAttendanceTime());
|
||||
labourDataVoPM.setScanPhoto(surProjectAttendanceData.getScanPhoto());
|
||||
result.add(labourDataVoPM);
|
||||
data.setRemark(JSONObject.toJSONString(result));
|
||||
}catch (Exception e){
|
||||
log.error("保存考勤PM信息出错...{}",e.getMessage());
|
||||
}
|
||||
surProjectAttendanceDataService.updateSurProjectAttendanceData(data);
|
||||
}else{
|
||||
/**
|
||||
|
@ -523,6 +541,11 @@ public class LabourApiController extends BaseController {
|
|||
if(StringUtils.isNull(surProjectAttendanceUser.getCompanyTypeId())){
|
||||
throw new ServiceException("人员部门类型信息不完整",HttpStatusEnum.DARA_EXCEPTION.getCode());
|
||||
}
|
||||
//进出门逻辑判断
|
||||
if(Objects.equals("L",surProjectAttendanceData.getAttendanceType())){
|
||||
surProjectAttendanceData.setAttendanceOutTime(labourDataVo.getAttendanceTime());
|
||||
surProjectAttendanceData.setAttendanceTime(null);
|
||||
}
|
||||
surProjectAttendanceData.setCfgid(sysApplyConfig.getCfgId());
|
||||
surProjectAttendanceData.setAppId(sysApplyConfig.getAppId());
|
||||
surProjectAttendanceData.setProjectId(sysApplyConfig.getProjectId());
|
||||
|
@ -634,8 +657,26 @@ public class LabourApiController extends BaseController {
|
|||
SurProjectAttendanceData data = surProjectAttendanceDataService.findCurrentAttendanceData(findData);
|
||||
if(data!=null){
|
||||
//这里不能修改出勤时间
|
||||
data.setAttendanceOutTime(surProjectAttendanceData.getAttendanceTime());
|
||||
if(Objects.equals("L",surProjectAttendanceData.getAttendanceType())){
|
||||
data.setAttendanceOutTime(surProjectAttendanceData.getAttendanceTime());
|
||||
}
|
||||
data.setUpdateBy(sysApplyConfig.getAppId()+"Api推送离场打卡");
|
||||
try {
|
||||
List<LabourDataVoPM> result;
|
||||
if(data.getRemark()!=null){
|
||||
result = JSON.parseArray(data.getRemark(), LabourDataVoPM.class);
|
||||
}else{
|
||||
result = new ArrayList<>();
|
||||
}
|
||||
LabourDataVoPM labourDataVoPM = new LabourDataVoPM();
|
||||
labourDataVoPM.setAttendanceType(surProjectAttendanceData.getAttendanceType());
|
||||
labourDataVoPM.setAttendanceTime(surProjectAttendanceData.getAttendanceTime());
|
||||
labourDataVoPM.setScanPhoto(surProjectAttendanceData.getScanPhoto());
|
||||
result.add(labourDataVoPM);
|
||||
data.setRemark(JSONObject.toJSONString(result));
|
||||
}catch (Exception e){
|
||||
log.error("保存考勤PM信息出错...{}",e.getMessage());
|
||||
}
|
||||
surProjectAttendanceDataService.updateSurProjectAttendanceData(data);
|
||||
}else{
|
||||
/**
|
||||
|
@ -651,6 +692,11 @@ public class LabourApiController extends BaseController {
|
|||
if(StringUtils.isNull(surProjectAttendanceUser.getCompanyTypeId())){
|
||||
throw new ServiceException("人员部门类型信息不完整",HttpStatusEnum.DARA_EXCEPTION.getCode());
|
||||
}
|
||||
//进出门逻辑判断
|
||||
if(Objects.equals("L",surProjectAttendanceData.getAttendanceType())){
|
||||
surProjectAttendanceData.setAttendanceOutTime(surProjectAttendanceData.getAttendanceTime());
|
||||
surProjectAttendanceData.setAttendanceTime(null);
|
||||
}
|
||||
surProjectAttendanceData.setCfgid(sysApplyConfig.getCfgId());
|
||||
surProjectAttendanceData.setAppId(sysApplyConfig.getAppId());
|
||||
surProjectAttendanceData.setProjectId(sysApplyConfig.getProjectId());
|
||||
|
|
|
@ -74,9 +74,9 @@ xss:
|
|||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
excludes: /system/notice,/common/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*,/api/*,/flow/*
|
||||
|
||||
# flowable相关表
|
||||
flowable:
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
v-model="form.laborReason"
|
||||
type="textarea"
|
||||
rows="3"
|
||||
placeholder="请输入拖欠原因说明"
|
||||
placeholder="请输入拖欠原因说明(最多600字)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="凭证附件" prop="files">
|
||||
|
@ -238,13 +238,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="
|
||||
item.approveStatus == '100'
|
||||
? 'inspect_shtg'
|
||||
: 'inspect_shz'
|
||||
"
|
||||
>
|
||||
<div :class="item.approveStatus == '100' ? 'inspect_shtg' : 'inspect_shz'">
|
||||
<div class="inspect_list_info_details">
|
||||
<div class="inspect_list_info_data">
|
||||
<div class="inspect_list_info_data_prop">
|
||||
|
@ -362,10 +356,14 @@ export default {
|
|||
subDeptOptions: [],
|
||||
flowLabours: [],
|
||||
flowLabourNodes: [],
|
||||
flowId: null,
|
||||
nav: null,
|
||||
// 表单校验
|
||||
rules: {
|
||||
laborName: [{ required: true, message: "请输入投诉人名称", trigger: "blur" }],
|
||||
laborName: [
|
||||
{ required: true, message: "请输入投诉人名称", trigger: "blur" },
|
||||
{ max: 10, message: "最多输入10字符", trigger: "blur" },
|
||||
],
|
||||
laborPhone: [
|
||||
{ required: true, message: "请输入投诉人手机号码", trigger: "blur" },
|
||||
{
|
||||
|
@ -407,11 +405,11 @@ export default {
|
|||
],
|
||||
laborReason: [
|
||||
{ required: true, message: "请输入拖欠原因说明", trigger: "blur" },
|
||||
{ max: 200, message: "最多输入600字符", trigger: "blur" },
|
||||
{ max: 600, message: "最多输入600字符", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
timer: null, // 定时器
|
||||
count: 60, // 初始倒计时时间(单位:s)
|
||||
count: 30, // 初始倒计时时间(单位:s)
|
||||
buttonText: "查 询 投 诉 进 度", // 按钮显示文本
|
||||
disabled: false, // 按钮是否可点击
|
||||
};
|
||||
|
@ -462,7 +460,7 @@ export default {
|
|||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
projectId: null
|
||||
projectId: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -497,6 +495,12 @@ export default {
|
|||
this.loading = false;
|
||||
this.flowLabours = response.data || [];
|
||||
this.showInspect = true;
|
||||
if (this.flowId != null) {
|
||||
//默认刷新展开的记录信息
|
||||
let nav = this.nav;
|
||||
this.nav = null;
|
||||
this.showDetail(this.flowId, nav);
|
||||
}
|
||||
this.startCountdown();
|
||||
});
|
||||
},
|
||||
|
@ -508,13 +512,19 @@ export default {
|
|||
this.loading = false;
|
||||
this.flowLabours = response.data || [];
|
||||
this.showInspect = true;
|
||||
if (this.flowId != null) {
|
||||
//默认刷新展开的记录信息
|
||||
let nav = this.nav;
|
||||
this.nav = null;
|
||||
this.showDetail(this.flowId, nav);
|
||||
}
|
||||
this.startCountdown();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
resetCountdown() {
|
||||
this.count = 60;
|
||||
this.count = 30;
|
||||
this.buttonText = "查 询 投 诉 进 度";
|
||||
this.disabled = false; // 恢复按钮可点击
|
||||
},
|
||||
|
@ -531,6 +541,7 @@ export default {
|
|||
}, 1000);
|
||||
},
|
||||
showDetail(detailId, nv) {
|
||||
this.flowId = detailId;
|
||||
if (this.nav == nv) {
|
||||
this.nav = null;
|
||||
return false;
|
||||
|
|
|
@ -70,9 +70,9 @@ xss:
|
|||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
excludes: /system/notice,/wechat/common/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*,/wechat/*
|
||||
|
||||
# flowable相关表
|
||||
flowable:
|
||||
|
|
|
@ -145,16 +145,22 @@ public class FlowLabourInfoServiceImpl implements IFlowLabourInfoService
|
|||
flowLabourInfo.setId(0L);
|
||||
return AjaxResult.success(flowLabourInfo);
|
||||
}else{
|
||||
flowLabourInfo.setCreateTime(DateUtils.getNowDate());
|
||||
flowLabourInfoMapper.insertFlowLabourInfo(flowLabourInfo);
|
||||
//保存流程节点信息
|
||||
FlowLabourAuditNode flowLabourAuditNode = new FlowLabourAuditNode();
|
||||
flowLabourAuditNode.setFlowId(flowLabourInfo.getId());
|
||||
flowLabourAuditNode.setFlowNode("0");
|
||||
flowLabourAuditNode.setCreateBy(flowLabourInfo.getLaborName());
|
||||
flowLabourAuditNode.setCreateTime(new Date());
|
||||
flowLabourAuditNodeMapper.insertFlowLabourAuditNode(flowLabourAuditNode);
|
||||
return AjaxResult.success(flowLabourInfo);
|
||||
try {
|
||||
flowLabourInfo.setApproveStatus("10");
|
||||
flowLabourInfo.setCreateBy(flowLabourInfo.getLaborName());
|
||||
flowLabourInfo.setCreateTime(DateUtils.getNowDate());
|
||||
flowLabourInfoMapper.insertFlowLabourInfo(flowLabourInfo);
|
||||
//保存流程节点信息
|
||||
FlowLabourAuditNode flowLabourAuditNode = new FlowLabourAuditNode();
|
||||
flowLabourAuditNode.setFlowId(flowLabourInfo.getId());
|
||||
flowLabourAuditNode.setFlowNode("0");
|
||||
flowLabourAuditNode.setCreateBy(flowLabourInfo.getLaborName());
|
||||
flowLabourAuditNode.setCreateTime(new Date());
|
||||
flowLabourAuditNodeMapper.insertFlowLabourAuditNode(flowLabourAuditNode);
|
||||
return AjaxResult.success(flowLabourInfo);
|
||||
}catch (Exception e){
|
||||
throw new RuntimeException("输入字符中包含系统未识别的乱码!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -243,6 +243,9 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
/** 重要::yanzhu接口接收base64图片 */
|
||||
private String scanPhotoBase64;
|
||||
|
||||
/** 重要::yanzhu出门进门逻辑判断 */
|
||||
private String attendanceType;
|
||||
|
||||
public String getScanPhotoBase64() {
|
||||
return scanPhotoBase64;
|
||||
}
|
||||
|
@ -251,6 +254,14 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
this.scanPhotoBase64 = scanPhotoBase64;
|
||||
}
|
||||
|
||||
public String getAttendanceType() {
|
||||
return attendanceType;
|
||||
}
|
||||
|
||||
public void setAttendanceType(String attendanceType) {
|
||||
this.attendanceType = attendanceType;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceData createFromHuazhu(JSONObject j) {
|
||||
SurProjectAttendanceData d=new SurProjectAttendanceData();
|
||||
d.vendorsCode="huazhu";
|
||||
|
|
|
@ -29,11 +29,9 @@ public class LabourDataVo extends BaseEntity
|
|||
private String companyId;
|
||||
|
||||
/** 进门还是出门E进,L出 */
|
||||
/**
|
||||
* 新接口改造&暂不需要传入参数
|
||||
@NotBlank(message = "进出门不能为空")
|
||||
@Pattern(regexp = "E|L", message = "进出门类型格式异常,E进|L出")
|
||||
private String attendanceType;*/
|
||||
private String attendanceType;
|
||||
|
||||
/** 考勤时间yyyy-MM-dd HH:mm:ss */
|
||||
@NotBlank(message = "考勤时间不能为空")
|
||||
|
@ -97,4 +95,12 @@ public class LabourDataVo extends BaseEntity
|
|||
public void setIsDel(Long isDel) {
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getAttendanceType() {
|
||||
return attendanceType;
|
||||
}
|
||||
|
||||
public void setAttendanceType(String attendanceType) {
|
||||
this.attendanceType = attendanceType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.yanzhu.jh.project.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 劳务实名制管理对象
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2024-01-22
|
||||
*/
|
||||
@Data
|
||||
public class LabourDataVoPM
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 进门还是出门E进,L出 */
|
||||
private String attendanceType;
|
||||
|
||||
/** 考勤时间yyyy-MM-dd HH:mm:ss */
|
||||
private String attendanceTime;
|
||||
|
||||
/** 打卡照片 */
|
||||
private String scanPhoto;
|
||||
}
|
|
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'>
|
||||
and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 )
|
||||
</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.del_flag=0 )</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0)</if>
|
||||
<if test='activeName == "jxz"'>
|
||||
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
|
@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test='nowRole == "4"'> and fl.approve_status in ('20','31','30','100') and sp.deptId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 )</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.del_flag=0 )</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0)</if>
|
||||
</where>
|
||||
group by fl.approve_status
|
||||
</select>
|
||||
|
@ -120,10 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<if test='nowRole == "1" or nowRole == "2" or nowRole == "3"'> and fl.approve_status in ('30')</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='21' and spui.del_flag=0 )</if>
|
||||
<if test='nowRole == "4"'> and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='21' and spui.is_del=0 )</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.job_type='24' and spui.del_flag=0 )</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.del_flag=0 )</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17"'> and fl.approve_status in ('10','21','30','31','100') and sp.id in (select spui.project_id from sur_project_userinfo spui where spui.dept_id = #{nowDept} and spui.user_id=#{nowUser} and spui.job_type='24' and spui.is_del=0 )</if>
|
||||
<if test='activeName == "jxz"'>
|
||||
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
|
|
Loading…
Reference in New Issue