update code
parent
0240c1a2a1
commit
41a8a5179d
|
@ -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 字符验证
|
||||
|
|
|
@ -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" />
|
||||
|
@ -158,7 +166,8 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId:null,
|
||||
subDeptId:null,
|
||||
deptId:null,
|
||||
companyTypeId:"0",
|
||||
attendanceTime:new Date()
|
||||
},
|
||||
// 表单参数
|
||||
|
@ -187,9 +196,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 +216,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();
|
||||
|
@ -225,11 +234,17 @@ export default {
|
|||
let postData={};
|
||||
postData.attendanceTime=this.$dt(this.queryParams.attendanceTime).format("YYYY-MM-DD");
|
||||
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;
|
||||
listAttendance(postData).then(response=>{
|
||||
this.attendanceList = response.rows;
|
||||
if(this.queryParams.companyTypeId && this.queryParams.companyTypeId>0){
|
||||
postData.companyTypeId=this.queryParams.companyTypeId;
|
||||
}
|
||||
listAttendance(postData).then(response=>{
|
||||
this.attendanceList = (response.rows||[]).map(it=>{
|
||||
it.scanPhoto=it.scanPhoto.indexOf("/profile")==0?"/jhapi"+it.scanPhoto:it.scanPhoto;
|
||||
return it;
|
||||
});
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
})
|
||||
|
|
|
@ -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);
|
||||
|
@ -215,7 +214,7 @@ public class AttendanceJgwTask {
|
|||
JSONArray arr=joData.getJSONArray("teamList");
|
||||
if(arr.size()>0){
|
||||
for(int i=0;i<arr.size();i++){
|
||||
JSONObject json=arr.getJSONObject(i);
|
||||
JSONObject json=arr.getJSONObject(i);
|
||||
SurProjectAttendanceGroup group=SurProjectAttendanceGroup.createJgw(json);
|
||||
group.setBizLicense(json.getString("corpCode"));
|
||||
String type=json.getString("corpType");
|
||||
|
|
|
@ -75,7 +75,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<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="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