考勤流水刷新
diff --git a/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java b/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
index 764af1f..dda0da9 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
@@ -963,7 +963,7 @@
tdept=dept;
}
}
- map.addAttribute("deptname", tdept == null ? "unknow" :tdept.getDeptname());
+ map.addAttribute("deptname", tdept == null ? " " :tdept.getDeptname());
map.addAttribute("startdate",DateUtil.reformatDatetime(searchBean.getStartdate(),"yyyyMMdd","yyyy-MM-dd"));
map.addAttribute("enddate",DateUtil.reformatDatetime(searchBean.getEnddate(),"yyyyMMdd","yyyy-MM-dd"));
searchBean.setDeptcode(deptcode);
diff --git a/src/main/java/com/supwisdom/dlpay/atte/service/impl/AtteClassServiceImpl.java b/src/main/java/com/supwisdom/dlpay/atte/service/impl/AtteClassServiceImpl.java
index c524bd1..dc91376 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/service/impl/AtteClassServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/service/impl/AtteClassServiceImpl.java
@@ -230,7 +230,10 @@
}else{
dtl.setApflag(1);
}
- atteClassDao.saveAtteDtl(dtl);
+ TAtteDtl oldbean=atteClassDao.getDtl(timeid,attedate,cust.getCustid());
+ if(oldbean==null){
+ atteClassDao.saveAtteDtl(dtl);
+ }
}
}
diff --git a/src/main/resources/templates/atte/report/p_index.html b/src/main/resources/templates/atte/report/p_index.html
index 6b3e0d5..f7433b4 100644
--- a/src/main/resources/templates/atte/report/p_index.html
+++ b/src/main/resources/templates/atte/report/p_index.html
@@ -204,44 +204,22 @@
methods: {
handleSizeChange:function(val) {
this.pageSize=val;
- attedtl_commonQuery(this,this.currPage,val);
+ report_commonQuery(this,this.currPage,val);
},
currPageChange:function(val) {
this.currPage=val;
- attedtl_commonQuery(this,this.currPage,this.pageSize);
+ report_commonQuery(this,this.currPage,this.pageSize);
},
currRowChange:function(val) {
this.currentRow = val;
},
- attedatefor:function(row){
- if(row.attedate!= null){
- return dateformatter(row.attedate);
- }
- },
- statimefor:function(row){
- if(row.statime!= null){
- return timeformatter(row.statime);
- }
- },
- statefor:function(row){
- if(row.state!= null){
- return state_grpname(row.state);
- }
- },
- oldstatefor:function(row){
- if(row.oldstate!= null){
- return state_grpname(row.oldstate);
- }
- },
- timenamefor:function(row){
- if(row.timeid!=null){
- return timeid_grpname(row.timeid);
- }
- },
+
+
+
query:function () {
this.pagesize=10;
this.currPage=1;
- attedtl_commonQuery(this,this.currPage,this.pageSize);
+ report_commonQuery(this,this.currPage,this.pageSize);
},
print:function () {
that=this;
@@ -256,12 +234,6 @@
this.dialogFormVisible = false
},
- custtypefor:function (row) {
- return custtype_grpname(row.custtypeid);
- },
- deptfor:function (row) {
- return dept_grpname(row.deptcode);
- },
},
@@ -310,56 +282,11 @@
})
- function dateformatter(time){
- return time.substr(0,4)+'-'+time.substr(4,2)+'-'+time.substr(6,2);
- }
- function timeformatter(time){
- return time.substr(0,2)+':'+time.substr(2,2)+':'+time.substr(4,2);
- }
- function dept_grpname(grpid){
-// console.log(typeof timeid)
- if(grpid!=null){
- var list = polreport_vue.deptlist;
- for(var i=0;i<list.length;i++){
- if(list[i].value == grpid){
- return list[i].label;
- }
- }
- }
- }
- function custtype_grpname(grpid){
-// console.log(typeof timeid)
- if(grpid!=null){
- var list = polreport_vue.typegrplist;
- for(var i=0;i<list.length;i++){
- if(list[i].value == grpid){
- return list[i].label;
- }
- }
- }
- }
- function state_grpname(grpid){
- if(grpid!=null){
- var list = polreport_vue.stategrplist;
- for(var i=0;i<list.length;i++){
- if(list[i].value == grpid){
- return list[i].label;
- }
- }
- }
- }
- function timeid_grpname(grpid){
- if(grpid!=null){
- var list = polreport_vue.timegrplist;
- for(var i=0;i<list.length;i++){
- if(list[i].value == grpid){
- return list[i].label;
- }
- }
- }
- }
+
+
+
function class_Formatdate(date){
if(date==null||date==''){
return '';
@@ -377,7 +304,7 @@
return formated;
}
- function attedtl_commonQuery(_self,pageno,pagesize) {
+ function report_commonQuery(_self,pageno,pagesize) {
var token=$("meta[name='_csrf_token']").attr("value");
var startdate=class_Formatdate(_self.preportform.startdate);
@@ -440,7 +367,7 @@
} else {
layer.msg('保存信息成功!', {icon: 1, time: 1000});
_that.dialogFormVisible = false;
- dtl_refreshThisTable();
+ report_refreshThisTable();
_that.$refs[formName].resetFields();
}
}
@@ -448,8 +375,8 @@
}
- function dtl_refreshThisTable(){
- attedtl_commonQuery(polreport_vue,polreport_vue.currPage,polreport_vue.pageSize);
+ function report_refreshThisTable(){
+ report_commonQuery(polreport_vue,polreport_vue.currPage,polreport_vue.pageSize);
};
var LODOP;
function print(that){