Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
668912e91c
|
@ -9,7 +9,7 @@ ruoyi:
|
|||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: D:/data/uploadPath
|
||||
profile: D:/data2/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
|
|
|
@ -17,7 +17,7 @@ const service = axios.create({
|
|||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 100000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
|
|
@ -1,18 +1,26 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="82px">
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select :disabled="prjDisabled" v-model="queryParams.projectId" placeholder="请选择项目" clearable @change="doQuerySub()">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" placeholder="请选择总包单位" clearable>
|
||||
<el-form-item label="总包单位" prop="deptId">
|
||||
<el-select v-model="queryParams.deptId" placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包商类型" prop="companyTypeId">
|
||||
<el-select v-model="queryParams.companyTypeId" placeholder="请选择分包商类型" clearable>
|
||||
<el-option value="0" label="所有"></el-option>
|
||||
<el-option value="101" label="总包人员"></el-option>
|
||||
<el-option value="102" label="监理人员"></el-option>
|
||||
<el-option value="103" label="劳务人员"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="createBy">
|
||||
<el-date-picker v-model="queryParams.attendanceTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
|
@ -52,7 +60,7 @@
|
|||
|
||||
<el-table-column label="照片" align="center" prop="id">
|
||||
<template slot-scope="{row}">
|
||||
<el-image :src="row.workerPhoto||row.scanPhoto" :preview-src-list="[row.workerPhoto||row.scanPhoto]" style="height:60px"/>
|
||||
<el-image :src="row.scanPhoto||row.workerPhoto" :preview-src-list="[row.scanPhoto||row.workerPhoto]" style="height:60px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" prop="workerName" />
|
||||
|
@ -126,6 +134,7 @@
|
|||
<script>
|
||||
import { listAttendance, getAttendance, delAttendance, addAttendance, updateAttendance } from "@/api/project/attendance";
|
||||
import { listAttendanceWorker, getAttendanceWorker, delAttendanceWorker, addAttendanceWorker, updateAttendanceWorker, queryAttendanceData } from "@/api/project/attendanceWorker";
|
||||
import {listAttendanceConfig} from '@/api/project/attendanceConfig.js'
|
||||
import attConfigDrawer from '../attendanceConfig/attendanceConfigDrawer.vue'
|
||||
export default {
|
||||
name: "Attendance",
|
||||
|
@ -158,7 +167,8 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId:null,
|
||||
subDeptId:null,
|
||||
deptId:null,
|
||||
companyTypeId:"0",
|
||||
attendanceTime:new Date()
|
||||
},
|
||||
// 表单参数
|
||||
|
@ -169,12 +179,16 @@ export default {
|
|||
projectOptions: [],
|
||||
depts: [],
|
||||
prjDisabled:false,
|
||||
cfgList:[],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
listAttendanceConfig({}).then(d=>{
|
||||
this.cfgList=d.rows||[];
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
init(prj){
|
||||
|
@ -187,9 +201,9 @@ export default {
|
|||
if (tmps.length > 0) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
this.queryParams.deptId = '';
|
||||
}
|
||||
if(init){
|
||||
this.getList();
|
||||
|
@ -207,9 +221,9 @@ export default {
|
|||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
this.queryParams.deptId = '';
|
||||
}
|
||||
if(init){
|
||||
this.getList();
|
||||
|
@ -224,10 +238,23 @@ export default {
|
|||
this.loading = true;
|
||||
let postData={};
|
||||
postData.attendanceTime=this.$dt(this.queryParams.attendanceTime).format("YYYY-MM-DD");
|
||||
let tmps=this.cfgList.filter(d=>d.projectId==this.queryParams.projectId && d.subDeptId==this.queryParams.deptId);
|
||||
if(tmps.length>0){
|
||||
postData.cfgid=tmps[0].id;
|
||||
}else{
|
||||
postData.projectId=this.queryParams.projectId;
|
||||
postData.deptId=this.queryParams.subDeptId;
|
||||
postData.deptId=this.queryParams.deptId;
|
||||
}
|
||||
postData.pageNum=this.queryParams.pageNum;
|
||||
postData.pageSize=this.queryParams.pageSize;
|
||||
if(this.queryParams.companyTypeId && this.queryParams.companyTypeId>0){
|
||||
postData.companyTypeId=this.queryParams.companyTypeId;
|
||||
}
|
||||
listAttendance(postData).then(response=>{
|
||||
this.attendanceList = response.rows;
|
||||
this.attendanceList = (response.rows||[]).map(it=>{
|
||||
it.scanPhoto=it.scanPhoto && it.scanPhoto.indexOf("/profile")==0?"/jhapi"+it.scanPhoto:it.scanPhoto;
|
||||
return it;
|
||||
});
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
})
|
||||
|
|
|
@ -2,6 +2,11 @@ package com.yanzhu.jh.project.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceCfg;
|
||||
import com.yanzhu.jh.project.service.ISurProjectAttendanceCfgService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -34,6 +39,8 @@ public class SurProjectAttendanceDataController extends BaseController
|
|||
@Autowired
|
||||
private ISurProjectAttendanceDataService surProjectAttendanceDataService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectAttendanceCfgService surProjectAttendanceCfgService;
|
||||
/**
|
||||
* 查询劳务实名制管理列表
|
||||
*/
|
||||
|
@ -42,6 +49,11 @@ public class SurProjectAttendanceDataController extends BaseController
|
|||
public TableDataInfo list(SurProjectAttendanceData surProjectAttendanceData)
|
||||
{
|
||||
startPage();
|
||||
String tmp=surProjectAttendanceData.getAttendanceTime();
|
||||
if(StrUtil.isNotEmpty(tmp)){
|
||||
int year= DateUtil.parse(tmp).year();
|
||||
surProjectAttendanceData.setYear(year);
|
||||
}
|
||||
List<SurProjectAttendanceData> list = surProjectAttendanceDataService.selectSurProjectAttendanceDataList(surProjectAttendanceData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
@ -82,16 +82,16 @@ public class AttendanceJgwTask {
|
|||
|
||||
String appid="6a6f24fe35b04ee0bcf31cfb46ed1051";
|
||||
String secret="c3h5enh4MjAyNHN1Yw==";
|
||||
String prjId="db955e11ef774e63968a47c3dc2acc15";//"b67f1baa6dca4558a16bf90a4681b82e";
|
||||
String prjId="db955e11ef774e63968a47c3dc2acc15";//"b67f1baa6dca4558a16bf90a4681b82e";//
|
||||
String token= getToken(appid,secret);
|
||||
if(token==null || token.length()==0){
|
||||
return;
|
||||
}
|
||||
System.out.println(token);
|
||||
System.out.println(DateUtil.format(DateTime.now(),"yyyy-MM-dd"));
|
||||
findAddWorkerByProject(appid,token,prjId,0);
|
||||
//findAddWorkerByProject(appid,token,prjId,0);
|
||||
//findAttendanceByProject(appid,token,prjId);
|
||||
//findTeamByProjectId(appid,token,prjId);
|
||||
findTeamByProjectId(appid,token,prjId);
|
||||
//findProContractorByProjectId(appid,token,prjId);
|
||||
}
|
||||
public static void findAttendanceByProject(String appId,String token,String projectId){
|
||||
|
@ -152,7 +152,6 @@ public class AttendanceJgwTask {
|
|||
String purl=joData.getString("result");
|
||||
byte[] buffer= HttpUtil.downloadBytes(purl);
|
||||
String filePath= RuoYiConfig.getUploadPath();
|
||||
filePath="D:/data/uploadPath";
|
||||
try {
|
||||
return FileUtils.writeBytes(buffer, filePath+"/jgw");
|
||||
}catch (Exception ex){
|
||||
|
@ -191,9 +190,9 @@ public class AttendanceJgwTask {
|
|||
}
|
||||
}
|
||||
public static void findTeamByProjectId(String appId,String token,String projectId){
|
||||
String path="/webapi/project/findTeamByProjectId";
|
||||
String path="webapi/project/findTeamByProjectId";
|
||||
String time = System.currentTimeMillis() + "";
|
||||
String startId="34549";
|
||||
String startId="0";
|
||||
String url=host+path+"?appId=" + appId + "&tokenSign=" + token +"×tamp=" + time;
|
||||
|
||||
String tokenSign = Md5Utils.hash(url);
|
||||
|
|
|
@ -76,6 +76,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto = #{scanPhoto}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
|
@ -97,6 +113,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto = #{scanPhoto}</if>
|
||||
|
@ -385,7 +417,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and projectId=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and deptid=#{deptId}
|
||||
and projectId in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and projectId in
|
||||
|
@ -404,7 +436,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and projectId=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and deptid=#{deptId}
|
||||
and projectId in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and projectId in
|
||||
|
|
Loading…
Reference in New Issue