zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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.changhong.epc.parsing.service.ruleCheckMsg.impl;
 
import com.changhong.epc.bean.tenant.bill.RuleCheckMsg;
import com.changhong.epc.parsing.mapper.tenant.BillInfoMapper;
import com.changhong.epc.parsing.mapper.tenant.RuleCheckMsgMapper;
import com.changhong.epc.parsing.service.ruleCheckMsg.RuleCheckMsgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
@Slf4j
@Service 
public class RuleCheckMsgServiceImpl implements RuleCheckMsgService{
    
    @Resource
    RuleCheckMsgMapper ruleCheckMsgMapper;
    
    @Resource
    BillInfoMapper billInfoMapper;
 
    @Override
    public int insertRuleCheckMsg(RuleCheckMsg ruleCheckMsg) {
        ruleCheckMsg.setDataStart(99);
        ruleCheckMsgMapper.updateByPrimaryKey(ruleCheckMsg);
        ruleCheckMsg.setDataStart(0);
        int i = ruleCheckMsgMapper.insert(ruleCheckMsg);
        if(i>0){
            log.debug("********规则检查成功!!!");
            log.debug("********修改票据状态!!!");
            int b = billInfoMapper.updateBillState(ruleCheckMsg.getOrderCode());
            if(b>0){
                log.debug("********修改票据状态成功!!!");
            }else{
                log.debug("********票据为不可分配状态!!!");
            }
        }
        return i;
    }
 
}