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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.changhong.epc.form.service.tenant.contract.impl;
 
import com.changhong.epc.bean.tenant.system.SystemForm;
import com.changhong.epc.constter.base.BaseConst;
import com.changhong.epc.constter.system.businesscode.BudgetBusinessMeaningCode;
import com.changhong.epc.form.mapper.tenant.contract.FormContractMassageMapper;
import com.changhong.epc.form.service.budget.impl.GetConstant;
import com.changhong.epc.form.service.tenant.contract.FormContractMassageService;
import com.iemsoft.framework.cloud.core.thread.ThreadData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
 
@Slf4j
@Service("FormContractMassageService")
public class FormContractMassageServiceImpl implements FormContractMassageService,BaseConst,BudgetBusinessMeaningCode{
    @Resource
    private FormContractMassageMapper formContractMassageMapper;
    
    @Override
    public List<Map<String, String>> getContractMassage(String dataRowNum) {
        List<Map<String,String>> list= new ArrayList<Map<String,String>>();
        String tenantId =Objects.toString(ThreadData.get(TENANT_ID));
        String conFromId = GetConstant.getFormIdGetConstant(CONTRACT);
        //String conFromId ="96cecf4c7a690743db7a8667614f";
        Map<String , String> map = formContractMassageMapper.selectOneContract(dataRowNum, tenantId, conFromId);
        if(map != null && map.get("DATAROWNUM")!=null){
            //"a38a889670ec374f8d7bc077c57f";
            
            String ysFormId = GetConstant.getFormIdGetConstant(SystemForm.CONTRACT_EXPEND_FORM_ID.name());
            
            String paymentAmount = GetConstant.getFormIdGetConstant(PAYMENTAMOUNT);
            String paymentStage = GetConstant.getFormIdGetConstant(PAYMENTSTAGE);
            
            list= formContractMassageMapper.selectContractMoney(dataRowNum, tenantId, ysFormId,paymentAmount,paymentStage);
        }else{
            list=null;
        }
        return list;
    }
 
    @Override
    public List<Map<String, String>> getAllContractMassage(String dataRowNum) {
        List<Map<String,String>> list= new ArrayList<Map<String,String>>();
        String tenantId =Objects.toString(ThreadData.get(TENANT_ID));
 
        String ysFormId = GetConstant.getFormIdGetConstant(SystemForm.CONTRACT_EXPEND_FORM_ID.name());
        String paymentAmount = GetConstant.getFormIdGetConstant(PAYMENTAMOUNT);
        String paymentStage = GetConstant.getFormIdGetConstant(PAYMENTSTAGE);
        
        list= formContractMassageMapper.selectAllContractMoney(dataRowNum, tenantId, ysFormId,paymentAmount,paymentStage);
        // TODO Auto-generated method stub
        return list;
    }
 
}