cy
2023-10-26 5d7ab4ea0ef70f7930cc7b3a4209ded1b1c83115
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
package com.consum.base.service;
 
import com.consum.model.po.WhFormOutput;
import com.walker.infrastructure.utils.CollectionUtils;
import com.walker.jdbc.service.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
import java.util.HashMap;
import java.util.List;
 
/**
 * @ClassName WhFormOutputService
 * @Author cy
 * @Date 2023/10/26
 * @Description
 * @Version 1.0
 **/
@Slf4j
@Service
public class LWhFormOutputService extends BaseServiceImpl {
 
    /**
     * 通过调拨单查询出库单id
     *
     * @param transBusinessId
     * @return
     */
    private static String QUEYR_ID_BY_TRANSFERID = "select id from L_WH_FORM_OUTPUT where TRANS_BUSINESS_ID =:transBusinessId limit 1";
 
    public Long queyrIdByTransferId(Long transBusinessId) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("transBusinessId", transBusinessId);
        List<WhFormOutput> whFormOutputs = select(QUEYR_ID_BY_TRANSFERID, map, new WhFormOutput());
        if (CollectionUtils.isEmpty(whFormOutputs)) {
            return null;
        }
        return whFormOutputs.get(0).getId();
    }
}