提交数据

dev_xds
姜玉琦 2024-04-21 16:16:05 +08:00
parent 57fb2aeca4
commit 4edca70f3d
9 changed files with 141 additions and 37 deletions

View File

@ -38,6 +38,7 @@ import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
import com.yanzhu.jh.project.domain.SurProjectAttendanceGroup; import com.yanzhu.jh.project.domain.SurProjectAttendanceGroup;
import com.yanzhu.jh.project.domain.SurProjectAttendanceUser; import com.yanzhu.jh.project.domain.SurProjectAttendanceUser;
import com.yanzhu.jh.project.domain.vo.LabourDataVo; 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.LabourGroupVO;
import com.yanzhu.jh.project.domain.vo.LabourUserVO; import com.yanzhu.jh.project.domain.vo.LabourUserVO;
import com.yanzhu.jh.project.service.ISurProjectAttendanceDataService; import com.yanzhu.jh.project.service.ISurProjectAttendanceDataService;
@ -505,9 +506,26 @@ public class LabourApiController extends BaseController {
SurProjectAttendanceData data = surProjectAttendanceDataService.findCurrentAttendanceData(findData); SurProjectAttendanceData data = surProjectAttendanceDataService.findCurrentAttendanceData(findData);
if(data!=null){ if(data!=null){
//这里不能修改出勤时间 //这里不能修改出勤时间
data.setAttendanceOutTime(labourDataVo.getAttendanceTime()); if(Objects.equals("L",surProjectAttendanceData.getAttendanceType())){
data.setAttendanceOutTime(labourDataVo.getAttendanceTime());
}
data.setUpdateBy(sysApplyConfig.getAppId()+"Api推送离场打卡"); 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); surProjectAttendanceDataService.updateSurProjectAttendanceData(data);
}else{ }else{
/** /**
@ -523,6 +541,11 @@ public class LabourApiController extends BaseController {
if(StringUtils.isNull(surProjectAttendanceUser.getCompanyTypeId())){ if(StringUtils.isNull(surProjectAttendanceUser.getCompanyTypeId())){
throw new ServiceException("人员部门类型信息不完整",HttpStatusEnum.DARA_EXCEPTION.getCode()); 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.setCfgid(sysApplyConfig.getCfgId());
surProjectAttendanceData.setAppId(sysApplyConfig.getAppId()); surProjectAttendanceData.setAppId(sysApplyConfig.getAppId());
surProjectAttendanceData.setProjectId(sysApplyConfig.getProjectId()); surProjectAttendanceData.setProjectId(sysApplyConfig.getProjectId());
@ -634,8 +657,26 @@ public class LabourApiController extends BaseController {
SurProjectAttendanceData data = surProjectAttendanceDataService.findCurrentAttendanceData(findData); SurProjectAttendanceData data = surProjectAttendanceDataService.findCurrentAttendanceData(findData);
if(data!=null){ if(data!=null){
//这里不能修改出勤时间 //这里不能修改出勤时间
data.setAttendanceOutTime(surProjectAttendanceData.getAttendanceTime()); if(Objects.equals("L",surProjectAttendanceData.getAttendanceType())){
data.setAttendanceOutTime(surProjectAttendanceData.getAttendanceTime());
}
data.setUpdateBy(sysApplyConfig.getAppId()+"Api推送离场打卡"); 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); surProjectAttendanceDataService.updateSurProjectAttendanceData(data);
}else{ }else{
/** /**
@ -651,6 +692,11 @@ public class LabourApiController extends BaseController {
if(StringUtils.isNull(surProjectAttendanceUser.getCompanyTypeId())){ if(StringUtils.isNull(surProjectAttendanceUser.getCompanyTypeId())){
throw new ServiceException("人员部门类型信息不完整",HttpStatusEnum.DARA_EXCEPTION.getCode()); 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.setCfgid(sysApplyConfig.getCfgId());
surProjectAttendanceData.setAppId(sysApplyConfig.getAppId()); surProjectAttendanceData.setAppId(sysApplyConfig.getAppId());
surProjectAttendanceData.setProjectId(sysApplyConfig.getProjectId()); surProjectAttendanceData.setProjectId(sysApplyConfig.getProjectId());

View File

@ -74,9 +74,9 @@ xss:
# 过滤开关 # 过滤开关
enabled: true enabled: true
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: /system/notice,/common/*
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*,/api/*,/flow/*
# flowable相关表 # flowable相关表
flowable: flowable:

View File

@ -109,7 +109,7 @@
v-model="form.laborReason" v-model="form.laborReason"
type="textarea" type="textarea"
rows="3" rows="3"
placeholder="请输入拖欠原因说明" placeholder="请输入拖欠原因说明最多600字"
/> />
</el-form-item> </el-form-item>
<el-form-item label="凭证附件" prop="files"> <el-form-item label="凭证附件" prop="files">
@ -238,13 +238,7 @@
</div> </div>
</div> </div>
</div> </div>
<div <div :class="item.approveStatus == '100' ? 'inspect_shtg' : 'inspect_shz'">
:class="
item.approveStatus == '100'
? 'inspect_shtg'
: 'inspect_shz'
"
>
<div class="inspect_list_info_details"> <div class="inspect_list_info_details">
<div class="inspect_list_info_data"> <div class="inspect_list_info_data">
<div class="inspect_list_info_data_prop"> <div class="inspect_list_info_data_prop">
@ -362,10 +356,14 @@ export default {
subDeptOptions: [], subDeptOptions: [],
flowLabours: [], flowLabours: [],
flowLabourNodes: [], flowLabourNodes: [],
flowId: null,
nav: null, nav: null,
// //
rules: { rules: {
laborName: [{ required: true, message: "请输入投诉人名称", trigger: "blur" }], laborName: [
{ required: true, message: "请输入投诉人名称", trigger: "blur" },
{ max: 10, message: "最多输入10字符", trigger: "blur" },
],
laborPhone: [ laborPhone: [
{ required: true, message: "请输入投诉人手机号码", trigger: "blur" }, { required: true, message: "请输入投诉人手机号码", trigger: "blur" },
{ {
@ -407,11 +405,11 @@ export default {
], ],
laborReason: [ laborReason: [
{ required: true, message: "请输入拖欠原因说明", trigger: "blur" }, { required: true, message: "请输入拖欠原因说明", trigger: "blur" },
{ max: 200, message: "最多输入600字符", trigger: "blur" }, { max: 600, message: "最多输入600字符", trigger: "blur" },
], ],
}, },
timer: null, // timer: null, //
count: 60, // s count: 30, // s
buttonText: "查 询 投 诉 进 度", // buttonText: "查 询 投 诉 进 度", //
disabled: false, // disabled: false, //
}; };
@ -462,7 +460,7 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
projectId: null projectId: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -497,6 +495,12 @@ export default {
this.loading = false; this.loading = false;
this.flowLabours = response.data || []; this.flowLabours = response.data || [];
this.showInspect = true; this.showInspect = true;
if (this.flowId != null) {
//
let nav = this.nav;
this.nav = null;
this.showDetail(this.flowId, nav);
}
this.startCountdown(); this.startCountdown();
}); });
}, },
@ -508,13 +512,19 @@ export default {
this.loading = false; this.loading = false;
this.flowLabours = response.data || []; this.flowLabours = response.data || [];
this.showInspect = true; this.showInspect = true;
if (this.flowId != null) {
//
let nav = this.nav;
this.nav = null;
this.showDetail(this.flowId, nav);
}
this.startCountdown(); this.startCountdown();
}); });
} }
}); });
}, },
resetCountdown() { resetCountdown() {
this.count = 60; this.count = 30;
this.buttonText = "查 询 投 诉 进 度"; this.buttonText = "查 询 投 诉 进 度";
this.disabled = false; // this.disabled = false; //
}, },
@ -531,6 +541,7 @@ export default {
}, 1000); }, 1000);
}, },
showDetail(detailId, nv) { showDetail(detailId, nv) {
this.flowId = detailId;
if (this.nav == nv) { if (this.nav == nv) {
this.nav = null; this.nav = null;
return false; return false;

View File

@ -70,9 +70,9 @@ xss:
# 过滤开关 # 过滤开关
enabled: true enabled: true
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: /system/notice,/wechat/common/*
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*,/wechat/*
# flowable相关表 # flowable相关表
flowable: flowable:

View File

@ -145,16 +145,22 @@ public class FlowLabourInfoServiceImpl implements IFlowLabourInfoService
flowLabourInfo.setId(0L); flowLabourInfo.setId(0L);
return AjaxResult.success(flowLabourInfo); return AjaxResult.success(flowLabourInfo);
}else{ }else{
flowLabourInfo.setCreateTime(DateUtils.getNowDate()); try {
flowLabourInfoMapper.insertFlowLabourInfo(flowLabourInfo); flowLabourInfo.setApproveStatus("10");
//保存流程节点信息 flowLabourInfo.setCreateBy(flowLabourInfo.getLaborName());
FlowLabourAuditNode flowLabourAuditNode = new FlowLabourAuditNode(); flowLabourInfo.setCreateTime(DateUtils.getNowDate());
flowLabourAuditNode.setFlowId(flowLabourInfo.getId()); flowLabourInfoMapper.insertFlowLabourInfo(flowLabourInfo);
flowLabourAuditNode.setFlowNode("0"); //保存流程节点信息
flowLabourAuditNode.setCreateBy(flowLabourInfo.getLaborName()); FlowLabourAuditNode flowLabourAuditNode = new FlowLabourAuditNode();
flowLabourAuditNode.setCreateTime(new Date()); flowLabourAuditNode.setFlowId(flowLabourInfo.getId());
flowLabourAuditNodeMapper.insertFlowLabourAuditNode(flowLabourAuditNode); flowLabourAuditNode.setFlowNode("0");
return AjaxResult.success(flowLabourInfo); flowLabourAuditNode.setCreateBy(flowLabourInfo.getLaborName());
flowLabourAuditNode.setCreateTime(new Date());
flowLabourAuditNodeMapper.insertFlowLabourAuditNode(flowLabourAuditNode);
return AjaxResult.success(flowLabourInfo);
}catch (Exception e){
throw new RuntimeException("输入字符中包含系统未识别的乱码!");
}
} }
} }

View File

@ -243,6 +243,9 @@ public class SurProjectAttendanceData extends BaseEntity
/** 重要::yanzhu接口接收base64图片 */ /** 重要::yanzhu接口接收base64图片 */
private String scanPhotoBase64; private String scanPhotoBase64;
/** 重要::yanzhu出门进门逻辑判断 */
private String attendanceType;
public String getScanPhotoBase64() { public String getScanPhotoBase64() {
return scanPhotoBase64; return scanPhotoBase64;
} }
@ -251,6 +254,14 @@ public class SurProjectAttendanceData extends BaseEntity
this.scanPhotoBase64 = scanPhotoBase64; this.scanPhotoBase64 = scanPhotoBase64;
} }
public String getAttendanceType() {
return attendanceType;
}
public void setAttendanceType(String attendanceType) {
this.attendanceType = attendanceType;
}
public static SurProjectAttendanceData createFromHuazhu(JSONObject j) { public static SurProjectAttendanceData createFromHuazhu(JSONObject j) {
SurProjectAttendanceData d=new SurProjectAttendanceData(); SurProjectAttendanceData d=new SurProjectAttendanceData();
d.vendorsCode="huazhu"; d.vendorsCode="huazhu";

View File

@ -29,11 +29,9 @@ public class LabourDataVo extends BaseEntity
private String companyId; private String companyId;
/** 进门还是出门E进L出 */ /** 进门还是出门E进L出 */
/**
* &
@NotBlank(message = "进出门不能为空") @NotBlank(message = "进出门不能为空")
@Pattern(regexp = "E|L", message = "进出门类型格式异常E进|L出") @Pattern(regexp = "E|L", message = "进出门类型格式异常E进|L出")
private String attendanceType;*/ private String attendanceType;
/** 考勤时间yyyy-MM-dd HH:mm:ss */ /** 考勤时间yyyy-MM-dd HH:mm:ss */
@NotBlank(message = "考勤时间不能为空") @NotBlank(message = "考勤时间不能为空")
@ -97,4 +95,12 @@ public class LabourDataVo extends BaseEntity
public void setIsDel(Long isDel) { public void setIsDel(Long isDel) {
this.isDel = isDel; this.isDel = isDel;
} }
public String getAttendanceType() {
return attendanceType;
}
public void setAttendanceType(String attendanceType) {
this.attendanceType = attendanceType;
}
} }

View File

@ -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;
}

View File

@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> <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 ) 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>
<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='activeName == "jxz"'>
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if> <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 == "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 == "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> </where>
group by fl.approve_status group by fl.approve_status
</select> </select>
@ -120,10 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if> <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 == "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 == "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='activeName == "jxz"'>
<if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if> <if test='nowRole == "4"'> and fl.approve_status in ('20','31')</if>
<!--监理单位/总包公司/分包单位查询当前关联数据--> <!--监理单位/总包公司/分包单位查询当前关联数据-->