Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
8edb022406
|
@ -9,6 +9,8 @@ export function listAttendance(query) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询劳务实名制管理详细
|
||||
export function getAttendance(id) {
|
||||
return request({
|
||||
|
|
|
@ -10,6 +10,14 @@ export function listAttendanceWorker(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询考勤人员基本属性列表
|
||||
export function listJgwAttendanceWorker(query) {
|
||||
return request({
|
||||
url: '/project/attendanceWorker/listjgw',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询考勤人员基本属性详细
|
||||
export function getAttendanceWorker(id) {
|
||||
return request({
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<el-table-column label="性别" align="center" prop="attendanceType" >
|
||||
<template slot-scope="{row}">{{ row.gender==1?'女':'男' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进场时间" align="center" prop="inTime">
|
||||
<el-table-column label="进场时间" align="center" prop="inTime" v-if="1==2">
|
||||
<template slot-scope="{row}">{{ row.enterDate|formatDate }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
|
@ -80,8 +80,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listAttendanceWorker, getAttendanceWorker, delAttendanceWorker, addAttendanceWorker, updateAttendanceWorker,queryAttendanceData } from "@/api/project/attendanceWorker";
|
||||
|
||||
import { listAttendanceWorker,listJgwAttendanceWorker, getAttendanceWorker, delAttendanceWorker, addAttendanceWorker, updateAttendanceWorker,queryAttendanceData } from "@/api/project/attendanceWorker";
|
||||
import {listAttendanceConfig} from '@/api/project/attendanceConfig.js'
|
||||
export default {
|
||||
name: "AttendanceWorker",
|
||||
data() {
|
||||
|
@ -120,12 +120,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: {
|
||||
initMe(prj){
|
||||
|
@ -170,8 +174,14 @@ export default {
|
|||
},
|
||||
/** 查询考勤人员基本属性列表 */
|
||||
getList() {
|
||||
debugger
|
||||
this.loading = true;
|
||||
listAttendanceWorker(this.queryParams).then(response => {
|
||||
let tmps=this.cfgList.filter(d=>d.projectId==this.queryParams.projectId && d.subDeptId==this.queryParams.subDeptId);
|
||||
let ajax=listAttendanceWorker(this.queryParams);
|
||||
if(tmps.length>0 && tmps[0].vendorsCode=='jgw'){
|
||||
ajax=listJgwAttendanceWorker(this.queryParams)
|
||||
}
|
||||
ajax.then(response => {
|
||||
this.attendanceWorkerList = (response.rows||[]).map(it=>{
|
||||
it.enterDate=it.enterDate?new Date(it.enterDate*1):null;
|
||||
return it;
|
||||
|
|
|
@ -48,6 +48,14 @@ public class SurProjectAttendanceUserController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('project:attendanceWorker:list')")
|
||||
@GetMapping("/listjgw")
|
||||
public TableDataInfo listjgw(SurProjectAttendanceUser surProjectAttendanceUser)
|
||||
{
|
||||
startPage();
|
||||
List<SurProjectAttendanceUser> list = surProjectAttendanceUserService.selectSurProjectAttendanceUserListJgw(surProjectAttendanceUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出考勤人员基本属性列表
|
||||
*/
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.yanzhu.jh.project.domain;
|
|||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
@ -221,7 +222,7 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
u.groupId="";
|
||||
u.groupName="";
|
||||
u.workTypeCode="";
|
||||
u.workTypeName="";
|
||||
u.workTypeName=j.getString("jobtype");
|
||||
u.state="01".equals( j.getString("workerStatus"))?0l:1l;
|
||||
String workDate=j.getString("workDate");
|
||||
if(!StrUtil.isEmpty(workDate)){
|
||||
|
@ -233,6 +234,14 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
u.teamName="";
|
||||
u.other=j.toJSONString();
|
||||
u.isDel=0l;
|
||||
JSONArray ja=j.getJSONArray("corpName");
|
||||
if(ja!=null && ja.size()>0){
|
||||
Object obj=ja.get(0);
|
||||
if(obj!=null){
|
||||
u.companyName=obj.toString();
|
||||
}
|
||||
}
|
||||
|
||||
u.leader=j.getInteger("isAdmin")==1?1:0;
|
||||
return u;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@ public interface SurProjectAttendanceUserMapper
|
|||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
|
||||
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
/**
|
||||
* 新增考勤人员基本属性
|
||||
*
|
||||
|
|
|
@ -95,4 +95,11 @@ public interface ISurProjectAttendanceUserService
|
|||
public List<SurProjectAttendanceUser> todayAttendance(SurProjectAttendanceUser where);
|
||||
|
||||
public long countAttendance(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 济工网人员查询
|
||||
* @param surProjectAttendanceUser
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
}
|
||||
|
|
|
@ -202,6 +202,11 @@ public class SurProjectAttendanceUserServiceImpl implements ISurProjectAttendanc
|
|||
return surProjectAttendanceUserMapper.countAttendance(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(SurProjectAttendanceUser surProjectAttendanceUser) {
|
||||
return surProjectAttendanceUserMapper.selectSurProjectAttendanceUserListJgw(surProjectAttendanceUser);
|
||||
}
|
||||
|
||||
private Date findDate(List<SurProjectAttendanceUser> datas, SurProjectAttendanceUser u, String type) {
|
||||
for (SurProjectAttendanceUser user:datas) {
|
||||
if(user.getWorkerId().equals(u.getWorkerId()) && user.getName().equals(type)){
|
||||
|
|
|
@ -251,7 +251,7 @@ public class AttendanceJgwTask {
|
|||
public static void findTeamByProjectId(String appId,String token,String projectId){
|
||||
String path="webapi/project/findTeamByProjectId";
|
||||
String time = System.currentTimeMillis() + "";
|
||||
String startId="0";
|
||||
String startId="100";
|
||||
String url=host+path+"?appId=" + appId + "&tokenSign=" + token +"×tamp=" + time;
|
||||
|
||||
String tokenSign = Md5Utils.hash(url);
|
||||
|
@ -322,6 +322,11 @@ public class AttendanceJgwTask {
|
|||
cnt++;
|
||||
}
|
||||
SurProjectAttendanceUser user=SurProjectAttendanceUser.createFromJgw(json);
|
||||
if(user.getWorkerId().equals("e878b1b9c6ac461ebc4109843974f4c3")){
|
||||
String k=user.getName();
|
||||
JSONArray arr2= json.getJSONArray("corpName");
|
||||
Object o=arr2.get(0);
|
||||
}
|
||||
}
|
||||
System.out.println("cnt:"+cnt+","+arr.size());
|
||||
//findAddWorkerByProject(appId, token, projectId, endId);
|
||||
|
|
|
@ -57,7 +57,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE a.cfgid=b.id )
|
||||
sur_project_attendance_user
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectAttendanceUserListJgw" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
select u.id,u.cfgid,u.app_id,u.vendors_code,u.workerId,u.laborWorkerId,u.workerCategory,u.qrCode,u.name,
|
||||
u.ethnic,u.nativePlace,u.gender,u.birthDate,u.phone,u.degreeName,u.photo,u.recentPhoto,
|
||||
u.groupId,u.groupName,u.leader,u.workTypeCode,u.specWorkType,
|
||||
u.hatCode,u.state,u.enterDate,u.exitDate,u.companyId,u.vendorId,
|
||||
u.teamId,u.teamName,u.enterType,u.remark,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
||||
c.project_id,c.sub_dept_id,g.companyName,g.companyCode workTypeName
|
||||
from sur_project_attendance_user u,sur_project_attendance_cfg c,sur_project_attendance_group g
|
||||
where u.cfgid=c.id and g.companyid=u.companyid and u.vendors_code='jgw'
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="laborWorkerId != null "> and laborWorkerId = #{laborWorkerId}</if>
|
||||
<if test="workerCategory != null "> and workerCategory = #{workerCategory}</if>
|
||||
<if test="qrCode != null "> and qrCode = #{qrCode}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="ethnic != null and ethnic != ''"> and ethnic = #{ethnic}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and nativePlace = #{nativePlace}</if>
|
||||
<if test="gender != null "> and gender = #{gender}</if>
|
||||
<if test="birthDate != null "> and birthDate = #{birthDate}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="degreeName != null and degreeName != ''"> and degreeName like concat('%', #{degreeName}, '%')</if>
|
||||
<if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
||||
<if test="recentPhoto != null and recentPhoto != ''"> and recentPhoto = #{recentPhoto}</if>
|
||||
<if test="groupId != null "> and groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="leader != null "> and leader = #{leader}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<if test="workTypeName != null and workTypeName != ''"> and workTypeName like concat('%', #{workTypeName}, '%')</if>
|
||||
<if test="specWorkType != null "> and specWorkType = #{specWorkType}</if>
|
||||
<if test="hatCode != null and hatCode != ''"> and hatCode = #{hatCode}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="enterDate != null and enterDate != ''"> and enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null and exitDate != ''"> and exitDate = #{exitDate}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="enterType != null and enterType != ''"> and enterType = #{enterType}</if>
|
||||
<if test="other != null and other != ''"> and other = #{other}</if>
|
||||
<if test="projectId != null and projectId > 0 "> and project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId >0 "> and sub_dept_id = #{subDeptId}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</select>
|
||||
<select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
<include refid="selectSurProjectAttendanceUserVo"/>
|
||||
<where>
|
||||
|
|
Loading…
Reference in New Issue