11 files added
29 files modified
1812 ■■■■■ changed files
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java 13 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java 20 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/domain/AnimationSettlement.java 98 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/AnimationSettlementRepository.java 29 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/rest/AnimationSettlementController.java 103 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/AnimationSettlementService.java 115 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/dto/AnimationSettlementDto.java 93 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/dto/AnimationSettlementQueryCriteria.java 54 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/AnimationSettlementServiceImpl.java 507 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/mapstruct/AnimationSettlementMapper.java 32 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java 23 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java 5 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/SysUserLevelOtherRepository.java 1 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/SysUserLevelOtherQueryCriteria.java 1 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserDto.java 2 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserQueryCriteria.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java 12 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskDaliy.java 12 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskDaliyMongo.java 9 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskUser.java 4 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskUserMongo.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/rest/TaskUserController.java 6 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyDto.java 9 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyMongoDto.java 9 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskMongoDto.java 6 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskUserDto.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskUserMongoDto.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java 86 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java 36 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java 137 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/vo/TaskUserMongoVo.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/domain/UserLevelWage.java 8 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/dto/UserLevelWageDto.java 6 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/api/task/animationSettlement.js 27 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/utils/constant.js 6 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/animeManage/index.vue 140 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/personalCommission/index.vue 146 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/taskDaliy/index.vue 14 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/task/taskUser/index.vue 6 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/treatment/userLevelWage/index.vue 22 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java
@@ -31,8 +31,10 @@
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl;
import me.zhengjie.modules.system.domain.*;
import me.zhengjie.modules.system.repository.*;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.modules.system.repository.SysConfigHolidayRepository;
import me.zhengjie.modules.system.repository.SysUserLevelOtherRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.treatment.domain.CmnLevel;
import me.zhengjie.modules.treatment.repository.CmnLevelRepository;
import me.zhengjie.modules.treatment.service.dto.CmnLevelQueryCriteria;
@@ -818,10 +820,9 @@
        levelQueryCriteria.setName("实习");
        List<CmnLevel> internshipLevelList = cmnLevelRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, levelQueryCriteria, criteriaBuilder));
        if (internshipLevelList.size() > 0) {
            UserQueryCriteria userQueryCriteria = new UserQueryCriteria();
            userQueryCriteria.setId(userId);
            userQueryCriteria.setLevelIds(internshipLevelList.stream().map(CmnLevel::getId).collect(Collectors.toList()));
            if (userRepository.count((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, userQueryCriteria, criteriaBuilder)) > 0) {
            internshipLevelList.stream().map(CmnLevel::getId).collect(Collectors.toList());
            SysUserLevelOther targetSysUserLevelOther = sysUserLevelOtherRepository.findByUserIdAndData(userId, targetDate.format(DateTimeFormatter.ofPattern("yyyy-MM")));
            if (targetSysUserLevelOther != null && internshipLevelList.stream().map(CmnLevel::getId).anyMatch(id -> id.equals(targetSysUserLevelOther.getLevelId()))) {
                return surplusYearTime.doubleValue();
            }
        }
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
@@ -126,6 +126,8 @@
    public static final String PROJECT_DISTINGUISH = "project_distinguish";
    // 项目区分:科技
    public static final String PROJECT_DISTINGUISH_PRODUCT = "project_distinguish_product";
    // 项目区分:漫广
    public static final String PROJECT_DISTINGUISH_VISION = "project_distinguish_vision";
    // 单价币种
    public static final String STANDARD_UNIT_CURRENCY = "standard_unit_currency";
@@ -466,4 +468,22 @@
    // 最低限度加班费
    public static final BigDecimal MIN_OVERTIME_PAY = BigDecimal.valueOf(12);
    // 漫剧结算状态:未结算
    public static final String ANIME_SETTLEMENT_STATUS_UNSETTLED = "0";
    // 漫剧结算状态:已结算
    public static final String ANIME_SETTLEMENT_STATUS_SETTLED = "1";
    // 漫剧结算任务类型:普通
    public static final String ANIME_TASK_TYPE_NORMAL = "0";
    // 漫剧结算任务类型:审核
    public static final String ANIME_TASK_TYPE_REVIEW = "1";
    // 漫剧项目类型:有预算
    public static final String ANIME_PROJECT_TYPE_BUDGET = "漫剧-有预算";
    // 漫剧默认月度标准:制作分钟
    public static final BigDecimal ANIME_MONTHLY_PRODUCE_MINUTE = BigDecimal.valueOf(80);
    // 漫剧默认月度标准:审核分钟
    public static final BigDecimal ANIME_MONTHLY_REVIEW_MINUTE = BigDecimal.valueOf(330);
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/domain/AnimationSettlement.java
New file
@@ -0,0 +1,98 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.domain;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @website https://eladmin.vip
* @description /
* @author baolh
* @date 2026-09-28
**/
@Entity
@Data
@Table(name="animation_settlement")
public class AnimationSettlement extends BaseEntity implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "ID")
    private Long id;
    @Column(name = "`user_id`")
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    @Column(name = "`project_id`")
    @ApiModelProperty(value = "项目ID")
    private Long projectId;
    @Column(name = "`task_id`")
    @ApiModelProperty(value = "任务详情ID")
    private String taskId;
    @Column(name = "`task_user_id`")
    @ApiModelProperty(value = "任务分配ID")
    private String taskUserId;
    @Column(name = "`acceptance_time`")
    @ApiModelProperty(value = "验收时间")
    private Timestamp acceptanceTime;
    @Column(name = "`task_seconds`")
    @ApiModelProperty(value = "秒数")
    private Integer taskSeconds;
    @Column(name = "`points_consumed`")
    @ApiModelProperty(value = "消耗积分")
    private Integer pointsConsumed;
    @Column(name = "`issue_count`")
    @ApiModelProperty(value = "问题数量")
    private Integer issueCount;
    @Column(name = "`reject_count`")
    @ApiModelProperty(value = "驳回数量")
    private Integer rejectCount;
    @Column(name = "`settlement_status`")
    @ApiModelProperty(value = "结算状态(0-未结算,1-已结算)")
    private String settlementStatus;
    @Column(name = "`task_type`")
    @ApiModelProperty(value = "任务类型(0-普通,1-复核)")
    private String taskType;
    @Column(name = "`cost_hours`")
    @ApiModelProperty(value = "消耗工时")
    private BigDecimal costHours;
    public void copy(AnimationSettlement source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/AnimationSettlementRepository.java
New file
@@ -0,0 +1,29 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.repository;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://eladmin.vip
* @author baolh
* @date 2026-09-28
**/
public interface AnimationSettlementRepository extends JpaRepository<AnimationSettlement, Long>, JpaSpecificationExecutor<AnimationSettlement> {
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/rest/AnimationSettlementController.java
New file
@@ -0,0 +1,103 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.rest;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import me.zhengjie.modules.project.service.AnimationSettlementService;
import me.zhengjie.modules.project.service.dto.AnimationSettlementQueryCriteria;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
/**
* @website https://eladmin.vip
* @author baolh
* @date 2026-09-28
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "漫剧结算计费管理")
@RequestMapping("/api/animationSettlement")
public class AnimationSettlementController {
    private final AnimationSettlementService animationSettlementService;
    @Log("导出数据")
    @ApiOperation("导出数据")
    @GetMapping(value = "/download")
    @PreAuthorize("@el.check('animationSettlement:list')")
    public void exportAnimationSettlement(HttpServletResponse response, AnimationSettlementQueryCriteria criteria) throws IOException {
        animationSettlementService.download(animationSettlementService.queryAll(criteria), response);
    }
    @GetMapping
    @Log("查询漫剧结算计费")
    @ApiOperation("查询漫剧结算计费")
    @PreAuthorize("@el.check('animationSettlement:list')")
    public ResponseEntity<Object> queryAnimationSettlement(AnimationSettlementQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity<>(animationSettlementService.queryAll(criteria,pageable),HttpStatus.OK);
    }
    @PostMapping
    @Log("新增漫剧结算计费")
    @ApiOperation("新增漫剧结算计费")
    @PreAuthorize("@el.check('animationSettlement:add')")
    public ResponseEntity<Object> createAnimationSettlement(@Validated @RequestBody AnimationSettlement resources){
        return new ResponseEntity<>(animationSettlementService.create(resources),HttpStatus.CREATED);
    }
    @PutMapping
    @Log("修改漫剧结算计费")
    @ApiOperation("修改漫剧结算计费")
    @PreAuthorize("@el.check('animationSettlement:edit')")
    public ResponseEntity<Object> updateAnimationSettlement(@Validated @RequestBody AnimationSettlement resources){
        animationSettlementService.update(resources);
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
    }
    @DeleteMapping
    @Log("删除漫剧结算计费")
    @ApiOperation("删除漫剧结算计费")
    @PreAuthorize("@el.check('animationSettlement:del')")
    public ResponseEntity<Object> deleteAnimationSettlement(@RequestBody Long[] ids) {
        animationSettlementService.deleteAll(ids);
        return new ResponseEntity<>(HttpStatus.OK);
    }
    @GetMapping("/personal")
    @Log("查询漫剧结算计费(个人维度)")
    @ApiOperation("查询漫剧结算计费(个人维度)")
    @PreAuthorize("@el.check('animationSettlement:list')")
    public ResponseEntity<Object> queryPersonalAnimationSettlement(AnimationSettlementQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity<>(animationSettlementService.queryPersonalAll(criteria, pageable), HttpStatus.OK);
    }
    @GetMapping("/anime")
    @Log("查询漫剧结算计费(漫剧维度)")
    @ApiOperation("查询漫剧结算计费(漫剧维度)")
    @PreAuthorize("@el.check('animationSettlement:list')")
    public ResponseEntity<Object> queryAnimeAnimationSettlement(AnimationSettlementQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity<>(animationSettlementService.queryAnimeAll(criteria, pageable), HttpStatus.OK);
    }
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/AnimationSettlementService.java
New file
@@ -0,0 +1,115 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.service;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import me.zhengjie.modules.project.domain.ProjectType;
import me.zhengjie.modules.project.service.dto.AnimationSettlementDto;
import me.zhengjie.modules.project.service.dto.AnimationSettlementQueryCriteria;
import me.zhengjie.modules.task.domain.TaskUserMongo;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
/**
* @website https://eladmin.vip
* @description 服务接口
* @author baolh
* @date 2026-09-28
**/
public interface AnimationSettlementService {
    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(AnimationSettlementQueryCriteria criteria, Pageable pageable);
    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<AnimationSettlementDto>
    */
    List<AnimationSettlementDto> queryAll(AnimationSettlementQueryCriteria criteria);
    /**
     * 根据ID查询
     * @param id ID
     * @return AnimationSettlementDto
     */
    AnimationSettlementDto findById(Long id);
    /**
    * 创建
    * @param resources /
    * @return AnimationSettlementDto
    */
    AnimationSettlementDto create(AnimationSettlement resources);
    /**
    * 编辑
    * @param resources /
    */
    void update(AnimationSettlement resources);
    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Long[] ids);
    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<AnimationSettlementDto> all, HttpServletResponse response) throws IOException;
    /**
     * 统一结算任务
     * taskUserMongo / 结算任务分配
     * projectType / 结算类型
     */
    void generateByTaskUser(TaskUserMongo taskUserMongo, List<ProjectType> projectTypeList);
    /**
     * 查询数据分页(个人维度)
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Map<String, Object> queryPersonalAll(AnimationSettlementQueryCriteria criteria, Pageable pageable);
    /**
     * 查询数据分页(漫剧维度)
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Map<String, Object> queryAnimeAll(AnimationSettlementQueryCriteria criteria, Pageable pageable);
    /**
     * 查询数据(个人维度)
     * @param criteria 条件
     * @return Map<String,Object>
     */
    List<AnimationSettlementDto> queryPersonalAll(AnimationSettlementQueryCriteria criteria);
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/dto/AnimationSettlementDto.java
New file
@@ -0,0 +1,93 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.service.dto;
import lombok.Data;
import me.zhengjie.base.BaseDTO;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @website https://eladmin.vip
* @description /
* @author baolh
* @date 2026-09-28
**/
@Data
public class AnimationSettlementDto extends BaseDTO implements Serializable {
    /** ID */
    private Long id;
    /** 用户ID */
    private Long userId;
    /** 项目ID */
    private Long projectId;
    /** 任务详情ID */
    private String taskId;
    /** 任务分配ID */
    private String taskUserId;
    /** 验收时间 */
    private Timestamp acceptanceTime;
    /** 秒数 */
    private Integer taskSeconds;
    /** 消耗积分 */
    private Integer pointsConsumed;
    /** 问题数量 */
    private Integer issueCount;
    /** 驳回数量 */
    private Integer rejectCount;
    /** 结算状态(0-未结算,1-已结算) */
    private String settlementStatus;
    /** 任务类型(0-普通,1-复核) */
    private String taskType;
    /** 消耗工时 */
    private BigDecimal costHours;
    /** 制作提成 */
    private BigDecimal produceCommission;
    /** 制作扣除 */
    private BigDecimal produceDeduction;
    /** 审核提成 */
    private BigDecimal reviewCommission;
    /** 审核扣除 */
    private BigDecimal reviewDeduction;
    /** 抽卡系数 */
    private BigDecimal gachaCoefficient;
    /** 提成单价 */
    private BigDecimal commissionPrice;
    /** 超额分钟 */
    private BigDecimal excessProduceMinutes;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/dto/AnimationSettlementQueryCriteria.java
New file
@@ -0,0 +1,54 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
import java.sql.Timestamp;
import java.util.List;
/**
* @website https://eladmin.vip
* @author baolh
* @date 2026-09-28
**/
@Data
public class AnimationSettlementQueryCriteria{
    /** 精确 */
    @Query(propName = "userId", type = Query.Type.EQUAL)
    private Long userId;
    @Query(propName = "taskId", type = Query.Type.EQUAL)
    private String taskId;
    @Query(propName = "taskUserId", type = Query.Type.EQUAL)
    private String taskUserId;
    @Query(propName = "settlementStatus", type = Query.Type.EQUAL)
    private String settlementStatus;
    @Query(propName = "taskId", type = Query.Type.IN)
    private List<String> taskIds;
    /** 模糊 */
    @Query(propName = "acceptanceTime", type = Query.Type.EQUAL)
    private Timestamp acceptanceTime;
    @Query(propName = "acceptanceTime", type = Query.Type.BETWEEN)
    private List<Timestamp> acceptanceTimeRange;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/AnimationSettlementServiceImpl.java
New file
@@ -0,0 +1,507 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import me.zhengjie.modules.project.domain.Project;
import me.zhengjie.modules.project.domain.ProjectType;
import me.zhengjie.modules.project.repository.AnimationSettlementRepository;
import me.zhengjie.modules.project.repository.ProjectRepository;
import me.zhengjie.modules.project.service.AnimationSettlementService;
import me.zhengjie.modules.project.service.dto.AnimationSettlementDto;
import me.zhengjie.modules.project.service.dto.AnimationSettlementQueryCriteria;
import me.zhengjie.modules.project.service.mapstruct.AnimationSettlementMapper;
import me.zhengjie.modules.task.domain.TaskDaliyMongo;
import me.zhengjie.modules.task.domain.TaskMongo;
import me.zhengjie.modules.task.domain.TaskUserMongo;
import me.zhengjie.modules.task.service.dto.TaskMongoDto;
import me.zhengjie.modules.treatment.domain.UserLevelWage;
import me.zhengjie.modules.treatment.repository.UserLevelWageRepository;
import me.zhengjie.utils.*;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.*;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Timestamp;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @website https://eladmin.vip
* @description 服务实现
* @author baolh
* @date 2026-09-28
**/
@Service
@RequiredArgsConstructor
public class AnimationSettlementServiceImpl implements AnimationSettlementService {
    private final AnimationSettlementRepository animationSettlementRepository;
    private final UserLevelWageRepository userLevelWageRepository;
    private final ProjectRepository projectRepository;
    private final MongoTemplate mongoTemplate;
    private final AnimationSettlementMapper animationSettlementMapper;
    @Autowired
    private EntityManager entityManager;
    @Override
    public Map<String,Object> queryAll(AnimationSettlementQueryCriteria criteria, Pageable pageable){
        Page<AnimationSettlement> page = animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
        return PageUtil.toPage(page.map(animationSettlementMapper::toDto));
    }
    @Override
    public List<AnimationSettlementDto> queryAll(AnimationSettlementQueryCriteria criteria){
        return animationSettlementMapper.toDto(animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
    }
    @Override
    @Transactional
    public AnimationSettlementDto findById(Long id) {
        AnimationSettlement animationSettlement = animationSettlementRepository.findById(id).orElseGet(AnimationSettlement::new);
        ValidationUtil.isNull(animationSettlement.getId(),"AnimationSettlement","id",id);
        return animationSettlementMapper.toDto(animationSettlement);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public AnimationSettlementDto create(AnimationSettlement resources) {
        return animationSettlementMapper.toDto(animationSettlementRepository.save(resources));
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void update(AnimationSettlement resources) {
        AnimationSettlement animationSettlement = animationSettlementRepository.findById(resources.getId()).orElseGet(AnimationSettlement::new);
        ValidationUtil.isNull( animationSettlement.getId(),"AnimationSettlement","id",resources.getId());
        animationSettlement.copy(resources);
        animationSettlementRepository.save(animationSettlement);
    }
    @Override
    public void deleteAll(Long[] ids) {
        for (Long id : ids) {
            animationSettlementRepository.deleteById(id);
        }
    }
    @Override
    public void download(List<AnimationSettlementDto> all, HttpServletResponse response) throws IOException {
        List<Map<String, Object>> list = new ArrayList<>();
        for (AnimationSettlementDto animationSettlement : all) {
            Map<String,Object> map = new LinkedHashMap<>();
            map.put("用户ID", animationSettlement.getUserId());
            map.put("项目ID", animationSettlement.getProjectId());
            map.put("任务详情ID", animationSettlement.getTaskId());
            map.put("任务分配ID", animationSettlement.getTaskUserId());
            map.put("验收时间", animationSettlement.getAcceptanceTime());
            map.put("秒数", animationSettlement.getTaskSeconds());
            map.put("消耗积分", animationSettlement.getPointsConsumed());
            map.put("问题数量", animationSettlement.getIssueCount());
            map.put("驳回数量", animationSettlement.getRejectCount());
            map.put("结算状态", animationSettlement.getSettlementStatus());
            map.put("创建者", animationSettlement.getCreateBy());
            map.put("创建时间", animationSettlement.getCreateTime());
            list.add(map);
        }
        FileUtil.downloadExcel(list, response);
    }
    @Override
    public void generateByTaskUser(TaskUserMongo taskUserMongo, List<ProjectType> projectTypeList) {
        // 漫剧结算计费
        if (projectTypeList.size() > 0 && ObjectUtils.isNotEmpty(taskUserMongo.getTask().getProjectId())) {
            // 查询项目信息
            Project project = projectRepository.findById(taskUserMongo.getTask().getProjectId()).orElseGet(Project::new);
            if (StringUtils.isNotBlank(project.getProjectDistinguish()) && Constant.PROJECT_DISTINGUISH_VISION.equals(project.getProjectDistinguish()) && projectTypeList.stream().map(ProjectType::getId).collect(Collectors.toList()).contains(project.getProjectTypeId())) {
                List<TaskDaliyMongo> taskDaliyMongoList = mongoTemplate.find(Query.query(new Criteria("taskUserMongo._id").is(taskUserMongo.getId())).with(Sort.by(Sort.Order.desc("fillDate"))), TaskDaliyMongo.class);
                TaskDaliyMongo taskDaliyMongo = taskDaliyMongoList.stream().findFirst().orElseGet(TaskDaliyMongo::new);
                // 查询漫剧结算记录
                AnimationSettlementQueryCriteria animationSettlementQueryCriteria = new AnimationSettlementQueryCriteria();
                animationSettlementQueryCriteria.setTaskUserId(taskUserMongo.getId());
                AnimationSettlement animationSettlement = animationSettlementRepository.findOne((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,animationSettlementQueryCriteria,criteriaBuilder)).orElseGet(AnimationSettlement::new);
                // 填充数据
                animationSettlement.setUserId(taskUserMongo.getUserId());
                animationSettlement.setProjectId(taskUserMongo.getTask().getProjectId());
                animationSettlement.setTaskId(taskUserMongo.getTask().getId());
                animationSettlement.setTaskUserId(taskUserMongo.getId());
                animationSettlement.setTaskSeconds(Optional.ofNullable(taskDaliyMongo.getTaskSeconds()).orElse(0));
                animationSettlement.setPointsConsumed(Optional.ofNullable(taskDaliyMongo.getPointsConsumed()).orElse(0));
                animationSettlement.setIssueCount(Optional.ofNullable(taskDaliyMongo.getIssueCount()).orElse(0));
                animationSettlement.setRejectCount(Optional.ofNullable(taskUserMongo.getRejectCount()).orElse(0));
                animationSettlement.setSettlementStatus(Constant.ANIME_SETTLEMENT_STATUS_UNSETTLED);
                animationSettlement.setTaskType(Optional.ofNullable(taskUserMongo.getRid()).map(rid -> Constant.ANIME_TASK_TYPE_REVIEW).orElse(Constant.ANIME_TASK_TYPE_NORMAL));
                animationSettlement.setCostHours(taskDaliyMongoList.stream().map(tdm -> BigDecimal.valueOf(tdm.getConsumedHours())).reduce(BigDecimal.ZERO, BigDecimal::add));
                // 保存数据
                animationSettlementRepository.save(animationSettlement);
            }
        }
    }
    @Override
    public Map<String,Object> queryPersonalAll(AnimationSettlementQueryCriteria criteria, Pageable pageable) {
        Long currentUserId = Optional.ofNullable(criteria.getUserId()).orElse(SecurityUtils.getCurrentUserId());
        UserLevelWage userLevelWage = userLevelWageRepository.findUserLevelWageByUserId(currentUserId).stream().findFirst().orElseGet(UserLevelWage::new);
        Page<Timestamp> page = this.queryPersonalAcceptanceTime(criteria, pageable);
        Function<Timestamp, AnimationSettlementDto> personalFunc = new Function<Timestamp, AnimationSettlementDto>() {
            @Override
            public AnimationSettlementDto apply(Timestamp time) {
                AnimationSettlementDto settlementDto = new AnimationSettlementDto();
                settlementDto.setAcceptanceTime(time);
                settlementDto.setUserId(currentUserId);
                // 查询漫剧结算计费
                AnimationSettlementQueryCriteria queryCriteria = new AnimationSettlementQueryCriteria();
                queryCriteria.setUserId(currentUserId);
                queryCriteria.setAcceptanceTime(time);
                List<AnimationSettlement> settlementList = animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, queryCriteria, criteriaBuilder));
                // 计算参数
                BigDecimal monthlyProduceMinutes = Optional.ofNullable(userLevelWage.getMonthlyProduceMinutes()).orElse(Constant.ANIME_MONTHLY_PRODUCE_MINUTE);
                BigDecimal monthlyReviewMinutes = Optional.ofNullable(userLevelWage.getMonthlyReviewMinutes()).orElse(Constant.ANIME_MONTHLY_REVIEW_MINUTE);
                BigDecimal normalTaskSeconds = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getTaskSeconds())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal normalCostHours = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(AnimationSettlement::getCostHours).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal normalPointsConsumed = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getPointsConsumed())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal normalRejectCount = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getRejectCount())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal reviewTaskSeconds = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_REVIEW.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getTaskSeconds())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal reviewCostHours = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_REVIEW.equals(s.getTaskType())).map(AnimationSettlement::getCostHours).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal reviewIssueCount = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_REVIEW.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getIssueCount())).reduce(BigDecimal.ZERO, BigDecimal::add);
                // 计算
                BigDecimal produceCommission = calcProduceCommission(normalTaskSeconds, normalCostHours, monthlyProduceMinutes, normalPointsConsumed, settlementDto);
                BigDecimal produceDeduction = calcProduceDeduction(normalTaskSeconds, reviewIssueCount, normalRejectCount);
                BigDecimal reviewCommission = calcReviewCommission(reviewTaskSeconds, reviewCostHours, monthlyReviewMinutes, reviewIssueCount, normalRejectCount);
                BigDecimal reviewDeduction = calcReviewDeduction(reviewTaskSeconds, normalRejectCount);
                // 填充数据
                settlementDto.setProduceCommission(produceCommission);
                settlementDto.setProduceDeduction(produceDeduction);
                settlementDto.setReviewCommission(reviewCommission);
                settlementDto.setReviewDeduction(reviewDeduction);
                return settlementDto;
            }
        };
        return PageUtil.toPage(page.map(personalFunc));
    }
    @Override
    public Map<String,Object> queryAnimeAll(AnimationSettlementQueryCriteria criteria, Pageable pageable) {
        Page<String> page = this.queryAnimeTaskId(criteria, pageable);
        Function<String, TaskMongoDto> animeFunc = new Function<String, TaskMongoDto>() {
            @Override
            public TaskMongoDto apply(String taskId) {
                TaskMongo taskMongo = mongoTemplate.findById(taskId, TaskMongo.class);
                // 转换类型
                TaskMongoDto taskMongoDto = new TaskMongoDto();
                taskMongoDto.setId(taskMongo.getId());
                taskMongoDto.setName(taskMongo.getName());
                taskMongoDto.setOld_id(taskMongo.getOld_id());
                taskMongoDto.setProjectId(taskMongo.getProjectId());
                taskMongoDto.setPerformanceType(taskMongo.getPerformanceType());
                taskMongoDto.setPlanStartTime(taskMongo.getPlanStartTime());
                taskMongoDto.setPlanEndTime(taskMongo.getPlanEndTime());
                taskMongoDto.setPlanHours(taskMongo.getPlanHours());
                taskMongoDto.setTaskStatus(taskMongo.getTaskStatus());
                taskMongoDto.setDescription(taskMongo.getDescription());
                taskMongoDto.setUserIdList(taskMongo.getUserIdList());
                taskMongoDto.setContainUserList(taskMongo.getContainUserList());
                taskMongoDto.setTagList(taskMongo.getTagList());
                taskMongoDto.setVersion(taskMongo.getVersion());
                if (taskMongo.getPlanWorkload() != null) {
                    taskMongoDto.setPlanWorkload(taskMongo.getPlanWorkload());
                }
                if (taskMongo.getPlanWorkloadUnit() != null) {
                    taskMongoDto.setPlanWorkloadUnit(taskMongo.getPlanWorkloadUnit());
                }
                taskMongoDto.setConsumedHours(0.0D);
                // 项目信息
                Project project = projectRepository.findById(taskMongo.getProjectId()).orElseGet(Project::new);
                taskMongoDto.setProjectName(project.getName());
                // 查询漫剧结算信息
                AnimationSettlementQueryCriteria queryCriteria = new AnimationSettlementQueryCriteria();
                queryCriteria.setTaskId(taskId);
                List<AnimationSettlement> animationSettlementList = animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, queryCriteria, criteriaBuilder));
                taskMongoDto.setAcceptanceTime(animationSettlementList.stream().findFirst().map(AnimationSettlement::getAcceptanceTime).orElse(null));
                taskMongoDto.setSettlementStatus(animationSettlementList.stream().findFirst().map(AnimationSettlement::getSettlementStatus).orElse(Constant.ANIME_SETTLEMENT_STATUS_UNSETTLED));
                return taskMongoDto;
            }
        };
        return PageUtil.toPage(page.map(animeFunc));
    }
    @Override
    public List<AnimationSettlementDto> queryPersonalAll(AnimationSettlementQueryCriteria criteria) {
        Long currentUserId = Optional.ofNullable(criteria.getUserId()).orElse(SecurityUtils.getCurrentUserId());
        UserLevelWage userLevelWage = userLevelWageRepository.findUserLevelWageByUserId(currentUserId).stream().findFirst().orElseGet(UserLevelWage::new);
        // 不分页
        Pageable pageable = Pageable.unpaged();
        Page<Timestamp> page = this.queryPersonalAcceptanceTime(criteria, pageable);
        Function<Timestamp, AnimationSettlementDto> personalFunc = new Function<Timestamp, AnimationSettlementDto>() {
            @Override
            public AnimationSettlementDto apply(Timestamp time) {
                AnimationSettlementDto settlementDto = new AnimationSettlementDto();
                settlementDto.setAcceptanceTime(time);
                settlementDto.setUserId(currentUserId);
                // 查询漫剧结算计费
                AnimationSettlementQueryCriteria queryCriteria = new AnimationSettlementQueryCriteria();
                queryCriteria.setUserId(currentUserId);
                queryCriteria.setAcceptanceTime(time);
                List<AnimationSettlement> settlementList = animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, queryCriteria, criteriaBuilder));
                // 计算参数
                BigDecimal monthlyProduceMinutes = Optional.ofNullable(userLevelWage.getMonthlyProduceMinutes()).orElse(Constant.ANIME_MONTHLY_PRODUCE_MINUTE);
                BigDecimal monthlyReviewMinutes = Optional.ofNullable(userLevelWage.getMonthlyReviewMinutes()).orElse(Constant.ANIME_MONTHLY_REVIEW_MINUTE);
                BigDecimal normalTaskSeconds = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getTaskSeconds())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal normalCostHours = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(AnimationSettlement::getCostHours).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal normalPointsConsumed = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getPointsConsumed())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal normalRejectCount = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_NORMAL.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getRejectCount())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal reviewTaskSeconds = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_REVIEW.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getTaskSeconds())).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal reviewCostHours = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_REVIEW.equals(s.getTaskType())).map(AnimationSettlement::getCostHours).reduce(BigDecimal.ZERO, BigDecimal::add);
                BigDecimal reviewIssueCount = settlementList.stream().filter(s -> Constant.ANIME_TASK_TYPE_REVIEW.equals(s.getTaskType())).map(s -> BigDecimal.valueOf(s.getIssueCount())).reduce(BigDecimal.ZERO, BigDecimal::add);
                // 计算
                BigDecimal produceCommission = calcProduceCommission(normalTaskSeconds, normalCostHours, monthlyProduceMinutes, normalPointsConsumed, settlementDto);
                BigDecimal produceDeduction = calcProduceDeduction(normalTaskSeconds, reviewIssueCount, normalRejectCount);
                BigDecimal reviewCommission = calcReviewCommission(reviewTaskSeconds, reviewCostHours, monthlyReviewMinutes, reviewIssueCount, normalRejectCount);
                BigDecimal reviewDeduction = calcReviewDeduction(reviewTaskSeconds, normalRejectCount);
                // 填充数据
                settlementDto.setProduceCommission(produceCommission);
                settlementDto.setProduceDeduction(produceDeduction);
                settlementDto.setReviewCommission(reviewCommission);
                settlementDto.setReviewDeduction(reviewDeduction);
                return settlementDto;
            }
        };
        return page.map(personalFunc).getContent();
    }
    private static final Map<Double, BigDecimal> coefficientUnitPriceMap = new LinkedHashMap() {{
        put(0.0, BigDecimal.valueOf(20));
        put(1.3, BigDecimal.valueOf(19));
        put(1.4, BigDecimal.valueOf(18));
        put(1.5, BigDecimal.valueOf(15));
        put(1.6, BigDecimal.ZERO);
    }};
    private static final BigDecimal BUG_LIMIT_MINUTE = BigDecimal.valueOf(2);
    private static final BigDecimal PRICE_SINGLE_BUG = BigDecimal.valueOf(3);
    private static final BigDecimal PRICE_SINGLE_REVIEW = BigDecimal.valueOf(5);
    private static final BigDecimal MONTHLY_STANDARD_HOUR = BigDecimal.valueOf(160);
    private static final BigDecimal MINUTE_STANDARD_POINT = BigDecimal.valueOf(60);
    /**
     * 计算制作提成
     * @param taskSeconds / 任务秒数
     * @param totalProduceHours / 月度总制作小时数
     * @param monthlyProduceMinutes / 月度标准制作分钟数
     * @param totalPoints / 消耗总积分
     * @return
     */
    private BigDecimal calcProduceCommission(BigDecimal taskSeconds, BigDecimal totalProduceHours, BigDecimal monthlyProduceMinutes, BigDecimal totalPoints, AnimationSettlementDto animationSettlement) {
        // 工时
        BigDecimal taskMinutes = taskSeconds.divide(BigDecimal.valueOf(60), 2, RoundingMode.HALF_UP);
        BigDecimal monthlyProduceRatio = totalProduceHours.divide(MONTHLY_STANDARD_HOUR);
        BigDecimal excessProduceMinutes = taskMinutes.subtract(monthlyProduceMinutes.multiply(monthlyProduceRatio)).max(BigDecimal.ZERO);
        // 单价
        BigDecimal gachaCoefficient = taskMinutes.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : totalPoints.divide(taskMinutes).divide(MINUTE_STANDARD_POINT);
        BigDecimal commissionUnitPrice = coefficientUnitPriceMap.entrySet().stream().filter(e -> gachaCoefficient.doubleValue() > e.getKey()).reduce((first, second) -> second).map(Map.Entry::getValue).orElse(BigDecimal.ZERO);
        // 保存额外信息
        if (animationSettlement != null) {
            animationSettlement.setGachaCoefficient(gachaCoefficient);
            animationSettlement.setCommissionPrice(commissionUnitPrice);
            animationSettlement.setExcessProduceMinutes(excessProduceMinutes);
        }
        return excessProduceMinutes.multiply(commissionUnitPrice);
    }
    /**
     * 计算制作扣除
     * @param taskSeconds / 任务秒数
     * @param issueCount / 问题数量
     * @param rejectCount / 驳回数量
     * @return
     */
    private BigDecimal calcProduceDeduction(BigDecimal taskSeconds, BigDecimal issueCount, BigDecimal rejectCount) {
        // 工时
        BigDecimal taskMinutes = taskSeconds.divide(BigDecimal.valueOf(60), 0, RoundingMode.HALF_UP);
        BigDecimal excessBugDetected = issueCount.subtract(rejectCount).subtract(taskMinutes.multiply(BUG_LIMIT_MINUTE)).max(BigDecimal.ZERO);
        return excessBugDetected.multiply(PRICE_SINGLE_BUG);
    }
    /**
     * 计算审核提成
     * @param taskSeconds / 任务秒数
     * @param totalReviewHours / 月度总审核小时数
     * @param monthlyReviewMinutes / 月度标准审核分钟数
     * @param issueCount / 问题数量
     * @param rejectCount / 驳回数量
     * @return
     */
    private BigDecimal calcReviewCommission(BigDecimal taskSeconds, BigDecimal totalReviewHours, BigDecimal monthlyReviewMinutes, BigDecimal issueCount, BigDecimal rejectCount) {
        // 审核工时
        BigDecimal taskMinutes = taskSeconds.divide(BigDecimal.valueOf(60), 2, RoundingMode.HALF_UP);
        BigDecimal monthlyReviewRatio = totalReviewHours.divide(MONTHLY_STANDARD_HOUR);
        BigDecimal excessReviewMinutes = taskMinutes.subtract(monthlyReviewMinutes.multiply(monthlyReviewRatio)).max(BigDecimal.ZERO);
        // 超额BUG提成
        BigDecimal produceDeduction = calcProduceDeduction(taskSeconds, issueCount, rejectCount);
        return excessReviewMinutes.multiply(PRICE_SINGLE_REVIEW).add(produceDeduction);
    }
    /**
     * 计算审核扣除
     * @param taskSeconds / 任务秒数
     * @param rejectCount / 任务秒数
     * @return
     */
    private BigDecimal calcReviewDeduction(BigDecimal taskSeconds, BigDecimal rejectCount) {
        BigDecimal taskMinutes = taskSeconds.divide(BigDecimal.valueOf(60), 0, RoundingMode.HALF_UP);
        BigDecimal deductionCount = rejectCount.subtract(taskMinutes.multiply(BUG_LIMIT_MINUTE)).max(BigDecimal.ZERO);
        return deductionCount.multiply(PRICE_SINGLE_BUG);
    }
    /**
     * 获取个人提成月份
     * @param criteria / 限制条件
     * @param pageable / 分页参数
     * @return
     */
    private Page<Timestamp> queryPersonalAcceptanceTime(AnimationSettlementQueryCriteria criteria, Pageable pageable) {
        CriteriaBuilder cb = entityManager.getCriteriaBuilder();
        CriteriaQuery<Timestamp> query = cb.createQuery(Timestamp.class);
        Root<AnimationSettlement> root = query.from(AnimationSettlement.class);
        // 构建检索条件
        List<Predicate> predicates = new ArrayList<>();
        predicates.add(cb.equal(root.get("userId"), Optional.ofNullable(criteria.getUserId()).orElse(SecurityUtils.getCurrentUserId())));
        predicates.add(cb.equal(root.get("settlementStatus"), Constant.ANIME_SETTLEMENT_STATUS_SETTLED));
        if (ObjectUtils.isNotEmpty(criteria.getAcceptanceTime())) {
            predicates.add(cb.equal(root.get("acceptanceTime"), criteria.getAcceptanceTime()));
        }
        if (CollectionUtil.isNotEmpty(criteria.getAcceptanceTimeRange())) {
            predicates.add(cb.between(root.get("acceptanceTime"), criteria.getAcceptanceTimeRange().get(0), criteria.getAcceptanceTimeRange().get(1)));
        }
        query.where(cb.and(predicates.toArray(new Predicate[0])));
        // 构建结果项
        query.select(root.get("acceptanceTime").as(Timestamp.class));
        // 构建分组
        query.groupBy(root.get("acceptanceTime"));
        // 构建分页
        TypedQuery<Timestamp> typedQuery = entityManager.createQuery(query);
        if (pageable.isPaged()) {
            typedQuery.setFirstResult(pageable.getPageNumber() * pageable.getPageSize());
            typedQuery.setMaxResults(pageable.getPageSize());
        }
        List<Timestamp> content = typedQuery.getResultList();
        // 构建Count查询
        CriteriaQuery<Long> countQuery = cb.createQuery(Long.class);
        Root<AnimationSettlement> countRoot = countQuery.from(AnimationSettlement.class);
        countQuery.where(cb.and(predicates.toArray(new Predicate[0])));
        countQuery.select(cb.countDistinct(countRoot.get("acceptanceTime")));
        Long total = entityManager.createQuery(countQuery).getSingleResult();
        return new PageImpl<>(content, pageable, total);
    }
    /**
     * 获取漫剧任务ID
     * @param criteria / 限制条件
     * @param pageable / 分页参数
     * @return
     */
    private Page<String> queryAnimeTaskId(AnimationSettlementQueryCriteria criteria, Pageable pageable) {
        CriteriaBuilder cb = entityManager.getCriteriaBuilder();
        CriteriaQuery<String> query = cb.createQuery(String.class);
        Root<AnimationSettlement> root = query.from(AnimationSettlement.class);
        // 构建检索条件
        List<Predicate> predicates = new ArrayList<>();
        if (StringUtils.isNotBlank(criteria.getTaskId())) {
            predicates.add(cb.like(root.get("taskId"), criteria.getTaskId()));
        }
        if (ObjectUtils.isNotEmpty(criteria.getAcceptanceTime())) {
            predicates.add(cb.equal(root.get("acceptanceTime"), criteria.getAcceptanceTime()));
        }
        if (CollectionUtil.isNotEmpty(criteria.getTaskIds())) {
            predicates.add(root.get("taskId").in(criteria.getTaskIds()));
        }
        if (CollectionUtil.isNotEmpty(criteria.getAcceptanceTimeRange())) {
            predicates.add(cb.between(root.get("acceptanceTime"), criteria.getAcceptanceTimeRange().get(0), criteria.getAcceptanceTimeRange().get(1)));
        }
        query.where(cb.and(predicates.toArray(new Predicate[0])));
        // 构建结果项
        query.select(root.get("taskId"));
        // 构建分组
        query.groupBy(root.get("taskId"));
        // 构建分页
        TypedQuery<String> typedQuery = entityManager.createQuery(query);
        if (pageable.isPaged()) {
            typedQuery.setFirstResult(pageable.getPageNumber() * pageable.getPageSize());
            typedQuery.setMaxResults(pageable.getPageSize());
        }
        List<String> content = typedQuery.getResultList();
        // 构建Count查询
        CriteriaQuery<Long> countQuery = cb.createQuery(Long.class);
        Root<AnimationSettlement> countRoot = countQuery.from(AnimationSettlement.class);
        countQuery.where(cb.and(predicates.toArray(new Predicate[0])));
        countQuery.select(cb.countDistinct(countRoot.get("taskId")));
        Long total = entityManager.createQuery(countQuery).getSingleResult();
        return new PageImpl<>(content, pageable, total);
    }
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/mapstruct/AnimationSettlementMapper.java
New file
@@ -0,0 +1,32 @@
/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.project.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import me.zhengjie.modules.project.service.dto.AnimationSettlementDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @website https://eladmin.vip
* @author baolh
* @date 2026-09-28
**/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface AnimationSettlementMapper extends BaseMapper<AnimationSettlementDto, AnimationSettlement> {
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/salary/service/impl/NewSalaryServiceImpl.java
@@ -23,7 +23,10 @@
import me.zhengjie.modules.attendance.service.AttendanceService;
import me.zhengjie.modules.attendance.service.dto.*;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.service.AnimationSettlementService;
import me.zhengjie.modules.project.service.ProjectPerformanceDetailService;
import me.zhengjie.modules.project.service.dto.AnimationSettlementDto;
import me.zhengjie.modules.project.service.dto.AnimationSettlementQueryCriteria;
import me.zhengjie.modules.project.service.dto.ProjectPerformanceDetailQueryCriteria;
import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl;
import me.zhengjie.modules.salary.domain.NewSalary;
@@ -105,6 +108,7 @@
    private final TaskDaliyService taskDaliyService;
    private final SysConfigIndividualIncomeTaxService sysConfigIndividualIncomeTaxService;
    private final ProjectPerformanceDetailService projectPerformanceDetailService;
    private final AnimationSettlementService animationSettlementService;
    // ==================== 以上为定时生成工资记录主要依赖 ====================
    private final MeritWageRepository meritWageRepository;
    private final MeritLevelRepository meritLevelRepository;
@@ -535,11 +539,14 @@
            // 平日加班费(含3倍工资)
            newSalary = getNormalOverTimeWage(userId, targetYearMonth, newSalary);
            // 结算漫剧结算工资
            newSalary = getUserAnimationSettlement(userId, salaryYearMonth, newSalary);
            // 获取出勤小时数
            newSalary = getAttendanceHours(userId, targetYearMonth, newSalary);
//            // 获取已完成工时
//            newSalary = getCompletedWork(userId, targetYearMonth, newSalary);
            // 获取用户级别保险
            // 获取用户级别保险 TODO:税前工资金额请在本步骤之前执行完成
            newSalary = getUserLevelInsurance(userId, targetYearMonth, newSalary);
        } catch (Exception e) {
            errors.add(String.format("%s【注:用户ID--- %d】", e.getMessage(), userId));
@@ -1040,5 +1047,19 @@
            }
        }
    }
    // 结算漫剧结算工资
    private NewSalary getUserAnimationSettlement(Long userId, Timestamp targetYearMonth, NewSalary newSalary) {
        AnimationSettlementQueryCriteria animationSettlementQueryCriteria = new AnimationSettlementQueryCriteria();
        animationSettlementQueryCriteria.setUserId(userId);
        animationSettlementQueryCriteria.setSettlementStatus(Constant.ANIME_SETTLEMENT_STATUS_SETTLED);
        animationSettlementQueryCriteria.setAcceptanceTime(targetYearMonth);
        List<AnimationSettlementDto> animationSettlementList = animationSettlementService.queryPersonalAll(animationSettlementQueryCriteria);
        BigDecimal pieceRate = animationSettlementList.stream().map(asd -> asd.getProduceCommission().subtract(asd.getProduceDeduction()).add(asd.getReviewCommission()).subtract(asd.getReviewDeduction())).reduce(BigDecimal.ZERO, BigDecimal::add).max(BigDecimal.ZERO);
        newSalary.setPieceRate(newSalary.getPieceRate().add(pieceRate));
        newSalary.setPreTaxAmount(newSalary.getPreTaxAmount().add(newSalary.getPieceRate()));
        return newSalary;
    }
    // ==================== 以上为定时生成工资记录主要逻辑 ====================
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java
@@ -109,9 +109,8 @@
    @ApiModelProperty(value = "排班")
    private SysRostering sysRostering;
    @NotBlank
    @JoinColumn(name = "level_id")
    @ApiModelProperty(value = "级别ID")
    @Transient
    @ApiModelProperty(value = "级别ID(20261103废弃使用,后续仅传值使用)")
    private Long levelId;
    @ApiModelProperty(value = "用户性别")
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/SysUserLevelOtherRepository.java
@@ -73,7 +73,6 @@
     * 查询级别其他(新)
     * @param userId
     * @param targetDate
     * @param nextYear
     * @return
     */
    @Query(value = "SELECT * FROM sys_user_level_other WHERE user_id = ?1 AND `year_month` <= ?2 ORDER BY `year_month` DESC LIMIT 1", nativeQuery = true)
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/SysUserLevelOtherQueryCriteria.java
@@ -16,7 +16,6 @@
package me.zhengjie.modules.system.service.dto;
import lombok.Data;
import java.util.List;
import me.zhengjie.annotation.Query;
/**
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserDto.java
@@ -62,8 +62,6 @@
    private SysRosteringDto sysRostering;
    private Long levelId;
    private String levelName;
    private String gender;
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserQueryCriteria.java
@@ -62,9 +62,6 @@
    @Query(type = Query.Type.NOT_NULL, propName = "weComId")
    private Boolean weComIdNotNull;
    @Query(propName = "levelId", type = Query.Type.IN)
    private List<Long> levelIds;
    @Query
    private Boolean loginEnabled;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
@@ -581,8 +581,8 @@
        if (!resources.getLoginEnabled()) {
            onlineUserService.kickOutForUsername(resources.getUsername());
        }
        // 临时旧用户级别ID
        Long tempOldLevelId = user.getLevelId();
        // 填充数据
        user.setUsername(resources.getUsername());
        user.setEmail(resources.getEmail());
        user.setEnabled(resources.getEnabled());
@@ -601,15 +601,9 @@
        user.setDingding(resources.getDingding());
        user.setWeComId(resources.getWeComId());
        user.setSysRostering(resources.getSysRostering());
        user.setLevelId(resources.getLevelId());
        // 临时新用户级别ID
        Long tempNewLevelId = user.getLevelId();
        // 处理数据
        redisUtils.del("user::AllUser");
        userRepository.save(user);
        // 判断用户级别变更(新)
        if (tempOldLevelId != null && tempNewLevelId != null && tempOldLevelId != tempNewLevelId) {
            checkUserLevelNew(user);
        }
        // 清除缓存
        delCaches(user.getId(), user.getUsername());
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskDaliy.java
@@ -97,6 +97,18 @@
    @ApiModelProperty(value = "备注")
    private String remarks;
    @Column(name = "`task_seconds`")
    @ApiModelProperty(value = "秒数(任务耗时)")
    private Integer taskSeconds;
    @Column(name = "`points_consumed`")
    @ApiModelProperty(value = "消耗积分")
    private Integer pointsConsumed;
    @Column(name = "`issue_count`")
    @ApiModelProperty(value = "问题数量")
    private Integer issueCount;
    public void copy(TaskDaliy source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskDaliyMongo.java
@@ -78,4 +78,13 @@
    @ApiModelProperty(value = "备注")
    private String remarks;
    @ApiModelProperty(value = "秒数(任务耗时)")
    private Integer taskSeconds;
    @ApiModelProperty(value = "消耗积分")
    private Integer pointsConsumed;
    @ApiModelProperty(value = "问题数量")
    private Integer issueCount;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskUser.java
@@ -102,6 +102,10 @@
    @ApiModelProperty(value = "有效FLG")
    private Boolean enable;
    @Column(name = "`reject_count`")
    @ApiModelProperty(value = "驳回数量")
    private Integer rejectCount;
    public void copy(TaskUser source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/domain/TaskUserMongo.java
@@ -88,4 +88,7 @@
    @ApiModelProperty(value = "复核ID,复核任务使用")
    private String rid;
    @ApiModelProperty(value = "驳回数量")
    private Integer rejectCount;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/rest/TaskUserController.java
@@ -129,21 +129,21 @@
    @GetMapping("/getAdventTasks")
    @Log("用户自己认领任务")
    @Log("快捷日报")
    @ApiOperation("快捷日报")
    public ResponseEntity<Object> getAdventTasks(){
        return new ResponseEntity<>(taskUserService.getAdventTasks(),HttpStatus.OK);
    }
    @GetMapping("/getOngoingTasks")
    @Log("用户自己认领任务")
    @Log("进行中的任务")
    @ApiOperation("进行中的任务")
    public ResponseEntity<Object> getOngoingTasks(){
        return new ResponseEntity<>(taskUserService.getOngoingTasks(),HttpStatus.OK);
    }
    @GetMapping("/getTaskNotStarted")
    @Log("用户自己认领任务")
    @Log("未开始的任务")
    @ApiOperation("未开始的任务")
    public ResponseEntity<Object> getTaskNotStarted(){
        return new ResponseEntity<>(taskUserService.getTaskNotStarted(),HttpStatus.OK);
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyDto.java
@@ -83,4 +83,13 @@
    /** 用户的分配的任务 **/
    private TaskUserMongo taskUserMongo;
    /** 秒数(任务耗时) **/
    private Integer taskSeconds;
    /** 消耗积分 **/
    private Integer pointsConsumed;
    /** 问题数量 **/
    private Integer issueCount;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskDaliyMongoDto.java
@@ -75,6 +75,15 @@
    private String taskName;
    private String taskId;
    @ApiModelProperty(value = "秒数(任务耗时)")
    private Integer taskSeconds;
    @ApiModelProperty(value = "消耗积分")
    private Integer pointsConsumed;
    @ApiModelProperty(value = "问题数量")
    private Integer issueCount;
    /* ----------------额外统计---------------- */
    // 累计工时
    private Double accumulateHours;
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskMongoDto.java
@@ -16,6 +16,7 @@
package me.zhengjie.modules.task.service.dto;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -97,4 +98,9 @@
    @ApiModelProperty(value = "权限分级")
    private boolean flag;
    /** 漫剧结算时间 */
    private Timestamp acceptanceTime;
    /** 漫剧结算状态 */
    private String settlementStatus;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskUserDto.java
@@ -96,4 +96,7 @@
    /** 多用户ID */
    private List<Long> userIds;
    /** 驳回数量 */
    private Integer rejectCount;
}
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/dto/TaskUserMongoDto.java
@@ -103,6 +103,9 @@
    /** 复核ID,复核任务使用 */
    private String rid;
    /** 驳回数量 */
    private Integer rejectCount;
    /** 复核任务名称,复核任务使用 */
    private String rname;
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskDaliyServiceImpl.java
@@ -15,30 +15,35 @@
 */
package me.zhengjie.modules.task.service.impl;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import cn.hutool.core.date.DateTime;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.domain.Project;
import me.zhengjie.modules.project.repository.ProjectRepository;
import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.modules.task.domain.*;
import me.zhengjie.modules.task.repository.TaskDaliyRepository;
import me.zhengjie.modules.task.repository.TaskUserRepository;
import me.zhengjie.modules.task.service.TaskDaliyService;
import me.zhengjie.modules.task.service.dto.TaskDaliyDto;
import me.zhengjie.modules.task.service.dto.TaskDaliyMongoDto;
import me.zhengjie.modules.task.service.dto.TaskDaliyQueryCriteria;
import me.zhengjie.modules.task.service.mapstruct.TaskDaliyMapper;
import me.zhengjie.utils.*;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.aggregation.Aggregation;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;
@@ -47,22 +52,15 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.repository.ProjectRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.task.repository.TaskDaliyRepository;
import me.zhengjie.modules.task.repository.TaskUserRepository;
import me.zhengjie.modules.task.service.TaskDaliyService;
import me.zhengjie.modules.task.service.dto.TaskDaliyDto;
import me.zhengjie.modules.task.service.dto.TaskDaliyQueryCriteria;
import me.zhengjie.modules.task.service.mapstruct.TaskDaliyMapper;
import org.springframework.data.domain.Sort;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
 * @author 赵士淞
@@ -170,6 +168,9 @@
            dto.setSettlementStatus(taskDaliyMongo.getSettlementStatus());
            dto.setRemarks(taskDaliyMongo.getRemarks());
            dto.setTaskUserMongo(taskDaliyMongo.getTaskUserMongo());
            dto.setTaskSeconds(taskDaliyMongo.getTaskSeconds());
            dto.setPointsConsumed(taskDaliyMongo.getPointsConsumed());
            dto.setIssueCount(taskDaliyMongo.getIssueCount());
            return dto;
        }).sorted(Comparator.comparing(TaskDaliyMongoDto::getProjectId)).collect(Collectors.toList());
    }
@@ -226,6 +227,9 @@
            dto.setSettlementStatus(taskDaliyMongo.getSettlementStatus());
            dto.setRemarks(taskDaliyMongo.getRemarks());
            dto.setTaskUserMongo(taskDaliyMongo.getTaskUserMongo());
            dto.setTaskSeconds(taskDaliyMongo.getTaskSeconds());
            dto.setPointsConsumed(taskDaliyMongo.getPointsConsumed());
            dto.setIssueCount(taskDaliyMongo.getIssueCount());
            resultList.add(dto);
        }
        return PageUtil.toPage(resultList, count);
@@ -288,6 +292,9 @@
            dto.setSettlementStatus(taskDaliyMongo.getSettlementStatus());
            dto.setRemarks(taskDaliyMongo.getRemarks());
            dto.setTaskUserMongo(taskDaliyMongo.getTaskUserMongo());
            dto.setTaskSeconds(taskDaliyMongo.getTaskSeconds());
            dto.setPointsConsumed(taskDaliyMongo.getPointsConsumed());
            dto.setIssueCount(taskDaliyMongo.getIssueCount());
            // 统计累计工时:仅支持业务组长
            if (businessLeaderFlag) {
                Aggregation customerAgg = Aggregation.newAggregation(
@@ -353,6 +360,9 @@
            dto.setSettlementStatus(taskDaliyMongo.getSettlementStatus());
            dto.setRemarks(taskDaliyMongo.getRemarks());
            dto.setTaskUserMongo(taskDaliyMongo.getTaskUserMongo());
            dto.setTaskSeconds(taskDaliyMongo.getTaskSeconds());
            dto.setPointsConsumed(taskDaliyMongo.getPointsConsumed());
            dto.setIssueCount(taskDaliyMongo.getIssueCount());
            resultList.add(dto);
        }
        return resultList;
@@ -407,17 +417,17 @@
            TaskUserMongo byId = mongoTemplate.findById(resources.getTaskUserMongo().getId(), TaskUserMongo.class);
            byId.setCostHours(resources.getConsumedHours());
            if (resources.getTaskProgress().equals(100.0)){
                byId.setTaskStatus("task_status_unrecognized");
                byId.setTaskStatus(Constant.TASK_STATUS_UNRECOGNIZED);
            } else {
                byId.setTaskStatus("task_status_in_hand");
                byId.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
            }
            mongoTemplate.save(byId);
            TaskMongo taskMongo = mongoTemplate.findById(byId.getTask().getId(), TaskMongo.class);
            if (resources.getTaskProgress().equals(100.0)){
                taskMongo.setTaskStatus("task_status_unrecognized");
                taskMongo.setTaskStatus(Constant.TASK_STATUS_UNRECOGNIZED);
            } else {
                taskMongo.setTaskStatus("task_status_in_hand");
                taskMongo.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
            }
            mongoTemplate.save(taskMongo);
            return null;
@@ -429,18 +439,18 @@
                //check(resources, taskUserMongoList);
                TaskUserMongo byId = mongoTemplate.findById(resources.getTaskUserMongo().getId(), TaskUserMongo.class);
                if (resources.getTaskProgress().equals(100.0)){
                    byId.setTaskStatus("task_status_unrecognized");
                    byId.setTaskStatus(Constant.TASK_STATUS_UNRECOGNIZED);
                } else {
                    byId.setTaskStatus("task_status_in_hand");
                    byId.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
                }
                byId.setCostHours(byId.getCostHours() + resources.getConsumedHours());
                mongoTemplate.save(byId);
                TaskMongo taskMongo = mongoTemplate.findById(byId.getTask().getId(), TaskMongo.class);
                if (resources.getTaskProgress().equals(100.0)){
                    taskMongo.setTaskStatus("task_status_unrecognized");
                    taskMongo.setTaskStatus(Constant.TASK_STATUS_UNRECOGNIZED);
                } else {
                    taskMongo.setTaskStatus("task_status_in_hand");
                    taskMongo.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
                }
                mongoTemplate.save(taskMongo);
@@ -456,18 +466,18 @@
            TaskUserMongo byId = mongoTemplate.findById(resources.getTaskUserMongo().getId(), TaskUserMongo.class);
            if (resources.getTaskProgress().equals(100.0)){
                byId.setTaskStatus("task_status_unrecognized");
                byId.setTaskStatus(Constant.TASK_STATUS_UNRECOGNIZED);
            } else {
                byId.setTaskStatus("task_status_in_hand");
                byId.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
            }
            byId.setCostHours(byId.getCostHours() - taskDaliyMongo.getConsumedHours() + resources.getConsumedHours());
            mongoTemplate.save(byId);
            TaskMongo taskMongo = mongoTemplate.findById(byId.getTask().getId(), TaskMongo.class);
            if (resources.getTaskProgress().equals(100.0)){
                taskMongo.setTaskStatus("task_status_unrecognized");
                taskMongo.setTaskStatus(Constant.TASK_STATUS_UNRECOGNIZED);
            } else {
                taskMongo.setTaskStatus("task_status_in_hand");
                taskMongo.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
            }
            mongoTemplate.save(taskMongo);
@@ -509,7 +519,7 @@
        mongoTemplate.save(resources);
        TaskUserMongo byId = mongoTemplate.findById(resources.getTaskUserMongo().getId(), TaskUserMongo.class);
        byId.setTaskStatus("task_status_in_hand");
        byId.setTaskStatus(Constant.TASK_STATUS_IN_HAND);
        mongoTemplate.save(byId);
        //更新的是日报~
    }
@@ -731,7 +741,7 @@
        for (TaskDaliyMongo taskDaliyMongo : daliyMongoList) {
            if (!"1".equals(taskDaliyMongo.getTaskUserMongo().getPerformanceType())) {
                completedWork += taskDaliyMongo.getConsumedHours();
            } else if ("task_status_completed".equals(taskDaliyMongo.getTaskUserMongo().getTaskStatus())) {
            } else if (Constant.TASK_STATUS_COMPLETED.equals(taskDaliyMongo.getTaskUserMongo().getTaskStatus())) {
                if (!hasExecuted.contains(taskDaliyMongo.getTaskUserMongo().getId())) {
                    completedWork += taskDaliyMongo.getTaskUserMongo().getPerformanceHours();
                    hasExecuted.add(taskDaliyMongo.getTaskUserMongo().getId());
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskServiceImpl.java
@@ -18,13 +18,18 @@
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import me.zhengjie.modules.project.domain.Project;
import me.zhengjie.modules.project.domain.ProjectType;
import me.zhengjie.modules.project.repository.AnimationSettlementRepository;
import me.zhengjie.modules.project.repository.ProjectRepository;
import me.zhengjie.modules.project.repository.ProjectTypeRepository;
import me.zhengjie.modules.project.service.AnimationSettlementService;
import me.zhengjie.modules.project.service.ProjectService;
import me.zhengjie.modules.project.service.dto.AnimationSettlementQueryCriteria;
import me.zhengjie.modules.project.service.dto.ProjectDto;
import me.zhengjie.modules.project.service.dto.ProjectQueryCriteria;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.RoleService;
@@ -82,10 +87,13 @@
    private final TaskUserRepository taskUserRepository;
    private final TaskDaliyRepository taskDaliyRepository;
    private final UserRepository userRepository;
    private final ProjectTypeRepository projectTypeRepository;
    private final AnimationSettlementRepository animationSettlementRepository;
    private final RoleService roleService;
    private final UserLevelWageRepository userLevelWageRepository;
    @Autowired
    private ProjectService projectService;
    private final AnimationSettlementService animationSettlementService;
    private final MongoTemplate mongoTemplate;
    private final Object lock = new Object();
@@ -265,6 +273,18 @@
            taskMongo.setTaskStatus(Constant.TASK_STATUS_COMPLETED);
            mongoTemplate.save(taskMongo);
        });
        // 漫剧结算计费
        List<ProjectType> projectTypeList = projectTypeRepository.findByName(Constant.ANIME_PROJECT_TYPE_BUDGET);
        if (projectTypeList.size() > 0) {
            List<TaskMongo> settlementTaskMongoList = mongoTemplate.find(Query.query(new Criteria("id").in(ids)), TaskMongo.class);
            settlementTaskMongoList.stream().forEach(settlementTaskMongo -> {
                List<TaskUserMongo> settlementTaskUserMongoList = mongoTemplate.find(Query.query(new Criteria("task").is(settlementTaskMongo)), TaskUserMongo.class);
                settlementTaskUserMongoList.stream().forEach(settlementTaskUserMongo -> {
                    animationSettlementService.generateByTaskUser(settlementTaskUserMongo, projectTypeList);
                });
            });
        }
    }
    @Override
@@ -781,6 +801,7 @@
                    taskUserMongo.setTaskEndDate(taskUser.getTaskEndDate());
                    taskUserMongo.setTaskStatus(taskUser.getTaskStatus());
                    taskUserMongo.setRemarks(taskUser.getRemarks());
                    taskUserMongo.setRejectCount(taskUser.getRejectCount());
                    //List<TaskDaliy> taskDaliyList = taskDaliyRepository.findByProjectIdAndTaskIdAndUserIdOrderByFillDateDesc(taskMongo.getProjectId(), taskUser.getTaskId(), taskUser.getUserId());
                    List<TaskDaliyMongo> taskDaliyMongoList = new ArrayList<TaskDaliyMongo>();
@@ -979,6 +1000,11 @@
        if (existed) {
            throw new BadRequestException("任务名称重复");
        }
        // 更新漫剧结算计费
        if (resources.getTaskStatus().equals(Constant.TASK_STATUS_COMPLETED)) {
            this.changeStatus(Arrays.asList(resources.getId()).toArray(new String[0]));
        }
        return mongoTemplate.save(resources);
    }
@@ -1001,6 +1027,14 @@
                continue;
            }
            mongoTemplate.remove(taskMongo);
            // 删除相关漫剧结算记录
            AnimationSettlementQueryCriteria animationSettlementQueryCriteria = new AnimationSettlementQueryCriteria();
            animationSettlementQueryCriteria.setTaskId(taskMongo.getId());
            List<AnimationSettlement> animationSettlementList = animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,animationSettlementQueryCriteria,criteriaBuilder));
            if (!animationSettlementList.isEmpty()) {
                animationSettlementRepository.deleteAll(animationSettlementList);
            }
        }
        return result;
    }
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java
@@ -15,40 +15,37 @@
 */
package me.zhengjie.modules.task.service.impl;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.*;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.poi.excel.BigExcelWriter;
import cn.hutool.poi.excel.ExcelUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.domain.AnimationSettlement;
import me.zhengjie.modules.project.domain.Project;
import me.zhengjie.modules.project.domain.ProjectType;
import me.zhengjie.modules.project.repository.AnimationSettlementRepository;
import me.zhengjie.modules.project.repository.ProjectRepository;
import me.zhengjie.modules.project.repository.ProjectTypeRepository;
import me.zhengjie.modules.project.service.AnimationSettlementService;
import me.zhengjie.modules.project.service.dto.AnimationSettlementQueryCriteria;
import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl;
import me.zhengjie.modules.system.domain.SysConfigHoliday;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.modules.system.repository.SysConfigHolidayRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.modules.task.domain.*;
import me.zhengjie.modules.task.service.TaskUserService;
import me.zhengjie.modules.task.service.dto.*;
import me.zhengjie.modules.task.service.mapstruct.TaskUserMongoMapper;
import me.zhengjie.modules.task.service.vo.TaskUserMongoVo;
import me.zhengjie.modules.treatment.domain.UserLevelWage;
import me.zhengjie.modules.treatment.repository.UserLevelWageRepository;
import me.zhengjie.utils.*;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddressList;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.bson.types.ObjectId;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
@@ -62,18 +59,20 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.system.domain.SysConfigHoliday;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.SysConfigHolidayRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.modules.task.service.TaskUserService;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddressList;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
 * @author 赵士淞
@@ -94,7 +93,10 @@
    private final WeComServiceImpl weComService;
    private final ProjectRepository projectRepository;
    private final DictDetailRepository dictDetailRepository;
    private final ProjectTypeRepository projectTypeRepository;
    private final AnimationSettlementRepository animationSettlementRepository;
    private final TaskUserMongoMapper taskUserMongoMapper;
    private final AnimationSettlementService animationSettlementService;
//    @Override
//    public TaskUserTotalMongoDto sumTotalByTask(String taskId) {
@@ -177,6 +179,7 @@
            taskUserMongoDto.setTaskStartDate(taskUserMongo.getTaskStartDate());
            taskUserMongoDto.setTaskEndDate(taskUserMongo.getTaskEndDate());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            return taskUserMongoDto;
        }).collect(Collectors.toList());
    }
@@ -203,6 +206,7 @@
            taskUserMongoDto.setTaskStartDate(taskUserMongo.getTaskStartDate());
            taskUserMongoDto.setTaskEndDate(taskUserMongo.getTaskEndDate());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            return taskUserMongoDto;
        }).collect(Collectors.toList());
    }
@@ -229,6 +233,7 @@
            taskUserMongoDto.setTaskStartDate(taskUserMongo.getTaskStartDate());
            taskUserMongoDto.setTaskEndDate(taskUserMongo.getTaskEndDate());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            return taskUserMongoDto;
        }).collect(Collectors.toList());
    }
@@ -269,6 +274,7 @@
            dto.setTaskStartDate(item.getTaskStartDate());
            dto.setTaskEndDate(item.getTaskEndDate());
            dto.setRid(item.getRid());
            dto.setRejectCount(item.getRejectCount());
            //List<TaskDaliyMongo> daliyMongoList = mongoTemplate.find(Query.query(new Criteria("userId").is(SecurityUtils.getCurrentUserId()).and("taskUserMongo.id").is(item.getId())), TaskDaliyMongo.class);
@@ -301,10 +307,14 @@
    @Override
    public void changeStatus(String[] ids) {
        List<ProjectType> projectTypeList = projectTypeRepository.findByName(Constant.ANIME_PROJECT_TYPE_BUDGET);
        Arrays.stream(ids).forEach(item -> {
            TaskUserMongo mongoTemplateById = mongoTemplate.findById(item, TaskUserMongo.class);
            mongoTemplateById.setTaskStatus("task_status_completed");
            mongoTemplate.save(mongoTemplateById);
            TaskUserMongo taskUserMongo = mongoTemplate.findById(item, TaskUserMongo.class);
            taskUserMongo.setTaskStatus(Constant.TASK_STATUS_COMPLETED);
            mongoTemplate.save(taskUserMongo);
            // 漫剧结算计费
            animationSettlementService.generateByTaskUser(taskUserMongo, projectTypeList);
        });
    }
@@ -361,9 +371,9 @@
        for (Long userId : containUserList) {
            TaskDetail taskDetail = new TaskDetail();
            AtomicReference<Double> assignedWork = new AtomicReference<>(0D);
            List<TaskUserMongo> taskUserMongoList = mongoTemplate.find(Query.query(new Criteria("userId").is(userId).and("task._id").is(taskMongoId).and("taskStatus").ne("task_status_completed")), TaskUserMongo.class);
            List<TaskUserMongo> taskUserMongoList = mongoTemplate.find(Query.query(new Criteria("userId").is(userId).and("task._id").is(taskMongoId).and("taskStatus").ne(Constant.TASK_STATUS_COMPLETED)), TaskUserMongo.class);
            for (String taskId : taskIds) {
                taskUserMongoList.addAll(mongoTemplate.find(Query.query(new Criteria("userId").is(userId).and("task._id").is(taskId).and("taskStatus").ne("task_status_completed")), TaskUserMongo.class));
                taskUserMongoList.addAll(mongoTemplate.find(Query.query(new Criteria("userId").is(userId).and("task._id").is(taskId).and("taskStatus").ne(Constant.TASK_STATUS_COMPLETED)), TaskUserMongo.class));
            }
            taskDetail.setNickName(userRepository.findById(userId).get().getNickName());
            taskUserMongoList.forEach(item -> {
@@ -460,6 +470,7 @@
                }
                taskUserMongo.setPerformanceHours(taskUserMongo.getTaskHours());
                taskUserMongo.setRid(taskUserMongo.getRid());
                taskUserMongo.setRejectCount(taskUserMongo.getRejectCount());
//                if (taskGenerate.getUserIds() != null) {
//                    List<UserLevelWage> userLevelWageList = userLevelWageRepository.findUserLevelWageByUserId(Long.valueOf(taskGenerate.getUserIds()));
//                    if (userLevelWageList.size() > 0) {
@@ -526,12 +537,12 @@
        // 在任务状态信息中添加数据
        String[][] statuses = {
                {"未开始", "task_status_not_started"},
                {"进行中", "task_status_in_hand"},
                {"待测试", "task_status_test"},
                {"已暂停", "task_status_stop"},
                {"已完成", "task_status_completed"},
                {"未承认", "task_status_unrecognized"}
                {"未开始", Constant.TASK_STATUS_NOT_STARTED},
                {"进行中", Constant.TASK_STATUS_IN_HAND},
                {"待测试", Constant.TASK_STATUS_TEST},
                {"已暂停", Constant.TASK_STATUS_STOP},
                {"已完成", Constant.TASK_STATUS_COMPLETED},
                {"未承认", Constant.TASK_STATUS_UNRECOGNIZED}
        };
        for (int i = 0; i < statuses.length; i++) {
@@ -729,6 +740,13 @@
            taskUserMongoDto.setTaskEndDate(taskUserMongo.getTaskEndDate());
            taskUserMongoDto.setTaskHours(taskUserMongo.getTaskHours());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            if (StringUtils.isNotBlank(taskUserMongo.getRid())) {
                TaskUserMongo pTaskUserMongo = mongoTemplate.findById(taskUserMongo.getRid(), TaskUserMongo.class);
                if (ObjectUtils.isNotEmpty(pTaskUserMongo)) {
                    taskUserMongoDto.setRname(pTaskUserMongo.getName());
                }
            }
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            if (daliyMongoList.size() == 0) {
                //没有日报
@@ -809,8 +827,11 @@
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            if (StringUtils.isNotBlank(taskUserMongo.getRid())) {
                TaskUserMongo pTaskUserMongo = mongoTemplate.findById(taskUserMongo.getRid(), TaskUserMongo.class);
                taskUserMongoDto.setRname(pTaskUserMongo.getName());
                if (ObjectUtils.isNotEmpty(pTaskUserMongo)) {
                    taskUserMongoDto.setRname(pTaskUserMongo.getName());
                }
            }
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            if (daliyMongoList.size() == 0) {
                //没有日报
@@ -936,7 +957,7 @@
            if (daliys.size() != 0) {
                taskUserMongoDto.setStart(true);
            }
            if (taskUserMongo.getTaskStatus().equals("task_status_completed")) {
            if (taskUserMongo.getTaskStatus().equals(Constant.TASK_STATUS_COMPLETED)) {
                taskUserMongoDto.setOk(true);
            }
            if (taskUserMongo.getUserId() != null) {
@@ -954,6 +975,7 @@
            taskUserMongoDto.setTaskEndDate(taskUserMongo.getTaskEndDate());
            taskUserMongoDto.setTaskHours(taskUserMongo.getTaskHours());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            List<TaskDaliyMongo> daliyMongoList = mongoTemplate.find(new Query(new Criteria("taskUserMongo.id").is(taskUserMongo.getId())), TaskDaliyMongo.class);
@@ -1049,6 +1071,7 @@
            taskUserMongoDto.setTaskEndDate(taskUserMongo.getTaskEndDate());
            taskUserMongoDto.setTaskHours(taskUserMongo.getTaskHours());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            //这个人的绩效绩点
            if (taskUserMongo.getUserId() == null) {
                //如果当前的任务没有指定任务负责人就设置整体的绩效绩点为1
@@ -1104,6 +1127,7 @@
            taskUserMongoDto.setTaskHours(taskUserMongo.getTaskHours());
            taskUserMongoDto.setRid(taskUserMongo.getRid());
            taskUserMongoDto.setPerformanceHours(taskUserMongo.getTaskHours());
            taskUserMongoDto.setRejectCount(taskUserMongo.getRejectCount());
            resultList.add(taskUserMongoDto);
        }
@@ -1215,6 +1239,7 @@
                taskUserMongo.setPerformanceHours(resources.getTaskHours());
                taskUserMongo.setRid(resources.getRid());
                taskUserMongo.setUid(resources.getUid());
                taskUserMongo.setRejectCount(resources.getRejectCount());
                mongoTemplate.save(taskUserMongo);
                if (userId != null) {
                    // 发送给审批人企微
@@ -1262,6 +1287,7 @@
            taskUserMongo.setRid(resources.getRid());
            taskUserMongo.setUid(resources.getUid());
            taskUserMongo.setRejectCount(resources.getRejectCount());
            mongoTemplate.save(taskUserMongo);
@@ -1307,6 +1333,7 @@
        taskUserMongo.setRid(resources.getRid());
        taskUserMongo.setUid(resources.getUid());
        taskUserMongo.setRejectCount(resources.getRejectCount());
//        Double coefficientByUserId;
//        if (resources.isOk()) {
@@ -1323,6 +1350,11 @@
        taskUserMongo.setPerformanceHours(taskUserMongo.getTaskHours());
        mongoTemplate.save(taskUserMongo);
        // 更新漫剧结算计费
        if (taskUserMongo.getTaskStatus().equals(Constant.TASK_STATUS_COMPLETED)) {
            this.changeStatus(Arrays.asList(resources.getId()).toArray(new String[0]));
        }
//        if (resources.getUserId() == null) {
//            //如果没有分配人员
@@ -1379,7 +1411,8 @@
    }
    @Override
    public void deleteAll(String[] ids) { // TODO
    public void deleteAll(String[] ids) {
        // TODO
        for (String id : ids) {
            List<TaskDaliyMongo> daliyMongoList = mongoTemplate.find(Query.query(new Criteria("taskUserMongo._id").is(id)), TaskDaliyMongo.class);
            if (daliyMongoList.size() > 0) {
@@ -1390,6 +1423,14 @@
                throw new BadRequestException("当前分配任务已启动复核!");
            }
            mongoTemplate.remove(Query.query(Criteria.where("id").is(new ObjectId(id))), TaskUserMongo.class);
            // 删除相关漫剧结算记录
            AnimationSettlementQueryCriteria animationSettlementQueryCriteria = new AnimationSettlementQueryCriteria();
            animationSettlementQueryCriteria.setTaskUserId(id);
            List<AnimationSettlement> animationSettlementList = animationSettlementRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,animationSettlementQueryCriteria,criteriaBuilder));
            if (!animationSettlementList.isEmpty()) {
                animationSettlementRepository.deleteAll(animationSettlementList);
            }
        }
//        mongoTemplate.remove(Query.query(Criteria.where("id").in(ids)), getClass());
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/vo/TaskUserMongoVo.java
@@ -43,6 +43,9 @@
    private String rid;
    /** 驳回数量 */
    private Integer rejectCount;
    /**
     * 多用户id
     */
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/domain/UserLevelWage.java
@@ -95,6 +95,14 @@
    @ApiModelProperty(value = "备注")
    private String remarks;
    @Column(name = "`monthly_produce_minutes`")
    @ApiModelProperty(value = "月度标准制作分钟")
    private BigDecimal monthlyProduceMinutes = BigDecimal.ZERO;
    @Column(name = "`monthly_review_minutes`")
    @ApiModelProperty(value = "月度标准审核分钟")
    private BigDecimal monthlyReviewMinutes = BigDecimal.ZERO;
    public void copy(UserLevelWage source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreProperties("id").setIgnoreNullValue(true));
    }
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/service/dto/UserLevelWageDto.java
@@ -69,4 +69,10 @@
    /** 备注 */
    private String remarks;
    /** 月度标准制作分钟 */
    private BigDecimal monthlyProduceMinutes;
    /** 月度标准审核分钟 */
    private BigDecimal monthlyReviewMinutes;
}
eladmin-web-master/src/api/task/animationSettlement.js
New file
@@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
  return request({
    url: 'api/animationSettlement',
    method: 'post',
    data
  })
}
export function del(ids) {
  return request({
    url: 'api/animationSettlement/',
    method: 'delete',
    data: ids
  })
}
export function edit(data) {
  return request({
    url: 'api/animationSettlement',
    method: 'put',
    data
  })
}
export default { add, edit, del }
eladmin-web-master/src/utils/constant.js
@@ -421,6 +421,9 @@
// 邮寄类型
export const MAIL_METHOD = 'mail_method'
// 漫剧结算状态
export const ANIME_SETTLEMENT_STATUS = 'anime_settlement_status'
export default {
  ROLE_LEVEL_SUPER,
  ROLE_LEVEL_GENERAL,
@@ -611,5 +614,6 @@
  REIMBURSE_APPROVE_STATUS_REFUSE,
  REIMBURSE_TYPE,
  REIMBURSE_EXPENSE_TYPE,
  MAIL_METHOD
  MAIL_METHOD,
  ANIME_SETTLEMENT_STATUS
}
eladmin-web-master/src/views/task/animeManage/index.vue
New file
@@ -0,0 +1,140 @@
<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">
      <div>
        <!-- <el-date-picker
          v-model="query.outStartTime"
          type="daterange"
          clearable
          class="date-item"
          value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="选择日期时间"
          range-separator=" : "
          start-placeholder="开始时间"
          end-placeholder="开始时间"
        />
        <el-date-picker
          v-model="query.outEndTime"
          type="daterange"
          clearable
          class="date-item"
          value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="选择日期时间"
          range-separator=" : "
          start-placeholder="结束时间"
          end-placeholder="结束时间"
        /> -->
        <el-date-picker
          v-model="query.acceptanceTimeRange"
          type="monthrange"
          range-separator=":"
          start-placeholder="开始月份"
          end-placeholder="结束月份"
          value-format="yyyy-MM-01 00:00:00"
          clearable
          class="date-item"
          style="width: 370px !important;"
        />
        <rrOperation />
      </div>
      <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
      <crudOperation :permission="permission" />
      <!--表单组件-->
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px">
          <el-form-item label="审批说明">
            <el-input v-model="form.approvalDescription" type="textarea" rows="3" style="width: 340px;" disabled />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="text" @click="crud.cancelCU">取消</el-button>
          <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
        </div>
      </el-dialog>
      <!--表格渲染-->
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" row-key="id" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="projectName" label="项目名" min-width="140" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag>{{ scope.row.projectName }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="漫剧名" min-width="140" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag>{{ scope.row.name }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="settlementStatus" label="结算状态" width="100" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag :type="scope.row.settlementStatus === '0' ? 'danger' : 'success'">{{ dict.label[dictAnimeSettlementStatus][scope.row.settlementStatus] }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="acceptanceTime" label="结算时间" width="120" show-overflow-tooltip>
          <template slot-scope="scope">
            {{ parseTime(scope.row.acceptanceTime, '{y}-{m}-{d}') }}
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </div>
</template>
<script>
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import { mapGetters } from 'vuex'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import constant from '@/utils/constant'
const defaultForm = { id: null, projectId: null, projectName: null, parent: null, name: null, tagList: null, userIdList: null, containUserList: null, performanceType: null, planStartTime: null, planEndTime: null, planHours: null, sumPlanHours: null, consumedHours: null, performanceHours: null, taskStatus: null, description: null, acceptanceTime: null, settlementStatus: null }
export default {
  name: 'AnimeManege',
  components: { pagination, crudOperation, rrOperation },
  mixins: [presenter(), header(), form(defaultForm), crud()],
  cruds() {
    return CRUD({ title: '漫剧管理', url: 'api/animationSettlement/anime', idField: 'id', sort: '', optShow: { add: false, edit: false, del: false, download: false }})
  },
  // 数据字典
  dicts: [constant.ANIME_SETTLEMENT_STATUS],
  data() {
    return {
      permission: {
        add: ['admin', 'animationSettlement:add'],
        edit: ['admin', 'animationSettlement:edit'],
        del: ['admin', 'animationSettlement:del'],
        download: ['admin', 'animationSettlement:download']
      },
      rules: {},
      dictAnimeSettlementStatus: constant.ANIME_SETTLEMENT_STATUS
    }
  },
  computed: {
    ...mapGetters(['user'])
  },
  methods: {
  }
}
</script>
<style scoped>
.form-item {
  width: 100%;
  display: flex;
  margin-bottom: 20px;
}
.form-item-label {
  width: 20%;
  display: flex;
  padding-left: 20px;
}
.form-item-value {
  width: 80%;
  display: flex;
  padding-left: 25px;
  padding-right: 25px;
}
</style>
eladmin-web-master/src/views/task/personalCommission/index.vue
New file
@@ -0,0 +1,146 @@
<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">
      <div>
        <!-- <el-date-picker
          v-model="query.outStartTime"
          type="daterange"
          clearable
          class="date-item"
          value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="选择日期时间"
          range-separator=" : "
          start-placeholder="开始时间"
          end-placeholder="开始时间"
        />
        <el-date-picker
          v-model="query.outEndTime"
          type="daterange"
          clearable
          class="date-item"
          value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="选择日期时间"
          range-separator=" : "
          start-placeholder="结束时间"
          end-placeholder="结束时间"
        /> -->
        <el-date-picker
          v-model="query.acceptanceTimeRange"
          type="monthrange"
          range-separator=":"
          start-placeholder="开始月份"
          end-placeholder="结束月份"
          value-format="yyyy-MM-01 00:00:00"
          clearable
          class="date-item"
          style="width: 370px !important;"
        />
        <rrOperation />
      </div>
      <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
      <crudOperation :permission="permission" />
      <!--表单组件-->
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px">
          <el-form-item label="审批说明">
            <el-input v-model="form.approvalDescription" type="textarea" rows="3" style="width: 340px;" disabled />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="text" @click="crud.cancelCU">取消</el-button>
          <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
        </div>
      </el-dialog>
      <!--表格渲染-->
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" row-key="id" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="acceptanceTime" label="时间" width="100" show-overflow-tooltip>
          <template slot-scope="scope">
            {{ parseTime(scope.row.acceptanceTime, '{y}-{m}-{d}') }}
          </template>
        </el-table-column>
        <el-table-column prop="produceCommission" label="制作提成" min-width="140" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag type="success">{{ scope.row.produceCommission }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="produceDeduction" label="制作扣除" min-width="140" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag type="danger">{{ scope.row.produceDeduction }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="gachaCoefficient" label="抽卡系数" width="80" show-overflow-tooltip />
        <el-table-column prop="commissionPrice" label="提成单价" width="80" show-overflow-tooltip />
        <el-table-column prop="excessProduceMinutes" label="超额时长" width="80" show-overflow-tooltip />
        <el-table-column prop="reviewCommission" label="审核提成" min-width="140" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag type="success">{{ scope.row.reviewCommission }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="reviewDeduction" label="审核扣除" min-width="140" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag type="danger">{{ scope.row.reviewDeduction }}</el-tag>
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </div>
</template>
<script>
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import { mapGetters } from 'vuex'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
const defaultForm = { id: null, userId: null, projectId: null, taskId: null, taskUserId: null, acceptanceTime: null, taskSeconds: null, pointsConsumed: null, issueCount: null, rejectCount: null, settlementStatus: null, taskType: null, costHours: null, produceCommission: null, produceDeduction: null, reviewCommission: null, reviewDeduction: null, gachaCoefficient: null, commissionPrice: null, excessProduceMinutes: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
export default {
  name: 'PersonalCommission',
  components: { pagination, crudOperation, rrOperation },
  mixins: [presenter(), header(), form(defaultForm), crud()],
  cruds() {
    return CRUD({ title: '我的提成', url: 'api/animationSettlement/personal', idField: 'id', sort: '', optShow: { add: false, edit: false, del: false, download: false }})
  },
  // 数据字典
  dicts: [],
  data() {
    return {
      permission: {
        add: ['admin', 'animationSettlement:add'],
        edit: ['admin', 'animationSettlement:edit'],
        del: ['admin', 'animationSettlement:del'],
        download: ['admin', 'animationSettlement:download']
      },
      rules: {}
    }
  },
  computed: {
    ...mapGetters(['user'])
  },
  methods: {
  }
}
</script>
<style scoped>
.form-item {
  width: 100%;
  display: flex;
  margin-bottom: 20px;
}
.form-item-label {
  width: 20%;
  display: flex;
  padding-left: 20px;
}
.form-item-value {
  width: 80%;
  display: flex;
  padding-left: 25px;
  padding-right: 25px;
}
</style>
eladmin-web-master/src/views/task/taskDaliy/index.vue
@@ -273,6 +273,17 @@
          <el-form-item>
            本任务已消耗工时:{{ (1 * form.alreadyConsumedHours).toFixed(2) }} / 本任务总工时:{{ (1 * form.taskHours).toFixed(2) }}
          </el-form-item>
          <el-form-item label="成品时长" prop="taskSeconds">
            <el-input v-model="form.taskSeconds" style="width: 340px;">
              <template slot="append">秒</template>
            </el-input>
          </el-form-item>
          <el-form-item v-if="form.taskUserMongo && form.taskUserMongo.rid" label="问题数量" prop="issueCount">
            <el-input v-model="form.issueCount" style="width: 340px;" />
          </el-form-item>
          <el-form-item v-else label="消耗积分" prop="pointsConsumed">
            <el-input v-model="form.pointsConsumed" style="width: 340px;" />
          </el-form-item>
          <el-form-item label="消耗工作量" prop="consumedWorkload">
            <el-input v-model="form.consumedWorkload" style="width: 340px;" />
          </el-form-item>
@@ -463,7 +474,7 @@
import crudAttendance from '@/api/attendance/attendance'
import crudUser from '@/api/system/user'
const defaultForm = { id: null, projectId: null, taskId: null, taskName: null, taskMongoId: null, taskUserMongo: {}, userId: null, fillDate: null, consumedHours: null, todayFixedHours: 0, todayAttendanceHours: 0, alreadyConsumedHours: 0, taskHours: 0, consumedWorkload: null, consumedWorkloadUnit: null, taskProgress: null, settlementStatus: constant.SETTLEMENT_STATUS_UNSETTLED, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
const defaultForm = { id: null, projectId: null, taskId: null, taskName: null, taskMongoId: null, taskUserMongo: {}, userId: null, fillDate: null, consumedHours: null, todayFixedHours: 0, todayAttendanceHours: 0, alreadyConsumedHours: 0, taskHours: 0, consumedWorkload: null, consumedWorkloadUnit: null, taskProgress: null, settlementStatus: constant.SETTLEMENT_STATUS_UNSETTLED, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null, taskSeconds: null, pointsConsumed: null, issueCount: null }
export default {
  name: 'TaskDaliy',
  components: { pagination, crudOperation, rrOperation, udOperation },
@@ -744,6 +755,7 @@
        this.form.taskUserMongo.name = this.currentTask.name
        this.form.taskUserMongo.taskStartDate = this.currentTask.taskStartDate
        this.form.taskUserMongo.taskEndDate = this.currentTask.taskEndDate
        this.form.taskUserMongo.rid = this.currentTask.rid
        this.form.taskProgress = this.currentTask.taskProgress
        this.fetchAlreadyConsumedHours()
eladmin-web-master/src/views/task/taskUser/index.vue
@@ -523,6 +523,11 @@
                >小时</template>
              </el-input>
            </el-form-item>
            <el-form-item v-show="form.rid !== null" label="驳回数量" prop="rejectCount">
              <el-input v-model="form.rejectCount" style="width: 340px;">
                <template slot="append">个</template>
              </el-input>
            </el-form-item>
            <el-form-item label="UID" prop="uid">
              <el-input
                v-model="form.uid"
@@ -772,6 +777,7 @@
  uid: null,
  rid: null,
  rname: null,
  rejectCount: null,
  // 多选用户id
  userIds: [],
  // 用于新增用户时单选或多选
eladmin-web-master/src/views/treatment/userLevelWage/index.vue
@@ -31,8 +31,8 @@
        >生成</el-button>
      </crudOperation>
      <!--表单组件-->
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
      <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="520px">
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px">
          <el-form-item label="员工" prop="userId">
            <el-select v-model="form.userId" filterable clearable placeholder="请选择员工" :disabled="crud.status.add == 0" style="width: 370px;" @change="changeUserId">
              <el-option
@@ -92,6 +92,12 @@
          <el-form-item label="加班补助" prop="overTimeWage">
            <el-input v-model="form.overTimeWage" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="制作(分钟/月)" prop="monthlyProduceMinutes">
            <el-input v-model="form.monthlyProduceMinutes" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="审核(分钟/月)" prop="monthlyReviewMinutes">
            <el-input v-model="form.monthlyReviewMinutes" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="备注">
            <el-input v-model="form.remarks" style="width: 370px;" />
          </el-form-item>
@@ -136,6 +142,16 @@
            </template>
          </template>
        </el-table-column>
        <el-table-column prop="monthlyProduceMinutes" label="制作(分钟/月)">
          <template slot-scope="scope">
            {{ crud.toMoney(scope.row.monthlyProduceMinutes) }}
          </template>
        </el-table-column>
        <el-table-column prop="monthlyReviewMinutes" label="审核(分钟/月)">
          <template slot-scope="scope">
            {{ crud.toMoney(scope.row.monthlyReviewMinutes) }}
          </template>
        </el-table-column>
        <el-table-column prop="locked" label="锁定状态" />
        <el-table-column prop="remarks" label="备注" />
        <el-table-column v-if="checkPer(['admin','userLevelWage:edit','userLevelWage:del'])" label="操作" width="150px" align="center">
@@ -177,7 +193,7 @@
import crudUser from '@/api/system/user'
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
const defaultForm = { id: null, userId: null, yearMonth: null, level: null, rank: null, basicWage: null, rankWage: null, performanceWage: null, overTimeWage: null, locked: 0, remarks: null }
const defaultForm = { id: null, userId: null, yearMonth: null, level: null, rank: null, basicWage: null, rankWage: null, performanceWage: null, overTimeWage: null, locked: 0, remarks: null, monthlyProduceMinutes: null, monthlyReviewMinutes: null }
export default {
  name: 'UserLevelWage',
  components: { pagination, crudOperation, rrOperation, udOperation, UploadExcelComponent },