2 天以前 69dc6b16ef04bdfbfa65f77c169c0847dc7e65c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.ruoyi.production.service.impl;
 
import com.ruoyi.production.bean.dto.UserAccountDto;
import com.ruoyi.production.bean.dto.UserProductionAccountingDto;
import com.ruoyi.production.mapper.ProductionAccountMapper;
import com.ruoyi.production.service.SalesLedgerProductionAccountingService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
 
@Service
@RequiredArgsConstructor
public class SalesLedgerProductionAccountingServiceImpl implements SalesLedgerProductionAccountingService {
 
    private final ProductionAccountMapper productionAccountMapper;
 
    @Override
    public UserAccountDto getByUserId(UserProductionAccountingDto dto) {
        if (dto == null || dto.getUserId() == null || dto.getDate() == null || dto.getDate().trim().isEmpty()) {
            return new UserAccountDto();
        }
        UserAccountDto result = productionAccountMapper.selectUserAccount(dto.getUserId(), dto.getDate());
        return result == null ? new UserAccountDto() : result;
    }
}