|
@@ -593,7 +593,7 @@ func init_CRM_16_7() {
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
condition = " AND product_id = 2 AND status != 2 AND rai_contract_type = '续约合同' AND is_hand = 0 ORDER BY company_contract_id ASC "
|
|
|
- condition = " AND product_id = 2 AND status != 2 ORDER BY company_contract_id ASC "
|
|
|
+ condition = " AND product_id = 2 AND status != 2 ORDER BY company_contract_id ASC "
|
|
|
companyContractList, e := company.GetCompanyContractList(condition, pars)
|
|
|
if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
fmt.Println(e)
|
|
@@ -668,6 +668,7 @@ func UpdateCompanyContractInheritEndDate(companyContractId int) {
|
|
|
err = errors.New("GetCompanyContractList, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ //fmt.Println("companyContractList2", len(companyContractList2), "id", contractInfo.CompanyContractId, "contractInfo.EndDate", contractInfo.EndDate)
|
|
|
if len(companyContractList2) == 1 {
|
|
|
for _, v := range companyContractList2 {
|
|
|
e = company.UpdateCompanyContractInheritEndDate(v.EndDate, v.CompanyContractId, contractInfo.CompanyContractId)
|
|
@@ -679,12 +680,12 @@ func UpdateCompanyContractInheritEndDate(companyContractId int) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- ////上面两个要是都找不到,就把自身的结束时间作为,续约的结束时间
|
|
|
- //e = company.UpdateCompanyContractInheritEndDate(contractInfo.StartDate, contractInfo.CompanyContractId, contractInfo.CompanyContractId)
|
|
|
- //if e != nil {
|
|
|
- // err = errors.New("UpdateCompanyContractInheritEndDate, Err: " + e.Error())
|
|
|
- // return
|
|
|
- //}
|
|
|
+ ////上面两个要是都找不到,就把自身的开始时间作为,续约的结束时间
|
|
|
+ e = company.UpdateCompanyContractInheritEndDate(contractInfo.StartDate, contractInfo.CompanyContractId, contractInfo.CompanyContractId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("UpdateCompanyContractInheritEndDate, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
|