2025-10-20 红绿灯情况说明🚥: 60 ⇒ 20 ⇒ 60 ⇒ 0
not done
(scheduled this week) OR (due this week)
exclude sub-items
short mode运维群问题响应
CRM系统
今日细则
/**
* 注册资本带出公司规模
*/
String recordType = context.data.record_type as String
String createAmount = context.data.field_941Sf__c as String ?: "none"
if(recordType == "default__c"){
// 找到“万人民币”在字符串中的位置
def index = createAmount.indexOf("万")
log.info("index: " + index)
// 截取数字部分
if(index != -1){
def numericString = createAmount.substring(0, index)
log.info("numericString: " + numericString)
// 将数字字符串转换为 double
def numericPart = numericString as BigDecimal
// 将“万”转换为实际金额
if(numericPart){
def amount = numericPart * 10000
log.info("金额: " + amount)
if (amount >= 1000000000) {
context.data.company_size__c = "GSGM01SYS"
} else if (amount >= 100000000) {
context.data.company_size__c = "GSGM02SYS"
} else if (amount >= 10000000) {
context.data.company_size__c = "GSGM03SYS"
} else if (amount < 10000000) {
context.data.company_size__c = "GSGM04SYS"
} else {
context.data.company_size__c = "other"
}
}
}
}done 2025-10-20