zm
2024-10-23 70a6a22f94446bc9a1b96fc52584898aa7f67543
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.product.administration.service;
 
import java.util.Date;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import com.product.administration.config.CmnConst;
import com.product.common.lang.StringUtils;
import com.product.core.dao.BaseDao;
import com.product.core.entity.DataTableEntity;
import com.product.core.entity.FieldSetEntity;
import com.product.core.service.support.AbstractBaseService;
import com.product.core.spring.context.SpringMVCContextHolder;
 
@Component
public class WorkAttendancePoolService extends AbstractBaseService{
 
    @Autowired
    BaseDao baseDao;
    
    /**
     *     考勤汇总列表
     * @param fse
     * @return
     */
    public DataTableEntity listAttendancePool(FieldSetEntity fse) {
        DataTableEntity dt = baseDao.listTable(CmnConst.PRODUCT_OA_ATTENDANCE_POOL, null, new Object[] {}, null, null, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE));
        baseDao.loadPromptData(dt);
        return dt;
    }
    
    /**
     *     考勤汇总详情
     * @param uuid
     * @return
     */
    public FieldSetEntity findAttendancePool(String uuid) {
        return baseDao.getFieldSetEntity(CmnConst.PRODUCT_OA_ATTENDANCE_POOL, uuid, true);
    }
    
    /**
     *     考勤汇总保存
     * @param fse
     * @return
     */
    public String saveAttendancePool(FieldSetEntity fse) {
        if (!StringUtils.isEmpty(fse.getUUID())) {
            fse.setValue(CmnConst.UPDATED_BY, SpringMVCContextHolder.getCurrentUser().getUser_id());
            fse.setValue(CmnConst.UPDATED_UTC_DATETIME, new Date());
        }            
        baseDao.saveFieldSetEntity(fse);
        return fse.getUUID();
    }
    
    /**
     *     考勤汇总删除
     * @param uuid
     * @return
     */
    public boolean deleteAttendancePool(String uuid) {
        return baseDao.delete(CmnConst.PRODUCT_OA_ATTENDANCE_POOL, "uuid=?", new Object[] {uuid});
    }
}