自动化立体仓库 - WMS系统
zwl
2 天以前 73f677ac03ebcf0f9d2e865dd60d3e4a6c2bc2c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.R;
import com.zy.asrs.entity.InventoryFlowDto;
import com.zy.asrs.entity.WrkMastLog;
import com.zy.asrs.mapper.WrkMastLogMapper;
import com.zy.asrs.service.WrkMastLogService;
import org.springframework.stereotype.Service;
 
import java.util.Date;
import java.util.Map;
 
@Service("wrkMastLogService")
public class WrkMastLogServiceImpl extends ServiceImpl<WrkMastLogMapper, WrkMastLog> implements WrkMastLogService {
 
    @Override
    public boolean save(Integer workNo) {
        return this.baseMapper.save(workNo) > 0;
    }
 
    @Override
    public Long sumCostTimeByWrkSts(Date startTime, Date endTime, Integer wrkSts) {
        Long total = this.baseMapper.sumCostTimeByWrkSts(startTime, endTime, wrkSts);
        return total == null ? 0L : total;
    }
 
    @Override
    public Long countInboundHistoryBySourceStaNo(Date startTime, Date endTime, Integer sourceStaNo) {
        if (sourceStaNo == null) {
            return 0L;
        }
        Long count = this.baseMapper.countInboundHistoryBySourceStaNo(startTime, endTime, sourceStaNo);
        return count == null ? 0L : count;
    }
 
    @Override
    public R inventoryFlowList(Integer curr, Integer limit, Map<String, Object> param) {
        Page<InventoryFlowDto> page = new Page<>();
        page.setCurrent(curr);
        page.setSize(limit);
        page.setTotal(this.baseMapper.inventoryFlowListCount(param));
        page.setRecords(this.baseMapper.inventoryFlowList(curr, limit, param));
        return R.ok(page);
    }
 
}