|
|
@@ -354,13 +354,13 @@ func (s CtrContractService) Add(ctx context.Context, req *model.CtrContractAddRe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- c, err := s.Dao.Where("contract_name = ?", req.ContractName).One()
|
|
|
- if err != nil {
|
|
|
- return 0, err
|
|
|
- }
|
|
|
- if c != nil {
|
|
|
- return 0, myerrors.TipsError(fmt.Sprintf("合同名称:%s 已存在", req.ContractName))
|
|
|
- }
|
|
|
+ // c, err := s.Dao.Where("contract_name = ?", req.ContractName).One()
|
|
|
+ // if err != nil {
|
|
|
+ // return 0, err
|
|
|
+ // }
|
|
|
+ // if c != nil {
|
|
|
+ // return 0, myerrors.TipsError(fmt.Sprintf("合同名称:%s 已存在", req.ContractName))
|
|
|
+ // }
|
|
|
nbo, err := s.ProjBusinessDao.Where("id = ?", req.NboId).One()
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
@@ -394,7 +394,7 @@ func (s CtrContractService) Add(ctx context.Context, req *model.CtrContractAddRe
|
|
|
if req.ContractCode == "" {
|
|
|
req.ContractCode = fmt.Sprintf("DH%s%s-%03d", req.ContractType, time.Now().Format("0601"), sequence)
|
|
|
}
|
|
|
- c, err = s.Dao.Where("contract_code = ?", req.ContractCode).One()
|
|
|
+ c, err := s.Dao.Where("contract_code = ?", req.ContractCode).One()
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|