import _ from 'lodash' /** * 前端公式 获取基础数据包含的子基础数据的code * @author fengjiansheng * @data 2021-08-22 */ export default { execute: function () { console.log("s1 GetBaseDataSonCode") if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) { // TODO 参数校验 if(arguments[0][0] && arguments[0][0].getResult() && arguments[0][0].getResult().Value){ let temp1 = arguments[0][0].getResult().Value let temp2 = arguments[0][1].StaticValue.toLowerCase() let temp3 = temp1[temp2] if (_.isEmpty(temp3)) { temp3 = temp1[arguments[0][1].StaticValue] } if (_.isEmpty(temp3)) { return null; }else{ return temp3.split("||")[0] } } } }, getResultType: function () { return FMR.ConstDataTypes.String } }