update code
parent
00b199b034
commit
d89aed535d
|
@ -26,6 +26,25 @@ export function listByMonth(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询两个日期之间某人的工资
|
||||||
|
export function listByBetweenDay(query) {
|
||||||
|
return request({
|
||||||
|
url: '/project/unitpay/listByBetweenDay',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 按两个日期之间的时间差分组统计工资
|
||||||
|
export function listGroupBetweenDay(query) {
|
||||||
|
return request({
|
||||||
|
url: '/project/unitpay/listGroupBetweenDay',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询劳资管理详细
|
// 查询劳资管理详细
|
||||||
export function getUnitpay(id) {
|
export function getUnitpay(id) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pay-query-main">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||||
<el-form-item label="项目名称" prop="projectId">
|
<el-form-item label="项目名称" prop="projectId">
|
||||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" @change="doQuerySub">
|
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" @change="doQuerySub">
|
||||||
|
@ -13,13 +13,15 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="日期" prop="subDeptId" v-if="activeName == 'day'">
|
<el-form-item label="姓名" prop="workerName">
|
||||||
<el-date-picker v-model="queryParams.attendanceDay" style="margin:0px 10px;" type="date" placeholder="选择日期"
|
<el-input v-model="queryParams.workerName"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期" >
|
||||||
|
<el-date-picker v-model="queryParams.attendanceDay1" style="margin:0px 10px;" type="date" placeholder="选择日期"
|
||||||
@change="handleQuery">
|
@change="handleQuery">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
-
|
||||||
<el-form-item label="月份" prop="subDeptId" v-if="activeName == 'month'">
|
<el-date-picker v-model="queryParams.attendanceDay2" style="margin:0px 10px;" type="date" placeholder="选择日期"
|
||||||
<el-date-picker v-model="queryParams.attendanceMonth" style="margin:0px 10px;" type="month" placeholder="请选择月份"
|
|
||||||
@change="handleQuery">
|
@change="handleQuery">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -27,22 +29,59 @@
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button type="success" v-if="total>0" @click="doExport">导出</el-button>
|
<el-button type="success" v-if="total>0" @click="doExport">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<el-table v-loading="loading" :data="attendanceList" height="60vh" class="my-table">
|
||||||
|
<el-table-column label="照片" align="center" prop="id">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<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" />
|
||||||
|
<el-table-column label="籍贯" align="center" prop="nativePlace" />
|
||||||
|
<el-table-column label="性别" align="center" prop="attendanceType">
|
||||||
|
<template slot-scope="{ row }">{{
|
||||||
|
row.workerGender == 1 ? "女" : "男"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="分包商名称" align="center" prop="companyName" />
|
||||||
|
<el-table-column label="所属班组" align="center" prop="groupName" />
|
||||||
|
<el-table-column label="工种" align="center" prop="workTypeName" />
|
||||||
|
<el-table-column label="出勤天数" align="center" prop="pay" v-if="type=='month'">
|
||||||
|
<template slot-scope="{ row }">{{row.days }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出勤日期" align="center" prop="pay" v-if="type=='day'">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<span>{{(row.attendanceTime||row.attendanceOutTime)|formatDate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工资" align="center" prop="pay">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<span >{{(row.pay/100.0).toFixed(2)}}</span>
|
||||||
|
<span v-if="false" >
|
||||||
|
{{(row.unitPay/100.0).toFixed(2)}}*{{row.days}}={{(row.pay/100.0).toFixed(2)}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<div slot="empty">
|
||||||
|
<el-empty v-if="total==0" image="./images/empty.svg"></el-empty>
|
||||||
|
</div>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-tabs type="card" v-model="activeName" @tab-click="doTabClick">
|
|
||||||
<el-tab-pane label="日工资列表" name="day">
|
|
||||||
<DayPay ref="day" @update="dataChange" :getPrjInfo="getPrjInfo" type="index" v-if="activeName == 'day'"></DayPay>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="月工资列表" name="month">
|
|
||||||
<MonthPay ref="month" @update="dataChange" :getPrjInfo="getPrjInfo" type="index" v-if="activeName == 'month'"></MonthPay>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DayPay from './dayPay.vue'
|
import DayPay from './dayPay.vue'
|
||||||
import MonthPay from './monthPay.vue'
|
import MonthPay from './monthPay.vue'
|
||||||
|
import {listByBetweenDay,listGroupBetweenDay} from '@/api/project/unitpay'
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
DayPay,MonthPay
|
DayPay,MonthPay
|
||||||
|
@ -55,15 +94,20 @@ export default {
|
||||||
activeName: 'day',
|
activeName: 'day',
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
subDeptId: null,
|
subDeptId: null,
|
||||||
attendanceDay:new Date(),
|
workerName:'',
|
||||||
attendanceMonth:new Date(),
|
attendanceDay1:new Date(),
|
||||||
|
attendanceDay2:null,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
projectOptions: [],
|
projectOptions: [],
|
||||||
depts: [],
|
depts: [],
|
||||||
total:0,
|
total: 0,
|
||||||
|
attendanceList:[],
|
||||||
|
type:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -90,12 +134,14 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.subDeptId = '';
|
this.queryParams.subDeptId = '';
|
||||||
}
|
}
|
||||||
|
this.loading=false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$api.publics.queryUnitList({
|
this.$api.publics.queryUnitList({
|
||||||
projectId: prjId,
|
projectId: prjId,
|
||||||
unitTypes: "2".split(","),
|
unitTypes: "2".split(","),
|
||||||
}).then((d) => {
|
}).then((d) => {
|
||||||
|
this.loading=false;
|
||||||
let objs = d.rows || [];
|
let objs = d.rows || [];
|
||||||
if (!this.prjDept2) {
|
if (!this.prjDept2) {
|
||||||
this.prjDept2 = {};
|
this.prjDept2 = {};
|
||||||
|
@ -122,17 +168,66 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
if(this.activeName=='day'){
|
this.queryParams.pageNum=1;
|
||||||
this.$refs.day.doQuery();
|
this.getList();
|
||||||
|
},
|
||||||
|
getPostData(){
|
||||||
|
let postData={
|
||||||
|
projectId:this.queryParams.projectId,
|
||||||
|
deptId:this.queryParams.subDeptId,
|
||||||
|
pageNum:this.queryParams.pageNum,
|
||||||
|
pageSize:this.queryParams.pageSize
|
||||||
|
};
|
||||||
|
if(this.queryParams.workerName.trim()){
|
||||||
|
this.type='day';
|
||||||
|
postData.workerName=this.queryParams.workerName.trim();
|
||||||
}else{
|
}else{
|
||||||
this.$refs.month.doQuery();
|
this.type='month';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.queryParams.attendanceDay1){
|
||||||
|
postData.attendanceTime=this.$dt(this.queryParams.attendanceDay1).format("YYYY-MM-DD");
|
||||||
|
}
|
||||||
|
if(this.queryParams.attendanceDay2){
|
||||||
|
postData.attendanceOutTime=this.$dt(this.queryParams.attendanceDay1).format("YYYY-MM-DD");
|
||||||
|
}
|
||||||
|
return postData;
|
||||||
|
},
|
||||||
|
getList(){
|
||||||
|
this.loading = true;
|
||||||
|
let ajaxFun=listByBetweenDay;
|
||||||
|
let postData=this.getPostData();
|
||||||
|
if(this.type=='month'){
|
||||||
|
ajaxFun=listGroupBetweenDay;
|
||||||
|
}
|
||||||
|
ajaxFun(postData).then(response=>{
|
||||||
|
this.attendanceList = (response.rows || []).map((it) => {
|
||||||
|
if (it.vendorsCode != "yanzhu") {
|
||||||
|
let dt1 = it.attendanceTime;
|
||||||
|
let dt2 = it.attendanceOutTime;
|
||||||
|
if (!dt1 || !dt2 || dt1 == dt2) {
|
||||||
|
let dt = dt1 || dt2;
|
||||||
|
if (it.remark == "E") {
|
||||||
|
it.attendanceTime = dt;
|
||||||
|
it.attendanceOutTime = "";
|
||||||
|
} else {
|
||||||
|
it.attendanceTime = "";
|
||||||
|
it.attendanceOutTime = dt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
it.scanPhoto =it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto;
|
||||||
|
return it;
|
||||||
|
});
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
doTabClick(){
|
doTabClick(){
|
||||||
setTimeout(this.handleQuery,1000);
|
setTimeout(this.handleQuery,1000);
|
||||||
},
|
},
|
||||||
doExport(){
|
doExport(){
|
||||||
let postData=this.getPrjInfo();
|
let postData=this.getPostData();
|
||||||
let tmps=this.projectOptions.filter(d=>d.id==this.queryParams.projectId);
|
let tmps=this.projectOptions.filter(d=>d.id==this.queryParams.projectId);
|
||||||
let name=tmps.length>0?tmps[0].projectName:"";
|
let name=tmps.length>0?tmps[0].projectName:"";
|
||||||
if(this.queryParams.subDeptId){
|
if(this.queryParams.subDeptId){
|
||||||
|
@ -141,10 +236,8 @@ export default {
|
||||||
name+="_"+tmps[0].deptName;
|
name+="_"+tmps[0].deptName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
name+="_"+this.$dt(postData.attendanceTime).format(this.activeName=="day"?"YYYY年MM月DD日":"YYYY年MM月");
|
name+=`_工资管理_[${new Date().getTime()}].xlsx`
|
||||||
name+=`_[${new Date().getTime()}].xlsx`
|
let url=this.type=="day"?"project/unitpay/exportBetweenDay":"project/unitpay/exportGroupBetweenDay";
|
||||||
postData.attendanceTime=this.$dt(postData.attendanceTime).format("YYYY-MM-DD");
|
|
||||||
let url=this.activeName=="day"?"project/unitpay/exportDay":"project/unitpay/exportMonth";
|
|
||||||
this.download(
|
this.download(
|
||||||
url,
|
url,
|
||||||
{
|
{
|
||||||
|
@ -156,3 +249,11 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.pay-query-main{
|
||||||
|
font-size: 12px;
|
||||||
|
.el-table.my-table{
|
||||||
|
height: calc(100vh - 292px) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -90,6 +90,60 @@ public class SurProjectAttendanceUnitpayController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询两个日期之间某人的工资
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:unitpay:list')")
|
||||||
|
@GetMapping("/listByBetweenDay")
|
||||||
|
public TableDataInfo listByBetweenDay(SurProjectAttendanceData attWhere)
|
||||||
|
{
|
||||||
|
attWhere.setAttendanceOutTime(attWhere.getAttendanceOutTime());
|
||||||
|
startPage();
|
||||||
|
String tmp=attWhere.getAttendanceTime();
|
||||||
|
if(StrUtil.isNotEmpty(tmp)){
|
||||||
|
int year= DateUtil.parse(tmp).year();
|
||||||
|
attWhere.setYear(year);
|
||||||
|
}
|
||||||
|
List<SurProjectAttendanceData> list = surProjectAttendanceDataService.selectSurProjectAttendanceDataList(attWhere);
|
||||||
|
SurProjectAttendanceUnitpay payWhere=new SurProjectAttendanceUnitpay();
|
||||||
|
payWhere.setCfgId(attWhere.getCfgid());
|
||||||
|
List<SurProjectAttendanceUnitpay> payList= surProjectAttendanceUnitpayService.selectSurProjectAttendanceUnitpayList(payWhere);
|
||||||
|
for(SurProjectAttendanceData it :list){
|
||||||
|
it.setDays(1l);
|
||||||
|
it.setPay(surProjectAttendanceUnitpayService.getPay(payList,it));
|
||||||
|
}
|
||||||
|
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按两个日期之间的时间差分组统计工资
|
||||||
|
* @param attWhere
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:unitpay:list')")
|
||||||
|
@GetMapping("/listGroupBetweenDay")
|
||||||
|
public TableDataInfo listGroupBetweenDay(SurProjectAttendanceData attWhere)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
String tmp=attWhere.getAttendanceTime();
|
||||||
|
if(StrUtil.isNotEmpty(tmp)){
|
||||||
|
int year= DateUtil.parse(tmp).year();
|
||||||
|
attWhere.setYear(year);
|
||||||
|
}
|
||||||
|
List<SurProjectAttendanceData> list = surProjectAttendanceDataService.selectSurProjectAttendanceDataListByMonth(attWhere);
|
||||||
|
SurProjectAttendanceUnitpay payWhere=new SurProjectAttendanceUnitpay();
|
||||||
|
payWhere.setCfgId(attWhere.getCfgid());
|
||||||
|
List<SurProjectAttendanceUnitpay> payList= surProjectAttendanceUnitpayService.selectSurProjectAttendanceUnitpayList(payWhere);
|
||||||
|
for(SurProjectAttendanceData it :list){
|
||||||
|
it.setPay(surProjectAttendanceUnitpayService.getPay(payList,it));
|
||||||
|
}
|
||||||
|
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('project:unitpay:list')")
|
@PreAuthorize("@ss.hasPermi('project:unitpay:list')")
|
||||||
@GetMapping("/listByMonth")
|
@GetMapping("/listByMonth")
|
||||||
public TableDataInfo listByMonth(SurProjectAttendanceData attWhere)
|
public TableDataInfo listByMonth(SurProjectAttendanceData attWhere)
|
||||||
|
@ -115,7 +169,7 @@ public class SurProjectAttendanceUnitpayController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出劳资管理列表
|
* 按日导出工资
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('project:unitpay:export')")
|
@PreAuthorize("@ss.hasPermi('project:unitpay:export')")
|
||||||
@Log(title = "劳资管理", businessType = BusinessType.EXPORT)
|
@Log(title = "劳资管理", businessType = BusinessType.EXPORT)
|
||||||
|
@ -123,7 +177,7 @@ public class SurProjectAttendanceUnitpayController extends BaseController
|
||||||
public void exportDay(HttpServletResponse response, SurProjectAttendanceData attWhere)
|
public void exportDay(HttpServletResponse response, SurProjectAttendanceData attWhere)
|
||||||
{
|
{
|
||||||
Date dt=DateUtil.parse(attWhere.getAttendanceTime());
|
Date dt=DateUtil.parse(attWhere.getAttendanceTime());
|
||||||
attWhere.setAttendanceOutTime(attWhere.getAttendanceOutTime());
|
attWhere.setAttendanceOutTime(attWhere.getAttendanceTime());
|
||||||
String tmp=attWhere.getAttendanceTime();
|
String tmp=attWhere.getAttendanceTime();
|
||||||
if(StrUtil.isNotEmpty(tmp)){
|
if(StrUtil.isNotEmpty(tmp)){
|
||||||
int year= DateUtil.parse(tmp).year();
|
int year= DateUtil.parse(tmp).year();
|
||||||
|
@ -145,7 +199,7 @@ public class SurProjectAttendanceUnitpayController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出劳资管理列表
|
* 按月导出工资
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('project:unitpay:export')")
|
@PreAuthorize("@ss.hasPermi('project:unitpay:export')")
|
||||||
@Log(title = "劳资管理", businessType = BusinessType.EXPORT)
|
@Log(title = "劳资管理", businessType = BusinessType.EXPORT)
|
||||||
|
@ -173,6 +227,60 @@ public class SurProjectAttendanceUnitpayController extends BaseController
|
||||||
util.exportExcel(response, exportList, "劳务工资-月工资"+DateUtil.format(dt,"YYYY年MM月"));
|
util.exportExcel(response, exportList, "劳务工资-月工资"+DateUtil.format(dt,"YYYY年MM月"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出两个日期之间的每个员工统计考勤
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:unitpay:export')")
|
||||||
|
@Log(title = "劳资管理", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/exportGroupBetweenDay")
|
||||||
|
public void exportGroupBetweenDay(HttpServletResponse response, SurProjectAttendanceData attWhere)
|
||||||
|
{
|
||||||
|
String tmp=attWhere.getAttendanceTime();
|
||||||
|
if(StrUtil.isNotEmpty(tmp)){
|
||||||
|
int year= DateUtil.parse(tmp).year();
|
||||||
|
attWhere.setYear(year);
|
||||||
|
}
|
||||||
|
List<SurProjectAttendanceData> list = surProjectAttendanceDataService.selectSurProjectAttendanceDataListByMonth(attWhere);
|
||||||
|
SurProjectAttendanceUnitpay payWhere=new SurProjectAttendanceUnitpay();
|
||||||
|
payWhere.setCfgId(attWhere.getCfgid());
|
||||||
|
List<SurProjectAttendanceUnitpay> payList= surProjectAttendanceUnitpayService.selectSurProjectAttendanceUnitpayList(payWhere);
|
||||||
|
List<ExportAttendancMonth> exportList=new ArrayList<>();
|
||||||
|
for(SurProjectAttendanceData it :list){
|
||||||
|
it.setPay(surProjectAttendanceUnitpayService.getPay(payList,it));
|
||||||
|
exportList.add(ExportAttendancMonth.NEW(it));
|
||||||
|
}
|
||||||
|
ExcelUtil<ExportAttendancMonth> util = new ExcelUtil<ExportAttendancMonth>(ExportAttendancMonth.class);
|
||||||
|
util.exportExcel(response, exportList, "劳务工资-工资");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导出两个日期之间的某人工资
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('project:unitpay:export')")
|
||||||
|
@Log(title = "劳资管理", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/exportBetweenDay")
|
||||||
|
public void exportBetWeenDay(HttpServletResponse response, SurProjectAttendanceData attWhere)
|
||||||
|
{
|
||||||
|
Date dt=DateUtil.parse(attWhere.getAttendanceTime());
|
||||||
|
|
||||||
|
String tmp=attWhere.getAttendanceTime();
|
||||||
|
if(StrUtil.isNotEmpty(tmp)){
|
||||||
|
int year= DateUtil.parse(tmp).year();
|
||||||
|
attWhere.setYear(year);
|
||||||
|
}
|
||||||
|
List<SurProjectAttendanceData> list = surProjectAttendanceDataService.selectSurProjectAttendanceDataList(attWhere);
|
||||||
|
SurProjectAttendanceUnitpay payWhere=new SurProjectAttendanceUnitpay();
|
||||||
|
payWhere.setCfgId(attWhere.getCfgid());
|
||||||
|
List<SurProjectAttendanceUnitpay> payList= surProjectAttendanceUnitpayService.selectSurProjectAttendanceUnitpayList(payWhere);
|
||||||
|
List<ExportAttendancDay> exportList=new ArrayList<ExportAttendancDay>();
|
||||||
|
for(SurProjectAttendanceData it :list){
|
||||||
|
it.setDays(1l);
|
||||||
|
it.setPay(surProjectAttendanceUnitpayService.getPay(payList,it));
|
||||||
|
exportList.add(ExportAttendancDay.NEW(it));
|
||||||
|
}
|
||||||
|
|
||||||
|
ExcelUtil<ExportAttendancDay> util = new ExcelUtil<ExportAttendancDay>(ExportAttendancDay.class);
|
||||||
|
util.exportExcel(response, exportList, "劳务工资-工资");
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取劳资管理详细信息
|
* 获取劳资管理详细信息
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.yanzhu.jh.project.domain.vo;
|
package com.yanzhu.jh.project.domain.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
||||||
|
|
||||||
|
@ -25,6 +26,8 @@ public class ExportAttendancDay {
|
||||||
private String groupName;
|
private String groupName;
|
||||||
@Excel(name = "工种")
|
@Excel(name = "工种")
|
||||||
private String workTypeName;
|
private String workTypeName;
|
||||||
|
@Excel(name = "出勤日期")
|
||||||
|
private String attendanceDate;
|
||||||
@Excel(name = "日工资")
|
@Excel(name = "日工资")
|
||||||
private BigDecimal pay;
|
private BigDecimal pay;
|
||||||
@Excel(name = "工种日工资")
|
@Excel(name = "工种日工资")
|
||||||
|
@ -41,10 +44,23 @@ public class ExportAttendancDay {
|
||||||
d.groupName=it.getGroupName();
|
d.groupName=it.getGroupName();
|
||||||
d.workTypeName = it.getWorkTypeName();
|
d.workTypeName = it.getWorkTypeName();
|
||||||
d.pay=BigDecimal.valueOf(it.getPay()/100.0);
|
d.pay=BigDecimal.valueOf(it.getPay()/100.0);
|
||||||
|
if(it.getAttendanceTime()!=null){
|
||||||
|
d.attendanceDate= DateUtil.formatDate(DateUtil.parse(it.getAttendanceTime()));
|
||||||
|
}else if(it.getAttendanceOutTime()!=null){
|
||||||
|
d.attendanceDate= DateUtil.formatDate(DateUtil.parse(it.getAttendanceOutTime()));
|
||||||
|
}
|
||||||
d.unitPay=BigDecimal.valueOf(it.getUnitPay()/100.0);
|
d.unitPay=BigDecimal.valueOf(it.getUnitPay()/100.0);
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAttendanceDate() {
|
||||||
|
return attendanceDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttendanceDate(String attendanceDate) {
|
||||||
|
this.attendanceDate = attendanceDate;
|
||||||
|
}
|
||||||
|
|
||||||
public String getProjectName() {
|
public String getProjectName() {
|
||||||
return projectName;
|
return projectName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -509,9 +509,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId != null ">and cfgid in (select id from sur_project_attendance_cfg where projectId = #{projectId}
|
<if test="projectId != null ">and cfgid in (select id from sur_project_attendance_cfg where projectId = #{projectId}
|
||||||
<if test="deptId != null "> and sub_dept_id = #{deptId}</if>
|
<if test="deptId != null "> and sub_dept_id = #{deptId}</if>
|
||||||
)</if>
|
)</if>
|
||||||
|
<if test="attendanceTime!=null or attendanceOutTime!=null">
|
||||||
|
<if test="attendanceTime!=null and attendanceOutTime!=null">
|
||||||
|
AND (date(attendance_time) >= date(#{attendanceTime}) or date(attendance_out_time) >= date(#{attendanceTime}))
|
||||||
|
AND (date(attendance_time) <= date(#{attendanceOutTime}) or date(attendance_out_time) <= date(#{attendanceOutTime}))
|
||||||
|
</if>
|
||||||
|
|
||||||
AND (date(attendance_time) >= date(#{attendanceTime}) or date(attendance_out_time) >= date(#{attendanceTime}))
|
<if test="attendanceTime==null and attendanceOutTime!=null">
|
||||||
AND (date(attendance_time) <= date(#{attendanceOutTime}) or date(attendance_out_time) <= date(#{attendanceOutTime}))
|
AND (date(attendance_time) <= date(#{attendanceOutTime}) or date(attendance_out_time) <= date(#{attendanceOutTime}))
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="attendanceTime!=null and attendanceOutTime==null">
|
||||||
|
AND (date(attendance_time) >= date(#{attendanceTime}) or date(attendance_out_time) >= date(#{attendanceTime}))
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
)
|
)
|
||||||
SELECT a.*, b.days
|
SELECT a.*, b.days
|
||||||
|
@ -520,6 +531,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE b.rn = 1
|
WHERE b.rn = 1
|
||||||
order by a.workerId
|
order by a.workerId
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="todayAttendance" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
<select id="todayAttendance" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
select ady.* from sur_project_attendance_data_${year} ady
|
select ady.* from sur_project_attendance_data_${year} ady
|
||||||
left join sur_project sp on sp.id = ady.projectId
|
left join sur_project sp on sp.id = ady.projectId
|
||||||
|
|
Loading…
Reference in New Issue